/* * call-event.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 "event-p.h" #include "call-event.h" // ============================================================================= using namespace std; LINPHONE_BEGIN_NAMESPACE class CallEventPrivate : public EventPrivate { public: shared_ptr call; }; // ----------------------------------------------------------------------------- CallEvent::CallEvent (Type type, const shared_ptr &call) : Event(*new CallEventPrivate, type) { L_D(CallEvent); L_ASSERT(call); d->call = call; } CallEvent::CallEvent (const CallEvent &src) : CallEvent(src.getType(), src.getCall()) {} CallEvent &CallEvent::operator= (const CallEvent &src) { L_D(CallEvent); if (this != &src) { Event::operator=(src); d->call = src.getPrivate()->call; } return *this; } shared_ptr CallEvent::getCall () const { L_D(const CallEvent); return d->call; } LINPHONE_END_NAMESPACE