server-group-chat-room-stub.cpp 5.8 KB
Newer Older
1
/*
2
 * server-group-chat-room-stub.cpp
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 * 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.
 */

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
shared_ptr<Participant> ServerGroupChatRoomPrivate::findRemovedParticipant (
	const shared_ptr<const CallSession> &
) const {
40 41 42
	return nullptr;
}

43 44 45 46 47 48 49 50
// -----------------------------------------------------------------------------

void ServerGroupChatRoomPrivate::confirmCreation () {}

void ServerGroupChatRoomPrivate::confirmJoining (SalCallOp *) {}

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

51 52
IdentityAddress ServerGroupChatRoomPrivate::generateConferenceAddress (const shared_ptr<Participant> &me) const {
	return IdentityAddress();
53 54
}

55
void ServerGroupChatRoomPrivate::subscribeReceived (LinphoneEvent *) {}
56

57
void ServerGroupChatRoomPrivate::update (SalCallOp *) {}
58 59 60

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

61
void ServerGroupChatRoomPrivate::dispatchMessage (const IdentityAddress &, const Content &) {}
62

63 64
void ServerGroupChatRoomPrivate::setConferenceAddress (const IdentityAddress &) {}

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

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

69 70
// -----------------------------------------------------------------------------

71
LinphoneReason ServerGroupChatRoomPrivate::onSipMessageReceived (SalOp *, const SalMessage *) {
72 73 74 75 76
	return LinphoneReasonNone;
}

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

77
void ServerGroupChatRoomPrivate::designateAdmin () {}
78

79 80
void ServerGroupChatRoomPrivate::finalizeCreation () {}

81 82 83 84
bool ServerGroupChatRoomPrivate::isAdminLeft () const {
	return false;
}

85 86
// -----------------------------------------------------------------------------

87 88 89 90 91 92 93 94
void ServerGroupChatRoomPrivate::onChatRoomInsertRequested (const shared_ptr<AbstractChatRoom> &chatRoom) {}

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

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

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

95 96
void ServerGroupChatRoomPrivate::onCallSessionStateChanged (
	const shared_ptr<const CallSession> &,
97
	CallSession::State,
98 99 100
	const string &
) {}

101 102
// =============================================================================

Benjamin REIS's avatar
Benjamin REIS committed
103 104 105 106 107 108
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;
}
109 110 111 112 113 114 115 116 117

ServerGroupChatRoom::ServerGroupChatRoom (
	const shared_ptr<Core> &core,
	const IdentityAddress &peerAddress,
	const string &subject,
	list<shared_ptr<Participant>> &&participants,
	unsigned int lastNotifyId
) : ChatRoom(*new ServerGroupChatRoomPrivate, core, ChatRoomId(peerAddress, peerAddress)),
	LocalConference(core, peerAddress, nullptr) {}
118

119
ServerGroupChatRoom::CapabilitiesMask ServerGroupChatRoom::getCapabilities () const {
120 121 122
	return 0;
}

123
bool ServerGroupChatRoom::hasBeenLeft () const {
124 125 126
	return true;
}

127 128 129 130
const IdentityAddress &ServerGroupChatRoom::getConferenceAddress () const {
	return LocalConference::getConferenceAddress();
}

131 132 133
bool ServerGroupChatRoom::canHandleParticipants () const {
	return false;
}
134

135
void ServerGroupChatRoom::addParticipant (const IdentityAddress &, const CallSessionParams *, bool) {}
136

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

139 140 141 142
void ServerGroupChatRoom::removeParticipant (const shared_ptr<const Participant> &) {}

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

143
shared_ptr<Participant> ServerGroupChatRoom::findParticipant (const IdentityAddress &) const {
144 145 146
	return nullptr;
}

Ghislain MARY's avatar
Ghislain MARY committed
147 148 149 150
shared_ptr<Participant> ServerGroupChatRoom::getMe () const {
	return nullptr;
}

151
int ServerGroupChatRoom::getParticipantCount () const {
152 153 154
	return 0;
}

Ghislain MARY's avatar
Ghislain MARY committed
155
const list<shared_ptr<Participant>> &ServerGroupChatRoom::getParticipants () const {
156 157 158
	return LocalConference::getParticipants();
}

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

161 162 163 164
const string &ServerGroupChatRoom::getSubject () const {
	return LocalConference::getSubject();
}

165 166
void ServerGroupChatRoom::setSubject (const string &) {}

167 168 169 170 171
void ServerGroupChatRoom::join () {}

void ServerGroupChatRoom::leave () {}

LINPHONE_END_NAMESPACE