Add a content parameter to the update() method of the call session.

This commit is contained in:
Ghislain MARY 2017-10-04 14:23:19 +02:00
parent 4eb16ce346
commit eb21b8abec
2 changed files with 4 additions and 2 deletions

View file

@ -934,7 +934,7 @@ LinphoneStatus CallSession::terminate (const LinphoneErrorInfo *ei) {
return 0;
}
LinphoneStatus CallSession::update (const CallSessionParams *csp, const string &subject) {
LinphoneStatus CallSession::update (const CallSessionParams *csp, const string &subject, const Content *content) {
L_D();
LinphoneCallState nextState;
LinphoneCallState initialState = d->state;
@ -942,6 +942,8 @@ LinphoneStatus CallSession::update (const CallSessionParams *csp, const string &
return -1;
if (d->currentParams == csp)
lWarning() << "CallSession::update() is given the current params, this is probably not what you intend to do!";
if (content)
d->op->set_local_body(*content);
LinphoneStatus result = d->startUpdate(subject);
if (result && (d->state != initialState)) {
/* Restore initial state */

View file

@ -56,7 +56,7 @@ public:
virtual void startIncomingNotification ();
virtual int startInvite (const Address *destination, const std::string &subject = "", const Content *content = nullptr);
LinphoneStatus terminate (const LinphoneErrorInfo *ei = nullptr);
LinphoneStatus update (const CallSessionParams *csp, const std::string &subject = "");
LinphoneStatus update (const CallSessionParams *csp, const std::string &subject = "", const Content *content = nullptr);
CallSessionParams *getCurrentParams () const;
LinphoneCallDir getDirection () const;