• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/kopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • kopete
kopetedbusinterface.h
Go to the documentation of this file.
1 /*
2  kopetedbusinterface.h - Kopete D-Bus interface
3 
4  Copyright (c) 2007 by MichaĆ«l Larouche <larouche@kde.org>
5  Copyright (c) 2007 Will Stephenson <wstephenson@kde.org>
6 
7  Kopete (c) 2002-2007 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2 of the License, or (at your option) any later version. *
15  * *
16  *************************************************************************
17 */
18 #ifndef KOPETE_DBUSINTERFACE_H
19 #define KOPETE_DBUSINTERFACE_H
20 
21 #include <QtCore/QObject>
22 #include <QtCore/QVariantMap>
23 
24 class KopeteDBusInterfacePrivate;
25 
30 class KopeteDBusInterface : public QObject
31 {
32  Q_OBJECT
33  Q_CLASSINFO("D-Bus Interface", "org.kde.Kopete")
34 
35 public:
40  KopeteDBusInterface(QObject *parent);
44  ~KopeteDBusInterface();
45 
46 public Q_SLOTS:
50  void connectAll();
51 
55  void disconnectAll();
56 
60  void suspend();
61 
65  void resume();
66 
74  bool isConnected(const QString &protocolName, const QString &accountId);
75 
81  void connect(const QString &protocolName, const QString &accountId);
82 
88  void disconnect(const QString &protocolName, const QString &accountId);
89 
94  QStringList protocols() const;
95 
100  QStringList identities() const;
101 
106  QStringList accounts() const;
107 
112  QStringList contacts() const;
113 
118  QString labelForIdentity(const QString & id) const;
119 
129  QStringList contactsByFilter(const QString &filter) const;
130 
139  void setIdentityNickName(const QString &nickName, const QString &identityId = QString());
140 
149  void setIdentityAvatar(const QString &avatarUrl, const QString &identityId = QString());
150 
160  void setIdentityOnlineStatus(const QString &status, const QString &message, const QString &identityId = QString());
161 
169  void setOnlineStatus(const QString &status, const QString &message = QString());
170 
177  void setStatusMessage(const QString &message);
178 
184  void sendMessage(const QString &contactId, const QString &message);
185 
190  void openChat(const QString &contactId);
191 
202  bool addContact( const QString &protocolName, const QString &accountId, const QString &contactId, const QString &displayName, const QString &groupName = QString() );
203 
209  void sendFile( const QString &contactId, const QString &fileUrl );
210 
215  QString getDisplayName(const QString &contactId);
216 
221  bool isContactOnline(const QString &contactId);
222 
228  QVariantMap contactProperties(const QString &contactId);
229 
230 Q_SIGNALS:
235  void contactChanged(QString contactId);
236 
237 private:
238  KopeteDBusInterfacePrivate * const d;
239 };
240 
241 #endif
KopeteDBusInterface::disconnect
void disconnect(const QString &protocolName, const QString &accountId)
Disconnect a given account in the given protocol.
Definition: kopetedbusinterface.cpp:418
KopeteDBusInterface::openChat
void openChat(const QString &contactId)
Open a chat window for the given contact.
Definition: kopetedbusinterface.cpp:301
KopeteDBusInterface::isConnected
bool isConnected(const QString &protocolName, const QString &accountId)
Get information if we are connected to a given account in the given protocol.
Definition: kopetedbusinterface.cpp:387
KopeteDBusInterface::addContact
bool addContact(const QString &protocolName, const QString &accountId, const QString &contactId, const QString &displayName, const QString &groupName=QString())
Adds a contact with the specified params.
Definition: kopetedbusinterface.cpp:333
KopeteDBusInterface::resume
void resume()
Sets the online status of all accounts to the status they had when suspend was called.
Definition: kopetedbusinterface.cpp:264
KopeteDBusInterface::setIdentityNickName
void setIdentityNickName(const QString &nickName, const QString &identityId=QString())
Set the nickname for the given identity.
Definition: kopetedbusinterface.cpp:138
KopeteDBusInterface::connectAll
void connectAll()
Connect all accounts.
Definition: kopetedbusinterface.cpp:246
KopeteDBusInterface::contactsByFilter
QStringList contactsByFilter(const QString &filter) const
Get a filered list of contacts based on the filter.
Definition: kopetedbusinterface.cpp:80
accountId
QString accountId
Definition: kopete-account-kconf_update.cpp:31
KopeteDBusInterface::suspend
void suspend()
Saves the online status of all accounts and disconnects them.
Definition: kopetedbusinterface.cpp:259
QObject
KopeteDBusInterface::identities
QStringList identities() const
Get a list of all identities' ID.
Definition: kopetedbusinterface.cpp:208
KopeteDBusInterface::setIdentityOnlineStatus
void setIdentityOnlineStatus(const QString &status, const QString &message, const QString &identityId=QString())
Set the online status for the given identity.
Definition: kopetedbusinterface.cpp:188
KopeteDBusInterface::contacts
QStringList contacts() const
Return all contacts.
Definition: kopetedbusinterface.cpp:75
KopeteDBusInterface::setIdentityAvatar
void setIdentityAvatar(const QString &avatarUrl, const QString &identityId=QString())
Set the avatar for the given identity.
Definition: kopetedbusinterface.cpp:159
QString
QStringList
KopeteDBusInterface::labelForIdentity
QString labelForIdentity(const QString &id) const
Get UI labels for identities.
Definition: kopetedbusinterface.cpp:220
KopeteDBusInterface::setOnlineStatus
void setOnlineStatus(const QString &status, const QString &message=QString())
Change the online status for all accounts.
Definition: kopetedbusinterface.cpp:269
KopeteDBusInterface::setStatusMessage
void setStatusMessage(const QString &message)
Change the status message for all accounts.
Definition: kopetedbusinterface.cpp:276
KopeteDBusInterface::KopeteDBusInterface
KopeteDBusInterface(QObject *parent)
Constructor.
Definition: kopetedbusinterface.cpp:51
KopeteDBusInterface::contactProperties
QVariantMap contactProperties(const QString &contactId)
Look up details for a specific contact.
Definition: kopetedbusinterface.cpp:435
KopeteDBusInterface
Public D-Bus interface for Kopete.
Definition: kopetedbusinterface.h:30
KopeteDBusInterface::accounts
QStringList accounts() const
Get a list of all account's ID.
Definition: kopetedbusinterface.cpp:234
KopeteDBusInterface::connect
void connect(const QString &protocolName, const QString &accountId)
Connect a given account in the given protocol.
Definition: kopetedbusinterface.cpp:401
KopeteDBusInterface::protocols
QStringList protocols() const
Get a list of all protocol names.
Definition: kopetedbusinterface.cpp:65
KopeteDBusInterface::sendFile
void sendFile(const QString &contactId, const QString &fileUrl)
Send a file to the given contact.
Definition: kopetedbusinterface.cpp:373
KopeteDBusInterface::disconnectAll
void disconnectAll()
Disconnect all accounts.
Definition: kopetedbusinterface.cpp:253
KopeteDBusInterface::getDisplayName
QString getDisplayName(const QString &contactId)
Retrieve the Display Name from the given contact ID.
Definition: kopetedbusinterface.cpp:315
KopeteDBusInterface::isContactOnline
bool isContactOnline(const QString &contactId)
Get the Online Status of the contact.
Definition: kopetedbusinterface.cpp:324
QObject::parent
QObject * parent() const
KopeteDBusInterfacePrivate
Tracks changes of all metacontacts and reports them via signals.
Definition: kopetedbusinterface_p.h:62
KopeteDBusInterface::~KopeteDBusInterface
~KopeteDBusInterface()
Destructor.
Definition: kopetedbusinterface.cpp:61
KopeteDBusInterface::sendMessage
void sendMessage(const QString &contactId, const QString &message)
Send a message to the given contact.
Definition: kopetedbusinterface.cpp:281
KopeteDBusInterface::contactChanged
void contactChanged(QString contactId)
Contact properties have changed: displayName, avatar, pending messages...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/kopete

Skip menu "kopete/kopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal