gloox  1.0.20
adhoccommandprovider.h
1 /*
2  Copyright (c) 2004-2017 by Jakob Schröter <js@camaya.net>
3  This file is part of the gloox library. http://camaya.net/gloox
4 
5  This software is distributed under a license. The full license
6  agreement can be found in the file LICENSE in this distribution.
7  This software may not be copied, modified, sold or distributed
8  other than expressed in the named license agreement.
9 
10  This software is distributed without any warranty.
11 */
12 
13 
14 
15 #ifndef ADHOCCOMMANDPROVIDER_H__
16 #define ADHOCCOMMANDPROVIDER_H__
17 
18 #include "tag.h"
19 #include "jid.h"
20 #include "adhoc.h"
21 
22 #include <list>
23 #include <map>
24 #include <string>
25 
26 namespace gloox
27 {
28 
36  class GLOOX_API AdhocCommandProvider
37  {
38  public:
42  virtual ~AdhocCommandProvider() {}
43 
54  virtual void handleAdhocCommand( const JID& from, const Adhoc::Command& command,
55  const std::string& sessionID ) = 0;
56 
68  virtual bool handleAdhocAccessRequest( const JID& from, const std::string& command )
69  {
70  (void)from;
71  (void)command;
72  return true;
73  }
74 
75  };
76 
77 }
78 
79 #endif // ADHOCCOMMANDPROVIDER_H__
An abstraction of an Adhoc Command element (from Adhoc Commands, XEP-0050) as a StanzaExtension.
Definition: adhoc.h:91
The namespace for the gloox library.
Definition: adhoc.cpp:27
An abstraction of a JID.
Definition: jid.h:30
A virtual interface for an Ad-hoc Command Provider according to XEP-0050.
virtual bool handleAdhocAccessRequest(const JID &from, const std::string &command)