iq.h
/*
Copyright (c) 2007-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef IQ_H__
#define IQ_H__
#include "stanza.h"
#include "gloox.h"
#include <string>
namespace gloox
{
class JID;
class GLOOX_API IQ : public Stanza
{
friend class ClientBase;
public:
enum IqType
{
Get = 0,
Set,
Result,
Error,
Invalid
};
IQ( IqType type, const JID& to, const std::string& id = EmptyString );
virtual ~IQ();
IqType subtype() const { return m_subtype; }
// reimplemented from Stanza
virtual Tag* tag() const;
private:
#ifdef IQ_TEST
public:
#endif
IQ( Tag* tag );
void setID( const std::string& id ) { m_id = id; }
IqType m_subtype;
};
}
#endif // IQ_H__
gloox::IQ
An abstraction of an IQ stanza.
Definition iq.h:34
gloox::IQ::subtype
IqType subtype() const
Definition iq.h:74
gloox::IQ::IQ
IQ(IqType type, const JID &to, const std::string &id=EmptyString)
Definition iq.cpp:38
gloox::IQ::IqType
IqType
Definition iq.h:44
gloox::IQ::Set
@ Set
Definition iq.h:46
gloox::IQ::Error
@ Error
Definition iq.h:49
gloox::IQ::Result
@ Result
Definition iq.h:48
gloox::IQ::Get
@ Get
Definition iq.h:45
gloox::IQ::Invalid
@ Invalid
Definition iq.h:51
gloox::JID
An abstraction of a JID.
Definition jid.h:31
gloox::Stanza::Stanza
Stanza(Tag *tag)
Definition stanza.cpp:31
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::EmptyString
const std::string EmptyString
Definition gloox.cpp:124