20 #include "disconodehandler.h"
21 #include "discohandler.h"
22 #include "iqhandler.h"
23 #include "stanzaextension.h"
35 class AdhocCommandProvider;
155 : m_severity( sev ), m_note( note ) {}
172 const std::string&
content()
const {
return m_note; }
181 #ifdef ADHOC_COMMANDS_TEST
209 Command(
const std::string& node,
const std::string& sessionid,
Action action,
221 Command(
const std::string& node,
const std::string& sessionid,
Status status,
236 Command(
const std::string& node,
const std::string& sessionid,
Status status,
237 Action executeAction,
int allowedActions = Complete,
267 const std::string&
node()
const {
return m_node; }
273 const std::string&
sessionID()
const {
return m_sessionid; }
315 virtual const std::string& filterString()
const;
324 virtual Tag* tag()
const;
331 NoteList::const_iterator it = m_notes.begin();
332 for( ; it != m_notes.end(); ++it )
333 c->m_notes.push_back(
new Note( *(*it) ) );
336 c->m_sessionid = m_sessionid;
337 c->m_form = m_form ?
static_cast<DataForm*
>( m_form->clone() ) : 0;
338 c->m_action = m_action;
339 c->m_status = m_status;
340 c->m_actions = m_actions;
346 #ifdef ADHOC_COMMANDS_TEST
352 std::string m_sessionid;
420 const std::string& name );
427 void removeAdhocCommandProvider(
const std::string& command );
430 virtual StringList handleDiscoNodeFeatures(
const JID& from,
const std::string& node );
434 const std::string& node );
437 virtual Disco::ItemList handleDiscoNodeItems(
const JID& from,
const JID& to,
const std::string& node );
440 virtual bool handleIq(
const IQ& iq );
443 virtual void handleIqID(
const IQ& iq,
int context );
446 virtual void handleDiscoInfo(
const JID& from,
const Disco::Info& info,
int context );
449 virtual void handleDiscoItems(
const JID& from,
const Disco::Items& items,
int context );
452 virtual void handleDiscoError(
const JID& from,
const Error* error,
int context );
458 typedef std::map<const std::string, AdhocCommandProvider*> AdhocCommandProviderMap;
459 AdhocCommandProviderMap m_adhocCommandProviders;
471 AdhocContext context;
475 typedef std::map<std::string, TrackStruct> AdhocTrackMap;
476 AdhocTrackMap m_adhocTrackMap;
478 ClientBase* m_parent;