Port things from MSN to WLM plugin:
[kdenetwork.git] / kopete / protocols / telepathy / telepathyprotocol.h
blobf2e930614a20ac87ec6c914f28e5ef382871cef3
1 /*
2 * telepathyprotocol.h - Windows Live Telepathy Kopete protocol definition.
4 * Copyright (c) 2006 by Michaël Larouche <larouche@kde.org>
5 *
6 * Kopete (c) 2002-2006 by the Kopete developers <kopete-devel@kde.org>
8 *************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 *************************************************************************
17 #ifndef TELEPATHYPROTOCOL_H
18 #define TELEPATHYPROTOCOL_H
20 #include <kopeteprotocol.h>
21 #include <kopeteonlinestatus.h>
22 #include <kopeteproperty.h>
24 #include <QtTapioca/ContactBase>
26 #define TELEPATHY_DEBUG_AREA 14400
28 namespace Kopete
30 class Account;
33 class AddContactPage;
34 class KopeteEditAccountWidget;
36 /**
38 * @author Michaël Larouche <larouche@kde.org>
40 class KOPETE_EXPORT TelepathyProtocol : public Kopete::Protocol
42 Q_OBJECT
43 public:
44 const Kopete::OnlineStatus Available;
45 const Kopete::OnlineStatus Away;
46 const Kopete::OnlineStatus Busy;
47 const Kopete::OnlineStatus Hidden;
48 const Kopete::OnlineStatus ExtendedAway;
49 const Kopete::OnlineStatus Offline;
51 const Kopete::PropertyTmpl propAvatarToken;
53 TelepathyProtocol(QObject *parent, const QVariantList &args);
55 virtual Kopete::Account *createNewAccount(const QString &accountId);
56 virtual AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account);
57 virtual KopeteEditAccountWidget * createEditAccountWidget(Kopete::Account *account, QWidget *parent);
59 static TelepathyProtocol *protocol();
61 virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact,
62 const QMap<QString, QString> &serializedData, const QMap<QString, QString> &addressBookData );
64 QString formatTelepathyConfigGroup(const QString &connectionManager, const QString &protocol, const QString &accountId);
66 QtTapioca::ContactBase::Presence kopeteStatusToTelepathy(const Kopete::OnlineStatus &status);
67 Kopete::OnlineStatus telepathyStatusToKopete(QtTapioca::ContactBase::Presence presence);
69 private:
70 static TelepathyProtocol *s_self;
72 #endif