summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skypekit/skypekit.h
blob: 3f1d7b1e58076b995a688e29293d114bd2bd9427 (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
#pragma once

#include "common.h"

#include "group.h"
#include "search.h"
#include "account.h"
#include "contact.h"
#include "message.h"
#include "transfer.h"
#include "participant.h"
#include "conversation.h"

class CSkype : public Skype
{
public:
	typedef void (CSkypeProto::* OnMessaged)(CConversation::Ref conversation, CMessage::Ref message);

	CAccount*		newAccount(int oid);
	CContactGroup*	newContactGroup(int oid);
	CConversation*	newConversation(int oid);
	CContactSearch*	newContactSearch(int oid);
	CParticipant*	newParticipant(int oid);
	CContact*		newContact(int oid);	
	CMessage*		newMessage(int oid);
	CTransfer*		newTransfer(int oid);

	CSkype(int num_threads = 1);

	void SetOnMessageCallback(OnMessaged callback, CSkypeProto* proto);

	bool CreateConferenceWithConsumers(ConversationRef &conference, const SEStringList &identities);

private:
	CSkypeProto*	proto;
	OnMessaged		onMessagedCallback;

	void OnMessage(
		const MessageRef & message,
		const bool & changesInboxTimestamp,
		const MessageRef & supersedesHistoryMessage,
		const ConversationRef & conversation);
};