component.h
/*
Copyright (c) 2005-2023 by Jakob Schröter <js@camaya.net>
This file is part of the gloox library. http://camaya.net/gloox
This software is distributed under a license. The full license
agreement can be found in the file LICENSE in this distribution.
This software may not be copied, modified, sold or distributed
other than expressed in the named license agreement.
This software is distributed without any warranty.
*/
#ifndef COMPONENT_H__
#define COMPONENT_H__
#include "clientbase.h"
#include <string>
namespace gloox
{
class GLOOX_API Component : public ClientBase
{
public:
Component( const std::string& ns, const std::string& server,
const std::string& component, const std::string& password, int port = 5347 );
virtual ~Component() {}
virtual void disconnect() { ClientBase::disconnect( ConnUserDisconnected ); }
protected:
// reimplemented from ClientBase
virtual void handleStartNode( const Tag* start );
// reimplemented from ClientBase
virtual bool handleNormalNode( Tag* tag );
// reimplemented from ClientBase
virtual bool checkStreamVersion( const std::string& /*version*/ ) { return true; }
private:
// reimplemented from ClientBase
virtual void rosterFilled() {}
};
}
#endif // COMPONENT_H__
gloox::ClientBase::port
int port() const
Definition clientbase.h:221
gloox::ClientBase::server
const std::string & server() const
Definition clientbase.h:196
gloox::ClientBase::password
virtual const std::string & password() const
Definition clientbase.h:227
gloox::ClientBase::ClientBase
ClientBase(const std::string &ns, const std::string &server, int port=-1)
Definition clientbase.cpp:94
gloox::ClientBase::disconnect
virtual void disconnect(ConnectionError reason)
Definition clientbase.cpp:404
gloox::Component::~Component
virtual ~Component()
Definition component.h:52
gloox::Component::Component
Component(const std::string &ns, const std::string &server, const std::string &component, const std::string &password, int port=5347)
Definition component.cpp:27
gloox::Component::checkStreamVersion
virtual bool checkStreamVersion(const std::string &)
Definition component.h:67
gloox::Component::disconnect
virtual void disconnect()
Definition component.h:57
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47
gloox
The namespace for the gloox library.
Definition adhoc.cpp:28
gloox::ConnUserDisconnected
@ ConnUserDisconnected
Definition gloox.h:714