18 #include "adhocplugin.h"
20 #include "disconodehandler.h"
21 #include "discohandler.h"
22 #include "iqhandler.h"
23 #include "stanzaextension.h"
36 class AdhocCommandProvider;
156 : m_severity( sev ), m_note( note ) {}
173 const std::string&
content()
const {
return m_note; }
182 #ifdef ADHOC_COMMANDS_TEST
210 Command(
const std::string& node,
const std::string& sessionid,
Action action,
222 Command(
const std::string& node,
const std::string& sessionid,
Status status,
237 Command(
const std::string& node,
const std::string& sessionid,
Status status,
238 Action executeAction,
int allowedActions = Complete,
268 const std::string&
node()
const {
return m_node; }
274 const std::string&
sessionID()
const {
return m_sessionid; }
323 virtual const std::string& filterString()
const;
332 virtual Tag* tag()
const;
339 NoteList::const_iterator it = m_notes.begin();
340 for( ; it != m_notes.end(); ++it )
341 c->m_notes.push_back(
new Note( *(*it) ) );
344 c->m_sessionid = m_sessionid;
345 c->m_plugin = m_plugin ?
static_cast<AdhocPlugin*
>( m_plugin->clone() ) : 0;
346 c->m_action = m_action;
347 c->m_status = m_status;
348 c->m_actions = m_actions;
354 #ifdef ADHOC_COMMANDS_TEST
360 std::string m_sessionid;
385 void checkSupport(
const JID& remote,
AdhocHandler* ah,
int context = 0 );
394 void getCommands(
const JID& remote,
AdhocHandler* ah,
int context = 0 );
431 const std::string& name );
438 void removeAdhocCommandProvider(
const std::string& command );
441 virtual StringList handleDiscoNodeFeatures(
const JID& from,
const std::string& node );
445 const std::string& node );
448 virtual Disco::ItemList handleDiscoNodeItems(
const JID& from,
const JID& to,
const std::string& node );
451 virtual bool handleIq(
const IQ& iq );
454 virtual void handleIqID(
const IQ& iq,
int context );
457 virtual void handleDiscoInfo(
const JID& from,
const Disco::Info& info,
int context );
460 virtual void handleDiscoItems(
const JID& from,
const Disco::Items& items,
int context );
463 virtual void handleDiscoError(
const JID& from,
const Error* error,
int context );
469 typedef std::map<const std::string, AdhocCommandProvider*> AdhocCommandProviderMap;
470 AdhocCommandProviderMap m_adhocCommandProviders;
482 AdhocContext context;
487 typedef std::map<std::string, TrackStruct> AdhocTrackMap;
488 AdhocTrackMap m_adhocTrackMap;
489 util::Mutex m_adhocTrackMapMutex;
491 ClientBase* m_parent;
A virtual interface for an Ad-hoc Command Provider according to XEP-0050.
A virtual interface for an Ad-hoc Command users according to XEP-0050.
A base class for Adhoc Command plugins (DataForm, IO Data, ...).
const std::string & content() const
Severity severity() const
Note(Severity sev, const std::string ¬e)
An abstraction of an Adhoc Command element (from Adhoc Commands, XEP-0050) as a StanzaExtension.
GLOOX_DEPRECATED const AdhocPlugin * form() const
const AdhocPlugin * plugin() const
void addNote(const Note *note)
const std::string & node() const
const std::string & sessionID() const
const NoteList & notes() const
virtual StanzaExtension * newInstance(const Tag *tag) const
virtual StanzaExtension * clone() const
std::list< const Note * > NoteList
This class implements a provider for XEP-0050 (Ad-hoc Commands).
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
A virtual interface that enables objects to receive Service Discovery (XEP-0030) events.
Derived classes can be registered as NodeHandlers for certain nodes with the Disco object.
An abstraction of a Disco Info element (from Service Discovery, XEP-0030) as a StanzaExtension.
An abstraction of a Disco query element (from Service Discovery, XEP-0030) in the disco::items namesp...
std::list< Identity * > IdentityList
std::list< Item * > ItemList
A stanza error abstraction implemented as a StanzaExtension.
An abstraction of an IQ stanza.
A virtual interface which can be reimplemented to receive IQ stanzas.
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
This is an abstraction of an XML element.
The namespace for the gloox library.
std::list< std::string > StringList
std::map< std::string, std::string > StringMap