Home · All Classes · All Namespaces · Modules · Functions · Files

TpSession Class Reference

#include <tpsession.h>

List of all members.

Signals

Public Member Functions

Static Public Member Functions

Public Attributes


Detailed Description

Top level class, counterpart of Account Manager. TpSession connects to account manager and requests accounts from it. TpSession creates TpSessionAccount for all accounts . As top level class TpSession provides simålified interface to send and receive messages via any account. TpSession provides signal when it has accounts ready. If you require some specific account in constructor, you will receive signal only when this account is ready. If you use constructor without any parameters, you will get one signal for every account. If synchronous is true, constructor is executed as synchronous and it does return after transactions to set up accounts are done.

Constructor & Destructor Documentation

TpSession ( QString  cmname = QString(),
bool  synchronous = FALSE 
)

Construct a new TpSession object.

Parameters:
cmname Name of the default connection manager. Can be empty or omnitted, then there is no default connection manager
synchronous if false, asynchronous behavior, function returns immediately and accountReady signals are emitted when accounts are ready if True, synchronous behavior and function returns when accounts are ready


Member Function Documentation

TpSession * instance ( bool  synchronous = TRUE  )  [static]

Returns pointer to TpSession singleton. If there is not yet TpSession Object, creates it with "Ring" connection manager as default

Parameters:
synchronous if false, asynchronous behavior, function returns immediately and accountReady signals are emitted when accounts are ready if True, synchronous behavior and function returns when accounts are ready

void sendMessageToAddress ( QString  connectionMgr,
QString  address,
QString  message 
)

Send message using specified connection manager to address

Parameters:
connectionMgr Name of the connection manager
address Valid address for this connection manager type. Asexample telephone number to Ring, GoogleTalk address for Gabble
message Message body

TpSessionAccount * getAccount ( const QString  cm,
const QString  protocol = QString() 
)

Returns pointer to TpSessionAccout object with specified connection manager or protocol, returns NULL if no match found

Parameters:
cm Name of the connection manager, if left empty matches every entry
protocol Name of the protocol manager, if left empty matches every entry

void createChannelListener ( const QString &  channelType,
const Tp::MethodInvocationContextPtr<> &  context,
const Tp::AccountPtr &  account,
const Tp::ChannelPtr &  channel 
)

void createObserver (  ) 

void amReady ( TpSession _t1  )  [signal]

Emitted when the account Manager becomes ready

Parameters:
TpSession pointer to TpSession class

void accountReady ( TpSessionAccount _t1  )  [signal]

Emitted when the account becomes ready

Parameters:
TpSessionAccount pointer to account become ready

void channeReady ( TpSessionAccount _t1  )  [signal]

void messageReceived ( const Tp::ReceivedMessage &  _t1,
TpSessionAccount _t2 
) [signal]

Emitted when any of Account Managers recived message

Parameters:
Tp::ReceivedMessage Message received
TpSessionAccount pointer to account received message


Member Data Documentation


Copyright © 2010 Nokia Corporation
TpSession