gloox  1.0
adhoccommandprovider.h
1 /*
2  Copyright (c) 2004-2009 by Jakob Schroeter <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 
53  virtual void handleAdhocCommand( const JID& from, const Adhoc::Command& command,
54  const std::string& sessionID ) = 0;
55 
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__