feat(ChatRoom): provide a proxy and client group to basic chat room

This commit is contained in:
Ronan Abhamon 2017-12-15 14:59:29 +01:00
parent 16267be498
commit 4bf5640f1f
10 changed files with 559 additions and 213 deletions

View file

@ -46,6 +46,9 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
chat/chat-room/chat-room.h
chat/chat-room/client-group-chat-room-p.h
chat/chat-room/client-group-chat-room.h
chat/chat-room/client-group-to-basic-chat-room.h
chat/chat-room/proxy-chat-room-p.h
chat/chat-room/proxy-chat-room.h
chat/chat-room/real-time-text-chat-room-p.h
chat/chat-room/real-time-text-chat-room.h
chat/chat-room/server-group-chat-room-p.h
@ -177,6 +180,8 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
chat/chat-room/chat-room-id.cpp
chat/chat-room/chat-room.cpp
chat/chat-room/client-group-chat-room.cpp
chat/chat-room/client-group-to-basic-chat-room.cpp
chat/chat-room/proxy-chat-room.cpp
chat/chat-room/real-time-text-chat-room.cpp
chat/chat-room/server-group-chat-room-stub.cpp
chat/cpim/header/cpim-core-headers.cpp

View file

@ -33,11 +33,11 @@ class ChatRoomId;
class EventLog;
class LINPHONE_PUBLIC AbstractChatRoom : public Object, public CoreAccessor, public ConferenceInterface {
friend class BasicToClientGroupChatRoomPrivate;
friend class ChatMessage;
friend class ChatMessagePrivate;
friend class CorePrivate;
friend class MainDb;
friend class ProxyChatRoomPrivate;
public:
L_DECLARE_ENUM(Capabilities, L_ENUM_VALUES_CHAT_ROOM_CAPABILITIES);

View file

@ -17,9 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "abstract-chat-room-p.h"
#include "basic-to-client-group-chat-room.h"
#include "chat-room.h"
#include "proxy-chat-room-p.h"
// =============================================================================
@ -29,181 +28,22 @@ LINPHONE_BEGIN_NAMESPACE
// -----------------------------------------------------------------------------
class BasicToClientGroupChatRoomPrivate : public AbstractChatRoomPrivate {
class BasicToClientGroupChatRoomPrivate : public ProxyChatRoomPrivate {
public:
shared_ptr<AbstractChatRoom> chatRoom;
private:
inline void setCreationTime (time_t creationTime) override {
chatRoom->getPrivate()->setCreationTime(creationTime);
}
inline void setLastUpdateTime (time_t lastUpdateTime) override {
chatRoom->getPrivate()->setLastUpdateTime(lastUpdateTime);
}
inline void setState (BasicToClientGroupChatRoom::State state) override {
chatRoom->getPrivate()->setState(state);
}
inline void sendChatMessage (const shared_ptr<ChatMessage> &chatMessage) override {
chatRoom->getPrivate()->sendChatMessage(chatMessage);
}
inline void addTransientEvent (const shared_ptr<EventLog> &eventLog) override {
chatRoom->getPrivate()->addTransientEvent(eventLog);
}
inline void removeTransientEvent (const shared_ptr<EventLog> &eventLog) override {
chatRoom->getPrivate()->removeTransientEvent(eventLog);
}
inline void notifyUndecryptableChatMessageReceived (const shared_ptr<ChatMessage> &chatMessage) override {
chatRoom->getPrivate()->notifyUndecryptableChatMessageReceived(chatMessage);
}
inline LinphoneReason onSipMessageReceived (SalOp *op, const SalMessage *message) override {
return chatRoom->getPrivate()->onSipMessageReceived(op, message);
ProxyChatRoomPrivate::sendChatMessage(chatMessage);
// TODO: Try migration.
}
inline void onChatMessageReceived (const shared_ptr<ChatMessage> &chatMessage) override {
chatRoom->getPrivate()->onChatMessageReceived(chatMessage);
ProxyChatRoomPrivate::onChatMessageReceived(chatMessage);
// TODO: Try migration.
}
};
// =============================================================================
BasicToClientGroupChatRoom::BasicToClientGroupChatRoom (const shared_ptr<ChatRoom> &chatRoom) :
AbstractChatRoom(*new BasicToClientGroupChatRoomPrivate, chatRoom->getCore()) {
L_D();
d->chatRoom = chatRoom;
}
// -----------------------------------------------------------------------------
const ChatRoomId &BasicToClientGroupChatRoom::getChatRoomId () const {
L_D();
return d->chatRoom->getChatRoomId();
}
const IdentityAddress &BasicToClientGroupChatRoom::getPeerAddress () const {
L_D();
return d->chatRoom->getPeerAddress();
}
const IdentityAddress &BasicToClientGroupChatRoom::getLocalAddress () const {
L_D();
return d->chatRoom->getLocalAddress();
}
// -----------------------------------------------------------------------------
time_t BasicToClientGroupChatRoom::getCreationTime () const {
L_D();
return d->chatRoom->getCreationTime();
}
time_t BasicToClientGroupChatRoom::getLastUpdateTime () const {
L_D();
return d->chatRoom->getLastUpdateTime();
}
// -----------------------------------------------------------------------------
BasicToClientGroupChatRoom::State BasicToClientGroupChatRoom::getState () const {
L_D();
return d->chatRoom->getState();
}
// -----------------------------------------------------------------------------
list<shared_ptr<EventLog>> BasicToClientGroupChatRoom::getHistory (int nLast) const {
L_D();
return d->chatRoom->getHistory(nLast);
}
list<shared_ptr<EventLog>> BasicToClientGroupChatRoom::getHistoryRange (int begin, int end) const {
L_D();
return d->chatRoom->getHistoryRange(begin, end);
}
int BasicToClientGroupChatRoom::getHistorySize () const {
L_D();
return d->chatRoom->getHistorySize();
}
void BasicToClientGroupChatRoom::deleteHistory () {
L_D();
d->chatRoom->deleteHistory();
}
shared_ptr<ChatMessage> BasicToClientGroupChatRoom::getLastChatMessageInHistory () const {
L_D();
return d->chatRoom->getLastChatMessageInHistory();
}
int BasicToClientGroupChatRoom::getChatMessageCount () const {
L_D();
return d->chatRoom->getChatMessageCount();
}
int BasicToClientGroupChatRoom::getUnreadChatMessageCount () const {
L_D();
return d->chatRoom->getUnreadChatMessageCount();
}
// -----------------------------------------------------------------------------
void BasicToClientGroupChatRoom::compose () {
L_D();
return d->chatRoom->compose();
}
bool BasicToClientGroupChatRoom::isRemoteComposing () const {
L_D();
return d->chatRoom->isRemoteComposing();
}
list<IdentityAddress> BasicToClientGroupChatRoom::getComposingAddresses () const {
L_D();
return d->chatRoom->getComposingAddresses();
}
// -----------------------------------------------------------------------------
shared_ptr<ChatMessage> BasicToClientGroupChatRoom::createChatMessage () {
L_D();
return d->chatRoom->createChatMessage();
}
shared_ptr<ChatMessage> BasicToClientGroupChatRoom::createChatMessage (const string &text) {
L_D();
return d->chatRoom->createChatMessage(text);
}
shared_ptr<ChatMessage> BasicToClientGroupChatRoom::createFileTransferMessage (const LinphoneContent *initialContent) {
L_D();
return d->chatRoom->createFileTransferMessage(initialContent);
}
// -----------------------------------------------------------------------------
shared_ptr<ChatMessage> BasicToClientGroupChatRoom::findChatMessage (const string &messageId) const {
L_D();
return d->chatRoom->findChatMessage(messageId);
}
shared_ptr<ChatMessage> BasicToClientGroupChatRoom::findChatMessage (
const string &messageId,
ChatMessage::Direction direction
) const {
L_D();
return d->chatRoom->findChatMessage(messageId, direction);
}
void BasicToClientGroupChatRoom::markAsRead () {
L_D();
d->chatRoom->markAsRead();
}
ProxyChatRoom(*new BasicToClientGroupChatRoomPrivate, chatRoom) {}
LINPHONE_END_NAMESPACE

View file

@ -20,58 +20,18 @@
#ifndef _BASIC_TO_CLIENT_GROUP_CHAT_ROOM_H_
#define _BASIC_TO_CLIENT_GROUP_CHAT_ROOM_H_
#include "abstract-chat-room.h"
#include "proxy-chat-room.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class BasicToClientGroupChatRoomPrivate;
class ChatRoom;
class LINPHONE_PUBLIC BasicToClientGroupChatRoom : public AbstractChatRoom {
class LINPHONE_PUBLIC BasicToClientGroupChatRoom : public ProxyChatRoom {
public:
BasicToClientGroupChatRoom (const std::shared_ptr<ChatRoom> &chatRoom);
const ChatRoomId &getChatRoomId () const override;
const IdentityAddress &getPeerAddress () const override;
const IdentityAddress &getLocalAddress () const override;
time_t getCreationTime () const override;
time_t getLastUpdateTime () const override;
State getState () const override;
std::list<std::shared_ptr<EventLog>> getHistory (int nLast) const override;
std::list<std::shared_ptr<EventLog>> getHistoryRange (int begin, int end) const override;
int getHistorySize () const override;
void deleteHistory () override;
std::shared_ptr<ChatMessage> getLastChatMessageInHistory () const override;
int getChatMessageCount () const override;
int getUnreadChatMessageCount () const override;
void compose () override;
bool isRemoteComposing () const override;
std::list<IdentityAddress> getComposingAddresses () const override;
std::shared_ptr<ChatMessage> createChatMessage () override;
std::shared_ptr<ChatMessage> createChatMessage (const std::string &text) override;
// TODO: Remove LinphoneContent by LinphonePrivate::Content.
std::shared_ptr<ChatMessage> createFileTransferMessage (const LinphoneContent *initialContent) override;
std::shared_ptr<ChatMessage> findChatMessage (const std::string &messageId) const override;
std::shared_ptr<ChatMessage> findChatMessage (
const std::string &messageId,
ChatMessage::Direction direction
) const override;
void markAsRead () override;
private:
L_DECLARE_PRIVATE(BasicToClientGroupChatRoom);
L_DISABLE_COPY(BasicToClientGroupChatRoom);

View file

@ -0,0 +1,49 @@
/*
* client-group-to-basic-chat-room.cpp
* Copyright (C) 2010-2017 Belledonne Communications SARL
*
* 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.
*
* 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
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "client-group-to-basic-chat-room.h"
#include "proxy-chat-room-p.h"
// =============================================================================
using namespace std;
LINPHONE_BEGIN_NAMESPACE
// -----------------------------------------------------------------------------
class ClientGroupToBasicChatRoomPrivate : public ProxyChatRoomPrivate {
public:
inline void sendChatMessage (const shared_ptr<ChatMessage> &chatMessage) override {
ProxyChatRoomPrivate::sendChatMessage(chatMessage);
// TODO: Try migration.
}
inline void onChatMessageReceived (const shared_ptr<ChatMessage> &chatMessage) override {
ProxyChatRoomPrivate::onChatMessageReceived(chatMessage);
// TODO: Try migration.
}
};
// =============================================================================
ClientGroupToBasicChatRoom::ClientGroupToBasicChatRoom (const shared_ptr<ChatRoom> &chatRoom) :
ProxyChatRoom(*new ClientGroupToBasicChatRoomPrivate, chatRoom) {}
LINPHONE_END_NAMESPACE

View file

@ -0,0 +1,42 @@
/*
* basic-to-client-group-chat-room.h
* Copyright (C) 2010-2017 Belledonne Communications SARL
*
* 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.
*
* 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
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _CLIENT_GROUP_TO_BASIC_CHAT_ROOM_H_
#define _CLIENT_GROUP_TO_BASIC_CHAT_ROOM_H_
#include "proxy-chat-room.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class ClientGroupToBasicChatRoomPrivate;
class LINPHONE_PUBLIC ClientGroupToBasicChatRoom : public ProxyChatRoom {
public:
ClientGroupToBasicChatRoom (const std::shared_ptr<ChatRoom> &chatRoom);
private:
L_DECLARE_PRIVATE(ClientGroupToBasicChatRoom);
L_DISABLE_COPY(ClientGroupToBasicChatRoom);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _CLIENT_GROUP_TO_BASIC_CHAT_ROOM_H_

View file

@ -0,0 +1,72 @@
/*
* proxy-chat-room-p.h
* Copyright (C) 2010-2017 Belledonne Communications SARL
*
* 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.
*
* 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
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _PROXY_CHAT_ROOM_P_H_
#define _PROXY_CHAT_ROOM_P_H_
#include "abstract-chat-room-p.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class ProxyChatRoomPrivate : public AbstractChatRoomPrivate {
public:
inline void setCreationTime (time_t creationTime) override {
chatRoom->getPrivate()->setCreationTime(creationTime);
}
inline void setLastUpdateTime (time_t lastUpdateTime) override {
chatRoom->getPrivate()->setLastUpdateTime(lastUpdateTime);
}
inline void setState (AbstractChatRoom::State state) override {
chatRoom->getPrivate()->setState(state);
}
inline void sendChatMessage (const std::shared_ptr<ChatMessage> &chatMessage) override {
chatRoom->getPrivate()->sendChatMessage(chatMessage);
}
inline void addTransientEvent (const std::shared_ptr<EventLog> &eventLog) override {
chatRoom->getPrivate()->addTransientEvent(eventLog);
}
inline void removeTransientEvent (const std::shared_ptr<EventLog> &eventLog) override {
chatRoom->getPrivate()->removeTransientEvent(eventLog);
}
inline void notifyUndecryptableChatMessageReceived (const std::shared_ptr<ChatMessage> &chatMessage) override {
chatRoom->getPrivate()->notifyUndecryptableChatMessageReceived(chatMessage);
}
inline LinphoneReason onSipMessageReceived (SalOp *op, const SalMessage *message) override {
return chatRoom->getPrivate()->onSipMessageReceived(op, message);
}
inline void onChatMessageReceived (const std::shared_ptr<ChatMessage> &chatMessage) override {
chatRoom->getPrivate()->onChatMessageReceived(chatMessage);
}
std::shared_ptr<AbstractChatRoom> chatRoom;
};
LINPHONE_END_NAMESPACE
#endif // ifndef _PROXY_CHAT_ROOM_P_H_

View file

@ -0,0 +1,255 @@
/*
* proxy-chat-room.cpp
* Copyright (C) 2010-2017 Belledonne Communications SARL
*
* 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.
*
* 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
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "basic-to-client-group-chat-room.h"
#include "chat-room.h"
#include "proxy-chat-room-p.h"
// =============================================================================
using namespace std;
LINPHONE_BEGIN_NAMESPACE
// -----------------------------------------------------------------------------
ProxyChatRoom::ProxyChatRoom (ProxyChatRoomPrivate &p, const shared_ptr<ChatRoom> &chatRoom) :
AbstractChatRoom(p, chatRoom->getCore()) {
L_D();
d->chatRoom = chatRoom;
}
// -----------------------------------------------------------------------------
const ChatRoomId &ProxyChatRoom::getChatRoomId () const {
L_D();
return d->chatRoom->getChatRoomId();
}
const IdentityAddress &ProxyChatRoom::getPeerAddress () const {
L_D();
return d->chatRoom->getPeerAddress();
}
const IdentityAddress &ProxyChatRoom::getLocalAddress () const {
L_D();
return d->chatRoom->getLocalAddress();
}
// -----------------------------------------------------------------------------
time_t ProxyChatRoom::getCreationTime () const {
L_D();
return d->chatRoom->getCreationTime();
}
time_t ProxyChatRoom::getLastUpdateTime () const {
L_D();
return d->chatRoom->getLastUpdateTime();
}
// -----------------------------------------------------------------------------
ProxyChatRoom::State ProxyChatRoom::getState () const {
L_D();
return d->chatRoom->getState();
}
// -----------------------------------------------------------------------------
list<shared_ptr<EventLog>> ProxyChatRoom::getHistory (int nLast) const {
L_D();
return d->chatRoom->getHistory(nLast);
}
list<shared_ptr<EventLog>> ProxyChatRoom::getHistoryRange (int begin, int end) const {
L_D();
return d->chatRoom->getHistoryRange(begin, end);
}
int ProxyChatRoom::getHistorySize () const {
L_D();
return d->chatRoom->getHistorySize();
}
void ProxyChatRoom::deleteHistory () {
L_D();
d->chatRoom->deleteHistory();
}
shared_ptr<ChatMessage> ProxyChatRoom::getLastChatMessageInHistory () const {
L_D();
return d->chatRoom->getLastChatMessageInHistory();
}
int ProxyChatRoom::getChatMessageCount () const {
L_D();
return d->chatRoom->getChatMessageCount();
}
int ProxyChatRoom::getUnreadChatMessageCount () const {
L_D();
return d->chatRoom->getUnreadChatMessageCount();
}
// -----------------------------------------------------------------------------
void ProxyChatRoom::compose () {
L_D();
return d->chatRoom->compose();
}
bool ProxyChatRoom::isRemoteComposing () const {
L_D();
return d->chatRoom->isRemoteComposing();
}
list<IdentityAddress> ProxyChatRoom::getComposingAddresses () const {
L_D();
return d->chatRoom->getComposingAddresses();
}
// -----------------------------------------------------------------------------
shared_ptr<ChatMessage> ProxyChatRoom::createChatMessage () {
L_D();
return d->chatRoom->createChatMessage();
}
shared_ptr<ChatMessage> ProxyChatRoom::createChatMessage (const string &text) {
L_D();
return d->chatRoom->createChatMessage(text);
}
shared_ptr<ChatMessage> ProxyChatRoom::createFileTransferMessage (const LinphoneContent *initialContent) {
L_D();
return d->chatRoom->createFileTransferMessage(initialContent);
}
// -----------------------------------------------------------------------------
shared_ptr<ChatMessage> ProxyChatRoom::findChatMessage (const string &messageId) const {
L_D();
return d->chatRoom->findChatMessage(messageId);
}
shared_ptr<ChatMessage> ProxyChatRoom::findChatMessage (
const string &messageId,
ChatMessage::Direction direction
) const {
L_D();
return d->chatRoom->findChatMessage(messageId, direction);
}
void ProxyChatRoom::markAsRead () {
L_D();
d->chatRoom->markAsRead();
}
// -----------------------------------------------------------------------------
const IdentityAddress &ProxyChatRoom::getConferenceAddress () const {
L_D();
return d->chatRoom->getConferenceAddress();
}
// -----------------------------------------------------------------------------
bool ProxyChatRoom::canHandleParticipants () const {
L_D();
return d->chatRoom->canHandleParticipants();
}
void ProxyChatRoom::addParticipant (
const IdentityAddress &participantAddress,
const CallSessionParams *params,
bool hasMedia
) {
L_D();
return d->chatRoom->addParticipant(participantAddress, params, hasMedia);
}
void ProxyChatRoom::addParticipants (
const list<IdentityAddress> &addresses,
const CallSessionParams *params,
bool hasMedia
) {
L_D();
return d->chatRoom->addParticipants(addresses, params, hasMedia);
}
void ProxyChatRoom::removeParticipant (const shared_ptr<const Participant> &participant) {
L_D();
d->chatRoom->removeParticipant(participant);
}
void ProxyChatRoom::removeParticipants (const list<shared_ptr<Participant>> &participants) {
L_D();
d->chatRoom->removeParticipants(participants);
}
shared_ptr<Participant> ProxyChatRoom::findParticipant (const IdentityAddress &participantAddress) const {
L_D();
return d->chatRoom->findParticipant(participantAddress);
}
shared_ptr<Participant> ProxyChatRoom::getMe () const {
L_D();
return d->chatRoom->getMe();
}
int ProxyChatRoom::getParticipantCount () const {
L_D();
return d->chatRoom->getParticipantCount();
}
const list<shared_ptr<Participant>> &ProxyChatRoom::getParticipants () const {
L_D();
return d->chatRoom->getParticipants();
}
void ProxyChatRoom::setParticipantAdminStatus (const shared_ptr<Participant> &participant, bool isAdmin) {
L_D();
d->chatRoom->setParticipantAdminStatus(participant, isAdmin);
}
// -----------------------------------------------------------------------------
const string &ProxyChatRoom::getSubject () const {
L_D();
return d->chatRoom->getSubject();
}
void ProxyChatRoom::setSubject (const string &subject) {
L_D();
d->chatRoom->setSubject(subject);
}
// -----------------------------------------------------------------------------
void ProxyChatRoom::join () {
L_D();
d->chatRoom->join();
}
void ProxyChatRoom::leave () {
L_D();
d->chatRoom->leave();
}
LINPHONE_END_NAMESPACE

View file

@ -0,0 +1,115 @@
/*
* proxy-chat-room.h
* Copyright (C) 2010-2017 Belledonne Communications SARL
*
* 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.
*
* 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
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _PROXY_CHAT_ROOM_H_
#define _PROXY_CHAT_ROOM_H_
#include "abstract-chat-room.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class ChatRoom;
class ProxyChatRoomPrivate;
class LINPHONE_PUBLIC ProxyChatRoom : public AbstractChatRoom {
public:
const ChatRoomId &getChatRoomId () const override;
const IdentityAddress &getPeerAddress () const override;
const IdentityAddress &getLocalAddress () const override;
time_t getCreationTime () const override;
time_t getLastUpdateTime () const override;
State getState () const override;
std::list<std::shared_ptr<EventLog>> getHistory (int nLast) const override;
std::list<std::shared_ptr<EventLog>> getHistoryRange (int begin, int end) const override;
int getHistorySize () const override;
void deleteHistory () override;
std::shared_ptr<ChatMessage> getLastChatMessageInHistory () const override;
int getChatMessageCount () const override;
int getUnreadChatMessageCount () const override;
void compose () override;
bool isRemoteComposing () const override;
std::list<IdentityAddress> getComposingAddresses () const override;
std::shared_ptr<ChatMessage> createChatMessage () override;
std::shared_ptr<ChatMessage> createChatMessage (const std::string &text) override;
// TODO: Remove LinphoneContent by LinphonePrivate::Content.
std::shared_ptr<ChatMessage> createFileTransferMessage (const LinphoneContent *initialContent) override;
std::shared_ptr<ChatMessage> findChatMessage (const std::string &messageId) const override;
std::shared_ptr<ChatMessage> findChatMessage (
const std::string &messageId,
ChatMessage::Direction direction
) const override;
void markAsRead () override;
const IdentityAddress &getConferenceAddress () const override;
bool canHandleParticipants () const override;
void addParticipant (
const IdentityAddress &participantAddress,
const CallSessionParams *params,
bool hasMedia
) override;
void addParticipants (
const std::list<IdentityAddress> &addresses,
const CallSessionParams *params,
bool hasMedia
) override;
void removeParticipant (const std::shared_ptr<const Participant> &participant) override;
void removeParticipants (const std::list<std::shared_ptr<Participant>> &participants) override;
std::shared_ptr<Participant> findParticipant (const IdentityAddress &participantAddress) const override;
std::shared_ptr<Participant> getMe () const override;
int getParticipantCount () const override;
const std::list<std::shared_ptr<Participant>> &getParticipants () const override;
void setParticipantAdminStatus (const std::shared_ptr<Participant> &participant, bool isAdmin) override;
const std::string &getSubject () const override;
void setSubject (const std::string &subject) override;
void join () override;
void leave () override;
protected:
ProxyChatRoom (ProxyChatRoomPrivate &p, const std::shared_ptr<ChatRoom> &chatRoom);
private:
L_DECLARE_PRIVATE(ProxyChatRoom);
L_DISABLE_COPY(ProxyChatRoom);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _PROXY_CHAT_ROOM_H_

View file

@ -37,10 +37,18 @@ class LINPHONE_PUBLIC ConferenceInterface {
public:
virtual ~ConferenceInterface() = default;
virtual void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) = 0;
virtual void addParticipants (const std::list<IdentityAddress> &addresses, const CallSessionParams *params, bool hasMedia) = 0;
virtual void addParticipant (
const IdentityAddress &participantAddress,
const CallSessionParams *params,
bool hasMedia
) = 0;
virtual void addParticipants (
const std::list<IdentityAddress> &addresses,
const CallSessionParams *params,
bool hasMedia
) = 0;
virtual bool canHandleParticipants () const = 0;
virtual std::shared_ptr<Participant> findParticipant (const IdentityAddress &addr) const = 0;
virtual std::shared_ptr<Participant> findParticipant (const IdentityAddress &participantAddress) const = 0;
virtual const IdentityAddress &getConferenceAddress () const = 0;
virtual std::shared_ptr<Participant> getMe () const = 0;
virtual int getParticipantCount () const = 0;