#include <privacyitem.h>
Public Types | |
| TYPE_UNDEFINED | |
| TYPE_JID | |
| TYPE_GROUP | |
| TYPE_SUBSCRIPTION | |
| ACTION_ALLOW | |
| ACTION_DENY | |
| PACKET_MESSAGE = 1 | |
| PACKET_PRESENCE_IN = 2 | |
| PACKET_PRESENCE_OUT = 4 | |
| PACKET_IQ = 8 | |
| PACKET_ALL = 15 | |
| enum | ItemType { TYPE_UNDEFINED, TYPE_JID, TYPE_GROUP, TYPE_SUBSCRIPTION } |
| enum | ItemAction { ACTION_ALLOW, ACTION_DENY } |
| enum | ItemPacketType { PACKET_MESSAGE = 1, PACKET_PRESENCE_IN = 2, PACKET_PRESENCE_OUT = 4, PACKET_IQ = 8, PACKET_ALL = 15 } |
Public Member Functions | |
| PrivacyItem (const ItemType type=TYPE_UNDEFINED, const ItemAction action=ACTION_ALLOW, 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 |
Definition at line 31 of file privacyitem.h.
| enum ItemAction |
Two possible actions. Only one is allowed at a time.
| ACTION_ALLOW | The item explicitely allows the described packets. |
| ACTION_DENY | 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.
| TYPE_UNDEFINED | None of the types below is explicitely selected, "fall-through" case. |
| TYPE_JID | The item affects the JID which is given in the value attribute. |
| TYPE_GROUP | The item affects the group which is given in the value attribute and which must exist at least once in the users roster. |
| TYPE_SUBSCRIPTION | 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 = TYPE_UNDEFINED, |
|
| const ItemAction | action = ACTION_ALLOW, |
|||
| 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.
| ~PrivacyItem | ( | ) | [virtual] |
Virtual destructor.
Definition at line 27 of file privacyitem.cpp.
| const ItemAction action | ( | ) | const [inline] |
Returns the item's action.
Definition at line 95 of file privacyitem.h.
Referenced by PrivacyItem::operator==().
| 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.
| const int packetType | ( | ) | const [inline] |
Returns the packet type the item affects.
Definition at line 101 of file privacyitem.h.
Referenced by PrivacyItem::operator==().
| const ItemType type | ( | ) | const [inline] |
Returns the item type.
Definition at line 89 of file privacyitem.h.
Referenced by PrivacyItem::operator==().
| const std::string value | ( | ) | const [inline] |
Returns the value of the item's 'value' attribute.
Definition at line 107 of file privacyitem.h.
Referenced by PrivacyItem::operator==().
1.4.7