/* * 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 "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::leave () {} 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