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

kopete/protocols/messenger/libpapillon

client.h

Go to the documentation of this file.
00001 /*
00002    client.h - Papillon Client to Windows Live Messenger.
00003 
00004    Copyright (c) 2006 by Michaƫl Larouche <larouche@kde.org>
00005 
00006    *************************************************************************
00007    *                                                                       *
00008    * This library is free software; you can redistribute it and/or         *
00009    * modify it under the terms of the GNU Lesser General Public            *
00010    * License as published by the Free Software Foundation; either          *
00011    * version 2 of the License, or (at your option) any later version.      *
00012    *                                                                       *
00013    *************************************************************************
00014 */
00015 #ifndef PAPILLONCLIENT_H
00016 #define PAPILLONCLIENT_H
00017 
00018 #include <QtCore/QObject>
00019 #include <Papillon/Macros>
00020 #include <Papillon/Enums>
00021 
00022 namespace Papillon
00023 {
00024 
00025 class Connector;
00026 class Connection;
00027 class Task;
00028 class NetworkMessage;
00029 class MimeHeader;
00030 class StatusMessage;
00031 class ContactList;
00032 class UserContact;
00033 
00034 // TODO APIDOX, add a reference about connector model.
00063 class PAPILLON_EXPORT Client : public QObject
00064 {
00065     Q_OBJECT
00066 public:
00070     enum ConnectionStatus
00071     {
00075         Disconnected = 0,
00079         LoginBadPassword,
00083         Connecting,
00087         Connected,
00091         LoggedIn
00092     };
00093 
00099     explicit Client(Connector *connector, QObject *parent = 0);
00103     ~Client();
00104 
00109     Connection *createConnection();
00110 
00115     UserContact *userContact();
00116 
00125     ContactList *contactList();
00126 
00133     Connection *notificationConnection();
00134 
00139     Papillon::Client::ConnectionStatus connectionStatus() const;
00140 
00141 signals:
00146     void connectionStatusChanged(Papillon::Client::ConnectionStatus status);
00147 
00148     // TODO: Move those signals in Contact class
00154     void contactPresenceChanged(const QString &contactId, Papillon::Presence::Status presence);
00155 
00161     void contactStatusMessageChanged(const QString &contactId, const Papillon::StatusMessage &newStatusMessage);
00162 
00163 public slots:
00171     void setServer(const QString &server, quint16 port);
00172 
00182     void connectToServer(Papillon::Presence::Status initialPresence = Papillon::Presence::Online);
00183 
00188     void disconnectFromServer();
00189 
00190 //BEGIN Private Task slots
00191 private slots:
00196     void loginResult(Papillon::Task *task);
00203     void loginRedirect(const QString &server, quint16 port);
00204 
00210     void gotInitalProfile(const Papillon::MimeHeader &profileMessage);
00211 
00218     void slotContactPresenceChanged(const QString &contactId, Papillon::Presence::Status presence);
00219 
00226     void slotContactStatusMessageChanged(const QString &contactId, const Papillon::StatusMessage &newStatusMessage);
00227 //END Private Task slots
00228 
00229 //BEGIN Private Normal slots
00230 private slots:
00236     void initNotificationTasks();
00237 
00242     void notificationConnected();
00243 
00248     void login();
00249 //END Private Normal slots
00250 
00251 private:
00258     void writeCommand(NetworkMessage *command);
00259 
00265     void setConnectionStatus(Papillon::Client::ConnectionStatus newStatus);
00266 
00267     class Private;
00268     Private *d;
00269 };
00270 
00271 }
00272 
00273 #endif

kopete/protocols/messenger/libpapillon

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

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal