Commit 28f42a58 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#1108] Add a signal in the client to notify successful or failed transfer

parent 5a512122
......@@ -111,6 +111,13 @@
<arg type="s" name="device" direction="out"/>
<arg type="d" name="value" direction="out"/>
</signal>
<signal name="transferSucceded">
</signal>
<signal name="transferFailed">
</signal>
<!--
<signal name="error">
......
......@@ -111,10 +111,10 @@
<arg type="d" name="value" direction="out"/>
</signal>
<signal name="transferSucceeded">
<signal name="transferSucceded">
</signal>
<signal name="transferFailled">
<signal name="transferFailed">
</signal>
<!--
......
......@@ -504,6 +504,18 @@ ManagerImpl::transferCall(const CallID& id, const std::string& to)
return returnValue;
}
void ManagerImpl::transferFailed()
{
if(_dbus) _dbus->getCallManager()->transferFailed();
}
void ManagerImpl::transferSucceded()
{
if(_dbus) _dbus->getCallManager()->transferSucceded();
}
//THREAD=Main : Call:Incoming
bool
ManagerImpl::refuseCall (const CallID& id)
......
......@@ -157,6 +157,16 @@ class ManagerImpl {
*/
bool transferCall(const CallID& id, const std::string& to);
/**
* Notify the client the transfer is successful
*/
void transferSucceded();
/**
* Notify the client that the transfer failed
*/
void transferFailed();
/**
* Functions which occur with a user's action
* Refuse the call
......
......@@ -2726,6 +2726,8 @@ void xfer_func_cb ( pjsip_evsub *sub, pjsip_event *event )
_debug ( "UserAgent: NORESOURCE for transfer!\n" );
link->transferStep2();
pjsip_evsub_terminate ( sub, PJ_TRUE );
Manager::instance().transferFailed();
return;
}
......@@ -2734,6 +2736,8 @@ void xfer_func_cb ( pjsip_evsub *sub, pjsip_event *event )
_debug ( "UserAgent: transfered call RINGING!\n" );
link->transferStep2();
pjsip_evsub_terminate ( sub, PJ_TRUE );
Manager::instance().transferSucceded();
return;
}
}
......
Supports Markdown
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