KIMIface Class Reference
#include <kimiface.h>
Inheritance diagram for KIMIface:

Detailed Description
Generic DCOP interface for KDE instant messenger applications.The interface has two parts:
- methods to get information about IM-contacts, such as their reachability or their presence status (if the are online or away, etc)
- methods to initiate communication with IM-contacts, e.g. sending messages
- Note:
- If you are looking for a information about accessing application's that implement this interface, have a look at the KIMProxy class.
- Note:
- one omission of this interface is the lack of control over the range of values used for protocols' names.
X-DCOP-ServiceName=<application-name> ServiceTypes=DCOP/InstantMessenger
// just need QObject inheritance and Q_OBJECT if you want signals and slots // no need to use K_DCOP macro again class MyIMIface : public QObject, public KIMIface { Q_OBJECT public: MyIMIface(QObject* parent = 0, const char* name) : DCOPObject("KIMIface"), // <-- passing the interface name as required QObject(parent, name) {} };
The DCOP part of the interface needs to be processed by the DCOP IDL compiler. The KDE autotools framework will do this automatically, all you have to do is add kimiface.skel and kimiface.stub to the SOURCES
list in your Makefile.am
- See also:
- KIMProxy
KABC::AddressBook
KABC::Addressee
- Since:
- 3.3
- Author:
- Will Stephenson <lists@stevello.free-online.co.uk>
Definition at line 85 of file kimiface.h.
DCOP Member Functions | |
virtual QStringList | allContacts ()=0 |
virtual QStringList | reachableContacts ()=0 |
virtual QStringList | onlineContacts ()=0 |
virtual QStringList | fileTransferContacts ()=0 |
virtual bool | isPresent (const QString &uid)=0 |
virtual QString | displayName (const QString &uid)=0 |
virtual QString | presenceString (const QString &uid)=0 |
virtual int | presenceStatus (const QString &uid)=0 |
virtual bool | canReceiveFiles (const QString &uid)=0 |
virtual bool | canRespond (const QString &uid)=0 |
virtual QString | locate (const QString &contactId, const QString &protocol)=0 |
virtual QPixmap | icon (const QString &uid)=0 |
virtual QString | context (const QString &uid)=0 |
virtual QStringList | protocols ()=0 |
virtual void | messageContact (const QString &uid, const QString &message)=0 |
virtual void | messageNewContact (const QString &contactId, const QString &protocol)=0 |
virtual void | chatWithContact (const QString &uid)=0 |
virtual void | sendFile (const QString &uid, const KURL &sourceURL, const QString &altFileName=QString::null, uint fileSize=0)=0 |
virtual bool | addContact (const QString &contactId, const QString &protocol)=0 |
Public Attributes | |
k_dcop_signals | __pad0__: void contactPresenceChanged( QString uid |
k_dcop_signals QCString | appId |
k_dcop_signals QCString int | presence |
Member Function Documentation
|
Add a new contact given its protocol specific identifier. Implementations might add the contact silently, including sending an authorization request if necessary, ask the user for confirmation or just prefill the usual contact addingGUI.
|
|
Obtain a list of IM-contacts that are known to the application. Return a list of KABC UIDs of all the contacts you have such IDs for.
|
|
Indicate if a given contact can receive files.
|
|
Indicate if a given contact will be able to respond. Some media are unidirectional (e.g., sending SMS via a web interface). This refers to the contact's ability to respond as defined by the medium, not by their presence. Someone may appear offline (SMS has no presence) to you but in fact be able to respond.
|
|
Start a chat session with the specified contact. Applications that do not support a chat mode or when the IM-service of the given contact does not support it, this can also open a normal message input GUI.
|
|
Obtain the given contact's current context (home, work, or any).
Not all IM services/protocols support the concept of contexts. If the given UID maps to such a service, just return
|
|
Obtain the IM app's idea of the contact's display name. Useful if KABC lookups may be too slow. Should return whatever the application uses in its contact list or similar GUI, e.g. a nick name, a user configured name string, etc.
|
|
Obtain a list of IM-contacts who may receive file transfers. Return a list of KABC UIDs of the contacts that are capable of receiving file transfers based on the IM-service they are associated with, i.e. if it is technically able to provide this, on their online state, i.e. can likely not receive files while offline, and perhaps even information your application has additionally, e.g. a user config that tells you that the contact is behind a firewall. The simplest implementation is to return the same list as onlineContacts(), provided all the IM-services that are currently used support it.
|
|
Obtain the icon representing the IM presence for the specified contact. Return the image the application would use to display a contact's presence. The size and other properties of the image are currently unspecified.
|
|
Confirm if a given contact is known to the IM application. Check if you can map the given KABC UID to one if the IM-contacts, e.g. the would be part of the list returned by allContacts()
|
|
Obtain the KABC UID corresponding to the given IM address.
|
|
Send a single message to the specified contact. Any response will be handled by the IM client as a normal conversation. Implementations might send the message silently, ask the user for permission or just prefill the usual message input GUI.
|
|
Send a single message to a contact given only its protocol specific identifier. This could be used to send a message without having to know the KABC UID of the contact or without having to add it first.
|
|
Obtain a list of IM-contacts that are currently online. Return a list of KABC UIDs of the contacts you have any presence information for that indicates that they are connected to the IM-service they are associated with.
|
|
Obtain the IM presence as a number for the specified contact. Return one of the following values depending on the given contact's presence:
|
|
Obtain the IM presence as a i18ned string for the specified contact. Return a translated string your application would use when displaying the contact's presence, e.g. i18n("Online"), i18n("Away")
|
|
Obtain a list of supported IM services/protocols. Protocol names are currently of the form "protocol name" + "Protocol" for example:
The string is currently just an identifier to use with methods such as locate(), addContact() or messageNewContact()
|
|
Obtain a list of IM-contacts that are currently reachable. Return a list of KABC UIDs of the contacts that are reachable in the sense that you are connected to the IM-service they are associated with. For example if your application supports ICQ and AIM and the ICQ account is active but the AIM account isn't, return just the ICQ contacts.
|
|
Send a file to the contact. Initiates a file transfer with the given contact if possible. Implementations might start the transfer right away, ask the user's permission or just prefill the usual file transfer GUI.
|
The documentation for this class was generated from the following file: