gloox 1.0.28
iq.h
1/*
2 Copyright (c) 2007-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#ifndef IQ_H__
14#define IQ_H__
15
16#include "stanza.h"
17#include "gloox.h"
18
19#include <string>
20
21namespace gloox
22{
23
24 class JID;
25
33 class GLOOX_API IQ : public Stanza
34 {
35
36 friend class ClientBase;
37
38 public:
39
43 enum IqType
44 {
45 Get = 0,
46 Set,
49 Error,
51 Invalid
52 };
53
63 IQ( IqType type, const JID& to, const std::string& id = EmptyString );
64
68 virtual ~IQ();
69
74 IqType subtype() const { return m_subtype; }
75
76 // reimplemented from Stanza
77 virtual Tag* tag() const;
78
79 private:
80#ifdef IQ_TEST
81 public:
82#endif
87 IQ( Tag* tag );
88
89 void setID( const std::string& id ) { m_id = id; }
90
91 IqType m_subtype;
92 };
93
94}
95
96#endif // IQ_H__
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
Definition clientbase.h:79
A stanza error abstraction implemented as a StanzaExtension.
Definition error.h:35
An abstraction of an IQ stanza.
Definition iq.h:34
IqType subtype() const
Definition iq.h:74
IqType
Definition iq.h:44
@ Result
Definition iq.h:48
An abstraction of a JID.
Definition jid.h:31
This is the base class for XMPP stanza abstractions.
Definition stanza.h:34
This is an abstraction of an XML element.
Definition tag.h:47
The namespace for the gloox library.
Definition adhoc.cpp:28