-
Notifications
You must be signed in to change notification settings - Fork 0
/
mrimprotocol.h
106 lines (94 loc) · 2.95 KB
/
mrimprotocol.h
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#ifndef kopetemrim_H
#define kopetemrim_H
#include <kopete/kopeteprotocol.h>
#include <kopeteproperty.h>
/**
* @brief This Represents the MRIM (Mail.Ru Instant Mmessaging) Protocol
*
* Encapsulates the generic actions associated with this protocol
* Usually, there is only a single instance of this class at any time
*
* @author Galanin Mikhail <bespoleznyak\@narod.ru>
*/
class MrimProtocol : public Kopete::Protocol
{
Q_OBJECT
public:
MrimProtocol(QObject *parent, const QStringList &args);
virtual ~MrimProtocol();
/**
* Convert the serialised data back into a MrimContact and add this
* to its Kopete::MetaContact
*/
virtual Kopete::Contact *deserializeContact(
Kopete::MetaContact *metaContact,
const QMap< QString, QString > & serializedData,
const QMap< QString, QString > & addressBookData
);
/**
* @brief Generate an Add Contact Page (not actually useful)
*
* As you cannot actually add an contact, this basically brings up an ugly message
*
* @param account is the account to add contact to
* @param parent The parent of the 'to be returned' widget
*
* @return The Add Contact Page Widget
*/
virtual AddContactPage * createAddContactWidget( QWidget *parent, Kopete::Account *account );
/**
* @brief Generate an Edit Account Page
*
* Generate the widget needed to add/edit accounts for this protocol
*
* @param account is the account to edit. If @c NULL, a new account is made
* @param parent The parent of the 'to be returned' widget
*
* @return The Edit Account Page Widget
*/
virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent );
/**
* @brief Create a New Account
*
* This will Generate a MrimAccount
* @param accountId A Unique String to identify the Account
* @return The Newly Created Account
*/
virtual Kopete::Account * createNewAccount( const QString &accountId );
/**
* Return whether the protocol supports offline messages.
*/
virtual bool canSendOffline() const { return true; }
/**
* @brief Access the instance of this protocol
* @return The Instance of this protocol
*/
static MrimProtocol *protocol();
/**
* Represents contacts that are Online
*/
const Kopete::OnlineStatus mrimOnline;
/**
* Represents contacts that are Away
*/
const Kopete::OnlineStatus mrimAway;
/**
* Represents contacts that are Offline
*/
const Kopete::OnlineStatus mrimOffline;
/**
* Represents contacts that are Busy
*/
const Kopete::OnlineStatus mrimDontDistrub;
/**
* Represents contacts that are Away
*/
const Kopete::OnlineStatus mrimUnknown;
/**
* photo (avatar)
*/
const Kopete::PropertyTmpl propPhoto;
protected:
static MrimProtocol *s_protocol;
};
#endif // kopetemrim_H