|
gloox
0.9.9.12
|
#include <privacyitem.h>
Public Types | |
| enum | ItemType { TypeUndefined, TypeJid, TypeGroup, TypeSubscription } |
| enum | ItemAction { ActionAllow, ActionDeny } |
| enum | ItemPacketType { PacketMessage = 1, PacketPresenceIn = 2, PacketPresenceOut = 4, PacketIq = 8, PacketAll = 15 } |
Public Member Functions | |
| PrivacyItem (const ItemType type=TypeUndefined, const ItemAction action=ActionAllow, const int packetType=0, const std::string &value="") | |
| virtual | ~PrivacyItem () |
| const ItemType | type () const |
| const ItemAction | action () const |
| const int | packetType () const |
| const std::string | value () const |
| bool | operator== (PrivacyItem &item) const |
This is an abstraction of a single item of a privacy list, describing an allowed or forbidden action.
Definition at line 31 of file privacyitem.h.
| enum ItemAction |
Two possible actions. Only one is allowed at a time.
| ActionAllow |
The item explicitely allows the described packets. |
| ActionDeny |
The item forbids the described packets. |
Definition at line 52 of file privacyitem.h.
| enum ItemPacketType |
The packet type a privacy item affects (blocks). Combinations are allowed.
Definition at line 61 of file privacyitem.h.
| enum ItemType |
Three possible types of an item. Only one is allowed at a time.
| TypeUndefined |
None of the types below is explicitely selected, "fall-through" case. |
| TypeJid |
The item affects the JID which is given in the value attribute. |
| TypeGroup |
The item affects the group which is given in the value attribute and which must exist at least once in the users roster. |
| TypeSubscription |
The item affects the subscription type which is given in the value attribute. |
Definition at line 38 of file privacyitem.h.
| PrivacyItem | ( | const ItemType | type = TypeUndefined, |
| const ItemAction | action = ActionAllow, |
||
| const int | packetType = 0, |
||
| const std::string & | value = "" |
||
| ) |
Constructs a new privacy item.
| type | Action is based on matching JID, Group or Subscription. |
| action | The action to carry out. (Deny or allow.) |
| packetType | Affected packet types. Bit-wise OR'ed ItemPacketType. |
| value | The value to check for and match. |
Definition at line 20 of file privacyitem.cpp.
|
virtual |
Virtual destructor.
Definition at line 27 of file privacyitem.cpp.
|
inline |
Returns the item's action.
Definition at line 95 of file privacyitem.h.
| bool operator== | ( | PrivacyItem & | item | ) | const |
Compares the current PrivacyItem with another one.
| item | The item which shall be compared. |
Definition at line 31 of file privacyitem.cpp.
|
inline |
Returns the packet type the item affects.
Definition at line 101 of file privacyitem.h.
|
inline |
|
inline |
Returns the value of the item's 'value' attribute.
Definition at line 107 of file privacyitem.h.
1.8.1.2