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; }
316 virtual const std::string& filterString()
const;
325 virtual Tag* tag()
const;
332 NoteList::const_iterator it = m_notes.begin();
333 for( ; it != m_notes.end(); ++it )
334 c->m_notes.push_back(
new Note( *(*it) ) );
337 c->m_sessionid = m_sessionid;
338 c->m_form = m_form ?
static_cast<DataForm*
>( m_form->clone() ) : 0;
339 c->m_action = m_action;
340 c->m_status = m_status;
341 c->m_actions = m_actions;
347 #ifdef ADHOC_COMMANDS_TEST
353 std::string m_sessionid;
378 void checkSupport(
const JID& remote,
AdhocHandler* ah,
int context = 0 );
387 void getCommands(
const JID& remote,
AdhocHandler* ah,
int context = 0 );
424 const std::string& name );
431 void removeAdhocCommandProvider(
const std::string& command );
434 virtual StringList handleDiscoNodeFeatures(
const JID& from,
const std::string& node );
438 const std::string& node );
441 virtual Disco::ItemList handleDiscoNodeItems(
const JID& from,
const JID& to,
const std::string& node );
444 virtual bool handleIq(
const IQ& iq );
447 virtual void handleIqID(
const IQ& iq,
int context );
450 virtual void handleDiscoInfo(
const JID& from,
const Disco::Info& info,
int context );
453 virtual void handleDiscoItems(
const JID& from,
const Disco::Items& items,
int context );
456 virtual void handleDiscoError(
const JID& from,
const Error* error,
int context );
462 typedef std::map<const std::string, AdhocCommandProvider*> AdhocCommandProviderMap;
463 AdhocCommandProviderMap m_adhocCommandProviders;
475 AdhocContext context;
480 typedef std::map<std::string, TrackStruct> AdhocTrackMap;
481 AdhocTrackMap m_adhocTrackMap;
482 util::Mutex m_adhocTrackMapMutex;
484 ClientBase* m_parent;