libqutim  0.3.1.0
qutim_sdk_0_3::Account Class Referenceabstract

#include <account.h>

+ Inheritance diagram for qutim_sdk_0_3::Account:

Classes

struct  UpdateParametersArgument
 

Public Types

enum  AccountHookEnum { ReadParametersHook = 0x100, UpdateParametersHook }
 
- Public Types inherited from qutim_sdk_0_3::MenuController
enum  MenuFlag { ShowSelfActions = 0x01, ShowSuperActions = 0x02, ShowOwnerActions = 0x04 }
 

Signals

void conferenceCreated (qutim_sdk_0_3::Conference *conference)
 
void contactCreated (qutim_sdk_0_3::Contact *contact)
 
void groupChatManagerChanged (qutim_sdk_0_3::GroupChatManager *manager)
 
void nameChanged (const QString &current, const QString &previous)
 
void parametersChanged (const QVariantMap &parameters)
 
void statusChanged (const qutim_sdk_0_3::Status &current, const qutim_sdk_0_3::Status &previous)
 

Public Member Functions

 Account (const QString &id, Protocol *protocol)
 
 Account (AccountPrivate &p, Protocol *protocol)
 
virtual ~Account ()
 
Config config ()
 
ConfigGroup config (const QString &name)
 
ContactsFactorycontactsFactory ()
 
virtual ChatUnitgetUnit (const QString &unitId, bool create=false)=0
 
virtual ChatUnitgetUnitForSession (ChatUnit *unit)
 
GroupChatManagergroupChatManager ()
 
QString id () const
 
InfoRequestFactoryinfoRequestFactory () const
 
virtual QString name () const
 
QVariantMap parameters () const
 
Protocolprotocol ()
 
const Protocolprotocol () const
 
virtual void setStatus (Status status)
 
Status status () const
 
Q_INVOKABLE
qutim_sdk_0_3::ChatUnit
unit (const QString &unitId, bool create=false)
 
Q_INVOKABLE QStringList updateParameters (const QVariantMap &parameters)
 
- Public Member Functions inherited from qutim_sdk_0_3::MenuController
 MenuController (QObject *parent=0)
 
virtual ~MenuController ()
 
void addAction (const ActionGenerator *gen, const QList< QByteArray > &menu=QList< QByteArray >())
 
template<int N>
void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<int N>
Q_INLINE_TEMPLATE void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<typename T, int N>
Q_INLINE_TEMPLATE void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<int N>
Q_INLINE_TEMPLATE void addAction (const ActionGenerator *gen, const QMetaObject *meta, const char(&menu)[N])
 
QMenu * menu (bool deleteOnClose=true) const
 
bool removeAction (const ActionGenerator *gen)
 

Static Public Member Functions

static AccountList all ()
 
- Static Public Member Functions inherited from qutim_sdk_0_3::MenuController
static void addAction (const ActionGenerator *gen, const QMetaObject *meta, const QList< QByteArray > &menu=QList< QByteArray >())
 
template<typename T >
static void addAction (const ActionGenerator *gen, const QList< QByteArray > &menu=QList< QByteArray >())
 
template<typename T , int N>
static void addAction (const ActionGenerator *gen, const char(&menu)[N])
 
template<int N>
static void addAction (const ActionGenerator *gen, const QMetaObject *meta, const char(&menu)[N])
 
static QObject * get (QAction *)
 
template<typename T >
static T get (QAction *)
 

Protected Member Functions

void resetGroupChatManager (GroupChatManager *manager=0)
 
void setContactsFactory (ContactsFactory *factory)
 
void setInfoRequestFactory (InfoRequestFactory *factory)
 
- Protected Member Functions inherited from qutim_sdk_0_3::MenuController
void setMenuFlags (const MenuFlags &flags)
 
void setMenuOwner (MenuController *controller)
 
virtual void virtual_hook (int id, void *data)
 

Properties

QString id
 
QString name
 
QVariantMap parameters
 
qutim_sdk_0_3::Protocol protocol
 
qutim_sdk_0_3::Status status
 

Additional Inherited Members

- Public Slots inherited from qutim_sdk_0_3::MenuController
void showMenu (const QPoint &pos)
 

Detailed Description

Account is base class for all account entites.

Member Enumeration Documentation

Enumerator
ReadParametersHook 
UpdateParametersHook 

Constructor & Destructor Documentation

qutim_sdk_0_3::Account::Account ( const QString &  id,
Protocol protocol 
)

Account's contructor with identification id and protocol.

Identification is unique in current protocol, i.e. JID for XMPP or UIN for ICQ.

qutim_sdk_0_3::Account::Account ( AccountPrivate &  p,
Protocol protocol 
)
virtual qutim_sdk_0_3::Account::~Account ( )
virtual

Account destructor.

Member Function Documentation

static AccountList qutim_sdk_0_3::Account::all ( )
static
void qutim_sdk_0_3::Account::conferenceCreated ( qutim_sdk_0_3::Conference conference)
signal

Signal is emitted when new conference was created.

Config qutim_sdk_0_3::Account::config ( )

Returns Config for current account.

It's equal to

Config(protocol()->id() + '.' + id() + "/account")
ConfigGroup qutim_sdk_0_3::Account::config ( const QString &  name)

Returns ConfigGroup for certain group with name.

It's equal to

void qutim_sdk_0_3::Account::contactCreated ( qutim_sdk_0_3::Contact contact)
signal

Signal is emitted when new contact was created.

ContactsFactory* qutim_sdk_0_3::Account::contactsFactory ( )
virtual ChatUnit* qutim_sdk_0_3::Account::getUnit ( const QString &  unitId,
bool  create = false 
)
pure virtual

Method Returns ChatUnit by it's identification string unitId.

If create is true create new ChatUnit if it doesn't exist. Returnes ChatUnit with iq equal to unitId.

If unitId is invalid, i.e. invalid JID, unit won't be created and NULL will be returned.

virtual ChatUnit* qutim_sdk_0_3::Account::getUnitForSession ( ChatUnit unit)
virtual

Method looks for appropriate ChatUnit for conversation with unit.

Returns ChatUnit for ChatSession.

GroupChatManager* qutim_sdk_0_3::Account::groupChatManager ( )

Returns the group chat manager of the account.

See Also
resetGroupChatManager()
void qutim_sdk_0_3::Account::groupChatManagerChanged ( qutim_sdk_0_3::GroupChatManager manager)
signal

Signal is emitted whenever the group chat manager has been reset.

See Also
groupChatManager(), resetGroupChatManager()
QString qutim_sdk_0_3::Account::id ( ) const

Returns account's identification, which is unique for protocol.

InfoRequestFactory* qutim_sdk_0_3::Account::infoRequestFactory ( ) const
virtual QString qutim_sdk_0_3::Account::name ( ) const
virtual

Returns account's representable name.

void qutim_sdk_0_3::Account::nameChanged ( const QString &  current,
const QString &  previous 
)
signal

Signal is emitted when account's name was changed.

QVariantMap qutim_sdk_0_3::Account::parameters ( ) const
void qutim_sdk_0_3::Account::parametersChanged ( const QVariantMap &  parameters)
signal
Protocol* qutim_sdk_0_3::Account::protocol ( )

Returns pointer to account's Protocol.

const Protocol* qutim_sdk_0_3::Account::protocol ( ) const

Returns pointer to account's Protocol.

void qutim_sdk_0_3::Account::resetGroupChatManager ( GroupChatManager manager = 0)
protected

Sets the group chat manager to be used by this account.

See Also
groupChatManager()
void qutim_sdk_0_3::Account::setContactsFactory ( ContactsFactory factory)
protected
void qutim_sdk_0_3::Account::setInfoRequestFactory ( InfoRequestFactory factory)
protected
virtual void qutim_sdk_0_3::Account::setStatus ( Status  status)
virtual

Asks account to change status on server.

If status is not offline and acount hasn't already connected to server it should try to do it, else if status is offline and account is conntected to server it should disconnect.

Status qutim_sdk_0_3::Account::status ( ) const

Returns account's status.

void qutim_sdk_0_3::Account::statusChanged ( const qutim_sdk_0_3::Status current,
const qutim_sdk_0_3::Status previous 
)
signal

Signal is emitted when account's status was changed.

ChatUnit * qutim_sdk_0_3::Account::unit ( const QString &  unitId,
bool  create = false 
)
inline
Q_INVOKABLE QStringList qutim_sdk_0_3::Account::updateParameters ( const QVariantMap &  parameters)

Property Documentation

QString qutim_sdk_0_3::Account::id
read
QString qutim_sdk_0_3::Account::name
read
QVariantMap qutim_sdk_0_3::Account::parameters
readwrite
qutim_sdk_0_3::Protocol qutim_sdk_0_3::Account::protocol
read
qutim_sdk_0_3::Status qutim_sdk_0_3::Account::status
readwrite

The documentation for this class was generated from the following file:

Generated by Doxygen