privatexml.h

00001 /*
00002   Copyright (c) 2004-2006 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 
00014 
00015 #ifndef PRIVATEXML_H__
00016 #define PRIVATEXML_H__
00017 
00018 #include "iqhandler.h"
00019 #include "privatexmlhandler.h"
00020 
00021 #include <string>
00022 #include <list>
00023 #include <map>
00024 
00025 namespace gloox
00026 {
00027 
00028   class ClientBase;
00029   class Tag;
00030   class Stanza;
00031 
00037   class GLOOX_API PrivateXML : public IqHandler
00038   {
00039     public:
00046       PrivateXML( ClientBase *parent );
00047 
00051       virtual ~PrivateXML();
00052 
00060       std::string requestXML( const std::string& tag, const std::string& xmlns, PrivateXMLHandler *pxh );
00061 
00069       std::string storeXML( Tag *tag, PrivateXMLHandler *pxh );
00070 
00071       // reimplemented from IqHandler.
00072       virtual bool handleIq( Stanza *stanza );
00073 
00074       // reimplemented from IqHandler.
00075       virtual bool handleIqID( Stanza *stanza, int context );
00076 
00077     protected:
00078       ClientBase *m_parent;
00079 
00080     private:
00081       enum IdType
00082       {
00083         REQUEST_XML,
00084         STORE_XML
00085       };
00086 
00087       typedef std::map<std::string, PrivateXMLHandler*> TrackMap;
00088 
00089       TrackMap m_track;
00090   };
00091 
00092 }
00093 
00094 #endif // PRIVATEXML_H__

Generated on Tue May 1 14:20:20 2007 for gloox by  doxygen 1.5.1