gloox  0.9.9.12
adhochandler.h
1 /*
2  Copyright (c) 2004-2008 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 ADHOCHANDLER_H__
16 #define ADHOCHANDLER_H__
17 
18 #include "adhoc.h"
19 #include "dataform.h"
20 
21 #include <map>
22 
23 namespace gloox
24 {
25 
35  class GLOOX_API AdhocHandler
36  {
37  public:
41  virtual ~AdhocHandler() {}
42 
48  virtual void handleAdhocSupport( const JID& remote, bool support ) = 0;
49 
57  virtual void handleAdhocCommands( const JID& remote, const StringMap& commands ) = 0;
58 
65  virtual void handleAdhocError( const JID& remote, StanzaError error ) = 0;
66 
83  virtual void handleAdhocExecutionResult( const JID& remote, const std::string& command,
85  const std::string& sessionid,
86  const DataForm& form, int actions,
87  Adhoc::AdhocExecuteActions defaultAction,
88  const std::string& note, Adhoc::AdhocNoteType type ) = 0;
89  };
90 
91 }
92 
93 #endif // ADHOCHANDLER_H__