00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00034 #ifndef EXGMGR_H_
00035 #define EXGMGR_H_
00036
00037 #include <sys/types.h>
00038 #include <hiker/types.h>
00039 #include <hiker/sysclass.h>
00040
00041 #ifdef __cplusplus
00042 extern "C"
00043 {
00044 #endif
00045
00051
00052
00053
00054
00058
00059 #define ALP_EXGMGR_ERR_NO_ERROR ((alp_status_t) (0))
00060
00061 #define ALP_EXGMGR_ERR_NULL_REQUEST_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00010000))
00062
00063 #define ALP_EXGMGR_ERR_PARAM_NOT_FOUND_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00020000))
00064
00065 #define ALP_EXGMGR_ERR_OUT_OF_MEMORY_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00030000))
00066
00067 #define ALP_EXGMGR_ERR_BUF_TOO_SMALL_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00040000))
00068
00069 #define ALP_EXGMGR_ERR_VERB_TOO_LONG_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00050000))
00070
00071 #define ALP_EXGMGR_ERR_MIMETYPE_TOO_LONG_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00060000))
00072
00073 #define ALP_EXGMGR_ERR_PACKAGENAME_TOO_LONG_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00070000))
00074
00075 #define ALP_EXG_MGR_ERR_SOCKET_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00080000))
00076
00077 #define ALP_EXG_MGR_ERR_BIND_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00090000))
00078
00079 #define ALP_EXG_MGR_ERR_LISTEN_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000a0000))
00080
00081 #define ALP_EXG_MGR_ERR_CONNECT_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000b0000))
00082
00083 #define ALP_EXG_MGR_ERR_WRITE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000c0000))
00084
00085 #define ALP_EXG_MGR_ERR_WRITE_FD_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000d0000))
00086
00087 #define ALP_EXG_MGR_ERR_READ_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000e0000))
00088
00089 #define ALP_EXG_MGR_ERR_READ_FD_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x000f0000))
00090
00091 #define ALP_EXG_MGR_ERR_NO_SUCH_REQUEST_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00100000))
00092
00093 #define ALP_EXG_MGR_ERR_REQUEST_NOT_RECEIVED_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00110000))
00094
00095 #define ALP_EXG_MGR_ERR_NO_SUCH_TRANSPORT_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00120000))
00096
00097 #define ALP_EXGMGR_ERR_NOTIFICATIONTYPE_TOO_LONG_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00130000))
00098
00099 #define ALP_EXGMGR_ERR_DBUS_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00140000))
00100
00101 #define ALP_EXGMGR_ERR_CANNOT_CREATE_TMP_FILE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00150000))
00102
00103 #define ALP_EXGMGR_ERR_NO_DATA_FD_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00160000))
00104
00105 #define ALP_EXGMGR_ERR_FILE_SYSTEM_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00170000))
00106
00107 #define ALP_EXGMGR_ERR_LOCALIZED_VERB_TOO_LONG_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00180000))
00108
00109 #define ALP_EXGMGR_ERR_OBEX_PARAM_NOT_ALLOWED_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00190000))
00110
00111 #define ALP_EXGMGR_ERR_USER_CANCEL_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001a0000))
00112
00113 #define ALP_EXGMGR_ERR_REG_CACHE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001b0000))
00114
00115 #define ALP_EXGMGR_ERR_TOO_MANY_ASYNC_EXECUTE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001c0000))
00116
00117 #define ALP_EXGMGR_ERR_API_ERR_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001d0000))
00118
00119 #define ALP_EXGMGR_ERR_CANNOT_OPEN_TMP_FILE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001e0000))
00120
00121 #define ALP_EXGMGR_ERR_DAEMON_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x001f0000))
00122
00124 #define ALP_EXG_MGR_ERR_HANDLER_ALREADY_REGISTERED_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00200000))
00125
00126 #define ALP_EXG_MGR_ERR_HANDLER_ALREADY_EXISTS_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00210000))
00127
00128 #define ALP_EXG_MGR_ERR_HANDLER_NOT_FOUND_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00220000))
00129
00130 #define ALP_EXG_MGR_ERR_HANDLER_COMMUNICATION_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00230000))
00131
00132 #define ALP_EXG_MGR_ERR_HANDLER_TIMEOUT_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00240000))
00133
00134 #define ALP_EXG_MGR_ERR_HANDLER_DID_NOT_CONSUME_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00250000))
00135
00136 #define ALP_EXG_MGR_ERR_HANDLER_IS_LOCAL_ONLY_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00260000))
00137
00139 #define ALP_EXG_MGR_ERR_TOO_MANY_TRANSPORT_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00900000))
00140
00141 #define ALP_EXG_MGR_ERR_CANNOT_OPEN_TRANSPORT_LIB_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00910000))
00142
00143 #define ALP_EXG_MGR_ERR_CANNOT_GET_TRANSPORT_FUNC_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00920000))
00144
00145 #define ALP_EXG_MGR_ERR_CANNOT_CREATE_GSOURCE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00930000))
00146
00147 #define ALP_EXG_MGR_ERR_CANNOT_ATTACH_GSOURCE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00940000))
00148
00149 #define ALP_EXG_MGR_ERR_TRANSPORT_SOCKET_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b00000))
00150
00151 #define ALP_EXG_MGR_ERR_TRANSPORT_BIND_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b10000))
00152
00153 #define ALP_EXG_MGR_ERR_TRANSPORT_LISTEN_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b20000))
00154
00155 #define ALP_EXG_MGR_ERR_TRANSPORT_CONNECT_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b30000))
00156
00157 #define ALP_EXG_MGR_ERR_TRANSPORT_WRITE_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b40000))
00158
00159 #define ALP_EXG_MGR_ERR_TRANSPORT_WRITE_FD_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b50000))
00160
00161 #define ALP_EXG_MGR_ERR_TRANSPORT_READ_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b60000))
00162
00163 #define ALP_EXG_MGR_ERR_TRANSPORT_READ_FD_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b70000))
00164
00165 #define ALP_EXG_MGR_ERR_TRANSPORT_DEST_NOT_FOUND_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b80000))
00166
00167 #define ALP_EXG_MGR_ERR_TRANSPORT_DEST_ITEM_NOT_FOUND_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00b90000))
00168
00169 #define ALP_EXG_MGR_ERR_TRANSPORT_BUSY_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00ba0000))
00170
00171 #define ALP_EXG_MGR_ERR_TRANSPORT_OPEN_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bb0000))
00172
00173 #define ALP_EXG_MGR_ERR_TRANSPORT_OBEXSEND_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bc0000))
00174
00175 #define ALP_EXG_MGR_ERR_TRANSPORT_OBEXRCV_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bd0000))
00176
00177 #define ALP_EXG_MGR_ERR_TRANSPORT_OBEXREPLY_TIMEOUT_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00be0000))
00178
00179 #define ALP_EXG_MGR_ERR_TRANSPORT_OBEX_TIMEOUT_ERROR ((alp_status_t) (ALP_CLASS_EXCHANGE | 0x00bf0000))
00180
00181
00185
00186 #define ALP_EXGMGR_VERSION_1 1
00187
00188
00192
00193 typedef void *AlpExgRequest;
00195 typedef void *AlpExgRequestId;
00197
00201
00202 #define ALP_EXGMGR_VERB_MAXLEN 20
00203
00204 #define ALP_EXGMGR_LOCALIZED_VERB_MAXLEN 60
00205
00206 #define ALP_EXGMGR_MIMETYPE_MAXLEN 50
00207
00208 #define ALP_EXGMGR_PACKAGENAME_MAXLEN 150
00209
00210 #define ALP_EXGMGR_NOTIFICATIONTYPE_MAXLEN 40
00211
00212
00216
00217 #define ALP_EXGMGR_STORE_OBJECT_VERB "send_obex_legacy"
00218
00219
00223
00224 #define ALP_EXGMGR_GENERIC_DATA_PARAMETER_NAME "alp_exg_generic_dataparam"
00225
00226
00230
00231 #define ALP_EXGMGR_ATTACH_ALL_MIME_TYPE "alp_exg_attach_all_types"
00232
00233 #define ALP_EXGMGR_GENERIC_PHONE_STRING_MIME_TYPE "alp_exg_generic_phone_string"
00234
00235 #define ALP_EXGMGR_GENERIC_URL_STRING_MIME_TYPE "alp_exg_generic_url_string"
00236
00237 #define ALP_EXGMGR_GENERIC_EMAIL_STRING_MIME_TYPE "alp_exg_generic_email_string"
00238
00239
00266 alp_status_t alp_exg_handler_register (char *iVerb, char *iLocalizedVerb, char *iMIMEType,
00267 char *iHandlerPackageName,
00268 int iLocalOnly, int iSerializeMe, int iMustBeUnique, int iAcceptGenericInvocation);
00269
00292 alp_status_t alp_exg_handler_register_notification (char *iVerb, char *iLocalizedVerb, char *iMIMEType,
00293 char *iNotificationType,
00294 int iLocalOnly, int iSerializeMe, int iMustBeUnique, int iAcceptGenericInvocation);
00295
00307 alp_status_t alp_exg_handler_unregister (char *iVerb, char *iMIMEType, char *iHandlerPackageName);
00308
00309
00321 alp_status_t alp_exg_handler_unregister_notification (char *iVerb, char *iMIMEType, char *iNotificationType);
00322
00324
00341 alp_status_t alp_exg_handler_check_registration (char *iVerb, char *iMIMEType);
00342
00344
00362 alp_status_t alp_exg_handler_query_verbs (char *iMIMEType, int *oEntryCount, char **oDataP);
00363
00365
00380 alp_status_t alp_exg_request_create (AlpExgRequest *oRequest);
00381
00389 alp_status_t alp_exg_request_delete (AlpExgRequest iRequest);
00390
00392
00406 alp_status_t alp_exg_request_set_verb (AlpExgRequest iRequest, char *iVerb);
00407
00418 alp_status_t alp_exg_request_set_data_fd (AlpExgRequest iRequest, int iFd);
00419
00428 alp_status_t alp_exg_request_set_data_url (AlpExgRequest iRequest, char *iURL);
00429
00438 alp_status_t alp_exg_request_set_data_type (AlpExgRequest iRequest, char *iMIMEType);
00439
00451 alp_status_t alp_exg_request_set_int_parameter (AlpExgRequest iRequest, char *iParamTag, int iParamValue);
00452
00465 alp_status_t alp_exg_request_set_blob_parameter (AlpExgRequest iRequest, char *iParamTag, uint8_t *iBlob, size_t iBlobSize);
00466
00478 alp_status_t alp_exg_request_set_string_parameter (AlpExgRequest iRequest, char *iParamTag, char *iParamValue);
00479
00481
00504 alp_status_t alp_exg_transport_select (AlpExgRequest iRequest, char *iPrompt);
00505
00518 alp_status_t alp_exg_transport_get_params (AlpExgRequest iRequest, char *oParamsValue, size_t iParamsValueBufLen);
00519
00538 alp_status_t alp_exg_transport_set_params (AlpExgRequest iRequest, char *iParamsValue);
00539
00541
00561 alp_status_t alp_exg_request_execute (AlpExgRequest iRequest);
00562
00577 typedef void (*alp_exg_execute_complete_func) (AlpExgRequest iRequest, alp_status_t iExecuteCompleteErr);
00578
00595 alp_status_t alp_exg_request_execute_async (AlpExgRequest iRequest, alp_exg_execute_complete_func iExecuteCompleteFunc);
00596
00598
00615 alp_status_t alp_exg_request_set_generic_mode (AlpExgRequest iRequest);
00616
00625 alp_status_t alp_exg_request_get_generic_mode (AlpExgRequest iRequest, int *oGenericMode);
00626
00628
00644 alp_status_t alp_exg_request_activate_progress (AlpExgRequest iRequest);
00645
00647
00648
00665 alp_status_t alp_exg_request_get_verb (AlpExgRequest iRequest, char *oVerb, size_t iVerbBufLen);
00666
00676 alp_status_t alp_exg_request_get_int_parameter (AlpExgRequest iRequest, char *iParamTag, int *oParamValue);
00677
00688 alp_status_t alp_exg_request_get_string_parameter (AlpExgRequest iRequest, char *iParamTag, char *oParamValue, size_t iParamValueBufLen);
00689
00703 alp_status_t alp_exg_request_get_string_parameter_const (AlpExgRequest iRequest, char *iParamTag, const char **oParamValue);
00704
00718 alp_status_t alp_exg_request_get_blob_parameter (AlpExgRequest iRequest, char *iParamTag, uint8_t **oBlob, size_t *oBlobSize);
00719
00731 alp_status_t alp_exg_request_get_data_type (AlpExgRequest iRequest, char *oMIMEType, size_t iMIMETypeBufLen);
00732
00744 alp_status_t alp_exg_request_get_data_fd (AlpExgRequest iRequest, int *oFd);
00745
00755 alp_status_t alp_exg_request_get_data_url (AlpExgRequest iRequest, char *oUrl, size_t iUrlBufLen);
00756
00758
00774 alp_status_t alp_exg_request_receive (AlpExgRequest *oRequest, AlpExgRequestId iRequestId);
00775
00786 alp_status_t alp_exg_request_complete (AlpExgRequest iRequest, alp_status_t iResult);
00787
00789
00806 alp_status_t alp_exg_request_cancel (AlpExgRequest iRequest);
00807
00809
00811
00812 #ifdef __cplusplus
00813 }
00814 #endif
00815
00816 #endif