#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. |
|
cannot bind socket
|
|
cannot attach the GSource
|
|
cannot create a new GSource
|
|
cannot get transport function pointer
|
|
cannot open transport plug-in
|
|
cannot connect socket
|
|
there is already a handler registered for this verb and MIMEType, and iMustBeUnique was true.
|
|
there is already a handler registered for this verb, MIMEType and package
|
|
communication error between handler and daemon
|
|
handler did not consume the request (used by handlers that accept multiple registrants)
|
|
handler accepts requests from local device only
|
|
no handler exists for this verb and MIMEType
|
|
handler did not repond to invocation within the expected delay
|
|
cannot listen socket
|
|
the request the handler is trying to receive does not exist
|
|
the transport the request is trying to use does not exist
|
|
cannot read
|
|
cannot receive fd from daemon
|
|
the request was not received before it is completed
|
|
cannot create socket
|
|
cannot open anymore transport plug-in
|
|
transport cannot bind socket
|
|
transport is busy and cannot send at this time
|
|
transport cannot connect socket
|
|
cannot find a transport param item
|
|
transport cannot determine destination address
|
|
transport cannot listen socket
|
|
Obex server did not respond to our send request (it may not be started).
|
|
Obex could not receive the object correctly.
|
|
Obex reply was not received within timeout.
|
|
Obex could not send the object correctly.
|
|
transport cannot open a temp file
|
|
transport cannot read
|
|
transport cannot receive fd from other side
|
|
transport cannot create socket
|
|
transport cannot write to destination
|
|
transport cannot send fd to destination
|
|
cannot write to destination
|
|
cannot send fd to destination
|
|
Use this type to register a handler that can send or attach any type of data.
|
|
General error in API parameter usage.
|
|
buffer to small
|
|
Cannot create a temp file.
|
|
Cannot open tmp data file.
|
|
General daemon init error.
|
|
DBUS subsystem returned an error.
|
|
general file system error during operations
|
|
localized verb string is too long
|
|
MIME Type string is too long.
|
|
no data fd was found in the request (mandatory for legacy obex)
|
|
operation completed successfully
|
|
Notification Type string is too long.
|
|
request pointer is NULL
|
|
OBEX specific parameters are allowed only in an ALP_EXGMGR_STORE_OBJECT_VERB request.
|
|
cannot allocate memory//!< cannot allocate memory
|
|
Package Name string is too long.
|
|
parameter not found
|
|
Error while updating the registration cache.
|
|
Too many concurent async requests executing.
|
|
Request execution canceled by initiator.
|
|
verb string is too long
|
|
When using a generic request, the data must be passed in either the request file descriptor OR in this string parameter.
|
|
Use this type when querying verbs that can do something with a string reprensenting an email.
|
|
Use this type when querying verbs that can do something with a string reprensenting a phone number.
|
|
Use this type when querying verbs that can do something with a string reprensenting an url.
|
|
max len for the localized verb
|
|
max len for the MIME Type
|
|
max len for the notification type
|
|
max len for the package name
|
|
< 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.
|
|
max len for the verb
|
|
This is useful for transport modules only.
|
|
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.
|
|
This is the public opaque type. A request is formed and accessed using Exchange Manager API only.
|
|
This is the reference of the request passed to an exchange handler.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Create an empty request object. Everything works around the request. You must always create a request before you can do anything useful.
|
|
Delete a request object.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Get the data type of the data. This function will mostly be used from the handler to dispatch execution to the right event handler.
|
|
Get the data source url.
|
|
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.
|
|
Get an integer parameter from the request.
|
|
Get a string parameter from the request.
|
|
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.
|
|
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.
|
|
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.
|
|
Create/Set a request blob parameter. The parameter is replaced if it was already existing
|
|
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.
|
|
Set the request data type.
|
|
Description Set the request data source using an url.
|
|
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.
|
|
Create/Set a request integer parameter. The parameter is replaced if it was already existing
|
|
Create/Set a request string parameter. The parameter is replaced if it was already existing
|
|
Set the request verb.
|
|
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.
|
|
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.
|
|
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.
|