kimiface.h
/*
kimiface.h - KDE Instant Messenger DCOP Interface
Copyright (c) 2004-5 Will Stephenson <lists@stevello.free-online.co.uk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KIMIFACE_H
#define KIMIFACE_H
#include <qpixmap.h>
#include <dcopobject.h>
#include <qstringlist.h>
#include <kurl.h>
class KIMIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
// ACCESSORS
// contact list
virtual QStringList allContacts() = 0;
virtual QStringList reachableContacts() = 0;
virtual QStringList onlineContacts() = 0;
virtual QStringList fileTransferContacts() = 0;
// individual
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;
// metadata
virtual QPixmap icon( const QString & uid ) = 0;
virtual QString context( const QString & uid ) = 0;
// App capabilities
virtual QStringList protocols() = 0;
// ACTORS
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;
// MUTATORS
// Contact list
virtual bool addContact( const QString &contactId, const QString &protocol ) = 0;
// SIGNALS
k_dcop_signals:
void contactPresenceChanged( QString uid, QCString appId, int presence );
};
#endif
/*
* Local variables:
* c-indentation-style: k&r
* c-basic-offset: 8
* indent-tabs-mode: t
* End:
*/
// vim: set noet ts=4 sts=4 sw=4:
KIMIface::reachableContacts
virtual QStringList reachableContacts()=0
Obtain a list of IM-contacts that are currently reachable.
KIMIface::allContacts
virtual QStringList allContacts()=0
Obtain a list of IM-contacts that are known to the application.
KIMIface::chatWithContact
virtual void chatWithContact(const QString &uid)=0
Start a chat session with the specified contact.
KIMIface::protocols
virtual QStringList protocols()=0
Obtain a list of supported IM services/protocols.
KIMIface::onlineContacts
virtual QStringList onlineContacts()=0
Obtain a list of IM-contacts that are currently online.
KIMIface
Generic DCOP interface for KDE instant messenger applications.
Definition: kimiface.h:85
KIMIface::isPresent
virtual bool isPresent(const QString &uid)=0
Confirm if a given contact is known to the IM application.
KIMIface::icon
virtual QPixmap icon(const QString &uid)=0
Obtain the icon representing the IM presence for the specified contact.
KIMIface::presenceStatus
virtual int presenceStatus(const QString &uid)=0
Obtain the IM presence as a number for the specified contact.
KIMIface::messageNewContact
virtual void messageNewContact(const QString &contactId, const QString &protocol)=0
Send a single message to a contact given only its protocol specific identifier.
KIMIface::sendFile
virtual void sendFile(const QString &uid, const KURL &sourceURL, const QString &altFileName=QString::null, uint fileSize=0)=0
Send a file to the contact.
KIMIface::context
virtual QString context(const QString &uid)=0
Obtain the given contact's current context (home, work, or any)
KIMIface::addContact
virtual bool addContact(const QString &contactId, const QString &protocol)=0
Add a new contact given its protocol specific identifier.
KIMIface::locate
virtual QString locate(const QString &contactId, const QString &protocol)=0
Obtain the KABC UID corresponding to the given IM address.
KIMIface::fileTransferContacts
virtual QStringList fileTransferContacts()=0
Obtain a list of IM-contacts who may receive file transfers.
KIMIface::messageContact
virtual void messageContact(const QString &uid, const QString &message)=0
Send a single message to the specified contact.
KIMIface::canReceiveFiles
virtual bool canReceiveFiles(const QString &uid)=0
Indicate if a given contact can receive files.
KIMIface::displayName
virtual QString displayName(const QString &uid)=0
Obtain the IM app's idea of the contact's display name.
KIMIface::presenceString
virtual QString presenceString(const QString &uid)=0
Obtain the IM presence as a i18ned string for the specified contact.
KIMIface::canRespond
virtual bool canRespond(const QString &uid)=0
Indicate if a given contact will be able to respond.

KDE Home | KDE Accessibility Home | Description of Access Keys