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

exgmgr.h File Reference


Detailed Description

Public headers for Exchange Manager.

#include <sys/types.h>
#include <hiker/types.h>
#include <hiker/sysclass.h>

Go to the source code of this file.

Exchange Manager Errors

#define ALP_EXGMGR_ERR_NO_ERROR   ((alp_status_t) (0))
 operation completed successfully
#define ALP_EXGMGR_ERR_NULL_REQUEST_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00010000))
 request pointer is NULL
#define ALP_EXGMGR_ERR_PARAM_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00020000))
 parameter not found
#define ALP_EXGMGR_ERR_OUT_OF_MEMORY_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00030000))
 cannot allocate memory//!< cannot allocate memory
#define ALP_EXGMGR_ERR_BUF_TOO_SMALL_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00040000))
 buffer to small
#define ALP_EXGMGR_ERR_VERB_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00050000))
 verb string is too long
#define ALP_EXGMGR_ERR_MIMETYPE_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00060000))
 MIME Type string is too long.
#define ALP_EXGMGR_ERR_PACKAGENAME_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00070000))
 Package Name string is too long.
#define ALP_EXG_MGR_ERR_SOCKET_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00080000))
 cannot create socket
#define ALP_EXG_MGR_ERR_BIND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00090000))
 cannot bind socket
#define ALP_EXG_MGR_ERR_LISTEN_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000a0000))
 cannot listen socket
#define ALP_EXG_MGR_ERR_CONNECT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000b0000))
 cannot connect socket
#define ALP_EXG_MGR_ERR_WRITE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000c0000))
 cannot write to destination
#define ALP_EXG_MGR_ERR_WRITE_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000d0000))
 cannot send fd to destination
#define ALP_EXG_MGR_ERR_READ_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000e0000))
 cannot read
#define ALP_EXG_MGR_ERR_READ_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000f0000))
 cannot receive fd from daemon
#define ALP_EXG_MGR_ERR_NO_SUCH_REQUEST_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00100000))
 the request the handler is trying to receive does not exist
#define ALP_EXG_MGR_ERR_REQUEST_NOT_RECEIVED_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00110000))
 the request was not received before it is completed
#define ALP_EXG_MGR_ERR_NO_SUCH_TRANSPORT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00120000))
 the transport the request is trying to use does not exist
#define ALP_EXGMGR_ERR_NOTIFICATIONTYPE_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00130000))
 Notification Type string is too long.
#define ALP_EXGMGR_ERR_DBUS_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00140000))
 DBUS subsystem returned an error.
#define ALP_EXGMGR_ERR_CANNOT_CREATE_TMP_FILE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00150000))
 Cannot create a temp file.
#define ALP_EXGMGR_ERR_NO_DATA_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00160000))
 no data fd was found in the request (mandatory for legacy obex)
#define ALP_EXGMGR_ERR_FILE_SYSTEM_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00170000))
 general file system error during operations
#define ALP_EXGMGR_ERR_LOCALIZED_VERB_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00180000))
 localized verb string is too long
#define ALP_EXGMGR_ERR_OBEX_PARAM_NOT_ALLOWED_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00190000))
 OBEX specific parameters are allowed only in an ALP_EXGMGR_STORE_OBJECT_VERB request.
#define ALP_EXGMGR_ERR_USER_CANCEL_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001a0000))
 Request execution canceled by initiator.
#define ALP_EXGMGR_ERR_REG_CACHE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001b0000))
 Error while updating the registration cache.
#define ALP_EXGMGR_ERR_TOO_MANY_ASYNC_EXECUTE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001c0000))
 Too many concurent async requests executing.
#define ALP_EXGMGR_ERR_API_ERR_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001d0000))
 General error in API parameter usage.
#define ALP_EXGMGR_ERR_CANNOT_OPEN_TMP_FILE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001e0000))
 Cannot open tmp data file.
#define ALP_EXGMGR_ERR_DAEMON_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001f0000))
 General daemon init error.
#define ALP_EXG_MGR_ERR_HANDLER_ALREADY_REGISTERED_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00200000))
 there is already a handler registered for this verb, MIMEType and package
#define ALP_EXG_MGR_ERR_HANDLER_ALREADY_EXISTS_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00210000))
 there is already a handler registered for this verb and MIMEType, and iMustBeUnique was true.
#define ALP_EXG_MGR_ERR_HANDLER_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00220000))
 no handler exists for this verb and MIMEType
#define ALP_EXG_MGR_ERR_HANDLER_COMMUNICATION_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00230000))
 communication error between handler and daemon
#define ALP_EXG_MGR_ERR_HANDLER_TIMEOUT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00240000))
 handler did not repond to invocation within the expected delay
#define ALP_EXG_MGR_ERR_HANDLER_DID_NOT_CONSUME_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00250000))
 handler did not consume the request (used by handlers that accept multiple registrants)
#define ALP_EXG_MGR_ERR_HANDLER_IS_LOCAL_ONLY_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00260000))
 handler accepts requests from local device only
#define ALP_EXG_MGR_ERR_TOO_MANY_TRANSPORT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00900000))
 cannot open anymore transport plug-in
#define ALP_EXG_MGR_ERR_CANNOT_OPEN_TRANSPORT_LIB_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00910000))
 cannot open transport plug-in
#define ALP_EXG_MGR_ERR_CANNOT_GET_TRANSPORT_FUNC_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00920000))
 cannot get transport function pointer
#define ALP_EXG_MGR_ERR_CANNOT_CREATE_GSOURCE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00930000))
 cannot create a new GSource
#define ALP_EXG_MGR_ERR_CANNOT_ATTACH_GSOURCE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00940000))
 cannot attach the GSource
#define ALP_EXG_MGR_ERR_TRANSPORT_SOCKET_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b00000))
 transport cannot create socket
#define ALP_EXG_MGR_ERR_TRANSPORT_BIND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b10000))
 transport cannot bind socket
#define ALP_EXG_MGR_ERR_TRANSPORT_LISTEN_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b20000))
 transport cannot listen socket
#define ALP_EXG_MGR_ERR_TRANSPORT_CONNECT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b30000))
 transport cannot connect socket
#define ALP_EXG_MGR_ERR_TRANSPORT_WRITE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b40000))
 transport cannot write to destination
#define ALP_EXG_MGR_ERR_TRANSPORT_WRITE_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b50000))
 transport cannot send fd to destination
#define ALP_EXG_MGR_ERR_TRANSPORT_READ_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b60000))
 transport cannot read
#define ALP_EXG_MGR_ERR_TRANSPORT_READ_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b70000))
 transport cannot receive fd from other side
#define ALP_EXG_MGR_ERR_TRANSPORT_DEST_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b80000))
 transport cannot determine destination address
#define ALP_EXG_MGR_ERR_TRANSPORT_DEST_ITEM_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b90000))
 cannot find a transport param item
#define ALP_EXG_MGR_ERR_TRANSPORT_BUSY_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00ba0000))
 transport is busy and cannot send at this time
#define ALP_EXG_MGR_ERR_TRANSPORT_OPEN_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bb0000))
 transport cannot open a temp file
#define ALP_EXG_MGR_ERR_TRANSPORT_OBEXSEND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bc0000))
 Obex could not send the object correctly.
#define ALP_EXG_MGR_ERR_TRANSPORT_OBEXRCV_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bd0000))
 Obex could not receive the object correctly.
#define ALP_EXG_MGR_ERR_TRANSPORT_OBEXREPLY_TIMEOUT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00be0000))
 Obex reply was not received within timeout.
#define ALP_EXG_MGR_ERR_TRANSPORT_OBEX_TIMEOUT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bf0000))
 Obex server did not respond to our send request (it may not be started).

Exchange Manager Version

#define ALP_EXGMGR_VERSION_1   1
 This is useful for transport modules only.

String Parameters Max Lens

#define ALP_EXGMGR_VERB_MAXLEN   20
 max len for the verb
#define ALP_EXGMGR_LOCALIZED_VERB_MAXLEN   60
 max len for the localized verb
#define ALP_EXGMGR_MIMETYPE_MAXLEN   50
 max len for the MIME Type
#define ALP_EXGMGR_PACKAGENAME_MAXLEN   150
 max len for the package name
#define ALP_EXGMGR_NOTIFICATIONTYPE_MAXLEN   40
 max len for the notification type

Send/Receive Obex compatible well known verb

#define ALP_EXGMGR_STORE_OBJECT_VERB   "send_obex_legacy"
 < When using this verb, IR and BT will use a standard OBEX send to transmit the data. Receiving objects through OBEX will also invoke a handler for this verb.

Generic request string parameter name

#define ALP_EXGMGR_GENERIC_DATA_PARAMETER_NAME   "alp_exg_generic_dataparam"
 When using a generic request, the data must be passed in either the request file descriptor OR in this string parameter.

Generic data types

#define ALP_EXGMGR_ATTACH_ALL_MIME_TYPE   "alp_exg_attach_all_types"
 Use this type to register a handler that can send or attach any type of data.
#define ALP_EXGMGR_GENERIC_PHONE_STRING_MIME_TYPE   "alp_exg_generic_phone_string"
 Use this type when querying verbs that can do something with a string reprensenting a phone number.
#define ALP_EXGMGR_GENERIC_URL_STRING_MIME_TYPE   "alp_exg_generic_url_string"
 Use this type when querying verbs that can do something with a string reprensenting an url.
#define ALP_EXGMGR_GENERIC_EMAIL_STRING_MIME_TYPE   "alp_exg_generic_email_string"
 Use this type when querying verbs that can do something with a string reprensenting an email.

Request reference

typedef void * AlpExgRequest
 This is the public opaque type. A request is formed and accessed using Exchange Manager API only.
typedef void * AlpExgRequestId
 This is the reference of the request passed to an exchange handler.

Execution completion callback

typedef void(* alp_exg_execute_complete_func )(AlpExgRequest iRequest, alp_status_t iExecuteCompleteErr)
 Execution completion callback.

Registering/Unregistering handlers

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.
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 *iHandlerPackageName)
 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.

Check Handler Registration

alp_status_t alp_exg_handler_check_registration (char *iVerb, char *iMIMEType)
 Determine if a handler exist for a verb/data type pair.

Query Generic verbs

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.

Create and Delete Requests

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.

Construct a Request

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_blob_parameter (AlpExgRequest iRequest, char *iParamTag, uint8_t *iBlob, size_t iBlobSize)
 Create/Set a request blob parameter.
alp_status_t alp_exg_request_set_string_parameter (AlpExgRequest iRequest, char *iParamTag, char *iParamValue)
 Create/Set a request string parameter.

Transport parameters

alp_status_t alp_exg_transport_select (AlpExgRequest iRequest, char *iPrompt)
 Show UI to select a transport to use to reach the request destination.
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.

Executing a request

alp_status_t alp_exg_request_execute (AlpExgRequest iRequest)
 Hand the request to the system and execute it.

Executing a request asynchronously

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.

Handle generic Mode

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.

Progress dialog

alp_status_t alp_exg_request_activate_progress (AlpExgRequest iRequest)
 Activate Progress Dialog.

Extracting all the info from a Request

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_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_type (AlpExgRequest iRequest, char *oMIMEType, size_t iMIMETypeBufLen)
 Get the data type of the data.
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.

Receiving a Request in a Handler

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.

Cancel execution

alp_status_t alp_exg_request_cancel (AlpExgRequest iRequest)
 Cancel request while execution in progress.


Define Documentation

#define ALP_EXG_MGR_ERR_BIND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00090000))
 

cannot bind socket

#define ALP_EXG_MGR_ERR_CANNOT_ATTACH_GSOURCE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00940000))
 

cannot attach the GSource

#define ALP_EXG_MGR_ERR_CANNOT_CREATE_GSOURCE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00930000))
 

cannot create a new GSource

#define ALP_EXG_MGR_ERR_CANNOT_GET_TRANSPORT_FUNC_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00920000))
 

cannot get transport function pointer

#define ALP_EXG_MGR_ERR_CANNOT_OPEN_TRANSPORT_LIB_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00910000))
 

cannot open transport plug-in

#define ALP_EXG_MGR_ERR_CONNECT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000b0000))
 

cannot connect socket

#define ALP_EXG_MGR_ERR_HANDLER_ALREADY_EXISTS_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00210000))
 

there is already a handler registered for this verb and MIMEType, and iMustBeUnique was true.

#define ALP_EXG_MGR_ERR_HANDLER_ALREADY_REGISTERED_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00200000))
 

there is already a handler registered for this verb, MIMEType and package

#define ALP_EXG_MGR_ERR_HANDLER_COMMUNICATION_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00230000))
 

communication error between handler and daemon

#define ALP_EXG_MGR_ERR_HANDLER_DID_NOT_CONSUME_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00250000))
 

handler did not consume the request (used by handlers that accept multiple registrants)

#define ALP_EXG_MGR_ERR_HANDLER_IS_LOCAL_ONLY_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00260000))
 

handler accepts requests from local device only

#define ALP_EXG_MGR_ERR_HANDLER_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00220000))
 

no handler exists for this verb and MIMEType

#define ALP_EXG_MGR_ERR_HANDLER_TIMEOUT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00240000))
 

handler did not repond to invocation within the expected delay

#define ALP_EXG_MGR_ERR_LISTEN_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000a0000))
 

cannot listen socket

#define ALP_EXG_MGR_ERR_NO_SUCH_REQUEST_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00100000))
 

the request the handler is trying to receive does not exist

#define ALP_EXG_MGR_ERR_NO_SUCH_TRANSPORT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00120000))
 

the transport the request is trying to use does not exist

#define ALP_EXG_MGR_ERR_READ_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000e0000))
 

cannot read

#define ALP_EXG_MGR_ERR_READ_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000f0000))
 

cannot receive fd from daemon

#define ALP_EXG_MGR_ERR_REQUEST_NOT_RECEIVED_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00110000))
 

the request was not received before it is completed

#define ALP_EXG_MGR_ERR_SOCKET_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00080000))
 

cannot create socket

#define ALP_EXG_MGR_ERR_TOO_MANY_TRANSPORT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00900000))
 

cannot open anymore transport plug-in

#define ALP_EXG_MGR_ERR_TRANSPORT_BIND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b10000))
 

transport cannot bind socket

#define ALP_EXG_MGR_ERR_TRANSPORT_BUSY_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00ba0000))
 

transport is busy and cannot send at this time

#define ALP_EXG_MGR_ERR_TRANSPORT_CONNECT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b30000))
 

transport cannot connect socket

#define ALP_EXG_MGR_ERR_TRANSPORT_DEST_ITEM_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b90000))
 

cannot find a transport param item

#define ALP_EXG_MGR_ERR_TRANSPORT_DEST_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b80000))
 

transport cannot determine destination address

#define ALP_EXG_MGR_ERR_TRANSPORT_LISTEN_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b20000))
 

transport cannot listen socket

#define ALP_EXG_MGR_ERR_TRANSPORT_OBEX_TIMEOUT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bf0000))
 

Obex server did not respond to our send request (it may not be started).

#define ALP_EXG_MGR_ERR_TRANSPORT_OBEXRCV_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bd0000))
 

Obex could not receive the object correctly.

#define ALP_EXG_MGR_ERR_TRANSPORT_OBEXREPLY_TIMEOUT_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00be0000))
 

Obex reply was not received within timeout.

#define ALP_EXG_MGR_ERR_TRANSPORT_OBEXSEND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bc0000))
 

Obex could not send the object correctly.

#define ALP_EXG_MGR_ERR_TRANSPORT_OPEN_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bb0000))
 

transport cannot open a temp file

#define ALP_EXG_MGR_ERR_TRANSPORT_READ_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b60000))
 

transport cannot read

#define ALP_EXG_MGR_ERR_TRANSPORT_READ_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b70000))
 

transport cannot receive fd from other side

#define ALP_EXG_MGR_ERR_TRANSPORT_SOCKET_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b00000))
 

transport cannot create socket

#define ALP_EXG_MGR_ERR_TRANSPORT_WRITE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b40000))
 

transport cannot write to destination

#define ALP_EXG_MGR_ERR_TRANSPORT_WRITE_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b50000))
 

transport cannot send fd to destination

#define ALP_EXG_MGR_ERR_WRITE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000c0000))
 

cannot write to destination

#define ALP_EXG_MGR_ERR_WRITE_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000d0000))
 

cannot send fd to destination

#define ALP_EXGMGR_ATTACH_ALL_MIME_TYPE   "alp_exg_attach_all_types"
 

Use this type to register a handler that can send or attach any type of data.

#define ALP_EXGMGR_ERR_API_ERR_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001d0000))
 

General error in API parameter usage.

#define ALP_EXGMGR_ERR_BUF_TOO_SMALL_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00040000))
 

buffer to small

#define ALP_EXGMGR_ERR_CANNOT_CREATE_TMP_FILE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00150000))
 

Cannot create a temp file.

#define ALP_EXGMGR_ERR_CANNOT_OPEN_TMP_FILE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001e0000))
 

Cannot open tmp data file.

#define ALP_EXGMGR_ERR_DAEMON_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001f0000))
 

General daemon init error.

#define ALP_EXGMGR_ERR_DBUS_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00140000))
 

DBUS subsystem returned an error.

#define ALP_EXGMGR_ERR_FILE_SYSTEM_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00170000))
 

general file system error during operations

#define ALP_EXGMGR_ERR_LOCALIZED_VERB_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00180000))
 

localized verb string is too long

#define ALP_EXGMGR_ERR_MIMETYPE_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00060000))
 

MIME Type string is too long.

#define ALP_EXGMGR_ERR_NO_DATA_FD_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00160000))
 

no data fd was found in the request (mandatory for legacy obex)

#define ALP_EXGMGR_ERR_NO_ERROR   ((alp_status_t) (0))
 

operation completed successfully

#define ALP_EXGMGR_ERR_NOTIFICATIONTYPE_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00130000))
 

Notification Type string is too long.

#define ALP_EXGMGR_ERR_NULL_REQUEST_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00010000))
 

request pointer is NULL

#define ALP_EXGMGR_ERR_OBEX_PARAM_NOT_ALLOWED_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00190000))
 

OBEX specific parameters are allowed only in an ALP_EXGMGR_STORE_OBJECT_VERB request.

#define ALP_EXGMGR_ERR_OUT_OF_MEMORY_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00030000))
 

cannot allocate memory//!< cannot allocate memory

#define ALP_EXGMGR_ERR_PACKAGENAME_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00070000))
 

Package Name string is too long.

#define ALP_EXGMGR_ERR_PARAM_NOT_FOUND_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00020000))
 

parameter not found

#define ALP_EXGMGR_ERR_REG_CACHE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001b0000))
 

Error while updating the registration cache.

#define ALP_EXGMGR_ERR_TOO_MANY_ASYNC_EXECUTE_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001c0000))
 

Too many concurent async requests executing.

#define ALP_EXGMGR_ERR_USER_CANCEL_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001a0000))
 

Request execution canceled by initiator.

#define ALP_EXGMGR_ERR_VERB_TOO_LONG_ERROR   ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00050000))
 

verb string is too long

#define ALP_EXGMGR_GENERIC_DATA_PARAMETER_NAME   "alp_exg_generic_dataparam"
 

When using a generic request, the data must be passed in either the request file descriptor OR in this string parameter.

#define ALP_EXGMGR_GENERIC_EMAIL_STRING_MIME_TYPE   "alp_exg_generic_email_string"
 

Use this type when querying verbs that can do something with a string reprensenting an email.

#define ALP_EXGMGR_GENERIC_PHONE_STRING_MIME_TYPE   "alp_exg_generic_phone_string"
 

Use this type when querying verbs that can do something with a string reprensenting a phone number.

#define ALP_EXGMGR_GENERIC_URL_STRING_MIME_TYPE   "alp_exg_generic_url_string"
 

Use this type when querying verbs that can do something with a string reprensenting an url.

#define ALP_EXGMGR_LOCALIZED_VERB_MAXLEN   60
 

max len for the localized verb

#define ALP_EXGMGR_MIMETYPE_MAXLEN   50
 

max len for the MIME Type

#define ALP_EXGMGR_NOTIFICATIONTYPE_MAXLEN   40
 

max len for the notification type

#define ALP_EXGMGR_PACKAGENAME_MAXLEN   150
 

max len for the package name

#define ALP_EXGMGR_STORE_OBJECT_VERB   "send_obex_legacy"
 

< When using this verb, IR and BT will use a standard OBEX send to transmit the data. Receiving objects through OBEX will also invoke a handler for this verb.

#define ALP_EXGMGR_VERB_MAXLEN   20
 

max len for the verb

#define ALP_EXGMGR_VERSION_1   1
 

This is useful for transport modules only.


Typedef Documentation

typedef void(* alp_exg_execute_complete_func)(AlpExgRequest iRequest, alp_status_t iExecuteCompleteErr)
 

Execution completion callback.

This function is called back when an asynchronous request completes execution. You get the request back and you are responsible to delete it when done with it. This function is called in the context of your main event loop so you don't need to do anything to synchronize with it.

Parameters:
[in] iRequest the request that has completed execution
[in] iCompletionErr this is the execution result.

typedef void* AlpExgRequest
 

This is the public opaque type. A request is formed and accessed using Exchange Manager API only.

typedef void* AlpExgRequestId
 

This is the reference of the request passed to an exchange handler.


Function Documentation

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

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_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_select AlpExgRequest  iRequest,
char *  iPrompt
 

Show UI to select a transport to use to reach the request destination.

This function will popup a transport selection dialog and let the user choose one. Depending on the transport, the user may also be invited to select a destination (this is transport dependant UI. For TCP, it will be a simple text field to enter a name or IP address).

Once the user has selected the transport and destination address, the right parameters and values will have been added to the request. An application can also use this function on an empty request just for the purpose to subsequently save the transport and destination parameters and create a 'favorite' destination.

Parameters:
[in] iRequest the request you are working on
[in] iPrompt the prompt to display on top of the transport list (e.g. "where do you want to lookup Eric's email?"). If NULL, a default prompt will be shown.
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


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