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
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__
An abstraction of an IQ stanza.
Definition iq.h:34
IqType subtype() const
Definition iq.h:74
IQ(IqType type, const JID &to, const std::string &id=EmptyString)
Definition iq.cpp:38
IqType
Definition iq.h:44
@ Set
Definition iq.h:46
@ Error
Definition iq.h:49
@ Result
Definition iq.h:48
@ Get
Definition iq.h:45
@ Invalid
Definition iq.h:51
An abstraction of a JID.
Definition jid.h:31
Stanza(Tag *tag)
Definition stanza.cpp:31
This is an abstraction of an XML element.
Definition tag.h:47
The namespace for the gloox library.
Definition adhoc.cpp:28
const std::string EmptyString
Definition gloox.cpp:124