kimiface.h
00001 /* 00002 kimiface.h - KDE Instant Messenger DCOP Interface 00003 00004 Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #ifndef KIMIFACE_H 00023 #define KIMIFACE_H 00024 00025 #include <qpixmap.h> 00026 #include <dcopobject.h> 00027 #include <qstringlist.h> 00028 #include <kurl.h> 00029 00043 class KIMIface : virtual public DCOPObject 00044 { 00045 K_DCOP 00046 00047 k_dcop: 00048 // ACCESSORS 00049 // contact list 00055 virtual QStringList allContacts() = 0; 00061 virtual QStringList reachableContacts() = 0; 00067 virtual QStringList onlineContacts() = 0; 00073 virtual QStringList fileTransferContacts() = 0; 00074 00075 // individual 00081 virtual bool isPresent( const QString & uid ) = 0; 00088 virtual QString displayName( const QString & uid ) = 0; 00094 virtual QString presenceString( const QString & uid ) = 0; 00100 virtual int presenceStatus( const QString & uid ) = 0; 00106 virtual bool canReceiveFiles( const QString & uid ) = 0; 00114 virtual bool canRespond( const QString & uid ) = 0; 00122 virtual QString locate( const QString & contactId, const QString & protocol ) = 0; 00123 // metadata 00129 virtual QPixmap icon( const QString & uid ) = 0; 00135 virtual QString context( const QString & uid ) = 0; 00136 // App capabilities 00141 virtual QStringList protocols() = 0; 00142 00143 // ACTORS 00151 virtual void messageContact( const QString &uid, const QString& message ) = 0; 00152 00156 virtual void messageNewContact( const QString &contactId, const QString &protocol ) = 0; 00157 00162 virtual void chatWithContact( const QString &uid ) = 0; 00163 00171 virtual void sendFile(const QString &uid, const KURL &sourceURL, 00172 const QString &altFileName = QString::null, uint fileSize = 0) = 0; 00173 00174 // MUTATORS 00175 // Contact list 00182 virtual bool addContact( const QString &contactId, const QString &protocol ) = 0; 00183 // SIGNALS 00184 k_dcop_signals: 00191 void contactPresenceChanged( QString uid, QCString appId, int presence ); 00192 }; 00193 00194 #endif 00195 00196 00197 00198 /* 00199 * Local variables: 00200 * c-indentation-style: k&r 00201 * c-basic-offset: 8 00202 * indent-tabs-mode: t 00203 * End: 00204 */ 00205 // vim: set noet ts=4 sts=4 sw=4: 00206