/* * basic-chat-room.cpp * Copyright (C) 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 3 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, see . */ #include "basic-chat-room-p.h" #include "logger/logger.h" // ============================================================================= using namespace std; LINPHONE_BEGIN_NAMESPACE BasicChatRoomPrivate::BasicChatRoomPrivate (LinphoneCore *core, const Address &peerAddress) : ChatRoomPrivate(core) { this->peerAddress = peerAddress; } // ============================================================================= BasicChatRoom::BasicChatRoom (LinphoneCore *core, const Address &peerAddress) : ChatRoom(*new BasicChatRoomPrivate(core, peerAddress)) {} // ----------------------------------------------------------------------------- void BasicChatRoom::addParticipant (const Address &addr, const CallSessionParams *params, bool hasMedia) { lError() << "addParticipant() is not allowed on a BasicChatRoom"; } void BasicChatRoom::addParticipants (const list
&addresses, const CallSessionParams *params, bool hasMedia) { lError() << "addParticipants() is not allowed on a BasicChatRoom"; } bool BasicChatRoom::canHandleParticipants () const { return false; } const Address *BasicChatRoom::getConferenceAddress () const { lError() << "a BasicChatRoom does not have a conference address"; return nullptr; } int BasicChatRoom::getNbParticipants () const { return 1; } list> BasicChatRoom::getParticipants () const { L_D(); list> l; l.push_back(ObjectFactory::create(d->peerAddress)); return l; } const string &BasicChatRoom::getSubject () const { L_D(); return d->subject; } void BasicChatRoom::removeParticipant (const shared_ptr &participant) { lError() << "removeParticipant() is not allowed on a BasicChatRoom"; } void BasicChatRoom::removeParticipants (const list> &participants) { lError() << "removeParticipants() is not allowed on a BasicChatRoom"; } void BasicChatRoom::setSubject (const string &subject) { L_D(); d->subject = subject; } LINPHONE_END_NAMESPACE