gloox
1.0
|
00001 /* 00002 Copyright (c) 2007-2009 by Jakob Schroeter <js@camaya.net> 00003 This file is part of the gloox library. http://camaya.net/gloox 00004 00005 This software is distributed under a license. The full license 00006 agreement can be found in the file LICENSE in this distribution. 00007 This software may not be copied, modified, sold or distributed 00008 other than expressed in the named license agreement. 00009 00010 This software is distributed without any warranty. 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 IQ( IqType type, const JID& to, const std::string& id = EmptyString ); 00064 00068 virtual ~IQ(); 00069 00074 IqType subtype() const { return m_subtype; } 00075 00076 // reimplemented from Stanza 00077 virtual Tag* tag() const; 00078 00079 private: 00080 #ifdef IQ_TEST 00081 public: 00082 #endif 00083 00087 IQ( Tag* tag ); 00088 00089 void setID( const std::string& id ) { m_id = id; } 00090 00091 IqType m_subtype; 00092 }; 00093 00094 } 00095 00096 #endif // IQ_H__