2 testbedprotocol.h - Kopete Testbed Protocol
4 Copyright (c) 2003 by Will Stephenson <will@stevello.free-online.co.uk>
5 Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
7 *************************************************************************
9 * This library is free software; you can redistribute it and/or *
10 * modify it under the terms of the GNU General Public *
11 * License as published by the Free Software Foundation; either *
12 * version 2 of the License, or (at your option) any later version. *
14 *************************************************************************
17 #ifndef TESTBEDPROTOCOL_H
18 #define TESTBEDPROTOCOL_H
20 #include <kopeteprotocol.h>
24 * Encapsulates the generic actions associated with this protocol
25 * @author Will Stephenson
27 class TestbedProtocol
: public Kopete::Protocol
31 TestbedProtocol(QObject
*parent
, const QVariantList
&args
);
34 * Convert the serialised data back into a TestbedContact and add this
35 * to its Kopete::MetaContact
37 virtual Kopete::Contact
*deserializeContact(
38 Kopete::MetaContact
*metaContact
,
39 const QMap
< QString
, QString
> & serializedData
,
40 const QMap
< QString
, QString
> & addressBookData
43 * Generate the widget needed to add TestbedContacts
45 virtual AddContactPage
* createAddContactWidget( QWidget
*parent
, Kopete::Account
*account
);
47 * Generate the widget needed to add/edit accounts for this protocol
49 virtual KopeteEditAccountWidget
* createEditAccountWidget( Kopete::Account
*account
, QWidget
*parent
);
51 * Generate a TestbedAccount
53 virtual Kopete::Account
* createNewAccount( const QString
&accountId
);
55 * Access the instance of this protocol
57 static TestbedProtocol
*protocol();
59 * Represents contacts that are Online
61 const Kopete::OnlineStatus testbedOnline
;
63 * Represents contacts that are Away
65 const Kopete::OnlineStatus testbedAway
;
67 * Represents contacts that are Offline
69 const Kopete::OnlineStatus testbedOffline
;
71 static TestbedProtocol
*s_protocol
;