summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/meanwhile/meanwhileprotocol.h
blob: 907b0482fa60a7ac151c6e67bd12edf5e60e8277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
    meanwhileprotocl.h - the meanwhile protocol definition

    Copyright (c) 2005      by Jeremy Kerr <jk@ozlabs.org>
    Copyright (c) 2003-2004 by Sivaram Gottimukkala  <suppandi@gmail.com>

    Kopete    (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>

    *************************************************************************
    *                                                                       *
    * This program is free software; you can redistribute it and/or modify  *
    * it under the terms of the GNU General Public License as published by  *
    * the Free Software Foundation; either version 2 of the License, or     *
    * (at your option) any later version.                                   *
    *                                                                       *
    *************************************************************************
*/
#ifndef MEANWHILEPROTOCOL_H
#define MEANWHILEPROTOCOL_H

#include <kopeteprotocol.h>

#include "kopetecontact.h"
#include "kopetemetacontact.h"
#include "kopeteonlinestatus.h"
#include "kopeteonlinestatusmanager.h"
#include "addcontactpage.h"

#include <kdebug.h>
#define MEANWHILE_DEBUG 14200
#define HERE kdDebug(MEANWHILE_DEBUG) << k_funcinfo << endl
#define mwDebug() kdDebug(MEANWHILE_DEBUG)

class MeanwhileAccount;
class MeanwhileEditAccountWidget;
class MeanwhileAddContactPage;

class MeanwhileProtocol : public Kopete::Protocol
{
    Q_OBJECT
  
public:
    MeanwhileProtocol(TQObject *parent, const char *name,
            const TQStringList &args);

    ~MeanwhileProtocol();

    virtual AddContactPage *createAddContactWidget(TQWidget *parent,
            Kopete::Account *account);

    virtual KopeteEditAccountWidget *createEditAccountWidget(
            Kopete::Account *account, TQWidget *parent);

    virtual Kopete::Account *createNewAccount(const TQString &accountId);

    virtual Kopete::Contact *deserializeContact(
            Kopete::MetaContact *metaContact,
            const TQMap<TQString,TQString> &serializedData,
            const TQMap<TQString, TQString> &addressBookData);

    const Kopete::OnlineStatus accountOfflineStatus();

    const Kopete::OnlineStatus lookupStatus(
            enum Kopete::OnlineStatusManager::Categories cats);

    const Kopete::OnlineStatus statusOffline;
    const Kopete::OnlineStatus statusOnline;
    const Kopete::OnlineStatus statusAway;
    const Kopete::OnlineStatus statusBusy;
    const Kopete::OnlineStatus statusIdle;
    const Kopete::OnlineStatus statusAccountOffline;

    Kopete::ContactPropertyTmpl statusMessage;
    Kopete::ContactPropertyTmpl awayMessage;

};

#endif