00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef IQ_H__
00014 #define IQ_H__
00015
00016 #include "stanza.h"
00017 #include "gloox.h"
00018
00019 #include <string>
00020
00021 namespace gloox
00022 {
00023
00024 class JID;
00025
00033 class GLOOX_API IQ : public Stanza
00034 {
00035
00036 friend class ClientBase;
00037
00038 public:
00039
00043 enum IqType
00044 {
00045 Get = 0,
00046 Set,
00048 Result,
00049 Error,
00051 Invalid
00052 };
00053
00063 GLOOX_DEPRECATED_CTOR IQ( IqType type, const JID& to, const std::string& id,
00064 const std::string& xmlns,
00065 const std::string& childtag = "query" );
00066
00076 IQ( IqType type, const JID& to, const std::string& id = EmptyString );
00077
00081 virtual ~IQ();
00082
00088 GLOOX_DEPRECATED Tag* query() const { return m_query; }
00089
00094 IqType subtype() const { return m_subtype; }
00095
00101 GLOOX_DEPRECATED const std::string& xmlns() const { return m_xmlns; }
00102
00103
00104 virtual Tag* tag() const;
00105
00106 private:
00107 #ifdef IQ_TEST
00108 public:
00109 #endif
00110
00114 IQ( Tag* tag );
00115
00116 void setID( const std::string& id ) { m_id = id; }
00117
00118 Tag* m_query;
00119 std::string m_xmlns;
00120 IqType m_subtype;
00121 };
00122
00123 }
00124
00125 #endif // IQ_H__