KIMProxy Class Reference
This class provides an easy-to-use interface to any instant messengers or chat programs that you have installed that implement. More...
#include <kimproxy.h>
Inheritance diagram for KIMProxy:


Public Slots | |
void | registeredToDCOP (const QCString &appId) |
void | unregisteredFromDCOP (const QCString &appId) |
Signals | |
void | sigContactPresenceChanged (const QString &uid) |
void | sigPresenceInfoExpired () |
Public Member Functions | |
bool | initialize () |
QStringList | allContacts () |
QStringList | reachableContacts () |
QStringList | onlineContacts () |
QStringList | fileTransferContacts () |
bool | isPresent (const QString &uid) |
QString | displayName (const QString &uid) |
int | presenceNumeric (const QString &uid) |
QString | presenceString (const QString &uid) |
QPixmap | presenceIcon (const QString &uid) |
bool | canReceiveFiles (const QString &uid) |
bool | canRespond (const QString &uid) |
QString | locate (const QString &contactId, const QString &protocol) |
QString | context (const QString &uid) |
void | chatWithContact (const QString &uid) |
void | messageContact (const QString &uid, const QString &message) |
void | sendFile (const QString &uid, const KURL &sourceURL, const QString &altFileName=QString::null, uint fileSize=0) |
bool | addContact (const QString &contactId, const QString &protocol) |
bool | imAppsAvailable () |
bool | startPreferredApp () |
void | contactPresenceChanged (QString uid, QCString appId, int presence) |
Static Public Member Functions | |
KIMProxy * | instance (DCOPClient *client) |
Protected Member Functions | |
void | pollApp (const QCString &appId) |
void | pollAll (const QString &uid) |
bool | updatePresence (const QString &uid, const QCString &appId, int presence) |
QString | preferredApp () |
KIMIface_stub * | stubForUid (const QString &uid) |
KIMIface_stub * | stubForProtocol (const QString &protocol) |
Detailed Description
This class provides an easy-to-use interface to any instant messengers or chat programs that you have installed that implement.
- See also:
- KIMIface
- See also:
- ServiceType DCOP/InstantMessenger If a UID is reachable with more than one program, KIMProxy aggregates the available information and presents the 'best' presence. For example, for a contact who can be seen to be Away in IRC on program A but Online using ICQ on program B, the information from program B will be used. KIMProxy is designed for simple information in a wide number of cases, not for detailed messaging.
- See also:
- KABC::Addressee, but use of the address book is optional. You can get a list of known contacts with
imAddresseeUids and then check their presence using the various accessor methods
presenceNumeric and display the IM programs' display names for them using
- Since:
- 3.3
- Author:
- Will Stephenson <lists@stevello.free-online.co.uk>
Definition at line 71 of file kimproxy.h.
Member Function Documentation
|
Obtain an instance of KIMProxy. Note, if you share this
Definition at line 166 of file kimproxy.cpp. References instance(). Referenced by instance(). |
|
Get the proxy ready to connect Discover any running preferred IM clients and set up stubs for it.
Definition at line 215 of file kimproxy.cpp. References endl(), QDict< KIMIface_stub >::find(), QDict< KIMIface_stub >::insert(), QDict< KIMIface_stub >::isEmpty(), QCString::isEmpty(), kdDebug(), QCString::length(), and pollApp(). Referenced by addContact(), canReceiveFiles(), canRespond(), chatWithContact(), context(), displayName(), fileTransferContacts(), locate(), messageContact(), presenceIcon(), presenceNumeric(), presenceString(), reachableContacts(), and sendFile(). |
|
Obtain a list of IM-contactable entries in the KDE address book.
Definition at line 394 of file kimproxy.cpp. |
|
Obtain a list of KDE address book entries who are currently reachable.
Definition at line 400 of file kimproxy.cpp. References QDictIterator::current(), and initialize(). |
|
Obtain a list of KDE address book entries who are currently online.
Definition at line 415 of file kimproxy.cpp. |
|
Obtain a list of KDE address book entries who may receive file transfers.
Definition at line 427 of file kimproxy.cpp. References QDictIterator::current(), and initialize(). |
|
Confirm if a given KABC uid is known to KIMProxy.
Definition at line 442 of file kimproxy.cpp. References isPresent(). Referenced by isPresent(). |
|
Obtain the IM app's idea of the contact's display name Useful if KABC lookups may be too slow.
Definition at line 447 of file kimproxy.cpp. References displayName(), initialize(), and stubForUid(). Referenced by displayName(). |
|
Obtain the IM presence as a number (see KIMIface) for the specified addressee.
Definition at line 346 of file kimproxy.cpp. References initialize(), and presenceNumeric(). Referenced by presenceNumeric(). |
|
Obtain the IM presence as a i18ned string for the specified addressee.
Definition at line 358 of file kimproxy.cpp. References initialize(), and presenceString(). Referenced by presenceString(). |
|
Obtain the icon representing IM presence for the specified addressee.
Definition at line 373 of file kimproxy.cpp. References initialize(), and presenceIcon(). Referenced by presenceIcon(). |
|
Indicate if a given uid can receive files.
Definition at line 459 of file kimproxy.cpp. References canReceiveFiles(), initialize(), and stubForUid(). Referenced by canReceiveFiles(). |
|
Some media are unidirectional (eg, sending SMS via a web interface).
Definition at line 469 of file kimproxy.cpp. References canRespond(), initialize(), and stubForUid(). Referenced by canRespond(). |
|
Get the KABC uid corresponding to the supplied IM address Protocols should be.
Definition at line 543 of file kimproxy.cpp. References initialize(), and stubForProtocol(). |
|
Get the supplied addressee's current context (home, work, or any).
Definition at line 479 of file kimproxy.cpp. References context(), initialize(), and stubForUid(). Referenced by context(). |
|
Start a chat session with the specified addressee.
Definition at line 489 of file kimproxy.cpp. References chatWithContact(), initialize(), and stubForUid(). Referenced by chatWithContact(). |
|
Send a single message to the specified addressee Any response will be handled by the IM client as a normal conversation.
Definition at line 502 of file kimproxy.cpp. References initialize(), messageContact(), and stubForUid(). Referenced by messageContact(). |
|
Send the file to the contact.
Definition at line 515 of file kimproxy.cpp. References QDictIterator::current(), initialize(), and sendFile(). Referenced by sendFile(). |
|
Add a contact to the contact list.
Definition at line 533 of file kimproxy.cpp. References addContact(), initialize(), and stubForProtocol(). Referenced by addContact(). |
|
Are there any compatible instant messaging apps installed?
Definition at line 553 of file kimproxy.cpp. References QDict< KIMIface_stub >::isEmpty(). |
|
Start the user's preferred IM application.
Definition at line 558 of file kimproxy.cpp. References endl(), k_funcinfo, kdDebug(), and preferredApp(). |
|
Just exists to let the idl compiler make the DCOP signal for this.
Definition at line 328 of file kimproxy.cpp. References contactPresenceChanged(), and sigContactPresenceChanged(). Referenced by contactPresenceChanged(). |
|
Indicates that the specified UID's presence changed.
Referenced by contactPresenceChanged(), and pollApp(). |
|
Indicates that the sources of presence information have changed so any previously supplied presence info is invalid.
|
|
Bootstrap our presence data for a newly registered app.
Definition at line 594 of file kimproxy.cpp. References pollApp(), and sigContactPresenceChanged(). Referenced by initialize(), and pollApp(). |
|
Bootstrap our presence data by polling all known apps.
Definition at line 576 of file kimproxy.cpp. References pollAll(). Referenced by pollAll(). |
|
Update our records with the given data.
|
|
Get the name of the user's IM weapon of choice.
Definition at line 644 of file kimproxy.cpp. References preferredApp(), KConfigBase::readEntry(), and KConfigBase::setGroup(). Referenced by preferredApp(), startPreferredApp(), and stubForProtocol(). |
|
Get the app stub best able to reach this uid.
Definition at line 616 of file kimproxy.cpp. References QDict< KIMIface_stub >::find(), and stubForUid(). Referenced by canReceiveFiles(), canRespond(), chatWithContact(), context(), displayName(), messageContact(), and stubForUid(). |
|
Get the app stub for this protocol. Take the preferred app first, then any other. Definition at line 624 of file kimproxy.cpp. References QDictIterator::current(), QDict< KIMIface_stub >::find(), preferredApp(), and stubForProtocol(). Referenced by addContact(), locate(), and stubForProtocol(). |
The documentation for this class was generated from the following files: