Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

exgmgr.c File Reference


Detailed Description

Exchange Manager Library.

#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>
#include <sys/un.h>
#include <sys/socket.h>
#include <errno.h>
#include <fcntl.h>
#include <glib/gmain.h>
#include <hiker/sysclass.h>
#include <hiker/traces.h>
#include <hiker/exgmgr.h>
#include <exgtransport.h>
#include "prvexgmgr.h"
#include <hiker/prv/exgmgr_prv.h>
#include <hiker/bundlemgr.h>

Data Structures

union  CMsgHdrUnion

Defines

#define TRANSPORTPARAMSMAXLEN   200

Typedefs

typedef msghdr MsgHdr
typedef cmsghdr CMsgHdr
typedef iovec IOVec

Functions

void alp_exg_request_prv_get_version (AlpExgRequest iRequest, int *oVersion)
void alp_ext_request_prv_get_info (AlpExgRequest iRequest, char **oInfo, size_t *oInfoLen)
void alp_exg_request_prv_set_info (AlpExgRequest iRequest, char *iInfo, size_t iInfoLen)
alp_status_t alp_exg_request_prv_alloc_init_info (AlpExgRequest iRequest, size_t iInfoLen)
alp_status_t alp_exg_prv_sync_full_write (int iSocket, void *iBuf, size_t iBufLen)
alp_status_t alp_exg_prv_sync_full_read (int iSocket, void *iBuf, size_t iBufLen)
ssize_t alp_exg_prv_read_fd (int sockFD, void *payload, size_t maxPL, int *recvFD)
ssize_t alp_exg_prv_write_fd (int sockFD, void *payload, size_t nPL, int sendFD)
char * alp_exg_make_tmpfile (char *iPrefix, int *oFd)
alp_status_t alp_exg_prv_fd_to_file (int iDataFd, char *iPrefix, char **oFilename)
int alp_exg_prv_daemon_is_alive ()
alp_status_t alp_exg_prv_extract_transport_params_item_value (char *iTransportParams, char *iItemName, char *oValue, size_t iValueLen)
alp_status_t alp_exg_handler_register (char *iVerb, char *iLocalizedVerb, char *iMIMEType, char *iHandlerBundleName, int iLocalOnly, int iSerializeMe, int iMustBeUnique, int iAcceptGenericInvocation)
 Declare an action handler for a specific verb/type of data combination.
alp_status_t alp_exg_handler_register_notification (char *iVerb, char *iLocalizedVerb, char *iMIMEType, char *iNotificationType, int iLocalOnly, int iSerializeMe, int iMustBeUnique, int iAcceptGenericInvocation)
 Declare an action handler for a specific verb/type of data combination.
alp_status_t alp_exg_handler_unregister (char *iVerb, char *iMIMEType, char *iHandlerBundleName)
 Undeclare a previously registered action handler.
alp_status_t alp_exg_handler_unregister_notification (char *iVerb, char *iMIMEType, char *iNotificationType)
 Undeclare a previously registered action handler by notification.
alp_status_t alp_exg_handler_check_registration (char *iVerb, char *iMIMEType)
 Determine if a handler exist for a verb/data type pair.
alp_status_t alp_exg_handler_query_verbs (char *iMIMEType, int *oEntryCount, char **oDataP)
 Query a list of verbs that can handle a given data type in a generic mode.
alp_status_t alp_exg_request_create (AlpExgRequest *oRequest)
 Create an empty request object.
alp_status_t alp_exg_request_delete (AlpExgRequest iRequest)
 Delete a request object.
alp_status_t alp_exg_request_set_verb (AlpExgRequest iRequest, char *iVerb)
 Set the request verb.
alp_status_t alp_exg_request_set_data_fd (AlpExgRequest iRequest, int iFd)
 Set the request data source using a file descriptor.
alp_status_t alp_exg_request_set_data_url (AlpExgRequest iRequest, char *iURL)
 Description Set the request data source using an url.
alp_status_t alp_exg_request_set_data_type (AlpExgRequest iRequest, char *iMIMEType)
 Set the request data type.
alp_status_t alp_exg_request_set_int_parameter (AlpExgRequest iRequest, char *iParamTag, int iParamValue)
 Create/Set a request integer parameter.
alp_status_t alp_exg_request_set_string_parameter (AlpExgRequest iRequest, char *iParamTag, char *iParamValue)
 Create/Set a request string parameter.
alp_status_t alp_exg_request_set_blob_parameter (AlpExgRequest iRequest, char *iParamTag, uint8_t *iBlob, size_t iBlobSize)
 Create/Set a request blob parameter.
alp_status_t alp_exg_transport_get_params (AlpExgRequest iRequest, char *oParamsValue, size_t iParamsValueBufLen)
 Retrieve all the transport parameters at once.
alp_status_t alp_exg_transport_set_params (AlpExgRequest iRequest, char *iParamsValue)
 Set all the transport parameters at once.
alp_status_t alp_exg_request_set_generic_mode (AlpExgRequest iRequest)
 Indicate this request is to be executed in generic mode.
alp_status_t alp_exg_request_get_generic_mode (AlpExgRequest iRequest, int *oGenericMode)
 ask whether the request is in generic mode or not.
alp_status_t alp_exg_request_execute (AlpExgRequest iRequest)
 Hand the request to the system and execute it.
alp_status_t alp_exg_request_execute_async (AlpExgRequest iRequest, alp_exg_execute_complete_func iExecuteCompleteFunc)
 Hand the request to the system and execute it asynchronously.
alp_status_t alp_exg_request_activate_progress (AlpExgRequest iRequest)
 Activate Progress Dialog.
alp_status_t alp_exg_request_get_verb (AlpExgRequest iRequest, char *oVerb, size_t iVerbBufLen)
 Get the verb associated to the request.
alp_status_t alp_exg_request_get_data_type (AlpExgRequest iRequest, char *oMIMEType, size_t iMIMETypeBufLen)
 Get the data type of the data.
alp_status_t alp_exg_request_get_int_parameter (AlpExgRequest iRequest, char *iParamTag, int *oParamValue)
 Get an integer parameter from the request.
alp_status_t alp_exg_request_get_string_parameter (AlpExgRequest iRequest, char *iParamTag, char *oParamValue, size_t iParamValueBufLen)
 Get a string parameter from the request.
alp_status_t alp_exg_request_get_string_parameter_const (AlpExgRequest iRequest, char *iParamTag, const char **oParamValue)
 Get a string parameter from the request.
alp_status_t alp_exg_request_get_blob_parameter (AlpExgRequest iRequest, char *iParamTag, uint8_t **oBlob, size_t *oBlobSize)
 Get a binary blob parameter from the request.
alp_status_t alp_exg_request_get_data_fd (AlpExgRequest iRequest, int *oFd)
 Get the data source file descriptor.
alp_status_t alp_exg_request_get_data_url (AlpExgRequest iRequest, char *oUrl, size_t iUrlBufLen)
 Get the data source url.
alp_status_t alp_exg_request_receive (AlpExgRequest *oRequest, AlpExgRequestId iRequestId)
 Receive the request for which we have declared to be the handler.
alp_status_t alp_exg_request_complete (AlpExgRequest iRequest, alp_status_t iResult)
 Tell the exchange manager the handler has completed execution.
alp_status_t alp_exg_request_cancel (AlpExgRequest iRequest)
 Cancel request while execution in progress.
alp_status_t alp_exg_prv_cancel_incoming (int iGuid)
void __attribute__ ((constructor))
void __attribute__ ((destructor))

Variables

alp_status_t g_synchronous_call_result


Define Documentation

#define TRANSPORTPARAMSMAXLEN   200
 


Typedef Documentation

typedef struct cmsghdr CMsgHdr
 

typedef struct iovec IOVec
 

typedef struct msghdr MsgHdr
 


Function Documentation

void __attribute__ (destructor)   ) 
 

void __attribute__ (constructor)   ) 
 

alp_status_t alp_exg_handler_check_registration char *  iVerb,
char *  iMIMEType
 

Determine if a handler exist for a verb/data type pair.

An application can use this function to determine if the specified handler is registered on the local device.

Parameters:
[in] iVerb the verb this handler implements
[in] iMIMEType the type of the data associated to the verb
Returns:
ALP_EXGMGR_ERR_NO_ERROR - there is at least one handler registered for this verb/data type
ALP_EXG_MGR_ERR_HANDLER_NOT_FOUND_ERROR - there is no handler registered for this verb/data type

alp_status_t alp_exg_handler_query_verbs char *  iMIMEType,
int *  oEntryCount,
char **  oDataP
 

Query a list of verbs that can handle a given data type in a generic mode.

An application can use this function to build a dynamic menu of actions that can be performed on some data that it knows the type. Only the verbs that can handle generic requests will be returned.

Parameters:
[in] iMIMEType the data type for which you want the registered verbs
[out] oEntryCount the number of verbs in the returned buffer
[out] oDataP a malloc-ed buffer containing a pair of null terminated strings for each entry. The first string is the verb to use in the request, the second string is the localized verb to display to the user. This buffer must be freeed by caller.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_handler_register char *  iVerb,
char *  iLocalizedVerb,
char *  iMIMEType,
char *  iHandlerPackageName,
int  iLocalOnly,
int  iSerializeMe,
int  iMustBeUnique,
int  iAcceptGenericInvocation
 

Declare an action handler for a specific verb/type of data combination.

An application must register with the exchange manager for all the verb/MIMEtype combinations it knows how to handle. The package specified will be launched (or relauched) when there is an incoming request ready to be handled. Only ALP Packages can be launched this way.

Parameters:
[in] iVerb the verb this handler implements
[in] iLocalizedVerb the localized verb to be displayed to the user when a list of generic verbs is built. If NULL, iVerb will be returned.
[in] iMIMEType the type of the data associated to the verb
[in] iHandlerPackageName the package name of the application that will be launched to execute a request. The name must include the bundle type (e.g. "bar:com.appname")
[in] iLocalOnly specifies that this handler will execute requests originating from the local device only
[in] iSerializeMe specifies that this handler may or may not be executed simultaneously to other handlers
[in] iMustBeUnique specifies that this handler does not accept other apps to register for the same verb/data. if the handler passes zero to allow other to register, then it must not return data or parameters as these would not be sent back to the request client.
[in] iAcceptGenericInvocation specifies that the handler understands the generic data passing convention
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_handler_register_notification char *  iVerb,
char *  iLocalizedVerb,
char *  iMIMEType,
char *  iNotificationType,
int  iLocalOnly,
int  iSerializeMe,
int  iMustBeUnique,
int  iAcceptGenericInvocation
 

Declare an action handler for a specific verb/type of data combination.

An application must register with the exchange manager for all the verb/MIMEtype combinations it knows how to handle. The notification type specified will be broadcasted when there is an incoming request ready to be handled. The notification type must have been previsouly registered with the notification manager. Using this handler registration mechanism allows daemons or other non ALP Packages to be called to process incoming exchange requests.

Parameters:
[in] iVerb the verb this handler implements
[in] iLocalizedVerb the localized verb to be displayed to the user when a list of generic verbs is built. If NULL, iVerb will be returned.
[in] iMIMEType the type of the data associated to the verb
[in] iNotificationType the notification type that will be broadcast when there is a request for this verb/data type
[in] iLocalOnly specifies that this handler will execute requests originating from the local device only
[in] iSerializeMe specifies that this handler may or may not be executed simultaneously to other handlers
[in] iMustBeUnique specifies that this handler does not accept other apps to register for the same verb/data. if the handler passes zero to allow other to register, then it must not return data or parameters as these would not be sent back to the request client.
[in] iAcceptGenericInvocation specifies that the handler understands the generic data passing convention
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_handler_unregister char *  iVerb,
char *  iMIMEType,
char *  iHandlerPackageName
 

Undeclare a previously registered action handler.

If an application registers a handler for its own usage, it will need to unregister it when it quits.

Parameters:
[in] iVerb the verb this handler implements
[in] iMIMEType the type of the data associated to the verb
[in] iHandlerPackageName is the same package name which was used for registering
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_handler_unregister_notification char *  iVerb,
char *  iMIMEType,
char *  iNotificationType
 

Undeclare a previously registered action handler by notification.

If an application or daemon registers a handler by notification, it will need to unregister it when it quits.

Parameters:
[in] iVerb the verb this handler implements
[in] iMIMEType the type of the data associated to the verb
[in] iNotificationType is the same package name which was used for registering
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

char* alp_exg_make_tmpfile char *  iPrefix,
int *  oFd
 

alp_status_t alp_exg_prv_cancel_incoming int  iGuid  ) 
 

int alp_exg_prv_daemon_is_alive  ) 
 

alp_status_t alp_exg_prv_extract_transport_params_item_value char *  iTransportParams,
char *  iItemName,
char *  oValue,
size_t  iValueLen
 

alp_status_t alp_exg_prv_fd_to_file int  iDataFd,
char *  iPrefix,
char **  oFilename
 

ssize_t alp_exg_prv_read_fd int  sockFD,
void *  payload,
size_t  maxPL,
int *  recvFD
 

alp_status_t alp_exg_prv_sync_full_read int  iSocket,
void *  iBuf,
size_t  iBufLen
 

alp_status_t alp_exg_prv_sync_full_write int  iSocket,
void *  iBuf,
size_t  iBufLen
 

ssize_t alp_exg_prv_write_fd int  sockFD,
void *  payload,
size_t  nPL,
int  sendFD
 

alp_status_t alp_exg_request_activate_progress AlpExgRequest  iRequest  ) 
 

Activate Progress Dialog.

Call this function to activate a modal progress dialog that will appear when applicable. Currently, this is only for sending over OBEX using Bluetooth or Irda.

Parameters:
[in] iRequest the request you are working on
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_cancel AlpExgRequest  iRequest  ) 
 

Cancel request while execution in progress.

This function lets you cancel a request while it is executing. When cancel completes, the matching alp_exg_request_execute or execute completion function will return ALP_EXGMGR_ERR_USER_CANCEL_ERROR.

Parameters:
[in] iRequest a request you have created or acquired in the process where you call this function
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_complete AlpExgRequest  iRequest,
alp_status_t  iResult
 

Tell the exchange manager the handler has completed execution.

This function must be called by the handler application when it is finished with execution of the requested operation.

Parameters:
[in] iRequest the request you are working on
[in] iResult the result of the handler execution. This will be passed back to the request initiator
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_create AlpExgRequest oRequest  ) 
 

Create an empty request object.

Everything works around the request. You must always create a request before you can do anything useful.

Parameters:
[out] oRequest pointer to an AlpExgRequest variable that will receive the created request reference.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_delete AlpExgRequest  iRequest  ) 
 

Delete a request object.

Parameters:
[in] iRequest the request to destroy
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_execute AlpExgRequest  iRequest  ) 
 

Hand the request to the system and execute it.

When the request if formed, go execute it. This is a synchronous function. No UI is displayed. If the client wants to execute this function asynchronously (e.g. phone app first displays incoming phone number, and then handle the phone call while the request is being executed), it must call it from another thread Upon return of this function, you can get returned parameters from the request, and also retrieve a file descriptor to returned data if any.

Parameters:
[in] iRequest the request you are working on
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success
ALP_EXGMGR_ERR_USER_CANCEL_ERROR - Execution was canceled by user

alp_status_t alp_exg_request_execute_async AlpExgRequest  iRequest,
alp_exg_execute_complete_func  iExecuteCompleteFunc
 

Hand the request to the system and execute it asynchronously.

This is the asynchronous request execution function. See alp_exg_request_execute for general information. To use this function, you need to provide a main GMainLoop running in the current context. The exchange mgr will use it to handle its own events and callback your completion routine when execution has finished.

Parameters:
[in] iRequest the request you are working on
[in] iExecuteCompletion this function is called when the request is complete.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_blob_parameter AlpExgRequest  iRequest,
char *  iParamTag,
uint8_t **  oBlob,
size_t *  oBlobSize
 

Get a binary blob parameter from the request.

This function will allocate (malloc) a chunk of memory and fill it with the binary data that was passed in this parameter. The caller is responsible to free the chunk.

Parameters:
[in] iRequest the request you are working on
[in] iParamTag the name of the parameter you are looking for
[out] oBlob a pointer to an uint8_t* that will be allocated by this function
[out] oBlobSize a pointer to a size_t that will contain the allocated size.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_data_fd AlpExgRequest  iRequest,
int *  oFd
 

Get the data source file descriptor.

This function should be called from the action handler or from the request initiator after it has been executed.

Parameters:
[in] iRequest the request you are working on
[out] oFd a pointer to a variable that will receive the file descriptor to read the data from. Note that the caller takes ownership of the file descriptor and he must therefore close it when done with it.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_data_type AlpExgRequest  iRequest,
char *  oMIMEType,
size_t  iMIMETypeBufLen
 

Get the data type of the data.

This function will mostly be used from the handler to dispatch execution to the right event handler.

Parameters:
[in] iRequest the request you are working on
[out] oMIMEType pointer to a buffer that will receive the MIME Type
[in] iMIMETypeBufLen the size of the buffer
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_data_url AlpExgRequest  iRequest,
char *  oUrl,
size_t  iUrlBufLen
 

Get the data source url.

Parameters:
[in] iRequest the request you are working on
[out] oUrl a pointer to the buffer that will receive the url
[in] iUrlBufLen the size of the buffer
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_generic_mode AlpExgRequest  iRequest,
int *  oGenericMode
 

ask whether the request is in generic mode or not.

This function is used by the handler. When a handler has registered itself by indicating it supports generic mode, it must check each request it receives to determine if it must perform a full treatment or just the generic action.

Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_int_parameter AlpExgRequest  iRequest,
char *  iParamTag,
int *  oParamValue
 

Get an integer parameter from the request.

Parameters:
[in] iRequest the request you are working on
[in] iParamTag the name of the parameter you are looking for
[out] oParamValue a pointer to an integer variable that will hold the value
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_string_parameter AlpExgRequest  iRequest,
char *  iParamTag,
char *  oParamValue,
size_t  iParamValueBufLen
 

Get a string parameter from the request.

Parameters:
[in] iRequest the request you are working on
[in] iParamTag the name of the parameter you are looking for
[out] oParamValue a pointer to a buffer that will hold the value text
[in] iParamValueBufLen the size of the buffer
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_string_parameter_const AlpExgRequest  iRequest,
char *  iParamTag,
const char **  oParamValue
 

Get a string parameter from the request.

Lets you get a pointer to the string value directly in the request storage. It is much easier and cheaper to use this function than to use alp_exg_request_get_string_parameter. The retrieved pointer will be valid until you use one of the "set" function on the same request, or you delete the request.

Parameters:
[in] iRequest the request you are working on
[in] iParamTag the name of the parameter you are looking for
[out] oParamValue a pointer to a string pointer that will hold the parameter value in the request buffer
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_get_verb AlpExgRequest  iRequest,
char *  oVerb,
size_t  iVerbBufLen
 

Get the verb associated to the request.

This function will mostly be used from the application main loop to dispatch execution to the right event handler.

Parameters:
[in] iRequest the request you are working on
[out] oVerb pointer to a buffer that will receive the verb
[in] iVerbBufLen the size of the buffer
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_prv_alloc_init_info AlpExgRequest  iRequest,
size_t  iInfoLen
 

void alp_exg_request_prv_get_version AlpExgRequest  iRequest,
int *  oVersion
 

void alp_exg_request_prv_set_info AlpExgRequest  iRequest,
char *  iInfo,
size_t  iInfoLen
 

alp_status_t alp_exg_request_receive AlpExgRequest oRequest,
AlpExgRequestId  iRequestId
 

Receive the request for which we have declared to be the handler.

This function must be called by the handler application in response to the invocation of its ExchangeHandler() function.

Parameters:
[out] oRequest pointer to a variable that will hold the request you have received
[in] iRequestId a unique id passed from the exchange daemon to the application handler
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_set_blob_parameter AlpExgRequest  iRequest,
char *  iParamTag,
uint8_t *  iBlob,
size_t  iBlobSize
 

Create/Set a request blob parameter.

The parameter is replaced if it was already existing

Parameters:
[in] iRequest the request you are working on
[in] iParamTag the parameter name
[in] iBlob a pointer to the binary blob
[in] iBlobSize size of the binary blob buffer
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_set_data_fd AlpExgRequest  iRequest,
int  iFd
 

Set the request data source using a file descriptor.

This function can be used by the request initiator as well as by the action handler to return data.

Parameters:
[in] iRequest the request you are working on
[in] iFd the file descriptor from which the data is readable. Note that once this function returns no error, the file descriptor belongs to the request and will be closed when the request is deleted.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_set_data_type AlpExgRequest  iRequest,
char *  iMIMEType
 

Set the request data type.

Parameters:
[in] iRequest the request you are working on
[in] iMIMEType the MIME type of the data
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_set_data_url AlpExgRequest  iRequest,
char *  iURL
 

Description Set the request data source using an url.

Parameters:
[in] iRequest the request you are working on
[in] iURL the url where the handler will find the data
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_set_generic_mode AlpExgRequest  iRequest  ) 
 

Indicate this request is to be executed in generic mode.

The generic mode is a very simplified mode. When using this mode, the client can only specify a data file descriptor and nothing else. The handler must also have specified that it accepts generic requests. When presented such a request, the handler will perform a default action.

Returns:
ALP_EXGMGR_ERR_NO_ERROR - success
ALP_EXG_MGR_ERR_HANDLER_NOT_FOUND_ERROR - there is no handler registered for this verb/data type
ALP_EXG_MGR_ERR_HANDLER_DID_NOT_CONSUME_ERROR - None of the registered handlers consumed the request

alp_status_t alp_exg_request_set_int_parameter AlpExgRequest  iRequest,
char *  iParamTag,
int  iParamValue
 

Create/Set a request integer parameter.

The parameter is replaced if it was already existing

Parameters:
[in] iRequest the request you are working on
[in] iParamTag the parameter name
[in] iParamValue the parameter value
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_set_string_parameter AlpExgRequest  iRequest,
char *  iParamTag,
char *  iParamValue
 

Create/Set a request string parameter.

The parameter is replaced if it was already existing

Parameters:
[in] iRequest the request you are working on
[in] iParamTag the parameter name
[in] iParamValue the parameter value
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_request_set_verb AlpExgRequest  iRequest,
char *  iVerb
 

Set the request verb.

Parameters:
[in] iRequest the request you are working on
[in] iVerb theVerb defining the action you want to perform
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_transport_get_params AlpExgRequest  iRequest,
char *  oParamsValue,
size_t  iParamsValueBufLen
 

Retrieve all the transport parameters at once.

This function lets you retrieve the transport params string from the current request. This can be useful if you want to save this string somewhere in order to be able to use it unchanged in subsequent requests.

Parameters:
[in] iRequest the request you are working on
[out] oParamsValue pointer to a buffer that will receive the parameters string
[in] iParamsValueBufLen size of the buffer
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_transport_set_params AlpExgRequest  iRequest,
char *  iParamsValue
 

Set all the transport parameters at once.

This function can be used to specify the transport to use and destination device where the request shall be executed. You can either either construct the string yourself if you know the syntax, or use a saved string that you previously built using alp_exg_transport_select(). For the built in transports, the syntax is the following: local : "local;" internet : "inet;destaddr:address_name_or_ip;" where address_name_or_ip is either a name that can be resolved through DNS or a decimal-dotted IP address irda : "irda;" bluetooth : TBD

If no transport parameters are set, the request will be executed locally.

Parameters:
[in] iRequest the request you are working on
[in] iParamsValue a string containing all the parameters
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

void alp_ext_request_prv_get_info AlpExgRequest  iRequest,
char **  oInfo,
size_t *  oInfoLen
 


Variable Documentation

alp_status_t g_synchronous_call_result
 


Generated on Sat Dec 16 20:29:48 2006 for hiker-0.9 by  doxygen 1.4.4