Commit dae79bdd authored by Kai Vehmanen's avatar Kai Vehmanen
Browse files

Big update to to nua_glib. Separated nua_glib operator code to...

Big update to to nua_glib. Separated nua_glib operator code to nua_glib_oper.c, improved documentation, and error handling.

darcs-hash:20060913111631-7659e-cdad8f8db0060e4114faa2833984b00c42568e4f.gz
parent 21cbeee7
...@@ -56,11 +56,14 @@ nobase_include_sofia_HEADERS += \ ...@@ -56,11 +56,14 @@ nobase_include_sofia_HEADERS += \
sofia-sip/nua_glib.h sofia-sip/nua_glib.h
endif endif
noinst_HEADERS = nua_glib_priv.h noinst_HEADERS = nua_glib_priv.h \
nua_glib_op.h
check_PROGRAMS = test_nua_glib check_PROGRAMS = test_nua_glib
libnua_glib_la_SOURCES = nua_glib.c libnua_glib_la_SOURCES = \
nua_glib.c \
nua_glib_op.c
libnua_glib_la_LIBADD = nua_glib_marshal.lo libnua_glib_la_LIBADD = nua_glib_marshal.lo
......
This diff is collapsed.
...@@ -77,7 +77,6 @@ struct _NuaGlibOp { ...@@ -77,7 +77,6 @@ struct _NuaGlibOp {
/** How this handle was used initially */ /** How this handle was used initially */
sip_method_t op_method; /**< REGISTER, INVITE, MESSAGE, or SUBSCRIBE */ sip_method_t op_method; /**< REGISTER, INVITE, MESSAGE, or SUBSCRIBE */
char const *op_method_name;
/** Call state. /** Call state.
* *
...@@ -85,17 +84,17 @@ struct _NuaGlibOp { ...@@ -85,17 +84,17 @@ struct _NuaGlibOp {
* - opc_recv when initial INVITE has been received * - opc_recv when initial INVITE has been received
* - opc_complate when 200 Ok has been sent/received * - opc_complate when 200 Ok has been sent/received
* - opc_active when media is used * - opc_active when media is used
* - opc_sent2 when re-INVITE has been sent * - opc_sent when re-INVITE has been sent
* - opc_recv2 when re-INVITE has been received * - opc_recv when re-INVITE has been received
*/ */
enum { enum {
opc_none = 0, opc_none,
opc_sent = 1, opc_sent = 1,
opc_recv = 2, opc_recv = 2,
opc_complete = 3, opc_complete = 3,
opc_active = 4, opc_active = 4,
opc_sent2 = 5, opc_sent_hold = 8, /**< Call put on hold */
opc_recv2 = 6 opc_pending = 16 /**< Waiting for local resources */
} op_callstate; } op_callstate;
/** Authentication state. /** Authentication state.
...@@ -148,134 +147,5 @@ struct _NuaGlibPrivate { ...@@ -148,134 +147,5 @@ struct _NuaGlibPrivate {
}; };
static void sof_callback(nua_event_t event,
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_register(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_unregister(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_publish(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_invite(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_i_fork(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_i_invite(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_i_state(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_i_active(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_i_terminated(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_i_prack(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
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[]);
static void sof_i_bye(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
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_message(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_i_message(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_r_info(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_i_info(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_r_refer(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_i_refer(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_r_subscribe(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_unsubscribe(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_notify(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_i_notify(nua_t *nua, NuaGlib *self,
nua_handle_t *nh, NuaGlibOp *op, sip_t const *sip,
tagi_t tags[]);
static void sof_r_options(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_shutdown(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_get_params(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_i_error(nua_t *nua, NuaGlib *self, nua_handle_t *nh, NuaGlibOp *op,
int status, char const *phrase,
tagi_t tags[]);
#endif /* __NUA_GLIB_PRIVATE_H__ */ #endif /* __NUA_GLIB_PRIVATE_H__ */
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
/**@file nua_glib.h Glib Interface Sofia-SIP 'nua' /**@file nua_glib.h Glib Interface for Sofia-SIP User-Agent API (NUA)
* *
* @author Kai Vehmanen <Kai.Vehmanen@nokia.com> * @author Kai Vehmanen <Kai.Vehmanen@nokia.com>
* @author Rob Taylor <rob.taylor@collabora.co.uk> * @author Rob Taylor <rob.taylor@collabora.co.uk>
...@@ -92,9 +92,9 @@ void nua_glib_bye (NuaGlib *cli, NuaGlibOp *op); ...@@ -92,9 +92,9 @@ void nua_glib_bye (NuaGlib *cli, NuaGlibOp *op);
void nua_glib_cancel (NuaGlib *cli, NuaGlibOp *op); void nua_glib_cancel (NuaGlib *cli, NuaGlibOp *op);
NuaGlibOp* nua_glib_options (NuaGlib *self, const char *destination); NuaGlibOp* nua_glib_options (NuaGlib *self, const char *destination_uri);
NuaGlibOp* nua_glib_message (NuaGlib *self, const char *destination, const char *message); NuaGlibOp* nua_glib_message (NuaGlib *self, const char *destination_uri, const char *message);
void nua_glib_info (NuaGlib *self, NuaGlibOp *op, const char *content_type, const char *message); void nua_glib_info (NuaGlib *self, NuaGlibOp *op, const char *content_type, const char *message);
......
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