-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmrimcontact.h
104 lines (74 loc) · 2.65 KB
/
mrimcontact.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
#ifndef MRIMCONTACT_H
#define MRIMCONTACT_H
#include <QList>
#include <QPair>
#include <QString>
#include <kopetecontact.h>
#include <kopetechatsession.h>
#include "mra/mraprotocol.h"
class MRAOfflineMessage;
class ContactInfo;
class TransferRequestInfo;
class MrimContact : public Kopete::Contact
{
Q_OBJECT
public:
explicit MrimContact( Kopete::Account* _account,
const QString &uniqueName,
const QString &displayName,
int flags,
Kopete::MetaContact *parent );
virtual ~MrimContact();
/**
* @brief Returns a Kopete::ChatSession associated with this contact
*
* @param canCreate If @c true, then a new manager may be created
* @return The Contats's ChatSession Manager
*/
virtual Kopete::ChatSession *manager( CanCreateFlags canCreate = CannotCreate );
void receivedMessage( const QString &text );
void receivedOfflineMessage( const MRAOfflineMessage &message );
void typingMessage();
void avatarLoaded(const QImage &avatar);
virtual bool isReachable() { return true; }
void loadUserInfo();
void slotUserInfoLoaded(const MRAContactInfo &info);
void setFlags(int arg);
void loadChatMembersList();
void slotChatSettingsReceived(const MRAConferenceSettings &settings);
virtual QList<KAction *> *customContextMenuActions( );
virtual QList<KAction *> *customContextMenuActions( Kopete::ChatSession* );
void sendFile( const KUrl &sourceURL = KUrl(),
const QString &fileName = QString(), uint fileSize = 0L );
void receiveFile(const TransferRequestInfo &transferInfo);
void receiveFileCancel(const TransferRequestInfo &transferInfo);
/**
* @brief isOrdinaryContact: neither chat nor phone number
* @return
*/
bool isOrdinaryContact() const;
bool isChatContact() const;
void inviteContactToConference(const QString &contactIdToInvite);
void removeContactFromConference(const QString &contactIdToRemove);
signals:
void userInfoLoaded(const MRAContactInfo &info);
public slots:
void deleteContact();
void sendMessage( Kopete::Message &message );
void slotTypingTimeOut();
void slotChatSessionDestroyed();
void slotMyselfTyping(bool typing);
void slotMyselfTypingTimeout();
void slotLoadAvatar();
void slotPerformRequestForAuthorization();
void slotTransferFinished();
/**
* Show "info dialog" for the contact
*/
virtual void slotUserInfo ();
virtual void sync(unsigned int changed = 0xFF);
private:
class Private;
Private *d;
};
#endif // MRIMCONTACT_H