mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 12:38:09 +00:00
feat(core): DO NOT ADD CODE IN private object destructors (if not possible you can in specific cases like base objects). Thx. <3
This commit is contained in:
parent
42035bb700
commit
fdfcbbc12a
7 changed files with 14 additions and 20 deletions
|
|
@ -37,7 +37,6 @@ class CallSession;
|
|||
class CallPrivate : public ObjectPrivate, public CallSessionListener {
|
||||
public:
|
||||
CallPrivate () = default;
|
||||
virtual ~CallPrivate () = default;
|
||||
|
||||
void initiateIncoming ();
|
||||
bool initiateOutgoing ();
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
class RealTimeTextChatRoomPrivate : public BasicChatRoomPrivate {
|
||||
public:
|
||||
RealTimeTextChatRoomPrivate () = default;
|
||||
~RealTimeTextChatRoomPrivate ();
|
||||
|
||||
void realtimeTextReceived (uint32_t character, LinphoneCall *call);
|
||||
void sendChatMessage (const std::shared_ptr<ChatMessage> &chatMessage) override;
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@ using namespace std;
|
|||
|
||||
LINPHONE_BEGIN_NAMESPACE
|
||||
|
||||
RealTimeTextChatRoomPrivate::~RealTimeTextChatRoomPrivate () {
|
||||
if (!receivedRttCharacters.empty()) {
|
||||
for (auto &rttChars : receivedRttCharacters)
|
||||
bctbx_free(rttChars);
|
||||
}
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void RealTimeTextChatRoomPrivate::realtimeTextReceived (uint32_t character, LinphoneCall *call) {
|
||||
|
|
@ -106,6 +99,14 @@ void RealTimeTextChatRoomPrivate::sendChatMessage (const shared_ptr<ChatMessage>
|
|||
RealTimeTextChatRoom::RealTimeTextChatRoom (const shared_ptr<Core> &core, const ChatRoomId &chatRoomId) :
|
||||
BasicChatRoom(*new RealTimeTextChatRoomPrivate, core, chatRoomId) {}
|
||||
|
||||
RealTimeTextChatRoom::~RealTimeTextChatRoom () {
|
||||
L_D();
|
||||
|
||||
if (!d->receivedRttCharacters.empty())
|
||||
for (auto &rttChars : d->receivedRttCharacters)
|
||||
bctbx_free(rttChars);
|
||||
}
|
||||
|
||||
RealTimeTextChatRoom::CapabilitiesMask RealTimeTextChatRoom::getCapabilities () const {
|
||||
return BasicChatRoom::getCapabilities() | Capabilities::RealTimeText;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ class LINPHONE_PUBLIC RealTimeTextChatRoom : public BasicChatRoom {
|
|||
friend class CorePrivate;
|
||||
|
||||
public:
|
||||
~RealTimeTextChatRoom ();
|
||||
|
||||
CapabilitiesMask getCapabilities () const override;
|
||||
|
||||
uint32_t getChar () const;
|
||||
|
|
|
|||
|
|
@ -29,9 +29,6 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
namespace Cpim {
|
||||
class HeaderPrivate : public ObjectPrivate {
|
||||
public:
|
||||
virtual ~HeaderPrivate () = default;
|
||||
|
||||
private:
|
||||
std::string value;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
|
||||
class RemoteConferenceEventHandlerPrivate : public ObjectPrivate, public CoreListener {
|
||||
private:
|
||||
~RemoteConferenceEventHandlerPrivate();
|
||||
void simpleNotifyReceived (const std::string &xmlBody);
|
||||
void subscribe ();
|
||||
void unsubscribe ();
|
||||
|
|
|
|||
|
|
@ -42,12 +42,6 @@ using namespace Xsd::ConferenceInfo;
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
RemoteConferenceEventHandlerPrivate::~RemoteConferenceEventHandlerPrivate(){
|
||||
if (lev){
|
||||
unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
void RemoteConferenceEventHandlerPrivate::simpleNotifyReceived (const string &xmlBody) {
|
||||
istringstream data(xmlBody);
|
||||
unique_ptr<ConferenceType> confInfo = parseConferenceInfo(data, Xsd::XmlSchema::Flags::dont_validate);
|
||||
|
|
@ -63,7 +57,7 @@ void RemoteConferenceEventHandlerPrivate::simpleNotifyReceived (const string &xm
|
|||
if (entityAddress == chatRoomId.getPeerAddress()) {
|
||||
if (confInfo->getVersion().present())
|
||||
lastNotify = confInfo->getVersion().get();
|
||||
|
||||
|
||||
if (confInfo->getConferenceDescription().present()) {
|
||||
if (confInfo->getConferenceDescription().get().getSubject().present() &&
|
||||
!confInfo->getConferenceDescription().get().getSubject().get().empty()
|
||||
|
|
@ -241,6 +235,9 @@ Object(*new RemoteConferenceEventHandlerPrivate) {
|
|||
RemoteConferenceEventHandler::~RemoteConferenceEventHandler () {
|
||||
L_D();
|
||||
d->conf->getCore()->getPrivate()->unregisterListener(d);
|
||||
|
||||
if (d->lev)
|
||||
unsubscribe();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue