server-group-chat-room-stub.cpp 7.75 KB
Newer Older
1
/*
2
 * server-group-chat-room-stub.cpp
Ronan's avatar
Ronan committed
3
 * Copyright (C) 2010-2018 Belledonne Communications SARL
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 *
 * 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.
 */

20
#include "core/core.h"
21 22 23 24 25 26 27 28 29 30
#include "server-group-chat-room-p.h"

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

using namespace std;

LINPHONE_BEGIN_NAMESPACE

// -----------------------------------------------------------------------------

31
shared_ptr<Participant> ServerGroupChatRoomPrivate::addParticipant (const IdentityAddress &) {
32 33 34
	return nullptr;
}

35
void ServerGroupChatRoomPrivate::removeParticipant (const shared_ptr<const Participant> &) {}
36

37 38 39 40 41
shared_ptr<Participant> ServerGroupChatRoomPrivate::findFilteredParticipant (const shared_ptr<const CallSession> &session) const {
	return nullptr;
}

shared_ptr<Participant> ServerGroupChatRoomPrivate::findFilteredParticipant (const IdentityAddress &participantAddress) const {
42 43 44
	return nullptr;
}

45
ParticipantDevice::State ServerGroupChatRoomPrivate::getParticipantDeviceState (const shared_ptr<const ParticipantDevice> &device) const {
46 47 48
	return device->getState();
}

49
void ServerGroupChatRoomPrivate::setParticipantDeviceState (const shared_ptr<ParticipantDevice> &device, ParticipantDevice::State state) {
50 51 52
	device->setState(state);
}

53 54
// -----------------------------------------------------------------------------

55 56
void ServerGroupChatRoomPrivate::acceptSession (const shared_ptr<CallSession> &session) {}

57 58 59 60
void ServerGroupChatRoomPrivate::confirmCreation () {}

void ServerGroupChatRoomPrivate::confirmJoining (SalCallOp *) {}

61 62
void ServerGroupChatRoomPrivate::confirmRecreation (SalCallOp *) {}

63 64
void ServerGroupChatRoomPrivate::dispatchQueuedMessages () {}

65 66
// -----------------------------------------------------------------------------

67 68
IdentityAddress ServerGroupChatRoomPrivate::generateConferenceAddress (const shared_ptr<Participant> &me) const {
	return IdentityAddress();
69 70
}

71
void ServerGroupChatRoomPrivate::subscribeReceived (LinphoneEvent *) {}
72

73
bool ServerGroupChatRoomPrivate::update (SalCallOp *) { return true; }
74 75 76

// -----------------------------------------------------------------------------

77 78
void ServerGroupChatRoomPrivate::setConferenceAddress (const IdentityAddress &) {}

79 80
void ServerGroupChatRoomPrivate::setParticipantDevices (const IdentityAddress &addr, const list<IdentityAddress> &devices) {}

81 82
void ServerGroupChatRoomPrivate::addCompatibleParticipants (const IdentityAddress &deviceAddr, const list<IdentityAddress> &participantCompatible) {}

83 84
// -----------------------------------------------------------------------------

85
LinphoneReason ServerGroupChatRoomPrivate::onSipMessageReceived (SalOp *, const SalMessage *) {
86 87 88 89 90
	return LinphoneReasonNone;
}

// -----------------------------------------------------------------------------

91
void ServerGroupChatRoomPrivate::designateAdmin () {}
92

93
void ServerGroupChatRoomPrivate::dispatchMessage (const shared_ptr<Message> &message, const string &uri) {}
94

95 96
void ServerGroupChatRoomPrivate::finalizeCreation () {}

97
void ServerGroupChatRoomPrivate::inviteDevice (const shared_ptr<ParticipantDevice> &device) {}
98

99 100 101 102
bool ServerGroupChatRoomPrivate::isAdminLeft () const {
	return false;
}

103
void ServerGroupChatRoomPrivate::queueMessage (const shared_ptr<Message> &message) {}
104

105 106
void ServerGroupChatRoomPrivate::queueMessage (const shared_ptr<Message> &msg, const IdentityAddress &deviceAddress) {}

107
void ServerGroupChatRoomPrivate::removeNonPresentParticipants (const list <IdentityAddress> &compatibleParticipants) {}
108 109 110

// -----------------------------------------------------------------------------

111
void ServerGroupChatRoomPrivate::onParticipantDeviceLeft (const shared_ptr<const CallSession> &session) {}
112

113 114
// -----------------------------------------------------------------------------

115 116 117 118 119 120 121 122
void ServerGroupChatRoomPrivate::onChatRoomInsertRequested (const shared_ptr<AbstractChatRoom> &chatRoom) {}

void ServerGroupChatRoomPrivate::onChatRoomInsertInDatabaseRequested (const shared_ptr<AbstractChatRoom> &chatRoom) {}

void ServerGroupChatRoomPrivate::onChatRoomDeleteRequested (const shared_ptr<AbstractChatRoom> &chatRoom) {}

// -----------------------------------------------------------------------------

123
void ServerGroupChatRoomPrivate::onCallSessionStateChanged (
124
	const shared_ptr<CallSession> &,
125
	CallSession::State,
126 127 128
	const string &
) {}

129 130
// =============================================================================

Benjamin REIS's avatar
Benjamin REIS committed
131 132 133 134 135 136
ServerGroupChatRoom::ServerGroupChatRoom (const shared_ptr<Core> &core, SalCallOp *op)
: ChatRoom(*new ServerGroupChatRoomPrivate, core, ChatRoomId(IdentityAddress(op->get_to()), IdentityAddress(op->get_to()))),
LocalConference(core, IdentityAddress(op->get_to()), nullptr) {
	L_D();
	d->chatRoomListener = d;
}
137 138 139 140

ServerGroupChatRoom::ServerGroupChatRoom (
	const shared_ptr<Core> &core,
	const IdentityAddress &peerAddress,
141
	AbstractChatRoom::CapabilitiesMask capabilities,
142 143 144 145 146
	const string &subject,
	list<shared_ptr<Participant>> &&participants,
	unsigned int lastNotifyId
) : ChatRoom(*new ServerGroupChatRoomPrivate, core, ChatRoomId(peerAddress, peerAddress)),
	LocalConference(core, peerAddress, nullptr) {}
147

148
ServerGroupChatRoom::CapabilitiesMask ServerGroupChatRoom::getCapabilities () const {
149 150 151
	return 0;
}

Sylvain Berfini's avatar
Sylvain Berfini committed
152 153 154 155 156 157 158 159
void ServerGroupChatRoom::allowCpim (bool value) {
	
}

void ServerGroupChatRoom::allowMultipart (bool value) {
	
}

160 161 162 163 164 165 166 167
bool ServerGroupChatRoom::canHandleCpim () const {
	return true;
}

bool ServerGroupChatRoom::canHandleMultipart () const {
	return true;
}

168
bool ServerGroupChatRoom::hasBeenLeft () const {
169 170 171
	return true;
}

172 173 174 175
const IdentityAddress &ServerGroupChatRoom::getConferenceAddress () const {
	return LocalConference::getConferenceAddress();
}

176 177 178
bool ServerGroupChatRoom::canHandleParticipants () const {
	return false;
}
179

180
void ServerGroupChatRoom::addParticipant (const IdentityAddress &, const CallSessionParams *, bool) {}
181

182
void ServerGroupChatRoom::addParticipants (const list<IdentityAddress> &, const CallSessionParams *, bool) {}
183

184 185 186 187
void ServerGroupChatRoom::removeParticipant (const shared_ptr<const Participant> &) {}

void ServerGroupChatRoom::removeParticipants (const list<shared_ptr<Participant>> &) {}

188
shared_ptr<Participant> ServerGroupChatRoom::findParticipant (const IdentityAddress &) const {
189 190 191
	return nullptr;
}

Ghislain MARY's avatar
Ghislain MARY committed
192 193 194 195
shared_ptr<Participant> ServerGroupChatRoom::getMe () const {
	return nullptr;
}

196
int ServerGroupChatRoom::getParticipantCount () const {
197 198 199
	return 0;
}

Ghislain MARY's avatar
Ghislain MARY committed
200
const list<shared_ptr<Participant>> &ServerGroupChatRoom::getParticipants () const {
201 202 203
	return LocalConference::getParticipants();
}

204
void ServerGroupChatRoom::setParticipantAdminStatus (const shared_ptr<Participant> &, bool) {}
205

206 207 208 209
const string &ServerGroupChatRoom::getSubject () const {
	return LocalConference::getSubject();
}

210 211
void ServerGroupChatRoom::setSubject (const string &) {}

212 213 214 215
void ServerGroupChatRoom::join () {}

void ServerGroupChatRoom::leave () {}

216 217
void ServerGroupChatRoom::onFirstNotifyReceived (const IdentityAddress &addr) {}

218 219 220
// -----------------------------------------------------------------------------

ostream &operator<< (ostream &stream, const ServerGroupChatRoom *chatRoom) {
Ghislain MARY's avatar
Ghislain MARY committed
221
	return stream << "ServerGroupChatRoom [" << reinterpret_cast<const void *>(chatRoom) << "]";
222 223
}

224
LINPHONE_END_NAMESPACE