Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

iq.h

00001 /*
00002   Copyright (c) 2007-2008 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       GLOOX_DEPRECATED_CTOR IQ( IqType type, const JID& to, const std::string& id, // FIXME remove for 1.0
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; } // FIXME remove for 1.0
00089 
00094       IqType subtype() const { return m_subtype; }
00095 
00101       GLOOX_DEPRECATED const std::string& xmlns() const { return m_xmlns; } // FIXME remove for 1.0
00102 
00103       // reimplemented from Stanza
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__

Generated on Tue Apr 22 15:10:11 2008 for gloox by  doxygen 1.4.1