gloox
1.0
|
00001 /* 00002 Copyright (c) 2005-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 00014 00015 #ifndef COMPONENT_H__ 00016 #define COMPONENT_H__ 00017 00018 #include "clientbase.h" 00019 00020 #include <string> 00021 00022 namespace gloox 00023 { 00024 00033 class GLOOX_API Component : public ClientBase 00034 { 00035 public: 00046 Component( const std::string& ns, const std::string& server, 00047 const std::string& component, const std::string& password, int port = 5347 ); 00048 00052 virtual ~Component() {} 00053 00057 void disconnect() { ClientBase::disconnect( ConnUserDisconnected ); } 00058 00059 protected: 00060 // reimplemented from ClientBase 00061 virtual void handleStartNode(); 00062 00063 // reimplemented from ClientBase 00064 virtual bool handleNormalNode( Tag* tag ); 00065 00066 // reimplemented from ClientBase 00067 virtual bool checkStreamVersion( const std::string& /*version*/ ) { return true; } 00068 00069 private: 00070 // reimplemented from ClientBase 00071 virtual void rosterFilled() {} 00072 00073 }; 00074 00075 } 00076 00077 #endif // COMPONENT_H__