interfaces Library API Documentation

KIMIface Class Reference

Generic DCOP interface for KDE instant messenger applications Note one omission of this interface is the lack of control over the range of values used for protocols' names. More...

#include <kimiface.h>

Inheritance diagram for KIMIface:

Inheritance graph
[legend]
Collaboration diagram for KIMIface:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Generic DCOP interface for KDE instant messenger applications Note one omission of this interface is the lack of control over the range of values used for protocols' names.

If you are implementing this interface, note that your application must have the following information in its desktop file, so that it can be identified as providing KIMIface at runtime: X-DCOP-ServiceName=<application name> ServiceTypes=DCOP/InstantMessenger and the class implementing KIMIface must pass "KIMIface" to the DCOPObject constructor.

Since:
3.3
Author:
Will Stephenson <lists@stevello.free-online.co.uk>

Definition at line 43 of file kimiface.h.


Member Function Documentation

virtual QStringList KIMIface::allContacts  )  [pure virtual]
 

Obtain a list of IM-contactable entries in the KDE address book.

Returns:
a list of KABC uids.

virtual QStringList KIMIface::reachableContacts  )  [pure virtual]
 

Obtain a list of KDE address book entries who are currently reachable.

Returns:
a list of KABC uids who can receive a message, even if offline.

virtual QStringList KIMIface::onlineContacts  )  [pure virtual]
 

Obtain a list of KDE address book entries who are currently online.

Returns:
a list of KABC uids who are online with unspecified presence.

virtual QStringList KIMIface::fileTransferContacts  )  [pure virtual]
 

Obtain a list of KDE address book entries who may receive file transfers.

Returns:
a list of KABC uids capable of file transfer.

virtual bool KIMIface::isPresent const QString uid  )  [pure virtual]
 

Confirm if a given contact is known to the IM application.

Parameters:
uid the KABC uid you are interested in.
Returns:
whether the program knows of this KABC uid.

virtual QString KIMIface::displayName const QString uid  )  [pure virtual]
 

Obtain the IM app's idea of the contact's display name Useful if KABC lookups may be too slow.

Parameters:
uid the KABC uid you are interested in.
Returns:
the corresponding display name.

virtual QString KIMIface::presenceString const QString uid  )  [pure virtual]
 

Obtain the IM presence as a i18ned string for the specified contact.

Parameters:
uid the KABC uid you want the presence for.
Returns:
the i18ned string describing presence.

virtual int KIMIface::presenceStatus const QString uid  )  [pure virtual]
 

Obtain the IM presence as a number for the specified contact.

Parameters:
uid the KABC uid you want the presence for.
Returns:
a numeric representation of presence - currently one of 0 (Unknown), 1 (Offline), 2 (Connecting), 3 (Away), 4 (Online)

virtual bool KIMIface::canReceiveFiles const QString uid  )  [pure virtual]
 

Indicate if a given contact can receive files.

Parameters:
uid the KABC uid you are interested in.
Returns:
whether the specified addressee can receive files.

virtual bool KIMIface::canRespond const QString uid  )  [pure virtual]
 

Some media are unidirectional (eg, 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.

Parameters:
uid the KABC uid you are interested in.
Returns:
whether the specified contact can respond.

virtual QString KIMIface::locate const QString contactId,
const QString protocol
[pure virtual]
 

Get the KABC uid corresponding to the supplied IM address.

Parameters:
contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC.
protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol",
Returns:
a KABC uid or null if none found

virtual QPixmap KIMIface::icon const QString uid  )  [pure virtual]
 

Obtain the icon representing IM presence for the specified contact.

Parameters:
uid the KABC uid you want the presence for.
Returns:
a pixmap representing the uid's presence.

virtual QString KIMIface::context const QString uid  )  [pure virtual]
 

Get the supplied contact's current context (home, work, or any).

Parameters:
uid the KABC uid you want the context for.
Returns:
a QString describing the context, or null if not supported.

virtual QStringList KIMIface::protocols  )  [pure virtual]
 

Discover what protocols the application supports.

Returns:
the set of protocols that the application supports, ie a list of protocol names, eg "AIMProtocol", "MSNProtocol", "ICQProtocol", ...

virtual void KIMIface::messageContact const QString uid,
const QString message
[pure virtual]
 

Send a single message to the specified contact Any response will be handled by the IM client as a normal conversation.

Parameters:
uid the KABC uid you want to send the message to.
message the message to send them.

virtual void KIMIface::messageNewContact const QString contactId,
const QString protocol
[pure virtual]
 

Open a chat to a contact, and optionally set some initial text.

virtual void KIMIface::chatWithContact const QString uid  )  [pure virtual]
 

Start a chat session with the specified contact.

Parameters:
uid the KABC uid you want to chat with.

virtual void KIMIface::sendFile const QString uid,
const KURL sourceURL,
const QString altFileName = QString::null,
uint  fileSize = 0
[pure virtual]
 

Send a file to the contact.

Parameters:
uid the KABC uid you are sending to.
sourceURL a
See also:
KURL to send.
Parameters:
altFileName an alternate filename describing the file
fileSize file size in bytes

virtual bool KIMIface::addContact const QString contactId,
const QString protocol
[pure virtual]
 

Add a contact to the contact list.

Parameters:
contactId the protocol specific identifier for the contact, eg UIN for ICQ, screenname for AIM, nick for IRC.
protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", ...
Returns:
whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported.
See also:
locate


The documentation for this class was generated from the following file:
KDE Logo
This file is part of the documentation for interfaces Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Jul 20 14:14:55 2006 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003