2 * telepathyprotocol.h - Windows Live Telepathy Kopete protocol definition.
4 * Copyright (c) 2006 by Michaël Larouche <larouche@kde.org>
6 * Kopete (c) 2002-2006 by the Kopete developers <kopete-devel@kde.org>
8 *************************************************************************
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. *
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
34 class KopeteEditAccountWidget
;
38 * @author Michaël Larouche <larouche@kde.org>
40 class KOPETE_EXPORT TelepathyProtocol
: public Kopete::Protocol
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
);
70 static TelepathyProtocol
*s_self
;