gloox 1.0.28
adhoccommandprovider.h
1/*
2 Copyright (c) 2004-2023 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
26namespace gloox
27{
28
36 class GLOOX_API AdhocCommandProvider
37 {
38 public:
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__
A virtual interface for an Ad-hoc Command Provider according to XEP-0050.
virtual void handleAdhocCommand(const JID &from, const Adhoc::Command &command, const std::string &sessionID)=0
virtual bool handleAdhocAccessRequest(const JID &from, const std::string &command)
An abstraction of an Adhoc Command element (from Adhoc Commands, XEP-0050) as a StanzaExtension.
Definition adhoc.h:92
An abstraction of a JID.
Definition jid.h:31
The namespace for the gloox library.
Definition adhoc.cpp:28