Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

AMP Class Reference

This is an implementation of XEP-0079 (Advanced Message Processing) as a StanzaExtension. More...

#include <amp.h>

Inherits StanzaExtension.

Inheritance diagram for AMP:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::list< const Rule * > RuleList
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 }

Public Member Functions

 AMP (bool perhop=false)
 AMP (const Tag *tag)
void addRule (const Rule *rule)
const RuleListrules () const
virtual ~AMP ()
virtual const std::string & filterString () const
virtual StanzaExtensionnewInstance (const Tag *tag) const
virtual Tagtag () const

Classes

class  Rule

Detailed Description

This is an implementation of XEP-0079 (Advanced Message Processing) as a StanzaExtension.

XEP Version: 1.2

Author:
Jakob Schroeter <js@camaya.net>

Vincent Thomasset

Since:
1.0

Definition at line 39 of file amp.h.


Member Typedef Documentation

typedef std::list<const Rule*> RuleList
 

A list of AMP rules.

Definition at line 175 of file amp.h.


Member Enumeration Documentation

enum ActionType
 

Possible actions to take when the corresponding condition is met.

Enumeration values:
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.

enum ConditionType
 

Possible types for a rule's condition.

Enumeration values:
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.

enum DeliverType
 

Possible delivery rules.

Enumeration values:
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.

enum MatchResourceType
 

Possible resource matching rules.

Enumeration values:
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.

enum Status
 

Available Stati.

Enumeration values:
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.

AMP const Tag tag  ) 
 

Constructs a new object from the given Tag.

Parameters:
tag The AMP Tag to parse.

Definition at line 127 of file amp.cpp.

~AMP  )  [virtual]
 

Virtual Destructor.

Definition at line 150 of file amp.cpp.


Member Function Documentation

void addRule const Rule rule  ) 
 

Adds the given rule to the list of rules.

Parameters:
rule The rule to add.

Definition at line 165 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 171 of file amp.cpp.

virtual StanzaExtension* newInstance const Tag tag  )  const [inline, virtual]
 

Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:

 StanzaExtension* FooExtension::newInstance( const Tag* tag ) const
 {
   return new FooExtension( tag );
 }
Returns:
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 211 of file amp.h.

const RuleList& rules  )  const [inline]
 

Returns the current list of rules for inspection.

Returns:
The current list of rules.

Definition at line 200 of file amp.h.

Tag * tag  )  const [virtual]
 

Returns a Tag representation of the extension.

Returns:
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 177 of file amp.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Apr 22 15:10:13 2008 for gloox by  doxygen 1.4.1