component.h

00001 /*
00002   Copyright (c) 2005-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 COMPONENT_H__
00016 #define COMPONENT_H__
00017 
00018 #include "clientbase.h"
00019 
00020 #include <string>
00021 
00022 namespace gloox
00023 {
00024 
00025   class Disco;
00026 
00034   class GLOOX_API Component : public ClientBase
00035   {
00036     public:
00047       Component( const std::string& ns, const std::string& server,
00048                  const std::string& component, const std::string& password, int port = 5347 );
00049 
00053       virtual ~Component();
00054 
00055       // reimplemented from ClientBase
00056       virtual const std::string username() const { return ""; };
00057 
00058       // reimplemented from ClientBase
00059       virtual const std::string password() const { return ""; };
00060 
00065       Disco* disco() const { return m_disco; };
00066 
00070       void disconnect();
00071 
00072     protected:
00073       virtual void handleStartNode();
00074       virtual bool handleNormalNode( Stanza *stanza );
00075       virtual bool checkStreamVersion( const std::string& /*version*/ ) { return true; };
00076       virtual void disconnect( ConnectionError reason );
00077 
00078     private:
00079       // reimplemented from ClientBase
00080       virtual void rosterFilled() {};
00081 
00082       Disco *m_disco;
00083   };
00084 
00085 }
00086 
00087 #endif // COMPONENT_H__

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