Commit 6d54b3c4 authored by Ghislain MARY's avatar Ghislain MARY

Add class skeletons for refactoring of conference.

parent daa9ed3f
......@@ -24,8 +24,21 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
address/address-p.h
address/address.h
c-wrapper/c-tools.h
call/call.h
chat/chat-room-p.h
chat/chat-room.h
conference/conference.h
conference/conference-listener.h
conference/conference-p.h
conference/local-conference.h
conference/params/call-session-params.h
conference/params/call-session-params-p.h
conference/params/media-session-params.h
conference/participant.h
conference/remote-conference.h
conference/session/call-session.h
conference/session/call-session-p.h
conference/session/media-session.h
content/content.h
core/core.h
chat/imdn.h
......@@ -66,11 +79,20 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
address/address.cpp
c-wrapper/api/c-address.cpp
c-wrapper/api/c-event-log.cpp
call/call.cpp
chat/chat-room.cpp
content/content.cpp
core/core.cpp
chat/imdn.cpp
chat/is-composing.cpp
conference/conference.cpp
conference/local-conference.cpp
conference/params/call-session-params.cpp
conference/params/media-session-params.cpp
conference/participant.cpp
conference/remote-conference.cpp
conference/session/call-session.cpp
conference/session/media-session.cpp
cpim/header/cpim-core-headers.cpp
cpim/header/cpim-generic-header.cpp
cpim/header/cpim-header.cpp
......
/*
* call.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 <http://www.gnu.org/licenses/>.
*/
#include "object/object-p.h"
#include "call.h"
using namespace std;
using namespace LinphonePrivate;
// =============================================================================
class Call::CallPrivate : public ObjectPrivate {
public:
LinphoneCallDir direction;
LinphoneCallState state = LinphoneCallIdle;
};
// =============================================================================
Call::Call::Call (LinphoneCallDir direction) : Object(*new CallPrivate) {
L_D(Call);
d->direction = direction;
}
// -----------------------------------------------------------------------------
LinphoneCallDir Call::Call::getDirection () const {
L_D(const Call);
return d->direction;
}
// -----------------------------------------------------------------------------
LinphoneCallState Call::Call::getState () const {
L_D(const Call);
return d->state;
}
/*
* call.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CALL_CALL_H_
#define _CALL_CALL_H_
#include "linphone/types.h"
#include "object/object.h"
// =============================================================================
namespace LinphonePrivate {
namespace Call {
class CallPrivate;
class Call : public Object {
public:
Call (LinphoneCallDir direction);
LinphoneCallDir getDirection() const;
LinphoneCallState getState() const;
private:
L_DECLARE_PRIVATE(Call);
L_DISABLE_COPY(Call);
};
}
}
#endif // ifndef _CALL_CALL_H_
......@@ -995,3 +995,4 @@ const LinphoneAddress *ChatRoom::getPeerAddress () const {
}
LINPHONE_END_NAMESPACE
......@@ -68,3 +68,4 @@ private:
LINPHONE_END_NAMESPACE
#endif // ifndef _CHAT_ROOM_H_
/*
* conference-listener.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CONFERENCE_LISTENER_H_
#define _CONFERENCE_LISTENER_H_
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class ConferenceListener : public Object {
public:
virtual void conferenceCreated (LinphoneAddress *addr) = 0;
virtual void conferenceTerminated (LinphoneAddress *addr) = 0;
virtual void participantAdded (LinphoneAddress *addr) = 0;
virtual void participantRemoved (LinphoneAddress *addr) = 0;
virtual void participantSetAdmin (LinphoneAddress *addr, bool isAdmin) = 0;
};
LINPHONE_END_NAMESPACE
#endif // ifndef _CONFERENCE_LISTENER_H_
/*
* conference-p.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CONFERENCE_P_H_
#define _CONFERENCE_P_H_
#include "object/object-p.h"
#include "conference.h"
#include <string>
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class ConferencePrivate : public ObjectPrivate {
public:
virtual ~ConferencePrivate () = default;
std::string confId;
L_DECLARE_PUBLIC(Conference);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _CONFERENCE_P_H_
/*
* conference.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 <http://www.gnu.org/licenses/>.
*/
#include "conference-p.h"
#include "conference.h"
LINPHONE_BEGIN_NAMESPACE
// =============================================================================
Conference::Conference (ConferencePrivate &p) : Object(p) {}
LINPHONE_END_NAMESPACE
/*
* conference.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CONFERENCE_H_
#define _CONFERENCE_H_
#include "object/object.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class ConferencePrivate;
class Conference : public Object {
public:
Conference ();
protected:
explicit Conference (ConferencePrivate &p);
private:
L_DECLARE_PRIVATE(Conference);
L_DISABLE_COPY(Conference);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _CONFERENCE_H_
/*
* local-conference.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 <http://www.gnu.org/licenses/>.
*/
#include "conference-p.h"
#include "local-conference.h"
LINPHONE_BEGIN_NAMESPACE
// =============================================================================
class LocalConferencePrivate : public ConferencePrivate {
public:
};
// =============================================================================
LocalConference::LocalConference () : Conference(*new LocalConferencePrivate) {}
LINPHONE_END_NAMESPACE
/*
* local-conference.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _LOCAL_CONFERENCE_H_
#define _LOCAL_CONFERENCE_H_
#include "conference.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class LocalConferencePrivate;
class LocalConference : public Conference {
public:
LocalConference ();
private:
L_DECLARE_PRIVATE(LocalConference);
L_DISABLE_COPY(LocalConference);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _LOCAL_CONFERENCE_H_
/*
* call-session-params-p.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CONFERENCE_CALL_SESSION_PARAMS_P_H_
#define _CONFERENCE_CALL_SESSION_PARAMS_P_H_
#include "object/object-p.h"
#include "call-session-params.h"
#include "linphone/types.h"
// =============================================================================
namespace LinphonePrivate {
namespace Conference {
class CallSessionParamsPrivate : public ObjectPrivate {
public:
virtual ~CallSessionParamsPrivate () = default;
LinphonePrivacyMask privacy = LinphonePrivacyNone;
L_DECLARE_PUBLIC(CallSessionParams);
};
}
}
#endif // ifndef _CONFERENCE_CALL_SESSION_PARAMS_P_H_
/*
* call-session-params.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 <http://www.gnu.org/licenses/>.
*/
#include "call-session-params-p.h"
#include "call-session-params.h"
using namespace LinphonePrivate;
// =============================================================================
Conference::CallSessionParams::CallSessionParams (CallSessionParamsPrivate &p) : Object(p) {}
/*
* call-session-params.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CONFERENCE_CALL_SESSION_PARAMS_H_
#define _CONFERENCE_CALL_SESSION_PARAMS_H_
#include "object/object.h"
// =============================================================================
namespace LinphonePrivate {
namespace Conference {
class CallSessionParamsPrivate;
class CallSessionParams : public Object {
public:
CallSessionParams ();
protected:
explicit CallSessionParams (CallSessionParamsPrivate &p);
private:
L_DECLARE_PRIVATE(CallSessionParams);
L_DISABLE_COPY(CallSessionParams);
};
}
}
#endif // ifndef _CONFERENCE_CALL_SESSION_PARAMS_H_
/*
* media-session-params.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 <http://www.gnu.org/licenses/>.
*/
#include "call-session-params-p.h"
#include "media-session-params.h"
#include "linphone/types.h"
using namespace LinphonePrivate;
// =============================================================================
class Conference::MediaSessionParamsPrivate : public CallSessionParamsPrivate {
public:
LinphoneMediaEncryption encryption = LinphoneMediaEncryptionNone;
};
// =============================================================================
Conference::MediaSessionParams::MediaSessionParams () : CallSessionParams(*new MediaSessionParamsPrivate) {}
/*
* media-session-params.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _CONFERENCE_MEDIA_SESSION_PARAMS_H_
#define _CONFERENCE_MEDIA_SESSION_PARAMS_H_
#include "call-session-params.h"
// =============================================================================
namespace LinphonePrivate {
namespace Conference {
class MediaSessionParamsPrivate;
class MediaSessionParams : public CallSessionParams {
public:
MediaSessionParams ();
private:
L_DECLARE_PRIVATE(MediaSessionParams);
L_DISABLE_COPY(MediaSessionParams);
};
}
}
#endif // ifndef _CONFERENCE_MEDIA_SESSION_PARAMS_H_
/*
* participant.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 <http://www.gnu.org/licenses/>.
*/
#include "object/object-p.h"
#include "participant.h"
using namespace std;
LINPHONE_BEGIN_NAMESPACE
// =============================================================================
class ParticipantPrivate : public ObjectPrivate {
public:
~ParticipantPrivate ();
Address addr;
bool isAdmin = false;
};
ParticipantPrivate::~ParticipantPrivate() {}
// =============================================================================
Participant::Participant (const Address &addr) : Object(*new ParticipantPrivate) {
L_D(Participant);
d->addr = addr;
}
// -----------------------------------------------------------------------------
const Address& Participant::getAddress () const {
L_D(const Participant);
return d->addr;
}
// -----------------------------------------------------------------------------
bool Participant::isAdmin () const {
L_D(const Participant);
return d->isAdmin;
}
void Participant::setAdmin (bool isAdmin) {
L_D(Participant);
d->isAdmin = isAdmin;
}
LINPHONE_END_NAMESPACE
/*
* participant.h
* 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 <http://www.gnu.org/licenses/>.
*/
#ifndef _PARTICIPANT_H_
#define _PARTICIPANT_H_
#include "address/address.h"
#include "object/object.h"
// =============================================================================
LINPHONE_BEGIN_NAMESPACE
class ParticipantPrivate;
class Participant : public Object {
public:
Participant (const Address &addr);
const Address& getAddress () const;
bool isAdmin () const;
void setAdmin (bool isAdmin);
private:
L_DECLARE_PRIVATE(Participant);
L_DISABLE_COPY(Participant);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _PARTICIPANT_H_
/*
* remote-conference.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 <http://www.gnu.org/licenses/>.
*/
#include "conference-p.h"
#include "remote-conference.h"
LINPHONE_BEGIN_NAMESPACE
// =============================================================================
class RemoteConferencePrivate : public ConferencePrivate {
public:
};
// =============================================================================
RemoteConference::RemoteConference () : Conference(*new RemoteConferencePrivate) {}
LINPHONE_END_NAMESPACE
/*
* remote-conference.h
* 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