Commit b5e4d04c authored by Kai Vehmanen's avatar Kai Vehmanen

Added nua_glib::cancel-answered signal.

darcs-hash:20060913130415-7659e-9aed9af06348255f2fa4961018a69a7d0eb355f3.gz
parent cc008247
......@@ -51,6 +51,8 @@ libsofia-sip-ua-glib:
deprecated, but still present. Similarly the functions su_root_source()
and su_root_source_create() have been deprecated and replaced with
su_glib_root_create() and su_glib_root_source().
- Added nua_glib::cancel-answered signal - emitted when the stack
receives an answer to previously sent CANCEL.
- This release is ABI/API compatible with libsofia-sip-ua-glib of 1.12.0. Note,
libsofia-sip-ua-glib interface is NOT considered stable and may change in
a future 1.12.x release.
......
......@@ -162,9 +162,9 @@ static void sof_i_prack(nua_t *nua, NuaGlib *self,
tagi_t tags[]);
static void sof_r_bye(int status, char const *phrase,
nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_i_bye(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
......@@ -174,6 +174,11 @@ static void sof_i_cancel(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_r_cancel(int status, char const *phrase,
nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_r_message(int status, char const *phrase,
nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
......@@ -886,6 +891,22 @@ nua_glib_class_init (NuaGlibClass *nua_glib_class)
nua_glib_marshal_VOID__POINTER_INT_STRING,
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_STRING);
/**
* NuaGlib::cancel-answered:
* @nua_glib: the object that received the signal
* @op: pointer to the operation representing the existing call
* @status: SIP status of CANCEL answer (see SIP RFC)
* @phrase: Reason for CANCEL answer
*
*/
signals[NGSIG_CANCEL_ANSWERED] =
g_signal_new("cancel-answered",
G_OBJECT_CLASS_TYPE (nua_glib_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0, NULL, NULL,
nua_glib_marshal_VOID__POINTER_INT_STRING,
G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_STRING);
/**
* NuaGlib::message-answered:
* @nua_glib: the object that received the signal
......@@ -1115,6 +1136,10 @@ sof_callback(nua_event_t event,
sof_i_bye(nua, self, nh, op, sip, tags);
return;
case nua_r_cancel:
sof_r_cancel(status, phrase, nua, self, nh, op, sip, tags);
return;
case nua_r_message:
sof_r_message(status, phrase, nua, self, nh, op, sip, tags);
return;
......@@ -1650,8 +1675,11 @@ sof_i_bye(nua_t *nua, NuaGlib *self,
* nua_glib_cancel:
* @op the call to cancel
*
* Cancel a call
* A cancel-received signal will be emitted with the response to the cancel
* Cancel a request.
* A 'cancel-answered' signal will be emitted with the response to the
* cancel.
*
* @see nua_cancel() (libsofia-sip-ua/nua)
*/
void nua_glib_cancel(NuaGlib *self, NuaGlibOp *op)
{
......@@ -1667,6 +1695,17 @@ void sof_i_cancel(nua_t *nua, NuaGlib *self,
g_signal_emit(self, signals[NGSIG_INCOMING_CANCEL], 0, op);
}
void sof_r_cancel(int status, char const *phrase,
nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[])
{
g_assert(op); g_assert(op->op_handle == nh);
g_signal_emit(self, signals[NGSIG_CANCEL_ANSWERED], 0, op, status, phrase);
}
/**
* nua_glib_options:
* @destination: URI to set options for
......
......@@ -12,6 +12,11 @@ SIP user-agent software. It is similar to the Sofia-SIP NUA
@LICENSE LGPL
@section nua_glib_contents Contents of nua-glib Module
The nua-glib module contains the public header files as follows:
- <nua_glib.h> the public API of the module
@section nua_glib_examples Examples of use
TBD
......
......@@ -15,6 +15,12 @@ the Sofia-SIP event loop.
@LICENSE LGPL
@section su_glib_contents Contents of su-glib Module
The su-glib module contains the public header files as follows:
- <su_glib.h> the public API of the module
- <su_source.h> deprecated API (1.12.1 and earlier)
@section su_glib_examples Examples of use
Below is a simple example of how to use su-glib:
......
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