mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 12:08:11 +00:00
get notify body for each entry of the subscribe
This commit is contained in:
parent
040ecf2448
commit
ca7dd265fc
3 changed files with 15 additions and 2 deletions
|
|
@ -529,5 +529,14 @@ ChatRoomId LocalConferenceEventHandler::getChatRoomId () const {
|
|||
return d->chatRoomId;
|
||||
}
|
||||
|
||||
string LocalConferenceEventHandler::getNotifyForId (int notifyId) {
|
||||
L_D();
|
||||
if (notifyId == 0)
|
||||
return d->createNotifyFullState(static_cast<int>(d->lastNotify)); // oneToOne ?
|
||||
else if (notifyId < static_cast<int>(d->lastNotify))
|
||||
return d->createNotifyMultipart(notifyId);
|
||||
|
||||
return Utils::getEmptyConstRefObject<string>();
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ class LocalConference;
|
|||
class LocalConferenceEventHandlerPrivate;
|
||||
|
||||
class LocalConferenceEventHandler : public Object {
|
||||
friend class LocalConferenceListEventHandler;
|
||||
public:
|
||||
LocalConferenceEventHandler (LocalConference *localConference, unsigned int notify = 0);
|
||||
|
||||
|
|
@ -53,7 +54,7 @@ public:
|
|||
void setChatRoomId (const ChatRoomId &chatRoomId);
|
||||
ChatRoomId getChatRoomId () const;
|
||||
|
||||
void getNotifyForId (int notifyId) const {};
|
||||
std::string getNotifyForId (int notifyId);
|
||||
|
||||
private:
|
||||
L_DECLARE_PRIVATE(LocalConferenceEventHandler);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,10 @@ void LocalConferenceListEventHandler::subscribeReceived (const string &xmlBody)
|
|||
if (!handler)
|
||||
continue;
|
||||
|
||||
handler->getNotifyForId(notifyId);
|
||||
string notifyBody = handler->getNotifyForId(notifyId);
|
||||
if (notifyBody.empty())
|
||||
continue;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue