ClientConnection Class Reference

Base class for administrate clients. More...

#include <clientConnection.h>

List of all members.

Public Member Functions

 ~ClientConnection ()
 destructor clearing the class
bool checkClientCapabilities (int capability)
 check if we have a connected client with a specific capability
int count ()
 get number of clients connected
bool addClient (const char *name, int modes)
 adds a client to the list of connected clients
bool checkClientRemoval (const char *name)
 check if given client should get removed
void getClients (std::list< std::string > &names, std::list< int > &caps)
 get all connected clients with their capabilities

Private Attributes

std::list< cNode_clients


Detailed Description

Base class for administrate clients.

Base class for administrate clients which connect to a server socket provided by powersaved. Everytime one of the above defined states changes, all client which requested this state will be notified. Additionally it is also possible that acpi_events occurring on /proc/acpi/events will be forwarded to the clients instead of changes.

The class clientStorage is a list which holds all the registered clients.


Constructor & Destructor Documentation

ClientConnection::~ClientConnection  ) 
 

destructor clearing the class


Member Function Documentation

bool ClientConnection::addClient const char *  name,
int  modes
 

adds a client to the list of connected clients

Parameters:
name the dbus name of the client
modes the modes the client is aware of
Returns:
true on success, false otherwise

bool ClientConnection::checkClientCapabilities int  capability  ) 
 

check if we have a connected client with a specific capability

Parameters:
capability the capability to check for
Returns:
integer value representing result of function call
Return values:
1 on success
0 otherwise

bool ClientConnection::checkClientRemoval const char *  name  ) 
 

check if given client should get removed

Parameters:
name the dbus name of the client
Returns:
true when the client got removed, false otherwise

int ClientConnection::count  ) 
 

get number of clients connected

Returns:
integer with number of clients connected to the daemon
invokes count() from class clientStorage and so returns the number of clients which are connected to the daemon

void ClientConnection::getClients std::list< std::string > &  names,
std::list< int > &  caps
 

get all connected clients with their capabilities

Parameters:
names stl list that gets filled with client names
caps slt list that gets filled with client capabilities


Member Data Documentation

std::list< cNode > ClientConnection::_clients [private]
 

list for storing all connected clients


The documentation for this class was generated from the following files:
Generated on Mon Mar 27 09:27:19 2006 for Powersave Daemon by  doxygen 1.4.6