A class for handling incoming IQ Get and Set requests of a specific payload type. More...
 Inheritance diagram for Swift::Responder< PAYLOAD_TYPE >:
 Inheritance diagram for Swift::Responder< PAYLOAD_TYPE >: Collaboration diagram for Swift::Responder< PAYLOAD_TYPE >:
 Collaboration diagram for Swift::Responder< PAYLOAD_TYPE >:| Public Member Functions | |
| Responder (IQRouter *router) | |
| ~Responder () | |
| void | start () | 
| Starts the responder. | |
| void | stop () | 
| Stops the responder. | |
| Protected Member Functions | |
| virtual bool | handleGetRequest (const JID &from, const JID &to, const std::string &id, boost::shared_ptr< PAYLOAD_TYPE > payload)=0 | 
| Handle an incoming IQ-Get request containing a payload of class PAYLOAD_TYPE. | |
| virtual bool | handleSetRequest (const JID &from, const JID &to, const std::string &id, boost::shared_ptr< PAYLOAD_TYPE > payload)=0 | 
| Handle an incoming IQ-Set request containing a payload of class PAYLOAD_TYPE. | |
| void | sendResponse (const JID &to, const std::string &id, boost::shared_ptr< PAYLOAD_TYPE > payload) | 
| Convenience function for sending an IQ response. | |
| void | sendResponse (const JID &to, const JID &from, const std::string &id, boost::shared_ptr< PAYLOAD_TYPE > payload) | 
| Convenience function for sending an IQ response, with a specific from address. | |
| void | sendError (const JID &to, const std::string &id, ErrorPayload::Condition condition, ErrorPayload::Type type, Payload::ref payload=Payload::ref()) | 
| Convenience function for responding with an error. | |
| void | sendError (const JID &to, const JID &from, const std::string &id, ErrorPayload::Condition condition, ErrorPayload::Type type, Payload::ref payload=Payload::ref()) | 
| Convenience function for responding with an error from a specific from address. | |
| IQRouter * | getIQRouter () const | 
A class for handling incoming IQ Get and Set requests of a specific payload type.
Concrete subclasses of this class need to implement handleGetRequest() and handleSetRequest() to implement the behavior of the responder.
| PAYLOAD_TYPE | The type of payload this Responder handles. Only IQ requests containing this payload type will be passed to handleGetRequest() and handleSetRequest() | 
Definition at line 24 of file Responder.h.
| Swift::Responder< PAYLOAD_TYPE >::Responder | ( | IQRouter * | router | ) |  [inline] | 
Definition at line 26 of file Responder.h.
| Swift::Responder< PAYLOAD_TYPE >::~Responder | ( | ) |  [inline] | 
Definition at line 29 of file Responder.h.
| IQRouter* Swift::Responder< PAYLOAD_TYPE >::getIQRouter | ( | ) | const  [inline, protected] | 
Definition at line 97 of file Responder.h.
| virtual bool Swift::Responder< PAYLOAD_TYPE >::handleGetRequest | ( | const JID & | from, | |
| const JID & | to, | |||
| const std::string & | id, | |||
| boost::shared_ptr< PAYLOAD_TYPE > | payload | |||
| ) |  [protected, pure virtual] | 
Handle an incoming IQ-Get request containing a payload of class PAYLOAD_TYPE.
This method is implemented in the concrete subclasses.
| virtual bool Swift::Responder< PAYLOAD_TYPE >::handleSetRequest | ( | const JID & | from, | |
| const JID & | to, | |||
| const std::string & | id, | |||
| boost::shared_ptr< PAYLOAD_TYPE > | payload | |||
| ) |  [protected, pure virtual] | 
Handle an incoming IQ-Set request containing a payload of class PAYLOAD_TYPE.
This method is implemented in the concrete subclasses.
| void Swift::Responder< PAYLOAD_TYPE >::sendError | ( | const JID & | to, | |
| const JID & | from, | |||
| const std::string & | id, | |||
| ErrorPayload::Condition | condition, | |||
| ErrorPayload::Type | type, | |||
| Payload::ref | payload = Payload::ref() | |||
| ) |  [inline, protected] | 
Convenience function for responding with an error from a specific from address.
Definition at line 93 of file Responder.h.
| void Swift::Responder< PAYLOAD_TYPE >::sendError | ( | const JID & | to, | |
| const std::string & | id, | |||
| ErrorPayload::Condition | condition, | |||
| ErrorPayload::Type | type, | |||
| Payload::ref | payload = Payload::ref() | |||
| ) |  [inline, protected] | 
Convenience function for responding with an error.
Definition at line 86 of file Responder.h.
| void Swift::Responder< PAYLOAD_TYPE >::sendResponse | ( | const JID & | to, | |
| const std::string & | id, | |||
| boost::shared_ptr< PAYLOAD_TYPE > | payload | |||
| ) |  [inline, protected] | 
Convenience function for sending an IQ response.
Definition at line 72 of file Responder.h.
| void Swift::Responder< PAYLOAD_TYPE >::sendResponse | ( | const JID & | to, | |
| const JID & | from, | |||
| const std::string & | id, | |||
| boost::shared_ptr< PAYLOAD_TYPE > | payload | |||
| ) |  [inline, protected] | 
Convenience function for sending an IQ response, with a specific from address.
Definition at line 79 of file Responder.h.
| void Swift::Responder< PAYLOAD_TYPE >::start | ( | ) |  [inline] | 
Starts the responder.
After the responder has started, it will start receiving and responding to requests.
Definition at line 39 of file Responder.h.
| void Swift::Responder< PAYLOAD_TYPE >::stop | ( | ) |  [inline] | 
Stops the responder.
When the responder is stopped, it will no longer receive incoming requests.
Definition at line 50 of file Responder.h.
 1.7.1
 1.7.1