client-group-chat-room-p.h 2.48 KB
Newer Older
1 2
/*
 * client-group-chat-room-p.h
3
 * Copyright (C) 2010-2018 Belledonne Communications SARL
4
 *
Ghislain MARY's avatar
Ghislain MARY committed
5 6 7 8
 * 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.
9 10 11 12 13 14 15
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
Ghislain MARY's avatar
Ghislain MARY committed
16 17
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 19
 */

20 21
#ifndef _L_CLIENT_GROUP_CHAT_ROOM_P_H_
#define _L_CLIENT_GROUP_CHAT_ROOM_P_H_
22

Ronan's avatar
Ronan committed
23
#include "chat/chat-room/chat-room-p.h"
24
#include "client-group-chat-room.h"
25 26 27 28 29

// =============================================================================

LINPHONE_BEGIN_NAMESPACE

30
class ClientGroupChatRoomPrivate : public ChatRoomPrivate {
31
public:
32
	ClientGroupChatRoomPrivate () = default;
33

34
	std::list<IdentityAddress> cleanAddressesList (const std::list<IdentityAddress> &addresses) const;
35
	std::shared_ptr<CallSession> createSession ();
Ghislain MARY's avatar
Ghislain MARY committed
36
	void notifyReceived (const std::string &body);
37
	void multipartNotifyReceived (const std::string &body);
38

39
	void setCallSessionListener (CallSessionListener *listener);
40 41 42 43 44
	void setChatRoomListener (ChatRoomListener *listener) { chatRoomListener = listener; }

	// ChatRoomListener
	void onChatRoomInsertRequested (const std::shared_ptr<AbstractChatRoom> &chatRoom) override;
	void onChatRoomInsertInDatabaseRequested (const std::shared_ptr<AbstractChatRoom> &chatRoom) override;
45
	void onChatRoomDeleteRequested (const std::shared_ptr<AbstractChatRoom> &chatRoom) override;
46

47 48
	// CallSessionListener
	void onCallSessionSetReleased (const std::shared_ptr<const CallSession> &session) override;
49
	void onCallSessionStateChanged (const std::shared_ptr<const CallSession> &session, CallSession::State state, const std::string &message) override;
50

51 52 53
private:
	CallSessionListener *callSessionListener = this;
	ChatRoomListener *chatRoomListener = this;
54 55
	ClientGroupChatRoom::CapabilitiesMask capabilities = ClientGroupChatRoom::Capabilities::Conference;
	bool deletionOnTerminationEnabled = false;
56

57 58 59 60 61
	L_DECLARE_PUBLIC(ClientGroupChatRoom);
};

LINPHONE_END_NAMESPACE

62
#endif // ifndef _L_CLIENT_GROUP_CHAT_ROOM_P_H_