gloox
1.1-svn
Main Page
Related Pages
Namespaces
Classes
Files
File List
src
privacyitem.h
1
/*
2
Copyright (c) 2005-2009 by Jakob Schroeter <js@camaya.net>
3
This file is part of the gloox library. http://camaya.net/gloox
4
5
This software is distributed under a license. The full license
6
agreement can be found in the file LICENSE in this distribution.
7
This software may not be copied, modified, sold or distributed
8
other than expressed in the named license agreement.
9
10
This software is distributed without any warranty.
11
*/
12
13
14
#ifndef PRIVACYITEM_H__
15
#define PRIVACYITEM_H__
16
17
#include "gloox.h"
18
19
#include <string>
20
21
namespace
gloox
22
{
23
31
class
GLOOX_API
PrivacyItem
32
{
33
public
:
34
38
enum
ItemType
39
{
40
TypeUndefined,
42
TypeJid
,
43
TypeGroup,
45
TypeSubscription
47
};
48
52
enum
ItemAction
53
{
54
ActionAllow
,
55
ActionDeny
56
};
57
61
enum
ItemPacketType
62
{
63
PacketMessage = 1,
64
PacketPresenceIn = 2,
65
PacketPresenceOut = 4,
66
PacketIq = 8,
67
PacketAll = 15
68
};
69
77
PrivacyItem
(
const
ItemType type = TypeUndefined,
const
ItemAction action = ActionAllow,
78
const
int
packetType = 0,
const
std::string& value =
EmptyString
);
79
83
virtual
~
PrivacyItem
();
84
89
ItemType
type
()
const
{
return
m_type; }
90
95
ItemAction
action
()
const
{
return
m_action; }
96
101
int
packetType
()
const
{
return
m_packetType; }
102
107
const
std::string
value
()
const
{
return
m_value; }
108
114
bool
operator==(
const
PrivacyItem
& item )
const
;
115
116
private
:
117
ItemType m_type;
118
ItemAction m_action;
119
int
m_packetType;
120
std::string m_value;
121
};
122
123
}
124
125
#endif // PRIVACYITEM_H__
Generated on Thu Jun 27 2013 13:43:27 for gloox by
1.8.1.2