#include <amp.h>
Public Types |
enum | ConditionType { ConditionDeliver,
ConditionExpireAt,
ConditionMatchResource,
ConditionInvalid
} |
enum | ActionType {
ActionAlert,
ActionError,
ActionDrop,
ActionNotify,
ActionInvalid
} |
enum | DeliverType {
DeliverDirect,
DeliverForward,
DeliverGateway,
DeliverNone,
DeliverStored,
DeliverInvalid
} |
enum | MatchResourceType { MatchResourceAny,
MatchResourceExact,
MatchResourceOther,
MatchResourceInvalid
} |
enum | Status { StatusAlert,
StatusNotify,
StatusInvalid
} |
typedef std::list< const Rule * > | RuleList |
Detailed Description
This is an implementation of XEP-0079 (Advanced Message Processing) as a StanzaExtension.
XEP Version: 1.2
- Author
- Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
-
Vincent Thomasset
- Since
- 1.0
Definition at line 39 of file amp.h.
Member Typedef Documentation
A list of AMP rules.
Definition at line 175 of file amp.h.
Member Enumeration Documentation
Possible actions to take when the corresponding condition is met.
- Enumerator:
ActionAlert |
Sends back a message stanza with an 'alert' status
|
ActionError |
Sends back a message stanza with an error type
|
ActionDrop |
Silently ignore the message
|
ActionNotify |
Sends back a message stanza with a 'notify' status
|
ActionInvalid |
Invalid action
|
Definition at line 57 of file amp.h.
Possible types for a rule's condition.
- Enumerator:
ConditionDeliver |
Ensures (non-)delivery of the message
|
ConditionExpireAt |
Ensures delivery only before a certain time (UTC)
|
ConditionMatchResource |
Ensures delivery only to a specific resource type
|
ConditionInvalid |
Invalid condition
|
Definition at line 46 of file amp.h.
Possible delivery rules.
- Enumerator:
DeliverDirect |
The message would be immediately delivered to the intended recipient or routed to the next hop.
|
DeliverForward |
The message would be forwarded to another XMPP address or account.
|
DeliverGateway |
The message would be sent through a gateway to an address or account on a non-XMPP system.
|
DeliverNone |
The message would not be delivered at all (e.g., because the intended recipient is offline and message storage is not enabled).
|
DeliverStored |
The message would be stored offline for later delivery to the intended recipient.
|
DeliverInvalid |
Invalid deliver value
|
Definition at line 70 of file amp.h.
Possible resource matching rules.
- Enumerator:
MatchResourceAny |
Destination resource matches any value, effectively ignoring the intended resource.
|
MatchResourceExact |
Destination resource exactly matches the intended resource.
|
MatchResourceOther |
Destination resource matches any value except for the intended resource.
|
MatchResourceInvalid |
Invalid match-resource value
|
Definition at line 89 of file amp.h.
Available Stati.
- Enumerator:
StatusAlert |
The message is a reply to a Alert rule.
|
StatusNotify |
The message is a reply to a Notify rule.
|
StatusInvalid |
Invalid status.
|
Definition at line 103 of file amp.h.
Constructor & Destructor Documentation
AMP |
( |
bool |
perhop = false | ) |
|
Constructs a new object.
- Parameters
-
perhop | Indicates whether the ruleset should be applied to all hops, or at the edge servers only. Default: false (edge servers only) |
Definition at line 121 of file amp.cpp.
Constructs a new object from the given Tag.
- Parameters
-
Definition at line 127 of file amp.cpp.
Member Function Documentation
void addRule |
( |
const Rule * |
rule | ) |
|
Adds the given rule to the list of rules.
- Parameters
-
Definition at line 155 of file amp.cpp.
const std::string & filterString |
( |
| ) |
const |
|
virtual |
Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.
- Returns
- The extension's filter string.
Implements StanzaExtension.
Definition at line 161 of file amp.cpp.
Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:
{
return new FooExtension( tag );
}
- Returns
- The derived extension's new instance.
Implements StanzaExtension.
Definition at line 211 of file amp.h.
Returns the current list of rules for inspection.
- Returns
- The current list of rules.
Definition at line 200 of file amp.h.
Returns a Tag representation of the extension.
- Returns
- A Tag representation of the extension.
Implements StanzaExtension.
Definition at line 167 of file amp.cpp.
The documentation for this class was generated from the following files: