Interfaces
kimproxy.cpp
Go to the documentation of this file.
206 QDBusConnection::sessionBus().connect( QString(), "/KIMIface", "org.kde.KIM", "contactPresenceChanged",
219 m_initialized = true; // we should only do this once, as registeredToDCOP() will catch any new starts
220 // So there is no error from a failed query when using kdelibs 3.2, which don't have this servicetype
226 QStringList registeredApps = QDBusConnection::sessionBus().interface()->registeredServiceNames();
241 //kDebug( debugArea() ) << " app name: " << (*offer)->name() << ", has instance " << *app << ", dbusService: " << dbusService;
257 void KIMProxy::nameOwnerChanged( const QString & appId, const QString &, const QString & newOwner )
300 kDebug( debugArea() ) << "App: " << appId << ", dbusService: " << dbusService << " started, using it for presence info.";
318 //kDebug( debugArea() ) << "current best presence from : " << current.best().appId << " is: " << current.best().presence;
368 //kDebug( debugArea() ) << "returning a null QPixmap because we were asked for an icon for a uid we know nothing about";
501 void KIMProxy::sendFile(const QString &uid, const QString &sourceURL, const QString &altFileName, uint fileSize )
555 // The app will notify itself to us using nameOwnerChanged, so we don't need to record a stub for it here
558 int result = KDBusServiceStarter::self()->findServiceFor( IM_SERVICE_TYPE, QString("Application"), &error, &dbusService );
579 presence->insert( it.currentKey().toLatin1().constData(), it.current()->presenceStatus( uid ) ); // m_im_client_stubs has qstring keys...
598 # warning "KIMProxy::pollApp( const QString & appId ).presenceStatus() function doesn't exist Need to fix it"
622 # warning "KIMProxy::stubForProtocol( const QString &protocol) code disabled: protocols() function doesn't exist. Need to fix it"
bool addContact(const QString &contactId, const QString &protocol)
Add a contact to the contact list.
Definition: kimproxy.cpp:520
bool canReceiveFiles(const QString &uid)
Indicate if a given uid can receive files.
Definition: kimproxy.cpp:445
QStringList reachableContacts()
Obtain a list of KDE address book entries who are currently reachable.
Definition: kimproxy.cpp:384
static KDBusServiceStarter * self()
#define kapp
iterator insert(const Key &key, const T &value)
registeredServiceNames
QStringList allContacts()
Obtain a list of IM-contactable entries in the KDE address book.
Definition: kimproxy.cpp:378
void pollApp(const QString &appId)
Bootstrap our presence data for a newly registered app.
Definition: kimproxy.cpp:585
static KServiceTypeTrader * self()
bool hasNext() const
OrgKdeKIMInterface * stubForProtocol(const QString &protocol)
Get the app stub for this protocol.
Definition: kimproxy.cpp:618
QDBusConnectionInterface * interface() const
#define K_GLOBAL_STATIC(TYPE, NAME)
void sendFile(const QString &uid, const QString &sourceURL, const QString &altFileName=QString(), uint fileSize=0)
Send the file to the contact.
Definition: kimproxy.cpp:501
QStringList fileTransferContacts()
Obtain a list of KDE address book entries who may receive file transfers.
Definition: kimproxy.cpp:412
QString displayName(const QString &uid)
Obtain the IM app's idea of the contact's display name Useful if KABC lookups may be too slow...
Definition: kimproxy.cpp:433
int findServiceFor(const QString &serviceType, const QString &constraint=QString(), QString *error=0, QString *dbusService=0, int flags=0)
QDBusConnection sessionBus()
KAction * preferences(const QObject *recvr, const char *slot, QObject *parent)
bool imAppsAvailable()
Are there any compatible instant messaging apps installed?
Definition: kimproxy.cpp:540
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
int presenceNumeric(const QString &uid)
Obtain the IM presence as a number (see KIMIface) for the specified addressee.
Definition: kimproxy.cpp:330
QString presenceString(const QString &uid)
Obtain the IM presence as a i18ned string for the specified addressee.
Definition: kimproxy.cpp:342
T value(int i) const
void clear()
bool canRespond(const QString &uid)
Some media are unidirectional (eg, sending SMS via a web interface).
Definition: kimproxy.cpp:455
const char * name() const
void append(const T &value)
bool isPresent(const QString &uid)
Confirm if a given KABC uid is known to KIMProxy.
Definition: kimproxy.cpp:428
QPixmap presenceIcon(const QString &uid)
Obtain the icon representing IM presence for the specified addressee.
Definition: kimproxy.cpp:357
QStringList onlineContacts()
Obtain a list of KDE address book entries who are currently online.
Definition: kimproxy.cpp:400
bool isEmpty() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
static int registerArea(const QByteArray &areaName, bool enabled=true)
QString locate(const QString &contactId, const QString &protocol)
Get the KABC uid corresponding to the supplied IM address Protocols should be.
Definition: kimproxy.cpp:530
iterator end()
const T value(const Key &key) const
bool initialize()
Get the proxy ready to connect Discover any running preferred IM clients and set up stubs for it...
Definition: kimproxy.cpp:215
Item next()
void sigContactPresenceChanged(const QString &uid)
Indicates that the specified UID's presence changed.
KService::List query(const QString &servicetype, const QString &constraint=QString()) const
T take(const Key &key)
void pollAll(const QString &uid)
Bootstrap our presence data by polling all known apps.
Definition: kimproxy.cpp:566
bool isEmpty() const
This class provides an easy-to-use interface to any instant messengers or chat programs that you have...
Definition: kimproxy.h:68
QPixmap SmallIcon(const QString &name, int force_size, int state, const QStringList &overlays)
OrgKdeKIMInterface * stubForUid(const QString &uid)
Get the app stub best able to reach this uid.
Definition: kimproxy.cpp:610
void sigPresenceInfoExpired()
Indicates that the sources of presence information have changed so any previously supplied presence i...
bool contains(const Key &key) const
void messageContact(const QString &uid, const QString &message)
Send a single message to the specified addressee Any response will be handled by the IM client as a n...
Definition: kimproxy.cpp:488
typedef Iterator
const T & value() const
bool connect(const QString &service, const QString &path, const QString &interface, const QString &name, QObject *receiver, const char *slot)
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
const KShortcut & end()
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
T readEntry(const QString &key, const T &aDefault) const
iterator begin()
void chatWithContact(const QString &uid)
Start a chat session with the specified addressee.
Definition: kimproxy.cpp:475
const KShortcut & begin()
QString context(const QString &uid)
Get the supplied addressee's current context (home, work, or any).
Definition: kimproxy.cpp:465
void contactPresenceChanged(const QString &uid, const QString &appId, int presence)
Just exists to let the idl compiler make the D-Bus signal for this.
Definition: kimproxy.cpp:312
QStringList list(const QString &fileClass)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:27:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.