~ubuntu-branches/ubuntu/saucy/kopete/saucy-proposed

« back to all changes in this revision

Viewing changes to protocols/testbed/testbedprotocol.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-06-21 02:22:39 UTC
  • Revision ID: package-import@ubuntu.com-20130621022239-63l3zc8p0nf26pt6
Tags: upstream-4.10.80
ImportĀ upstreamĀ versionĀ 4.10.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    testbedprotocol.h - Kopete Testbed Protocol
 
3
 
 
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>
 
6
 
 
7
    *************************************************************************
 
8
    *                                                                       *
 
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.      *
 
13
    *                                                                       *
 
14
    *************************************************************************
 
15
*/
 
16
 
 
17
#ifndef TESTBEDPROTOCOL_H
 
18
#define TESTBEDPROTOCOL_H
 
19
 
 
20
#include <kopeteprotocol.h>
 
21
#include <QVariant>
 
22
 
 
23
 
 
24
 
 
25
/**
 
26
 * Encapsulates the generic actions associated with this protocol
 
27
 * @author Will Stephenson
 
28
 */
 
29
class TestbedProtocol : public Kopete::Protocol
 
30
{
 
31
        Q_OBJECT
 
32
public:
 
33
        TestbedProtocol(QObject *parent, const QVariantList &args);
 
34
    ~TestbedProtocol();
 
35
        /**
 
36
         * Convert the serialised data back into a TestbedContact and add this
 
37
         * to its Kopete::MetaContact
 
38
         */
 
39
        virtual Kopete::Contact *deserializeContact(
 
40
                        Kopete::MetaContact *metaContact,
 
41
                        const QMap< QString, QString > & serializedData,
 
42
                        const QMap< QString, QString > & addressBookData
 
43
                );
 
44
        /**
 
45
         * Generate the widget needed to add TestbedContacts
 
46
         */
 
47
        virtual AddContactPage * createAddContactWidget( QWidget *parent, Kopete::Account *account );
 
48
        /**
 
49
         * Generate the widget needed to add/edit accounts for this protocol
 
50
         */
 
51
        virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent );
 
52
        /**
 
53
         * Generate a TestbedAccount
 
54
         */
 
55
        virtual Kopete::Account * createNewAccount( const QString &accountId );
 
56
        /**
 
57
         * Access the instance of this protocol
 
58
         */
 
59
        static TestbedProtocol *protocol();
 
60
        /**
 
61
         * Represents contacts that are Online
 
62
         */
 
63
        const Kopete::OnlineStatus testbedOnline;
 
64
        /**
 
65
         * Represents contacts that are Away
 
66
         */
 
67
        const Kopete::OnlineStatus testbedAway;
 
68
        /**
 
69
         * Represents contacts that are Busy
 
70
         */
 
71
        const Kopete::OnlineStatus testbedBusy;
 
72
        /**
 
73
         * Represents contacts that are Offline
 
74
         */
 
75
        const Kopete::OnlineStatus testbedOffline;
 
76
protected:
 
77
        static TestbedProtocol *s_protocol;
 
78
};
 
79
 
 
80
#endif