update xcap stack.

This commit is contained in:
bossiel 2010-04-07 18:02:08 +00:00
parent 1d21203042
commit 33c5c2dfee
33 changed files with 2839 additions and 109 deletions

View File

@ -136,7 +136,7 @@ TINYHTTP_API int thttp_stack_start(thttp_stack_handle_t *self);
TINYHTTP_API int thttp_stack_set(thttp_stack_handle_t *self, ...);
TINYHTTP_API int thttp_stack_stop(thttp_stack_handle_t *self);
TINYHTTP_GEXTERN const void *thttp_stack_def_t;
TINYHTTP_GEXTERN const tsk_object_def_t *thttp_stack_def_t;
THTTP_END_DECLS

View File

@ -65,12 +65,12 @@ thhtp_session_option_t;
typedef enum thttp_session_param_type_e
{
sptype_null = tsk_null,
httpp_null = tsk_null,
sptype_option,
sptype_cred,
sptype_header,
sptype_context,
httpp_option,
httpp_cred,
httpp_header,
httpp_context,
}
thttp_session_param_type_t;
@ -134,11 +134,11 @@ thttp_session_set(session,
* @def THTTP_SESSION_SET_NULL
* Ends session parameters. Must always be the last one.
*/
#define THTTP_SESSION_SET_OPTION(ID_INT, VALUE_STR) sptype_option, (thhtp_session_option_t)ID_INT, (const char*)VALUE_STR
#define THTTP_SESSION_SET_CRED(USERNAME_STR, PASSWORD_STR) sptype_cred, (const char*)USERNAME_STR, (const char*)PASSWORD_STR
#define THTTP_SESSION_SET_HEADER(NAME_STR, VALUE_STR) sptype_header, (const char*)NAME_STR, (const char*)VALUE_STR
#define THTTP_SESSION_SET_CONTEXT(CTX_PTR) sptype_context, (const void*)CTX_PTR
#define THTTP_SESSION_SET_NULL() sptype_null
#define THTTP_SESSION_SET_OPTION(ID_INT, VALUE_STR) httpp_option, (thhtp_session_option_t)ID_INT, (const char*)VALUE_STR
#define THTTP_SESSION_SET_CRED(USERNAME_STR, PASSWORD_STR) httpp_cred, (const char*)USERNAME_STR, (const char*)PASSWORD_STR
#define THTTP_SESSION_SET_HEADER(NAME_STR, VALUE_STR) httpp_header, (const char*)NAME_STR, (const char*)VALUE_STR
#define THTTP_SESSION_SET_CONTEXT(CTX_PTR) httpp_context, (const void*)CTX_PTR
#define THTTP_SESSION_SET_NULL() httpp_null
typedef struct thttp_session_s
{
@ -146,7 +146,7 @@ typedef struct thttp_session_s
thttp_session_id_t id;
const struct thttp_stack_s* stack;
const void* context; // usr context
const void* context; // user's context
tsk_options_L_t *options;
tsk_params_L_t *headers;

View File

@ -94,6 +94,7 @@ thttp_url_t;
TINYHTTP_API int thttp_url_serialize(const thttp_url_t *url, tsk_buffer_t *output);
TINYHTTP_API char* thttp_url_tostring(const thttp_url_t *url);
TINYHTTP_API thttp_url_t *thttp_url_clone(const thttp_url_t *url);
TINYHTTP_API tsk_bool_t thttp_url_isok(const char* urlstring);
TINYHTTP_GEXTERN const void *thttp_url_def_t;

View File

@ -239,19 +239,20 @@ int __thttp_stack_set(thttp_stack_t *self, va_list values)
}/* switch */
}/* while */
return 0;
bail:
return 0;
return -2;
}
/**@ingroup thttp_stack_group
* Creates new HTTP/HTTPS stack.
* @param callback Pointer to the callback function to call when new messages come to the transport layer.
* Can be set to Null if you don't want to be alerted.
* @param ... Configuration parameters. You must use @a THTTP_STACK_SET_* macros to set these parameters.
* The list of parameters must end with @ref THTTP_STACK_SET_NULL() even if there is no parameter.<br>
* @param ... Configuration parameters. You must use @a THTTP_STACK_SET_*() macros to set these parameters.
* The list of parameters must end with @ref THTTP_STACK_SET_NULL() even if there is no parameter to pass to the stack.<br>
* @retval A Pointer to the newly created stack if succeed and @a Null otherwise.
* A session is a well-defined object.
* A stack is a well-defined object.
*
* @code
* thttp_stack_create(callback,
@ -284,7 +285,7 @@ thttp_stack_handle_t *thttp_stack_create(thttp_stack_callback callback, ...)
/**@ingroup thttp_stack_group
* Starts the stack.
* @param self A pointer to the stack to start. The stack must be create using @ref thttp_stack_create.
* @param self A pointer to the stack to start. The stack shall be created using @ref thttp_stack_create().
* @retval Zero if succeed and non-zero error code otherwise.
* @sa @ref thttp_stack_stop
*/
@ -341,8 +342,8 @@ int thttp_stack_set(thttp_stack_handle_t *self, ...)
}
/**@ingroup thttp_stack_group
* Stops the stack. The stack must be already started.
* @param self A pointer to the stack to stop. The stack must be create using @ref thttp_stack_create.
* Stops the stack. The stack must already be started.
* @param self A pointer to the stack to stop. The stack shall be created using @ref thttp_stack_create.
* @retval Zero if succeed and non-zero error code otherwise.
* @sa @ref thttp_stack_start
*/
@ -399,7 +400,7 @@ int thttp_stack_alert(const thttp_stack_t *self, const thttp_event_t* e)
//========================================================
// HTTP stack object definition
//
static void* _thttp_stack_create(void * self, va_list * app)
static tsk_object_t* _thttp_stack_create(tsk_object_t * self, va_list * app)
{
thttp_stack_t *stack = self;
if(stack){
@ -410,7 +411,7 @@ static void* _thttp_stack_create(void * self, va_list * app)
return self;
}
static void* thttp_stack_destroy(void * self)
static tsk_object_t* thttp_stack_destroy(tsk_object_t * self)
{
thttp_stack_t *stack = self;
if(stack){
@ -438,6 +439,6 @@ static const tsk_object_def_t thttp_stack_def_s =
sizeof(thttp_stack_t),
_thttp_stack_create,
thttp_stack_destroy,
0,
tsk_null,
};
const void *thttp_stack_def_t = &thttp_stack_def_s;
const tsk_object_def_t *thttp_stack_def_t = &thttp_stack_def_s;

View File

@ -50,11 +50,9 @@ int __thttp_session_set(thttp_session_t *self, va_list* app)
return -1;
}
while((curr=va_arg(*app, thttp_session_param_type_t)) != sptype_null)
{
switch(curr)
{
case sptype_option:
while((curr=va_arg(*app, thttp_session_param_type_t)) != httpp_null){
switch(curr){
case httpp_option:
{
thhtp_session_option_t id = va_arg(*app, thhtp_session_option_t);
const char* value = va_arg(*app, const char *);
@ -62,7 +60,7 @@ int __thttp_session_set(thttp_session_t *self, va_list* app)
break;
}
case sptype_header:
case httpp_header:
{
const char* name = va_arg(*app, const char *);
const char* value = va_arg(*app, const char *);
@ -70,14 +68,14 @@ int __thttp_session_set(thttp_session_t *self, va_list* app)
break;
}
case sptype_cred:
case httpp_cred:
{
tsk_strupdate(&self->cred.usename, va_arg(*app, const char *));
tsk_strupdate(&self->cred.password, va_arg(*app, const char *));
break;
}
case sptype_context:
case httpp_context:
{
self->context = va_arg(*app, const void *);
break;
@ -88,8 +86,8 @@ int __thttp_session_set(thttp_session_t *self, va_list* app)
TSK_DEBUG_ERROR("NOT SUPPORTED.");
goto bail;
}
}
}
} /* sxitch */
} /* while */
return 0;
bail:
@ -135,14 +133,14 @@ thttp_session_handle_t* thttp_session_create(const struct thttp_stack_s* stack,
/**@ingroup thttp_session_group
* Updates the session parameters.
* @param self The session to update. The session shall be created using @ref thttp_session_create.
* @param self The session to update. The session shall be created using @ref thttp_session_create().
* @param ... Any @b THTTP_SESSION_SET_*() macros. MUST ends with @ref THTTP_SESSION_SET_NULL().
* @retval Zero if succeed and non zero error code otherwise.
*
* @code
int ret = thttp_session_set(session,
// session-level parameters
THTTP_SESSION_SET_PARAM("timeout", "6000"),
THTTP_SESSION_SET_OPTION(THTTP_SESSION_OPTION_TIMEOUT, "6000"),
// session-level headers
THTTP_SESSION_SET_HEADER("Pragma", "No-Cache"),

View File

@ -90,7 +90,23 @@ thttp_url_t *thttp_url_clone(const thttp_url_t *url)
return newurl;
}
/**@ingroup thttp_url_group
*/
tsk_bool_t thttp_url_isok(const char* urlstring)
{
thttp_url_t *url;
if(!urlstring){
return tsk_false;
}
if((url = thttp_url_parse(urlstring, strlen(urlstring)))){
TSK_OBJECT_SAFE_FREE(url);
return tsk_true;
}
else{
return tsk_false;
}
}

View File

@ -120,6 +120,8 @@
<includes id="tinyhttp__config_8h" name="tinyhttp_config.h" local="yes" imported="no">tinyHTTP_config.h</includes>
<includes id="thttp__event_8h" name="thttp_event.h" local="yes" imported="no">tinyHTTP/thttp_event.h</includes>
<includes id="thttp__session_8h" name="thttp_session.h" local="yes" imported="no">tinyHTTP/thttp_session.h</includes>
<includes id="thttp__message_8h" name="thttp_message.h" local="yes" imported="no">tinyHTTP/thttp_message.h</includes>
<includes id="thttp__url_8h" name="thttp_url.h" local="yes" imported="no">tinyHTTP/thttp_url.h</includes>
</compound>
<compound kind="file">
<name>thttp_auth.h</name>
@ -325,6 +327,12 @@
<anchor>ac740fe3f373d2a91913437e31e44d4b3a8ae250e4da5f57fca5eb36f227409c44</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>thttp_htype_Transfer_Encoding</name>
<anchorfile>thttp__header_8h.html</anchorfile>
<anchor>ac740fe3f373d2a91913437e31e44d4b3a396cb186e47c23c5e52be304b6a5bd47</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>thttp_htype_WWW_Authenticate</name>
<anchorfile>thttp__header_8h.html</anchorfile>
@ -503,10 +511,10 @@
<arglist>(const char *data, size_t size)</arglist>
</member>
<member kind="variable">
<type>TINYHTTP_GEXTERN const void *</type>
<type>TINYHTTP_GEXTERN const tsk_object_def_t *</type>
<name>thttp_header_Content_Type_def_t</name>
<anchorfile>thttp__header___content___type_8h.html</anchorfile>
<anchor>ae21fdcc8ed9d62d36bddfaee98d91d7b</anchor>
<anchor>aae2f5aaccb96719f11770748caa192b6</anchor>
<arglist></arglist>
</member>
</compound>
@ -560,6 +568,56 @@
<arglist></arglist>
</member>
</compound>
<compound kind="file">
<name>thttp_header_Transfer_Encoding.h</name>
<path>C:/doubango/tinyHTTP/include/tinyHTTP/headers/</path>
<filename>thttp__header___transfer___encoding_8h</filename>
<includes id="tinyhttp__config_8h" name="tinyhttp_config.h" local="yes" imported="no">tinyHTTP_config.h</includes>
<includes id="thttp__header_8h" name="thttp_header.h" local="yes" imported="no">tinyHTTP/headers/thttp_header.h</includes>
<class kind="struct">thttp_header_Transfer_Encoding_s</class>
<member kind="define">
<type>#define</type>
<name>THTTP_HEADER_TRANSFER_ENCODING_VA_ARGS</name>
<anchorfile>thttp__header___transfer___encoding_8h.html</anchorfile>
<anchor>af3d45684db89cc6a76d82e56abf46bd6</anchor>
<arglist>(encoding)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>THTTP_HEADER_TRANSFER_ENCODING_CREATE</name>
<anchorfile>thttp__header___transfer___encoding_8h.html</anchorfile>
<anchor>a8a99e4a81e5adfe47c4d027c0b8dde24</anchor>
<arglist>(encoding)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>THTTP_HEADER_TRANSFER_ENCODING_CREATE_NULL</name>
<anchorfile>thttp__header___transfer___encoding_8h.html</anchorfile>
<anchor>a8141d205a6b88ddc0123b8bc7e2a6a16</anchor>
<arglist>()</arglist>
</member>
<member kind="typedef">
<type>struct thttp_header_Transfer_Encoding_s</type>
<name>thttp_header_Transfer_Encoding_t</name>
<anchorfile>thttp__header___transfer___encoding_8h.html</anchorfile>
<anchor>a819c92eb51b3f91042057b99c1c33a78</anchor>
<arglist></arglist>
</member>
<member kind="function">
<type>thttp_header_Transfer_Encoding_t *</type>
<name>thttp_header_Transfer_Encoding_parse</name>
<anchorfile>group__thttp__header__group.html</anchorfile>
<anchor>ga3c59176f6b363090c3f89e5238cb3901</anchor>
<arglist>(const char *data, size_t size)</arglist>
</member>
<member kind="variable">
<type>TINYHTTP_GEXTERN const tsk_object_def_t *</type>
<name>thttp_header_Transfer_Encoding_def_t</name>
<anchorfile>thttp__header___transfer___encoding_8h.html</anchorfile>
<anchor>a8451162b13619940f0a0b438c840fe61</anchor>
<arglist></arglist>
</member>
</compound>
<compound kind="file">
<name>thttp_header_WWW_Authenticate.h</name>
<path>C:/doubango/tinyHTTP/include/tinyHTTP/headers/</path>
@ -682,10 +740,10 @@
</member>
<member kind="define">
<type>#define</type>
<name>THTTP_ACTION_SET_PARAM</name>
<name>THTTP_ACTION_SET_OPTION</name>
<anchorfile>group__thttp__action__group.html</anchorfile>
<anchor>gad93eb89d30c8892263037a222bcc5b67</anchor>
<arglist>(NAME_STR, VALUE_STR)</arglist>
<anchor>gaad52574ad5dfd402db89f6d5f6367065</anchor>
<arglist>(ID_INT, VALUE_STR)</arglist>
</member>
<member kind="define">
<type>#define</type>
@ -778,6 +836,13 @@
<anchor>ab4937bdabb43b5de1885164160ab1a5b</anchor>
<arglist></arglist>
</member>
<member kind="typedef">
<type>enum thhtp_action_option_e</type>
<name>thhtp_action_option_t</name>
<anchorfile>thttp__action_8h.html</anchorfile>
<anchor>a0cdf56c18ad08a6123a05bf2d9310286</anchor>
<arglist></arglist>
</member>
<member kind="typedef">
<type>enum thttp_action_type_e</type>
<name>thttp_action_type_t</name>
@ -813,6 +878,18 @@
<anchor>a2daa7482248c60ac251b34539f206712</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>thhtp_action_option_e</name>
<anchorfile>thttp__action_8h.html</anchorfile>
<anchor>a82c6f0093fa0bf359c17ee07884206a8</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>THTTP_ACTION_OPTION_TIMEOUT</name>
<anchorfile>thttp__action_8h.html</anchorfile>
<anchor>a82c6f0093fa0bf359c17ee07884206a8ae29bc22ba4b0dbab91762df2498bec75</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>thttp_action_type_e</name>
<anchorfile>thttp__action_8h.html</anchorfile>
@ -862,9 +939,9 @@
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>aptype_param</name>
<name>aptype_option</name>
<anchorfile>thttp__action_8h.html</anchorfile>
<anchor>ad990d5d648fad6d0d72b341c47d69db1ad776e52763a756961ec25b34c7f13723</anchor>
<anchor>ad990d5d648fad6d0d72b341c47d69db1aa407d88a84c1c7bf54c8890cea11122d</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
@ -944,9 +1021,9 @@
</member>
<member kind="function">
<type>thttp_dialog_t *</type>
<name>thttp_dialog_get_by_age</name>
<name>thttp_dialog_get_oldest</name>
<anchorfile>thttp__dialog_8h.html</anchorfile>
<anchor>ac89c8e01aa2b847a0831f06be81b49a7</anchor>
<anchor>a11a7f172eec35d75c54445562db2733e</anchor>
<arglist>(thttp_dialogs_L_t *dialogs)</arglist>
</member>
<member kind="variable">
@ -1309,6 +1386,13 @@
<anchor>ga90d831ed5c6d29560ded8e688ac60242</anchor>
<arglist>(thttp_message_t *self, const char *content_type, const void *content, size_t size)</arglist>
</member>
<member kind="function">
<type>TINYHTTP_API int</type>
<name>thttp_message_append_content</name>
<anchorfile>group__thttp__message__group.html</anchorfile>
<anchor>ga3b5a87db25bc5e2056d406b64154e348</anchor>
<arglist>(thttp_message_t *self, const void *content, size_t size)</arglist>
</member>
<member kind="function">
<type>TINYHTTP_API const thttp_header_t *</type>
<name>thttp_message_get_headerAt</name>
@ -1391,10 +1475,10 @@
</member>
<member kind="define">
<type>#define</type>
<name>THTTP_SESSION_SET_PARAM</name>
<name>THTTP_SESSION_SET_OPTION</name>
<anchorfile>group__thttp__session__group.html</anchorfile>
<anchor>gaa3552649971c1d05d289c422cfbea33d</anchor>
<arglist>(NAME_STR, VALUE_STR)</arglist>
<anchor>gaf4aedae9e645145e611d849b31bfb989</anchor>
<arglist>(ID_INT, VALUE_STR)</arglist>
</member>
<member kind="define">
<type>#define</type>
@ -1431,6 +1515,13 @@
<anchor>aa6372f0a6a5f36d90f0b7e10958cfcb0</anchor>
<arglist></arglist>
</member>
<member kind="typedef">
<type>enum thhtp_session_option_e</type>
<name>thhtp_session_option_t</name>
<anchorfile>thttp__session_8h.html</anchorfile>
<anchor>aa76da6e651655851903b8ea5a7c154a7</anchor>
<arglist></arglist>
</member>
<member kind="typedef">
<type>enum thttp_session_param_type_e</type>
<name>thttp_session_param_type_t</name>
@ -1459,6 +1550,18 @@
<anchor>a0697a651e7789539f8fa15c2ee3e8565</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>thhtp_session_option_e</name>
<anchorfile>thttp__session_8h.html</anchorfile>
<anchor>ab12b176916b17dcff5531c4834fc13d3</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>THTTP_SESSION_OPTION_TIMEOUT</name>
<anchorfile>thttp__session_8h.html</anchorfile>
<anchor>ab12b176916b17dcff5531c4834fc13d3a94cc57900b9735e4313e16c36cfb3416</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>thttp_session_param_type_e</name>
<anchorfile>thttp__session_8h.html</anchorfile>
@ -1472,9 +1575,9 @@
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>sptype_param</name>
<name>sptype_option</name>
<anchorfile>thttp__session_8h.html</anchorfile>
<anchor>ac60e1a2d905c79691f843b2ff333c7e3a715ca2bc9254a45be6b348648b7cc3de</anchor>
<anchor>ac60e1a2d905c79691f843b2ff333c7e3aa5801f22c8e7f0b21775ad29322e3b8a</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
@ -1945,10 +2048,10 @@
<arglist>(const char *data, size_t size)</arglist>
</member>
<member kind="variable">
<type>const void *</type>
<type>const tsk_object_def_t *</type>
<name>thttp_header_Content_Type_def_t</name>
<anchorfile>thttp__header___content___type_8c.html</anchorfile>
<anchor>a5ae679ccb04566d4a0cdd09967db0de8</anchor>
<anchor>a911bb4b12f106ad2da6673169f6e37be</anchor>
<arglist></arglist>
</member>
</compound>
@ -1978,6 +2081,33 @@
<arglist></arglist>
</member>
</compound>
<compound kind="file">
<name>thttp_header_Transfer_Encoding.c</name>
<path>C:/doubango/tinyHTTP/src/headers/</path>
<filename>thttp__header___transfer___encoding_8c</filename>
<includes id="thttp__header___transfer___encoding_8h" name="thttp_header_Transfer_Encoding.h" local="yes" imported="no">tinyHTTP/headers/thttp_header_Transfer_Encoding.h</includes>
<member kind="function">
<type>int</type>
<name>thttp_header_Transfer_Encoding_tostring</name>
<anchorfile>thttp__header___transfer___encoding_8c.html</anchorfile>
<anchor>ac1593a69da298d7fa2be1f4be559f982</anchor>
<arglist>(const void *header, tsk_buffer_t *output)</arglist>
</member>
<member kind="function">
<type>thttp_header_Transfer_Encoding_t *</type>
<name>thttp_header_Transfer_Encoding_parse</name>
<anchorfile>group__thttp__header__group.html</anchorfile>
<anchor>ga3c59176f6b363090c3f89e5238cb3901</anchor>
<arglist>(const char *data, size_t size)</arglist>
</member>
<member kind="variable">
<type>const tsk_object_def_t *</type>
<name>thttp_header_Transfer_Encoding_def_t</name>
<anchorfile>thttp__header___transfer___encoding_8c.html</anchorfile>
<anchor>adefb146cda0858b796412ae5af31bb86</anchor>
<arglist></arglist>
</member>
</compound>
<compound kind="file">
<name>thttp_header_WWW_Authenticate.c</name>
<path>C:/doubango/tinyHTTP/src/headers/</path>
@ -2020,6 +2150,7 @@
<includes id="thttp__parser__header_8h" name="thttp_parser_header.h" local="yes" imported="no">tinyHTTP/parsers/thttp_parser_header.h</includes>
<includes id="thttp__header___authorization_8h" name="thttp_header_Authorization.h" local="yes" imported="no">tinyHTTP/headers/thttp_header_Authorization.h</includes>
<includes id="thttp__header___dummy_8h" name="thttp_header_Dummy.h" local="yes" imported="no">tinyHTTP/headers/thttp_header_Dummy.h</includes>
<includes id="thttp__header___transfer___encoding_8h" name="thttp_header_Transfer_Encoding.h" local="yes" imported="no">tinyHTTP/headers/thttp_header_Transfer_Encoding.h</includes>
<includes id="thttp__header___w_w_w___authenticate_8h" name="thttp_header_WWW_Authenticate.h" local="yes" imported="no">tinyHTTP/headers/thttp_header_WWW_Authenticate.h</includes>
<member kind="define">
<type>#define</type>
@ -2080,6 +2211,7 @@
<includes id="thttp__event_8h" name="thttp_event.h" local="yes" imported="no">tinyHTTP/thttp_event.h</includes>
<includes id="thttp__message_8h" name="thttp_message.h" local="yes" imported="no">tinyHTTP/thttp_message.h</includes>
<includes id="thttp__parser__message_8h" name="thttp_parser_message.h" local="yes" imported="no">tinyHTTP/parsers/thttp_parser_message.h</includes>
<includes id="thttp__header___transfer___encoding_8h" name="thttp_header_Transfer_Encoding.h" local="yes" imported="no">tinyHTTP/headers/thttp_header_Transfer_Encoding.h</includes>
<includes id="thttp__dialog_8h" name="thttp_dialog.h" local="yes" imported="no">tinyHTTP/thttp_dialog.h</includes>
<member kind="function">
<type>int</type>
@ -2299,6 +2431,13 @@
<anchor>a00ab51fe52cf9ff43607376dd9b2f663</anchor>
<arglist>(va_list *app)</arglist>
</member>
<member kind="function">
<type>int</type>
<name>thttp_dialog_Transfering_2_Transfering_X_1xx</name>
<anchorfile>thttp__dialog_8c.html</anchorfile>
<anchor>ac58361d510dad68eed62a8ccf8e3ba75</anchor>
<arglist>(va_list *app)</arglist>
</member>
<member kind="function">
<type>int</type>
<name>thttp_dialog_Transfering_2_Terminated_X_message</name>
@ -2329,9 +2468,9 @@
</member>
<member kind="function">
<type>tsk_bool_t</type>
<name>_fsm_cond_i_n401_n407</name>
<name>_fsm_cond_i_1xx</name>
<anchorfile>thttp__dialog_8c.html</anchorfile>
<anchor>a28523b05f86797b90eeb14e0564761a1</anchor>
<anchor>a900dbaa94550c911cf068916d7949b52</anchor>
<arglist>(thttp_dialog_t *self, thttp_message_t *message)</arglist>
</member>
<member kind="function">
@ -2341,13 +2480,6 @@
<anchor>a75bbcbd775498c9c768e4d3536c7cc3b</anchor>
<arglist>(thttp_dialog_t *self, tsk_fsm_action_id action_id, const thttp_message_t *message, const thttp_action_t *action)</arglist>
</member>
<member kind="function">
<type>thttp_dialog_t *</type>
<name>thttp_dialog_get_by_session</name>
<anchorfile>thttp__dialog_8c.html</anchorfile>
<anchor>ab0c0bada4df232b6a11b6c5559f1219c</anchor>
<arglist>(thttp_dialogs_L_t *dialogs, const struct thttp_session_s *session)</arglist>
</member>
<member kind="function">
<type>thttp_dialog_t *</type>
<name>thttp_dialog_new</name>
@ -2357,9 +2489,9 @@
</member>
<member kind="function">
<type>thttp_dialog_t *</type>
<name>thttp_dialog_get_by_age</name>
<name>thttp_dialog_get_oldest</name>
<anchorfile>thttp__dialog_8c.html</anchorfile>
<anchor>ac89c8e01aa2b847a0831f06be81b49a7</anchor>
<anchor>a11a7f172eec35d75c54445562db2733e</anchor>
<arglist>(thttp_dialogs_L_t *dialogs)</arglist>
</member>
<member kind="variable">
@ -2417,6 +2549,13 @@
<anchor>ga90d831ed5c6d29560ded8e688ac60242</anchor>
<arglist>(thttp_message_t *self, const char *content_type, const void *content, size_t size)</arglist>
</member>
<member kind="function">
<type>int</type>
<name>thttp_message_append_content</name>
<anchorfile>group__thttp__message__group.html</anchorfile>
<anchor>ga3b5a87db25bc5e2056d406b64154e348</anchor>
<arglist>(thttp_message_t *self, const void *content, size_t size)</arglist>
</member>
<member kind="function">
<type>const thttp_header_t *</type>
<name>thttp_message_get_headerAt</name>
@ -2668,6 +2807,13 @@
<anchor>ga66de413d435bb6a93ae9d7a2647f62bc</anchor>
<arglist>(const char *data, size_t size)</arglist>
</member>
<member kind="function">
<type>thttp_header_Transfer_Encoding_t *</type>
<name>thttp_header_Transfer_Encoding_parse</name>
<anchorfile>group__thttp__header__group.html</anchorfile>
<anchor>ga3c59176f6b363090c3f89e5238cb3901</anchor>
<arglist>(const char *data, size_t size)</arglist>
</member>
<member kind="function">
<type>thttp_header_WWW_Authenticate_t *</type>
<name>thttp_header_WWW_Authenticate_parse</name>
@ -2715,10 +2861,10 @@
<filename>group__thttp__action__group.html</filename>
<member kind="define">
<type>#define</type>
<name>THTTP_ACTION_SET_PARAM</name>
<name>THTTP_ACTION_SET_OPTION</name>
<anchorfile>group__thttp__action__group.html</anchorfile>
<anchor>gad93eb89d30c8892263037a222bcc5b67</anchor>
<arglist>(NAME_STR, VALUE_STR)</arglist>
<anchor>gaad52574ad5dfd402db89f6d5f6367065</anchor>
<arglist>(ID_INT, VALUE_STR)</arglist>
</member>
<member kind="define">
<type>#define</type>
@ -3009,6 +3155,13 @@
<anchor>ga90d831ed5c6d29560ded8e688ac60242</anchor>
<arglist>(thttp_message_t *self, const char *content_type, const void *content, size_t size)</arglist>
</member>
<member kind="function">
<type>int</type>
<name>thttp_message_append_content</name>
<anchorfile>group__thttp__message__group.html</anchorfile>
<anchor>ga3b5a87db25bc5e2056d406b64154e348</anchor>
<arglist>(thttp_message_t *self, const void *content, size_t size)</arglist>
</member>
<member kind="function">
<type>const thttp_header_t *</type>
<name>thttp_message_get_headerAt</name>
@ -3058,10 +3211,10 @@
<filename>group__thttp__session__group.html</filename>
<member kind="define">
<type>#define</type>
<name>THTTP_SESSION_SET_PARAM</name>
<name>THTTP_SESSION_SET_OPTION</name>
<anchorfile>group__thttp__session__group.html</anchorfile>
<anchor>gaa3552649971c1d05d289c422cfbea33d</anchor>
<arglist>(NAME_STR, VALUE_STR)</arglist>
<anchor>gaf4aedae9e645145e611d849b31bfb989</anchor>
<arglist>(ID_INT, VALUE_STR)</arglist>
</member>
<member kind="define">
<type>#define</type>
@ -3192,10 +3345,10 @@
<arglist></arglist>
</member>
<member kind="variable">
<type>tsk_params_L_t *</type>
<name>params</name>
<type>tsk_options_L_t *</type>
<name>options</name>
<anchorfile>structthttp__action__s.html</anchorfile>
<anchor>a224e951a121249c4cd0d2356d3cce567</anchor>
<anchor>af5b6cc93a0b124046788312d128c9754</anchor>
<arglist></arglist>
</member>
<member kind="variable">
@ -3567,6 +3720,24 @@
<arglist></arglist>
</member>
</compound>
<compound kind="struct">
<name>thttp_header_Transfer_Encoding_s</name>
<filename>structthttp__header___transfer___encoding__s.html</filename>
<member kind="variable">
<type></type>
<name>THTTP_DECLARE_HEADER</name>
<anchorfile>structthttp__header___transfer___encoding__s.html</anchorfile>
<anchor>a54cf1e6c501a1773be1a8cffaf0aa865</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type>char *</type>
<name>encoding</name>
<anchorfile>structthttp__header___transfer___encoding__s.html</anchorfile>
<anchor>abfd0452ce0a5ba319ea4d624dc209250</anchor>
<arglist></arglist>
</member>
</compound>
<compound kind="struct">
<name>thttp_header_WWW_Authenticate_s</name>
<filename>structthttp__header___w_w_w___authenticate__s.html</filename>
@ -3768,10 +3939,10 @@
<arglist></arglist>
</member>
<member kind="variable">
<type>tsk_params_L_t *</type>
<name>params</name>
<type>tsk_options_L_t *</type>
<name>options</name>
<anchorfile>structthttp__session__s.html</anchorfile>
<anchor>a224e951a121249c4cd0d2356d3cce567</anchor>
<anchor>af5b6cc93a0b124046788312d128c9754</anchor>
<arglist></arglist>
</member>
<member kind="variable">
@ -3823,6 +3994,13 @@
<anchor>a59460a3ff2c12443d1022e5cc0fba85c</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type></type>
<name>TSK_DECLARE_SAFEOBJ</name>
<anchorfile>structthttp__session__s.html</anchorfile>
<anchor>a9818e976fd73889027b42c32d628169f</anchor>
<arglist></arglist>
</member>
</compound>
<compound kind="struct">
<name>thttp_stack_s</name>

View File

@ -37,7 +37,7 @@
/**@defgroup tsk_options_group Options.
*/
/* Predicate function used to find an option by id.
/** Predicate function used to find an option by id.
*/
static int pred_find_option_by_id(const tsk_list_item_t *item, const void *id)
{

View File

@ -35,12 +35,15 @@
TXCAP_BEGIN_DECLS
#define TXCAP_AUID_CREATE(type, id, content_type, document_name) tsk_object_new(txcap_auid_def_t, (txcap_auid_type_t)type, (const char*)id, (const char*)content_type, (const char*)document_name)
#define TXCAP_AUID_CREATE(type, id, mime_type, ns, document_name, is_global)\
tsk_object_new(txcap_auid_def_t, (txcap_auid_type_t)type, (const char*)id, (const char*)mime_type, (const char*)ns, (const char*)document_name, (tsk_bool_t)is_global)
/** List of supported AUIDs.
*/
typedef enum txcap_auid_type_e
{
tauid_dummy, /**< any auid */
tauid_ietf_xcap_caps, /**< xcap-caps */
tauid_ietf_resource_lists, /**< resource-lists */
tauid_ietf_rls_services, /**< rls-services */
@ -52,7 +55,7 @@ typedef enum txcap_auid_type_e
tauid_oma_directory, /**< org.openmobilealliance.xcap-directory */
tauid_oma_deferred_list, /**< org.openmobilealliance.deferred-list */
tauid_oma_pres_content, /**< org.openmobilealliance.pres-content*/
tauid_oma_shared_groups /**< org.openmobilealliance.groups */
tauid_oma_shared_groups /**< org.openmobilealliance.group-usage-list */
}
txcap_auid_type_t;
@ -64,13 +67,20 @@ typedef struct txcap_auid_s
txcap_auid_type_t type;
char* id; /**< The id of the AUID (e.g. 'xcap-caps' or 'rls-services' or 'resource-lists' or ...)*/
char* content_type; /**< The default MIME-type of the document associated to this auid. */
char* mime_type; /**< The default MIME-type of the document associated to this auid. */
char* ns; /**< The namespace associated to this auid. */
char* document_name; /**< The default name of the document associated to this auid. */
tsk_bool_t global; /**< Indicates the auid scope. */
}
txcap_auid_t;
typedef tsk_list_t txcap_auids_L_t;
int txcap_auid_register(txcap_auids_L_t* auids, const char* id, const char* mime_type, const char* ns, const char* document_name, tsk_bool_t is_global);
txcap_auid_t* txcap_auid_get_by_id(txcap_auids_L_t* auids, const char* id);
int txcap_auids_init(txcap_auids_L_t** auids);
TINYXCAP_GEXTERN const tsk_object_def_t *txcap_auid_def_t;
TXCAP_END_DECLS

View File

@ -0,0 +1,43 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
/**@file txcap_document.h
* @brief XCAP documents.
*
* @author Mamadou Diop <diopmamadou(at)doubango.org>
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#ifndef TINYXCAP_TXCAP_DOCUMENT_H
#define TINYXCAP_TXCAP_DOCUMENT_H
#include "tinyXCAP_config.h"
#include "txcap.h"
TXCAP_BEGIN_DECLS
TINYXCAP_API char* txcap_selector_get_document(const txcap_stack_handle_t* stack, const char* auid_id);
TINYXCAP_API char* txcap_selector_get_document_2(const char* xcap_root, const char* auid_id, const char* xui, const char* doc_name);
TXCAP_END_DECLS
#endif /* TINYXCAP_TXCAP_DOCUMENT_H */

View File

@ -0,0 +1,99 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
/**@file txcap_node.h
* @brief XCAP nodes.
*
* @author Mamadou Diop <diopmamadou(at)doubango.org>
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#ifndef TINYXCAP_TXCAP_NODE_H
#define TINYXCAP_TXCAP_NODE_H
#include "tinyXCAP_config.h"
#include "tsk_common.h"
TXCAP_BEGIN_DECLS
typedef enum txcap_selector_param_type_e
{
xcapp_node_null = tsk_null,
xcapp_node_name,
xcapp_node_pos,
xcapp_node_attribute,
xcapp_node_pos_n_attribute,
xcapp_node_namespace
}
txcap_selector_param_type_t;
/**@ingroup txcap_selector_group
* @def TXCAP_SELECTOR_NODE_SET_NAME
* Node selection step. Selects by name as per <a href="http://tools.ietf.org/html/rfc4825#section-6.3">RFC 4825 subclause 6.3</a>.
* @param QNAME_STR The name of the node to select. The @a QName grammar is defined in the XML namespaces [<a href="http://tools.ietf.org/html/rfc4825#ref-3">3</a>] specification (<i>const char*</i>).
*/
/**@ingroup txcap_selector_group
* @def TXCAP_SELECTOR_NODE_SET_POS
* Node selection step. Selects by position as per <a href="http://tools.ietf.org/html/rfc4825#section-6.3">RFC 4825 subclause 6.3</a>.
* @param QNAME_STR The name of the node to select. The @a QName grammar is defined in the XML namespaces [<a href="http://tools.ietf.org/html/rfc4825#ref-3">3</a>] specification.
* @param POS_UINT The position of the node to select (1*DIGIT) (<i>unsigned int</i>).
*/
/**@ingroup txcap_selector_group
* @def TXCAP_SELECTOR_NODE_SET_ATTRIBUTE
* Node selection step. Selects by position and attribute as per <a href="http://tools.ietf.org/html/rfc4825#section-6.3">RFC 4825 subclause 6.3</a>.
* @param QNAME_STR The name of the node to select. The @a QName grammar is defined in the XML namespaces [<a href="http://tools.ietf.org/html/rfc4825#ref-3">3</a>] specification (<i>const char*</i>).
* @param ATT_QNAME_STR The name of the attribute (<i>const char*</i>).
* @param ATT_VALUE_STR The value of the attribute. @a AttValue grammar is defined in the XML specification XML 1.0 [<a href="http://tools.ietf.org/html/rfc4825#ref-1">1</a>] (<i>const char*</i>).
*/
/**@ingroup txcap_selector_group
* @def TXCAP_SELECTOR_NODE_SET_POS_ATTRIBUTE
* Node selection step. Selects by position and attribute as per <a href="http://tools.ietf.org/html/rfc4825#section-6.3">RFC 4825 subclause 6.3</a>.
* @param QNAME_STR The name of the node to select. The @a QName grammar is defined in the XML namespaces [<a href="http://tools.ietf.org/html/rfc4825#ref-3">3</a>] specification.
* @param POS_UINT The position of the node to select (1*DIGIT) (<i>unsigned int</i>).
* @param ATT_QNAME_STR The name of the attribute (<i>const char*</i>).
* @param ATT_VALUE_STR The value of the attribute. @a AttValue grammar is defined in the XML specification XML 1.0 [<a href="http://tools.ietf.org/html/rfc4825#ref-1">1</a>] (<i>const char*</i>).
*/
/**@ingroup txcap_selector_group
* @def TXCAP_SELECTOR_NODE_SET_NAMESPACE
* Node selection step. Appends XML namespace("namespace::*") as per <a href="http://tools.ietf.org/html/rfc4825#section-6.3">RFC 4825 subclause 6.3</a>.
* @param PREFIX_STR The prefix to use for this namespace (<i>const char*</i>).
* @param VALUE_STR The value of the namespace (<i>const char*</i>).
*/
/**@ingroup txcap_selector_group
* @def TXCAP_SELECTOR_NODE_SET_NULL
* Ends node selection steps. Must always be present and should be the last one.
*/
#define TXCAP_SELECTOR_NODE_SET_NAME(QNAME_STR) xcapp_node_name, (const char*)QNAME_STR
#define TXCAP_SELECTOR_NODE_SET_POS(QNAME_STR, POS_UINT) xcapp_node_pos, (const char*)QNAME_STR, (unsigned int)POS_INT
#define TXCAP_SELECTOR_NODE_SET_ATTRIBUTE(QNAME_STR, ATT_QNAME_STR, ATT_VALUE_STR) xcapp_node_attribute, (const char*)QNAME_STR, (const char*)ATT_QNAME_STR, (const char*)ATT_VALUE_STR
#define TXCAP_SELECTOR_NODE_SET_POS_ATTRIBUTE(QNAME_STR, POS_UINT, ATT_QNAME_STR, ATT_VALUE_STR) xcapp_node_pos_n_attribute, (const char*)QNAME_STR, (unsigned int)POS_UINT, (const char*)ATT_QNAME_STR, (const char*)ATT_VALUE_STR
#define TXCAP_SELECTOR_NODE_SET_NAMESPACE(PREFIX_STR, VALUE_STR) xcapp_node_namespace, (const char*)PREFIX_STR, (const char*)VALUE_STR
#define TXCAP_SELECTOR_NODE_SET_NULL() xcapp_node_null
TINYXCAP_API char* txcap_selector_get_node(const char* auid_id, ...);
TINYXCAP_API char* txcap_selector_get_node_2(const char* auid_id, va_list* app);
TXCAP_END_DECLS
#endif /* TINYXCAP_TXCAP_NODE_H */

View File

@ -0,0 +1,41 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
/**@file txcap_selector.h
* @brief XCAP selector.
*
* @author Mamadou Diop <diopmamadou(at)doubango.org>
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#ifndef TINYXCAP_TXCAP_SELECTOR_H
#define TINYXCAP_TXCAP_SELECTOR_H
#include "tinyXCAP_config.h"
TXCAP_BEGIN_DECLS
TINYXCAP_API char* txcap_selector_get_full(const txcap_stack_handle_t* stack, const char* auid_id, ...);
TINYXCAP_API char* txcap_selector_get_full_2(const char* xcap_root, const char* auid_id, const char* xui, const char* doc_name, ...);
TXCAP_END_DECLS
#endif /* TINYXCAP_TXCAP_SELECTOR_H */

View File

@ -0,0 +1,31 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
/**@file tinyxcap.h
* @brief API functions.
*
* @author Mamadou Diop <diopmamadou(at)doubango.org>
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#include "txcap.h"
#include "tinyXCAP/txcap_document.h"

View File

@ -31,8 +31,74 @@
#include "tinyXCAP_config.h"
#include "tinyXCAP/txcap_auid.h"
#include "tsk_options.h"
#include "tinyhttp.h"
TXCAP_BEGIN_DECLS
typedef enum txcap_stack_option_e
{
TXCAP_STACK_OPTION_TIMEOUT,
TXCAP_STACK_OPTION_TTL,
TXCAP_STACK_OPTION_PASSWORD,
TXCAP_STACK_OPTION_XUI,
}
txcap_stack_option_t;
typedef enum txcap_stack_param_type_e
{
xcapp_null = tsk_null,
xcapp_option,
xcapp_header,
xcapp_context,
xcapp_auid,
}
txcap_stack_param_type_t;
#define TXCAP_STACK_SET_OPTION(ID_INT, VALUE_STR) xcapp_option, (txcap_stack_option_t)ID_INT, (const char*)VALUE_STR
#define TXCAP_STACK_SET_PASSWORD(PASSWORD_STR) TXCAP_STACK_SET_OPTION(TXCAP_STACK_OPTION_PASSWORD, PASSWORD_STR)
#define TXCAP_STACK_SET_XUI(XUI_STR) TXCAP_STACK_SET_OPTION(TXCAP_STACK_OPTION_XUI, XUI_STR)
#define TXCAP_STACK_SET_HEADER(NAME_STR, VALUE_STR) xcapp_header, (const char*)NAME_STR, (const char*)VALUE_STR
#define TXCAP_STACK_SET_CONTEXT(CTX_PTR) xcapp_context, (const void*)CTX_PTR
#define TXCAP_STACK_SET_AUID(ID_STR, MIME_TYPE_STR, NS_STR, DOC_NAME_STR, IS_GLOBAL_BOOL) xcapp_auid, (const char*)ID_STR, (const char*)MIME_TYPE_STR, (const char*)NS_STR, (const char*)DOC_NAME_STR, (tsk_bool_t)IS_GLOBAL_BOOL
#define TXCAP_STACK_SET_SELECTOR(...)
#define TXCAP_STACK_SET_NULL() xcapp_null
typedef struct txcap_stack_s
{
TSK_DECLARE_OBJECT;
char* xui; /**< user's name as per RFC 4825 subclause 4.Also used to fill @b "X-3GPP-Intended-Identity" header.*/
char* password; /**< user's password used to authenticate to the XDMS . */
char* xcap_root; /**< xcap-root URI as per RFC 4825 subclause 6.1. MUST be a valid HTPP/HTTPS URL and will be used to build all request-uris. */
thttp_session_handle_t* http_session;
thttp_stack_handle_t* http_stack; /**< http/https stack */
tsk_options_L_t *options; /**< list of user options */
const void* context; /**< user's context */
txcap_auids_L_t* auids; /**< user's auids */
TSK_DECLARE_SAFEOBJ;
}
txcap_stack_t;
typedef void txcap_stack_handle_t;
TINYXCAP_API txcap_stack_handle_t* txcap_stack_create(thttp_stack_callback callback, const char* xui, const char* password, const char* xcap_root, ...);
TINYXCAP_API int txcap_stack_start(txcap_stack_handle_t* self);
TINYXCAP_API int txcap_stack_set(txcap_stack_handle_t* self, ...);
TINYXCAP_API int txcap_stack_perform(txcap_stack_handle_t* self, const char* urlstring, ...);
TINYXCAP_API int txcap_stack_stop(txcap_stack_handle_t* self);
TINYXCAP_GEXTERN const tsk_object_def_t *txcap_stack_def_t;
TXCAP_END_DECLS

View File

@ -26,4 +26,267 @@
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#include "txcap.h"
#include "txcap.h"
#include "tinyHTTP/thttp_url.h"
/**@defgroup txcap_stack_group XCAP stack
*/
/** Internal function used to set options.
*/
int __txcap_stack_set(txcap_stack_t* self, va_list *app)
{
txcap_stack_param_type_t curr;
if(!self){
return -1;
}
while((curr = va_arg(*app, txcap_stack_param_type_t)) != xcapp_null){
switch(curr){
case xcapp_option:
{ /* (txcap_stack_option_t)ID_INT, (const char*)VALUE_STR */
txcap_stack_option_t ID_IN = va_arg(*app, txcap_stack_option_t);
const char* VALUE_STR = va_arg(*app, const char*);
break;
}
case xcapp_header:
{ /* (const char*)NAME_STR, (const char*)VALUE_STR */
const char* NAME_STR = va_arg(*app, const char*);
const char* VALUE_STR = va_arg(*app, const char*);
break;
}
case xcapp_context:
{ /* (const void*)CTX_PTR */
const void* CTX_PTR = va_arg(*app, const void*);
break;
}
case xcapp_auid:
{ /* (const char*)ID_STR, (const char*)MIME_TYPE_STR, (const char*)NS_STR, (const char*)DOC_NAME_STR, (tsk_bool_t)IS_GLOBAL_BOOL */
const char* ID_STR = va_arg(*app, const char*);
const char* MIME_TYPE_STR = va_arg(*app, const char*);
const char* NS_STR = va_arg(*app, const char*);
const char* DOC_NAME_STR = va_arg(*app, const char*);
tsk_bool_t IS_GLOBAL_BOOL = va_arg(*app, tsk_bool_t);
if(txcap_auid_register(self->auids, ID_STR, MIME_TYPE_STR, NS_STR, DOC_NAME_STR, IS_GLOBAL_BOOL)){
// do nothing
}
break;
}
default:
{
TSK_DEBUG_ERROR("NOT SUPPORTED.");
goto bail;
}
} /* switch */
} /* while */
return 0;
bail:
return -2;
}
/**@ingroup txcap_stack_group
* Creates new XCAP stack.
* @param callback Poiner to the callback function to call when new messages come to the transport layer.
* Can be set to Null if you don't want to be alerted.
* @param xui user's id as per RFC 4825 subclause 4. Also used to fill @b "X-3GPP-Intended-Identity" header.
* This paramter is mandatory and must not be null. If for any reason you'd like to update the user's id, then use @ref TXCAP_STACK_SET_XUI().
* @param password user's password used to authenticate to the XDMS.
* This parameter is not mandatory. If for any reason you'd like to update the password, then use @ref TXCAP_STACK_SET_PASSWORD().
* @param xcap_root xcap-root URI as per RFC 4825 subclause 6.1, used to build all request-uris.
* This parameter is not mandatory and must be a valid HTPP/HTTPS URL.
* @param ... User configuration. You must use @a TXCAP_STACK_SET_*() macros to set these options.
* The list of options must always and with @ref TXCAP_STACK_SET_NULL() even if these is no option to pass to the stack.
* @retval A Pointer to the newly created stack if succeed and @a Null otherwise.
* A stack is a well-defined object.
*
* @code
*
* @endcode
*
* @sa @ref txcap_stack_set
*/
txcap_stack_handle_t* txcap_stack_create(thttp_stack_callback callback, const char* xui, const char* password, const char* xcap_root, ...)
{
txcap_stack_handle_t* ret = tsk_null;
if(!xui || !xcap_root){
TSK_DEBUG_ERROR("Both xui and xcap_root are mandatory and should be non-null");
goto bail;
}
/* check url validity */
if(!thttp_url_isok(xcap_root)){
TSK_DEBUG_ERROR("%s is not a valid HTTP/HTTPS url", xcap_root);
goto bail;
}
if(!(ret = tsk_object_new(txcap_stack_def_t, callback, xui, password, xcap_root))){
TSK_DEBUG_FATAL("Failed to create the XCAP stack");
goto bail;
}
bail:
return ret;
}
/**@ingroup txcap_stack_group
* Starts the stack.
* @param self A pointer to the stack to stark. The stack shall be created using @ref txcap_stack_create().
* @retval Zero if succeed and non-zero error code otherwise.
* @sa @ref txcap_stack_stop
*/
int txcap_stack_start(txcap_stack_handle_t* self)
{
int ret = -1;
txcap_stack_t* stack = self;
if(!stack){
goto bail;
}
ret = thttp_stack_start(stack->http_stack);
bail:
return ret;
}
/**@ingroup txcap_stack_group
* Updates the stack configuration.
* @param self The XCAP stack to update. The stack shall be created using @ref txcap_stack_create().
* @param ... Any @a TXCAP_STACK_SET_*() macros. MUST ends with @ref TXCAP_STACK_SET_NULL().
* @retval Zero if succeed and non-zero error code otherwise.
*
* @code
*
* @endcode
*
* @sa @ref txcap_stack_create
*/
int txcap_stack_set(txcap_stack_handle_t* self, ...)
{
int ret = -1;
va_list ap;
if(!self){
goto bail;
}
va_start(ap, self);
ret = __txcap_stack_set(self, &ap);
va_end(ap);
bail:
return ret;
}
/**@ingroup txcap_stack_group
*/
int txcap_stack_perform(txcap_stack_handle_t* self, const char* urlstring, ...)
{
}
/**@ingroup txcap_stack_group
* Stops the stack. The stack must already be started.
* @param self A pointer to the stack to stop. The stack shall be created using @ref txcap_stack_create().
* @retval Zero if succeed and non-zero error code otherwise.
* @sa @ref txcap_stack_create
*/
int txcap_stack_stop(txcap_stack_handle_t* self)
{
int ret = -1;
txcap_stack_t* stack = self;
if(!stack){
goto bail;
}
else{
ret = thttp_stack_stop(stack->http_stack);
}
bail:
return ret;
}
//========================================================
// XCAP stack object definition
//
static tsk_object_t* _txcap_stack_create(tsk_object_t * self, va_list * app)
{
txcap_stack_t *stack = self;
if(stack){
thttp_stack_callback callback;
tsk_safeobj_init(stack);
callback = va_arg(*app, thttp_stack_callback);
stack->xui = tsk_strdup( va_arg(*app, const char*) );
stack->password = tsk_strdup( va_arg(*app, const char*) );
stack->xcap_root = tsk_strdup( va_arg(*app, const char*) );
/* HTTP/HTTPS resources */
stack->http_stack = thttp_stack_create(callback,
THTTP_STACK_SET_NULL());
stack->http_session = thttp_session_create(stack->http_stack ,
THTTP_SESSION_SET_NULL());
/* Options */
stack->options = TSK_LIST_CREATE();
/* AUIDs */
txcap_auids_init(&stack->auids);
}
return self;
}
static tsk_object_t* txcap_stack_destroy(tsk_object_t* self)
{
txcap_stack_t *stack = self;
if(stack){
/* vars */
TSK_FREE(stack->xui);
TSK_FREE(stack->password);
TSK_FREE(stack->xcap_root);
/* HTTP/HTTPS resources */
TSK_OBJECT_SAFE_FREE(stack->http_session);
TSK_OBJECT_SAFE_FREE(stack->http_stack);
/* Options */
TSK_OBJECT_SAFE_FREE(stack->options);
/* AUIDs */
TSK_OBJECT_SAFE_FREE(stack->auids);
tsk_safeobj_deinit(stack);
}
return self;
}
static const tsk_object_def_t txcap_stack_def_s =
{
sizeof(txcap_stack_t),
_txcap_stack_create,
txcap_stack_destroy,
tsk_null,
};
const tsk_object_def_t *txcap_stack_def_t = &txcap_stack_def_s;

View File

@ -28,14 +28,235 @@
*/
#include "tinyXCAP/txcap_auid.h"
#include "tsk_string.h"
#include "tsk_memory.h"
#include "tsk_debug.h"
typedef struct auid_s
{
txcap_auid_type_t type;
const char* id;
const char* mime_type;
const char* ns;
const char* document_name;
tsk_bool_t global;
}
auid_t;
/** List of all default auids
*/
static const auid_t __txcap_auids[] =
{
/*== xcap-caps ==*/{
tauid_ietf_xcap_caps,
"xcap-caps",
"application/xcap-caps+xml",
"urn:ietf:params:xml:ns:xcap-caps",
"index",
tsk_true
},
/*== resource-lists ==*/{
tauid_ietf_resource_lists,
"resource-lists",
"application/resource-lists+xml",
"urn:ietf:params:xml:ns:resource-lists",
"index",
tsk_false
},
/*== rls-services ==*/{
tauid_ietf_rls_services,
"rls-services",
"application/rls-services+xml",
"urn:ietf:params:xml:ns:resource-lists",
"index",
tsk_false
},
/*== pres-rules ==*/{
tauid_ietf_pres_rules,
"pres-rules",
"application/auth-policy+xml",
"urn:ietf:params:xml:ns:pres-rules",
"index",
tsk_false
},
/*== org.openmobilealliance.pres-rules ==*/{
tauid_oma_pres_rules,
"org.openmobilealliance.pres-rules",
"application/auth-policy+xml",
"urn:ietf:params:xml:ns:common-policy",
"pres-rules",
tsk_false
},
/*== directory ==*/{
tauid_ietf_directory,
"directory",
"application/directory+xml",
"urn:ietf:params:xml:ns:xcap-directory",
"directory.xml",
tsk_false
},
/*== org.openmobilealliance.xcap-directory ==*/{
tauid_oma_directory,
"org.openmobilealliance.xcap-directory",
"application/vnd.oma.xcap-directory+xml",
"urn:oma:xml:xdm:xcap-directory",
"directory.xml",
tsk_false
},
/*== org.openmobilealliance.pres-content ==*/{
tauid_oma_pres_content,
"org.openmobilealliance.pres-content",
"application/vnd.oma.pres-content+xml",
"urn:oma:xml:prs:pres-content",
"oma_status-icon/rcs_status_icon",
tsk_false
},
/*== org.openmobilealliance.conv-history ==*/{
tauid_oma_conv_history,
"org.openmobilealliance.conv-history",
"application/vnd.oma.im.history-list+xml",
"urn:oma:xml:im:history-list",
"conv-history",
tsk_false
},
/*== org.openmobilealliance.deferred-list ==*/{
tauid_oma_deferred_list,
"org.openmobilealliance.deferred-list",
"application/vnd.oma.im.deferred-list+xml",
"urn:oma:xml:im:history-list",
"deferred-list",
tsk_false
},
/*== org.openmobilealliance.group-usage-list ==*/{
tauid_oma_shared_groups,
"org.openmobilealliance.group-usage-list",
"application/vnd.oma.group-usage-list+xml",
"rn:ietf:params:xml:ns:resource-lists",
"index",
tsk_false
},
};
/** Predicate function used to find an option by id.
*/
static int pred_find_auid_by_id(const tsk_list_item_t *item, const void *id)
{
if(item && item->data){
txcap_auid_t *auid = item->data;
return tsk_stricmp(auid->id, (const char*)id);
}
return -1;
}
/** Initialze the list of auids with default values from __txcap_auids
* auids must be null;
*/
int txcap_auids_init(txcap_auids_L_t** auids)
{
size_t i;
size_t count;
if(!auids){
TSK_DEBUG_ERROR("invalid parameter.");
return -1;
}
else if(*auids){
TSK_DEBUG_WARN("auids already initialized.");
}
else{
*auids = TSK_LIST_CREATE();
}
count = sizeof(__txcap_auids)/sizeof(auid_t);
for(i = 0; i<count; i++){
txcap_auid_t* auid = TXCAP_AUID_CREATE(__txcap_auids[i].type,
__txcap_auids[i].id,
__txcap_auids[i].mime_type,
__txcap_auids[i].ns,
__txcap_auids[i].document_name,
__txcap_auids[i].global);
tsk_list_push_back_data(*auids, (void**)&auid);
}
return 0;
}
/**
* Registers a new AUID. If the AUID already exist (case-insensitive comparison on the id),
* then it will be updated with the new supplied values.
* @param auids The destination list.
* @param id The id of the new AUID to add (e.g. xcap-caps).
* @param mime_type The MIME-Type of the new AUID to add (e.g. application/xcap-caps+xml).
* @param ns The Namespace of the new AUID to add (e.g. urn:ietf:params:xml:ns:xcap-caps).
* @param document_name The name of the new AUID to add (e.g. index).
* @param is_global Indicates whether the AUID scope is global or not (user).
* @retval Zero if succeed and non-zero error code otherwise.
*/
int txcap_auid_register(txcap_auids_L_t* auids, const char* id, const char* mime_type, const char* ns, const char* document_name, tsk_bool_t is_global)
{
const tsk_list_item_t* item;
int ret = -1;
if(!auids || !id){
return -1;
}
if((item = tsk_list_find_item_by_pred(auids, pred_find_auid_by_id, id))){
tsk_strupdate(&((txcap_auid_t*)item->data)->mime_type, mime_type);
tsk_strupdate(&((txcap_auid_t*)item->data)->ns, ns);
tsk_strupdate(&((txcap_auid_t*)item->data)->document_name, document_name);
((txcap_auid_t*)item->data)->global = is_global;
ret = 0;
}
else{
txcap_auid_t* auid;
if((auid = TXCAP_AUID_CREATE(tauid_dummy, id, mime_type, ns, document_name, is_global))){
tsk_list_push_back_data(auids, (void**)&auid);
ret = 0;
}else{
ret = -2;
}
}
return ret;
}
/**
* Finds an AUID by id (case-insensitive).
* @param auids List of AUIDs from which to find the AUID.
* @param id The @a id of the AUID to find.
* @retval An AUID with the matching id or null if does not exist.
* It's up to you to free the returned object.
*/
txcap_auid_t* txcap_auid_get_by_id(txcap_auids_L_t* auids, const char* id)
{
const txcap_auid_t* ret = tsk_null;
const tsk_list_item_t* item;
if(!auids){
return tsk_null;
}
if((item = tsk_list_find_item_by_pred(auids, pred_find_auid_by_id, id))){
return tsk_object_ref((void*)item->data);
}
else{
return tsk_null;
}
}
//=================================================================================================
// AUID object definition
@ -44,31 +265,40 @@ static tsk_object_t* txcap_auid_create(tsk_object_t * self, va_list * app)
{
txcap_auid_t *auid = self;
if(auid){
string->value = tsk_strdup(value);
auid->type = va_arg(*app, txcap_auid_type_t);
auid->id = tsk_strdup( va_arg(*app, const char*) );
auid->mime_type = tsk_strdup( va_arg(*app, const char*) );
auid->ns = tsk_strdup( va_arg(*app, const char*) );
auid->document_name = tsk_strdup( va_arg(*app, const char*) );
auid->global = va_arg(*app, tsk_bool_t);
}
return self;
}
static tsk_object_t* txcap_auid_destroy(tsk_object_t * self)
{
txcap_auid_t *string = self;
if(string){
TSK_FREE(string->value);
txcap_auid_t *auid = self;
if(auid){
TSK_FREE(auid->id);
TSK_FREE(auid->mime_type);
TSK_FREE(auid->ns);
TSK_FREE(auid->document_name);
}
return self;
}
static int txcap_auid_cmp(const tsk_object_t *_s1, const tsk_object_t *_s2)
static int txcap_auid_cmp(const tsk_object_t *_a1, const tsk_object_t *_a2)
{
const txcap_auid_t *s1 = _s1;
const txcap_auid_t *s2 = _s2;
const txcap_auid_t *a1 = _a1;
const txcap_auid_t *a2 = _a2;
if(s1 && s2){
return tsk_stricmp(s1->value, s2->value);
if(a1 && a2){
return tsk_stricmp(a1->id, a2->id);
}
else{
return -1;
}
else if(!s1 && !s2) return 0;
else return -1;
}
static const tsk_object_def_t txcap_auid_def_s =

View File

@ -0,0 +1,137 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
/**@file txcap_document.c
* @brief XCAP documents.
*
* @author Mamadou Diop <diopmamadou(at)doubango.org>
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#include "tinyXCAP/txcap_document.h"
#include "tinyXCAP/txcap_auid.h"
/**@ingroup txcap_selector_group
* Create a custom XCAP document selector URI as per <a href="http://tools.ietf.org/html/rfc4825#section-6.2">RFC 4825 subclause 6.2</a>.
* @param stack The XCAP stack from which to load the user's preference (xcap-root, AUIDs, XUI, name of the document, ...).
* Should be created using @ref txcap_stack_create().
* @param auid_id The Application Unique ID. Unique identifier within the namespace of application unique IDs created by this specification (RFC 4825)
* that differentiates XCAP resources accessed by one application from XCAP resources accessed by another.
* For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* @retval The HTTP/HTTPS URI containing the XCAP root and document selector, resulting in the selection of a specific document. As a
* result, performing a GET against the document URI would retrieve the document.
* If supplied parameters are not valid this method will return NULL.
* You must free the returned string.
*
* @code
* // resource-lists document
* char* urlstring;
* if((urlstring = txcap_selector_get_document(stack, "resource-lists"))){
* TSK_FREE(urlstring);
* }
* @endcode
*
* @code
* // xcap-caps document
* char* urlstring;
* if((urlstring = txcap_selector_get_document(stack, "xcap-caps"))){
* TSK_FREE(urlstring);
* }
* @endcode
*
* @sa @ref txcap_selector_get_document_2<br>@ref txcap_selector_get_full<br>@ref txcap_selector_get_full_2
*/
char* txcap_selector_get_document(const txcap_stack_handle_t* stack, const char* auid_id)
{
char* ret = tsk_null;
txcap_auid_t* auid;
const txcap_stack_t* xcap_stack = stack;
if(xcap_stack && xcap_stack->auids && auid_id){
if((auid = txcap_auid_get_by_id(xcap_stack->auids, auid_id))){
ret = txcap_selector_get_document_2(xcap_stack->xcap_root, auid->id, auid->global? tsk_null: xcap_stack->xui, auid->document_name);
TSK_OBJECT_SAFE_FREE(auid);
}
else{
TSK_DEBUG_ERROR("Fail to find AUID with id %s.", auid_id);
}
}
else{
TSK_DEBUG_ERROR("Invalid parameter.");
}
return ret;
}
/**@ingroup txcap_selector_group
* Create a custom XCAP document selector URI as per <a href="http://tools.ietf.org/html/rfc4825#section-6.2">RFC 4825 subclause 6.2</a>.
* @param xcap_root The XCAP Root URI (valid HTTP/HTTPS URL). A context that contains all the documents across all
* application usages and users that are managed by the server. For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* @param auid_id The Application Unique ID. Unique identifier within the namespace of application unique IDs created by this specification (RFC 4825)
* that differentiates XCAP resources accessed by one application from XCAP resources accessed by another.
* For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* @param xui The XCAP User Identifier. The XUI is a string, valid as a path element in an HTTP URI, that is associated with each user served
* by the XCAP server. For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* For global document, this parameter should be NULL or equal to "global".
* @param doc_name The name of the document (e.g. index).
* @retval The HTTP/HTTPS URI containing the XCAP root and document selector, resulting in the selection of a specific document. As a
result, performing a GET against the document URI would retrieve the document.
* If supplied parameters are not valid this method will return NULL.
* You must free the returned string.
*
* @code
* // resource-lists document
* char* urlstring;
* if((urlstring = txcap_selector_get_document("http://doubango.org:8080/services", "resource-lists", "sip:mamadou@doubango.org", "index"))){
* TSK_FREE(urlstring);
* }
* @endcode
*
* @code
* // xcap-caps document
* char* urlstring;
* if((urlstring = txcap_selector_get_document("http://doubango.org:8080/services", "xcap-caps", "global", "index"))){
* TSK_FREE(urlstring);
* }
* @endcode
*
* @sa @ref txcap_selector_get_document<br>@ref txcap_selector_get_full<br>@ref txcap_selector_get_full_2
*/
char* txcap_selector_get_document_2(const char* xcap_root, const char* auid_id, const char* xui, const char* doc_name)
{
char* ret = tsk_null;
if(!xcap_root || !auid_id || !doc_name){
TSK_DEBUG_ERROR("Invalid parameter");
return tsk_null;
}
if(!xui || tsk_striequals("global", xui)){
/* xdm-root/auid-name/global/doc-name */
tsk_sprintf(&ret, "%s/%s/global/%s", xcap_root, auid_id, doc_name);
}
else{
/* xdm-root/auid-name/users/xui/doc-name */
tsk_sprintf(&ret, "%s/%s/users/%s/%s", xcap_root, auid_id, xui, doc_name);
}
return ret;
}

View File

@ -0,0 +1,149 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
/**@file txcap_node.c
* @brief XCAP nodes.
*
* @author Mamadou Diop <diopmamadou(at)doubango.org>
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#include "tinyXCAP/txcap_node.h"
#include "tsk_string.h"
#include "tsk_buffer.h"
#include "tsk_memory.h"
#include "tsk_debug.h"
#include <string.h> /* strlen() */
/**@ingroup txcap_selector_group
* Gets the Node Url.
* @param The id of the AUID (e.g 'resource-lists').
* @param ... Node selection steps. You must use @a TXCAP_SELECTOR_NODE_SET*() macros to set these steps.
* The list of parameters must end with @ref TXCAP_SELECTOR_NODE_SET_NULL() even if there is no step.<br>
* @retval The Url of the node (e.g. 'resource-lists/list[2]').
*
* @code
* @endcode
*
* @sa @ref txcap_selector_get_node_2<br>@ref txcap_selector_get_document<br> @ref txcap_selector_get_document_2<br>@ref txcap_selector_get_full<br>@ref txcap_selector_get_full_2
*/
char* txcap_selector_get_node(const char* auid_id, ...)
{
char* ret = tsk_null;
va_list ap;
va_start(ap, auid_id);
ret = txcap_selector_get_node_2(auid_id, &ap);
va_end(ap);
return ret;
}
/**@ingroup txcap_selector_group
* Gets the Node Url.
* @param The id of the AUID (e.g 'resource-lists').
* @param app Node selection steps. You must use @a TXCAP_SELECTOR_NODE_SET*() macros to set these steps.
* The list of parameters must end with @ref TXCAP_SELECTOR_NODE_SET_NULL() even if there is no step.<br>
* @retval The Url of the node (e.g. 'resource-lists/list[2]').
*
* @code
* @endcode
*
* @sa @ref txcap_selector_get_node<br>@ref txcap_selector_get_document<br> @ref txcap_selector_get_document_2<br>@ref txcap_selector_get_full<br>@ref txcap_selector_get_full_2
*/
char* txcap_selector_get_node_2(const char* auid_id, va_list* app)
{
char* ret = tsk_null;
char* namespace = tsk_null;
tsk_buffer_t* buffer = TSK_BUFFER_CREATE_NULL();
txcap_selector_param_type_t step;
while((step = va_arg(*app, txcap_selector_param_type_t)) != xcapp_node_null){
switch(step){
case xcapp_node_name:
{ /* (const char*)QNAME_STR */
const char* QNAME_STR = va_arg(*app, const char*);
if(tsk_buffer_appendEx(buffer, "/%s", QNAME_STR)){
goto bail;
}
break;
}
case xcapp_node_pos:
{ /* (const char*)QNAME_STR, (unsigned int)POS_INT */
const char* QNAME_STR = va_arg(*app, const char*);
unsigned int POS_INT = va_arg(*app, unsigned int);
tsk_buffer_appendEx(buffer, "/%s%%5B%u%%5D",
QNAME_STR, POS_INT);
break;
}
case xcapp_node_attribute:
{ /* (const char*)QNAME_STR, (const char*)ATT_QNAME_STR, (const char*)ATT_VALUE_STR */
const char* QNAME_STR = va_arg(*app, const char*);
const char* ATT_QNAME_STR = va_arg(*app, const char*);
const char* ATT_VALUE_STR = va_arg(*app, const char*);
tsk_buffer_appendEx(buffer, "/%s%%5B@%s=%%22%s%%22%%5D",
QNAME_STR, ATT_QNAME_STR, ATT_VALUE_STR);
break;
}
case xcapp_node_pos_n_attribute:
{ /* (const char*)QNAME_STR, (unsigned int)POS_UINT, (const char*)ATT_QNAME_STR, (const char*)ATT_VALUE_STR */
const char* QNAME_STR = va_arg(*app, const char*);
unsigned int POS_UINT = va_arg(*app, unsigned int);
const char* ATT_QNAME_STR = va_arg(*app, const char*);
const char* ATT_VALUE_STR = va_arg(*app, const char*);
tsk_buffer_appendEx(buffer, "/%s%%5B%u%%5D%%5B@%s=%%22%s%%22%%5D",
QNAME_STR, POS_UINT, ATT_QNAME_STR, ATT_VALUE_STR);
break;
}
case xcapp_node_namespace:
{ /* (const char*)PREFIX_STR, (const char*)VALUE_STR */
const char* PREFIX_STR = va_arg(*app, const char*);
const char* VALUE_STR = va_arg(*app, const char*);
char* temp = tsk_null;
tsk_sprintf(&temp, "%sxmlns(%s=%%22%s%%22)",
namespace?"":"%3F",PREFIX_STR, VALUE_STR);
tsk_strcat(&namespace, temp);
TSK_FREE(temp);
break;
}
default:
{
TSK_DEBUG_ERROR("NOT SUPPORTED.");
goto bail;
}
} /* switch */
} /* while */
/* append the namespace */
if(namespace){
tsk_buffer_append(buffer, namespace, strlen(namespace));
TSK_FREE(namespace);
}
bail:
if(TSK_BUFFER_DATA(buffer) && TSK_BUFFER_SIZE(buffer)){
ret = tsk_strndup(TSK_BUFFER_DATA(buffer), TSK_BUFFER_SIZE(buffer));
}
TSK_OBJECT_SAFE_FREE(buffer);
return ret;
}

View File

@ -0,0 +1,77 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
/**@file txcap_selector.c
* @brief XCAP selector.
*
* @author Mamadou Diop <diopmamadou(at)doubango.org>
*
* @date Created: Sat Nov 8 16:54:58 2009 mdiop
*/
#include "tinyXCAP/txcap_selector.h"
/**@defgroup txcap_selector_group XCAP URL selector
*/
/**@ingroup txcap_selector_group
* Gets the full XCAP URL with both the document and node selector parts.
* @param stack The XCAP stack from which to load the user's preference (xcap-root, AUIDs, XUI, name of the document, ...).
* Should be created using @ref txcap_stack_create().
* @param auid_id The Application Unique ID. Unique identifier within the namespace of application unique IDs created by this specification (RFC 4825)
* that differentiates XCAP resources accessed by one application from XCAP resources accessed by another.
* For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* @retval A well-formed HTTP/HTTPS URL which can be used as Request-Uri (e.g. GET, PUT or DELETE). As a
* result, performing a GET against the return URL would retrieve a document, element or attribute.
*
* @code
* @endcode
*
* @sa @ref txcap_selector_get_full_2<br>@ref txcap_selector_get_node<br>@ref txcap_selector_get_document<br> @ref txcap_selector_get_document_2
*/
char* txcap_selector_get_full(const txcap_stack_handle_t* stack, const char* auid_id, ...)
{
}
/**@ingroup txcap_selector_group
* Gets the full XCAP URL with both the document and node selector parts.
* @param xcap_root The XCAP Root URI (valid HTTP/HTTPS URL). A context that contains all the documents across all
* application usages and users that are managed by the server. For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* @param auid_id The Application Unique ID. Unique identifier within the namespace of application unique IDs created by this specification (RFC 4825)
* that differentiates XCAP resources accessed by one application from XCAP resources accessed by another.
* For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* @param xui The XCAP User Identifier. The XUI is a string, valid as a path element in an HTTP URI, that is associated with each user served
* by the XCAP server. For more information see <a href="http://tools.ietf.org/html/rfc4825#section-4">RFC 4825 subclause 4</a>.
* For global document, this parameter should be NULL or equal to "global".
* @param doc_name The name of the document (e.g. index).
* @retval A well-formed HTTP/HTTPS URL which can be used as Request-Uri (e.g. GET, PUT or DELETE). As a
* result, performing a GET against the return URL would retrieve a document, element or attribute.
* @code
* @endcode
*
* @sa @ref txcap_selector_get_full<br>@ref txcap_selector_get_node<br>@ref txcap_selector_get_document<br> @ref txcap_selector_get_document_2
*/
*/
char* txcap_selector_get_full_2(const char* xcap_root, const char* auid_id, const char* xui, const char* doc_name, ...)
{
}

View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View File

@ -0,0 +1,37 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
#ifndef TEST_TINYXCAP_STDAFX_H
#define TEST_TINYXCAP_STDAFX_H
#include "targetver.h"
#include <stdio.h>
//#if (defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE)) && !defined(__SYMBIAN32__)
#include <tchar.h>
//#endif
#define TINYSAK_IMPORTS
#define TINYXCAP_IMPORTS
// TODO: reference additional headers your program requires here
#endif /* TEST_TINYXCAP_STDAFX_H */

View File

@ -0,0 +1,18 @@
#ifndef _TEST_TINYXCAP_VER
#define _TEST_TINYXCAP_VER
#if (defined(_WIN32) || defined(WIN32) || defined(_WIN32_WCE)) && !defined(__SYMBIAN32__)
// The following macros define the minimum required platform. The minimum required platform
// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
// your application. The macros work by enabling all features available on platform versions up to and
// including the version specified.
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif
#endif
#endif /*_TEST_TINYXCAP_VER*/

View File

@ -0,0 +1,78 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
#include "stdafx.h"
#include "tinyxcap.h"
#define LOOP 1
#define RUN_TEST_ALL 0
#define RUN_TEST_SELECTOR 1
#define RUN_TEST_STACK 0
#define XUI "sip:mamadou@micromethod.com"
#define PASSWORD "mysecret"
#define XCAP_ROOT "http://192.168.16.104:8080/services"
#if RUN_TEST_SELECTOR || RUN_TEST_ALL
#include "test_selector.h"
#endif
#if RUN_TEST_STACK || RUN_TEST_ALL
#include "test_stack.h"
#endif
#ifdef _WIN32_WCE
int _tmain(int argc, _TCHAR* argv[])
#else
int main()
#endif
{
tnet_startup();
/* Print copyright information */
printf("Doubango Project\nCopyright (C) 2009 Mamadou Diop \n\n");
#if LOOP
while(1)
#endif
{
/* XCAP document/node selector */
#if RUN_TEST_SELECTOR || RUN_TEST_ALL
test_selector();
#endif
/* XCAP stack */
#if RUN_TEST_STACK || RUN_TEST_ALL
test_stack();
#endif
}
tnet_cleanup();
return 0;
}

View File

@ -0,0 +1,419 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="test"
ProjectGUID="{2A476CAA-BA45-4379-AFEC-088645840527}"
RootNamespace="test"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(DOUBANGO_HOME)\tinyXCAP\src&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\win32\include\smc&quot;"
PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\tinyXCAP.lib $(OutDir)\tinySAK.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\wince\include&quot;;&quot;$(DOUBANGO_HOME)\tinyXCAP\src&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\wince\include\smc&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\wince\include\wcecompat&quot;"
PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;_CONSOLE;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)"
MinimalRebuild="true"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\tinyXCAP.lib $(OutDir)\tinySAK.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="8"
EntryPointSymbol="mainWCRTStartup"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory=""
RegisterOutput="0"
AdditionalFiles=""
/>
<DebuggerTool
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="8"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory=""
RegisterOutput="0"
AdditionalFiles=""
/>
<DebuggerTool
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\stdafx.c"
>
</File>
<File
RelativePath=".\test.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\stdafx.h"
>
</File>
<File
RelativePath=".\targetver.h"
>
</File>
</Filter>
<Filter
Name="tests"
>
<File
RelativePath=".\test_async.h"
>
</File>
<File
RelativePath=".\test_gsma_rcs.h"
>
</File>
<File
RelativePath=".\test_http.h"
>
</File>
<File
RelativePath=".\test_ietf-pres-rules.h"
>
</File>
<File
RelativePath=".\test_oma-directory.h"
>
</File>
<File
RelativePath=".\test_oma-pres-cont.h"
>
</File>
<File
RelativePath=".\test_oma-pres-rules.h"
>
</File>
<File
RelativePath=".\test_rlist.h"
>
</File>
<File
RelativePath=".\test_rls.h"
>
</File>
<File
RelativePath=".\test_selector.h"
>
</File>
<File
RelativePath=".\test_xcap-caps.h"
>
</File>
<File
RelativePath=".\test_xdmc.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,69 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
#ifndef _TEST_SELECTOR_H
#define _TEST_SELECTOR_H
void test_selector()
{
txcap_stack_handle_t* stack = tsk_null;
char* urlstring;
stack = txcap_stack_create(tsk_null, XUI, PASSWORD, XCAP_ROOT,
TXCAP_STACK_SET_NULL());
/* add user auids */
txcap_stack_set(stack,
TXCAP_STACK_SET_AUID("xcap-caps2", "application/xcap-caps2+xml", "urn:ietf:params:xml:ns:xcap-caps2", "index2", tsk_true),
TXCAP_STACK_SET_AUID("resource-lists2", "application/resource-lists+xml2", "urn:ietf:params:xml:ns:resource-lists2", "index2", tsk_false),
TXCAP_STACK_SET_NULL()); /* mandatory */
/* IETF server capabilities */
urlstring = txcap_selector_get_document(stack, "xcap-caps");
TSK_DEBUG_INFO("Document('xcap-caps') = %s\n", urlstring);
TSK_FREE(urlstring);
/* My custom xcap-caps */
urlstring = txcap_selector_get_document(stack, "xcap-caps2");
TSK_DEBUG_INFO("Document('xcap-caps2') = %s\n", urlstring);
TSK_FREE(urlstring);
/* IETF resource-lists */
urlstring = txcap_selector_get_document(stack, "resource-lists");
TSK_DEBUG_INFO("Document('resource-lists') = %s\n", urlstring);
TSK_FREE(urlstring);
/* My custom resource-lists */
urlstring = txcap_selector_get_document(stack, "resource-lists2");
TSK_DEBUG_INFO("Document('resource-lists2') = %s\n", urlstring);
TSK_FREE(urlstring);
/* Full custom resource-lists */
urlstring = txcap_selector_get_document_2(XCAP_ROOT, "resource-lists3", XUI, "index3");
TSK_DEBUG_INFO("Document('resource-lists2') = %s\n", urlstring);
TSK_FREE(urlstring);
TSK_OBJECT_SAFE_FREE(stack);
}
#endif /* _TEST_SELECTOR_H */

View File

@ -0,0 +1,62 @@
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
#ifndef _TEST_STACK_H
#define _TEST_STACK_H
int test_stack_callback(const thttp_event_t *httpevent)
{
return 0;
}
void test_stack()
{
txcap_stack_handle_t* stack = tsk_null;
int ret;
stack = txcap_stack_create(test_stack_callback, "sip:mamadou@micromethod.com", "mysecret", "http://192.168.16.104:8080/services",
// options
TXCAP_STACK_SET_OPTION(TXCAP_STACK_OPTION_TIMEOUT, "6000"),
// stack-level headers
TXCAP_STACK_SET_HEADER("Pragma", "No-Cache"),
TXCAP_STACK_SET_HEADER("Connection", "Keep-Alive"),
TXCAP_STACK_SET_HEADER("User-Agent", "XDM-client/OMA1.1"),
TXCAP_STACK_SET_NULL());
if((ret = txcap_stack_start(stack))){
goto bail;
}
/* add user auids */
txcap_stack_set(stack,
TXCAP_STACK_SET_AUID("xcap-caps2", "application/xcap-caps2+xml", "urn:ietf:params:xml:ns:xcap-caps2", "index2", tsk_true),
TXCAP_STACK_SET_AUID("resource-lists2", "application/resource-lists+xml2", "urn:ietf:params:xml:ns:resource-lists2", "index2", tsk_false),
TXCAP_STACK_SET_NULL()); /* mandatory */
bail:
TSK_OBJECT_SAFE_FREE(stack);
}
#endif /* _TEST_STACK_H */

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Version="8.00"
Name="test"
ProjectGUID="{2A476CAA-BA45-4379-AFEC-088645840527}"
RootNamespace="test"

View File

@ -1,10 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyXCAP", "tinyXCAP.vcproj", "{B2EFD4EE-16A4-41DF-A25F-90DBF74D226C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "..\tinySAK\tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcproj", "{2A476CAA-BA45-4379-AFEC-088645840527}"
EndProject
Global
@ -25,16 +22,6 @@ Global
{B2EFD4EE-16A4-41DF-A25F-90DBF74D226C}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B2EFD4EE-16A4-41DF-A25F-90DBF74D226C}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B2EFD4EE-16A4-41DF-A25F-90DBF74D226C}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.ActiveCfg = Debug|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.Build.0 = Debug|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.ActiveCfg = Release|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.Build.0 = Release|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Win32.ActiveCfg = Debug|Win32
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Win32.Build.0 = Debug|Win32
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Version="8.00"
Name="tinyXCAP"
ProjectGUID="{B2EFD4EE-16A4-41DF-A25F-90DBF74D226C}"
RootNamespace="tinyXCAP"

View File

@ -0,0 +1,380 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="test"
ProjectGUID="{2A476CAA-BA45-4379-AFEC-088645840527}"
RootNamespace="test"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(DOUBANGO_HOME)\tinyXCAP\include&quot;;&quot;$(DOUBANGO_HOME)\tinyHTTP\include&quot;;&quot;$(DOUBANGO_HOME)\tinyNET\src&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\win32\include\smc&quot;"
PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\tinyXCAP.lib $(OutDir)\tinySAK.lib $(OutDir)\tinyNET.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\thirdparties\wince\include&quot;;&quot;$(DOUBANGO_HOME)\tinyXCAP\src&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\wince\include\smc&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\wince\include\wcecompat&quot;"
PreprocessorDefinitions="DEBUG_LEVEL=DEBUG_LEVEL_INFO;_CONSOLE;_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_WINDOWS;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)"
MinimalRebuild="true"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\tinyXCAP.lib $(OutDir)\tinySAK.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="8"
EntryPointSymbol="mainWCRTStartup"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory=""
RegisterOutput="0"
AdditionalFiles=""
/>
<DebuggerTool
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
OutputDirectory="&quot;$(SolutionDir)$(ConfigurationName)\wce&quot;"
IntermediateDirectory="&quot;$(SolutionDir)$(ConfigurationName)&quot;"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="1"
/>
<Tool
Name="VCCLCompilerTool"
ExecutionBucket="7"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="8"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCCodeSignTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
<DeploymentTool
ForceDirty="-1"
RemoteDirectory=""
RegisterOutput="0"
AdditionalFiles=""
/>
<DebuggerTool
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\tinyXCAP\test\stdafx.c"
>
</File>
<File
RelativePath="..\..\tinyXCAP\test\test.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\tinyXCAP\test\stdafx.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\test\targetver.h"
>
</File>
</Filter>
<Filter
Name="tests"
>
<File
RelativePath="..\..\tinyXCAP\test\test_selector.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\test\test_stack.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -0,0 +1,72 @@

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyXCAP", "tinyXCAP.vcproj", "{570CF33D-E65F-448F-8AC2-F9AE2F23152F}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{2A476CAA-BA45-4379-AFEC-088645840527}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinySAK", "..\tinySAK\tinySAK.vcproj", "{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyHTTP", "..\tinyHTTP\tinyHTTP.vcproj", "{B3E45009-C7C3-4090-837C-2D30C9058443}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tinyNET", "..\tinyNET\tinyNET.vcproj", "{7522A458-92F4-4259-B906-E84C2A65D9F1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
Release|Win32 = Release|Win32
Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{570CF33D-E65F-448F-8AC2-F9AE2F23152F}.Debug|Win32.ActiveCfg = Debug|Win32
{570CF33D-E65F-448F-8AC2-F9AE2F23152F}.Debug|Win32.Build.0 = Debug|Win32
{570CF33D-E65F-448F-8AC2-F9AE2F23152F}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Win32
{570CF33D-E65F-448F-8AC2-F9AE2F23152F}.Release|Win32.ActiveCfg = Release|Win32
{570CF33D-E65F-448F-8AC2-F9AE2F23152F}.Release|Win32.Build.0 = Release|Win32
{570CF33D-E65F-448F-8AC2-F9AE2F23152F}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Win32
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Win32.ActiveCfg = Debug|Win32
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Win32.Build.0 = Debug|Win32
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{2A476CAA-BA45-4379-AFEC-088645840527}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{2A476CAA-BA45-4379-AFEC-088645840527}.Release|Win32.ActiveCfg = Release|Win32
{2A476CAA-BA45-4379-AFEC-088645840527}.Release|Win32.Build.0 = Release|Win32
{2A476CAA-BA45-4379-AFEC-088645840527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{2A476CAA-BA45-4379-AFEC-088645840527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{2A476CAA-BA45-4379-AFEC-088645840527}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.ActiveCfg = Debug|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Win32.Build.0 = Debug|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.ActiveCfg = Release|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Win32.Build.0 = Release|Win32
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{6BC9B796-10C6-4CF7-A6E4-E2DACCDA84DA}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Win32.ActiveCfg = Debug|Win32
{B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Win32.Build.0 = Debug|Win32
{B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B3E45009-C7C3-4090-837C-2D30C9058443}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Win32.ActiveCfg = Release|Win32
{B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Win32.Build.0 = Release|Win32
{B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{B3E45009-C7C3-4090-837C-2D30C9058443}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.ActiveCfg = Debug|Win32
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Win32.Build.0 = Debug|Win32
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.ActiveCfg = Release|Win32
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Win32.Build.0 = Release|Win32
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
{7522A458-92F4-4259-B906-E84C2A65D9F1}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="tinyXCAP"
ProjectGUID="{570CF33D-E65F-448F-8AC2-F9AE2F23152F}"
RootNamespace="tinyXCAP"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;$(DOUBANGO_HOME)\tinyXCAP\include&quot;;&quot;$(DOUBANGO_HOME)\thirdparties\win32\include&quot;;&quot;$(DOUBANGO_HOME)\tinySAK\src&quot;;&quot;$(DOUBANGO_HOME)\tinyNET\src&quot;;&quot;$(DOUBANGO_HOME)\tinyHTTP\include&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;TINYXCAP_EXPORTS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="4"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(OutDir)\tinySAK.lib $(OutDir)\tinyHTTP.lib"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;TINYXCAP_EXPORTS"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
WarnAsError="true"
DebugInformationFormat="3"
CompileAs="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="include(*.h)"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\tinyXCAP\include\tinyxcap.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\include\tinyxcap_config.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\include\txcap.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\include\tinyXCAP\txcap_auid.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\include\tinyXCAP\txcap_document.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\include\tinyXCAP\txcap_node.h"
>
</File>
<File
RelativePath="..\..\tinyXCAP\include\tinyXCAP\txcap_selector.h"
>
</File>
</Filter>
<Filter
Name="source(*.c)"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath="..\..\tinyXCAP\src\txcap.c"
>
</File>
<File
RelativePath="..\..\tinyXCAP\src\txcap_auid.c"
>
</File>
<File
RelativePath="..\..\tinyXCAP\src\txcap_document.c"
>
</File>
<File
RelativePath="..\..\tinyXCAP\src\txcap_node.c"
>
</File>
<File
RelativePath="..\..\tinyXCAP\src\txcap_selector.c"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>