Commit e06f10ed authored by Benjamin REIS's avatar Benjamin REIS
Browse files

fix coding style

parent 2e8f7dad
...@@ -324,9 +324,9 @@ string LocalConferenceEventHandlerPrivate::createNotify (ConferenceType confInfo ...@@ -324,9 +324,9 @@ string LocalConferenceEventHandlerPrivate::createNotify (ConferenceType confInfo
if (notifyId == -1) { if (notifyId == -1) {
lastNotify = lastNotify + 1; lastNotify = lastNotify + 1;
confInfo.setVersion(lastNotify); confInfo.setVersion(lastNotify);
} else { } else
confInfo.setVersion(static_cast<unsigned int>(notifyId)); confInfo.setVersion(static_cast<unsigned int>(notifyId));
}
confInfo.setState(isFullState ? StateType::full : StateType::partial); confInfo.setState(isFullState ? StateType::full : StateType::partial);
if (!confInfo.getConferenceDescription()) { if (!confInfo.getConferenceDescription()) {
ConferenceDescriptionType description = ConferenceDescriptionType(); ConferenceDescriptionType description = ConferenceDescriptionType();
...@@ -359,23 +359,25 @@ void LocalConferenceEventHandlerPrivate::notifyParticipant (const string &notify ...@@ -359,23 +359,25 @@ void LocalConferenceEventHandlerPrivate::notifyParticipant (const string &notify
} }
void LocalConferenceEventHandlerPrivate::notifyParticipantDevice (const string &notify, const shared_ptr<ParticipantDevice> &device, bool multipart) { void LocalConferenceEventHandlerPrivate::notifyParticipantDevice (const string &notify, const shared_ptr<ParticipantDevice> &device, bool multipart) {
if (device->isSubscribedToConferenceEventPackage() && !notify.empty()) { if (!device->isSubscribedToConferenceEventPackage() || notify.empty())
LinphoneEvent *ev = device->getConferenceSubscribeEvent(); return;
LinphoneEventCbs *cbs = linphone_event_get_callbacks(ev);
linphone_event_cbs_set_user_data(cbs, this); LinphoneEvent *ev = device->getConferenceSubscribeEvent();
linphone_event_cbs_set_notify_response(cbs, notifyResponseCb); LinphoneEventCbs *cbs = linphone_event_get_callbacks(ev);
LinphoneContent *content = linphone_core_create_content(ev->lc); linphone_event_cbs_set_user_data(cbs, this);
linphone_content_set_buffer(content, (const uint8_t *)notify.c_str(), strlen(notify.c_str())); linphone_event_cbs_set_notify_response(cbs, notifyResponseCb);
if (multipart) { LinphoneContent *content = linphone_core_create_content(ev->lc);
linphone_content_set_type(content, "multipart"); linphone_content_set_buffer(content, (const uint8_t *)notify.c_str(), strlen(notify.c_str()));
linphone_content_set_subtype(content, "mixed;boundary=---------------------------14737809831466499882746641449"); linphone_content_set_type(
} else { content,
linphone_content_set_type(content, "application"); multipart ? "multipart" : "application"
linphone_content_set_subtype(content, "conference-info"); );
} linphone_content_set_subtype(
linphone_event_notify(ev, content); content,
linphone_content_unref(content); multipart ? "mixed;boundary=---------------------------14737809831466499882746641449" : "conference-info"
} );
linphone_event_notify(ev, content);
linphone_content_unref(content);
} }
// ============================================================================= // =============================================================================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment