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

TpSessionAccount Class Reference

#include <tpsessionaccount.h>

List of all members.

Signals

Public Member Functions

Public Attributes


Detailed Description

TpSessionAccount class represents every account you have. As example account for “Ring” connection manager represents your cellular account and you may send and receive SMS with it. Gabble represents your GoogleTalk account if you have defined them. TpSessionAccounts are created by TpSession class,they are not intended to be created stand-alone

Constructor & Destructor Documentation

TpSessionAccount ( Tp::AccountManagerPtr  am,
const QString &  objectPath 
)

Construct a new TpSessionAccount object. This constructor is called by TpSession class when new account is created or fetched from account manager. It is not inended to be used stand alone

Parameters:
am Telepathy-Qt4 account manager for this account
objectPath Dbus object path tonew account


Member Function Documentation

void makeContactFromAddress ( QString  address  ) 

Creates new contact with given address. This function is Acynchronous, it sends request to contact manager for contact creation,

Parameters:
address Contact address/id, as example email address, telephone number etc.

void sendMessageToAddress ( QString  address,
QString  message 
)

Send message to given address. This function is compled Acynchronous function that may produce multiple state transitions beforecomletion. If there is already existing TpSessionChannel for this contact, it simply queues message for sending and no forther transitions are needed If there are no hannel, it first check is there contact for this address, if is, it requests new channel to be created for ths channel and message is left waiting untill channel is created. If there is no contact, it sends request fr contact creation and when contact is created state machine proceeds to channel creation.

MessageSent() signal is emitted when completed

Parameters:
address Contact address/id, as example email address, telephone number etc.
message Message string

Tp::ContactPtr getContactFromAddress ( QString  id  ) 

Fetch Tp::ContactPtr for contact with given address. Contact is searched among contacts returned by contact manager for ths account. All connecions managers does not return contacts, as example Ring telephony contact manager does not. Gabble for Googletalk or Spirit for Skype does return contacts-

Parameters:
id Contact address/id, as example email address, telephone number etc. Only exact matches
Returns:
TpContactPtr, if nontact is not returned TpContactPtr.isNull() is true

void addOutgoingChannel ( const Tp::ContactPtr &  contact  ) 

void addOutgoingChannel ( QString  address  ) 

TpSessionChannel * getChannelFromPeerAddress ( QString  id  ) 

Fetch TpSessionChannel for with given address. Contact is searched among active channels for this account.

Parameters:
id Contact address/id, as example email address, telephone number etc. Only exact matches
Returns:
Pointer to TpSessionChannel or NULL if nit found

void accountReady ( TpSessionAccount _t1  )  [signal]

Emitted when the account becomes ready

Parameters:
TpSessionAccount pointer to account become ready

void channelReady ( TpSessionAccount _t1  )  [signal]

Emitted when the account Manager becomes ready

Parameters:
TpSession pointer to TpSession class

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

void messageSent ( const Tp::Message &  _t1,
TpSessionAccount _t2 
) [signal]

void newChannel ( TpSessionAccount _t1,
QString  _t2,
QString  _t3,
const Tp::ChannelDetails &  _t4 
) [signal]


Member Data Documentation

bool ready

QString reqContact

QString reqMessage

Tp::AccountPtr mAcc

Tp::Account* acc

Tp::ConnectionPtr contactsConn

QSet<Tp::ContactPtr> myContacts


Copyright © 2010 Nokia Corporation
TpSession