#include <string.h>
#include <fcntl.h>
#include <stdlib.h>
#include <hiker/traces.h>
#include <hiker/exgmgrutils.h>
#include <hiker/prv/exgmgr_prv.h>
Functions | |
alp_status_t | alp_exg_utils_store_request_create (AlpExgRequest *oRequest) |
Create a request to send objects using OBEX. | |
alp_status_t | alp_exg_utils_store_request_set_data_fd (AlpExgRequest iRequest, int iFd, char *iMIMEType, char *iDescription, char *iName) |
add an object by file descriptor | |
alp_status_t | alp_exg_utils_store_request_add_object (AlpExgRequest iRequest, char *iFilename, char *iMIMEType, char *iDescription, char *iName) |
add an object by filename | |
alp_status_t | alp_exg_utils_is_store_request (AlpExgRequest iRequest, int *oIsStoreRequest) |
Check if a request is a 'store' request. | |
alp_status_t | alp_exg_utils_store_request_get_object_count (AlpExgRequest iRequest, int *oObjectCount) |
Get the number of objects received. | |
alp_status_t | alp_exg_utils_store_request_get_data_fd (AlpExgRequest iRequest, int *oFd, char *oMIMEType, size_t iMIMETypeBufLen, char *oDescription, size_t iDescriptionBufLen, char *oName, size_t iNameBufLen) |
Get the object data file descriptor <DEPRECATED, use alp_exg_utils_store_request_get_object_fd()>. | |
alp_status_t | alp_exg_utils_store_request_get_object_fd (AlpExgRequest iRequest, int iObjectNum, int *oFd, char *oMIMEType, size_t iMIMETypeBufLen, char *oDescription, size_t iDescriptionBufLen, char *oName, size_t iNameBufLen) |
Get info about one of the received objects with data from file descriptor. | |
alp_status_t | alp_exg_utils_store_request_get_object (AlpExgRequest iRequest, int iObjectNum, char *oFilename, size_t iFilenameBufLen, char *oMIMEType, size_t iMIMETypeBufLen, char *oDescription, size_t iDescriptionBufLen, char *oName, size_t iNameBufLen) |
Get info about one of the received objects. |
|
Check if a request is a 'store' request. Use this function to determine whether the request you have received is a 'store' request. You may need to check that in case you register the same handler for multiple verbs.
|
|
add an object by filename Use this function when you want to send one or several objects. Each object must be stored in its own file. If you elect to use this function you cannot use alp_exg_utils_store_request_set_data_fd().
|
|
Create a request to send objects using OBEX. This function creates a new request and sets the right verb to let the exchange transport know you want to send objects using OBEX. This lets you send one or more objects to any device which understands OBEX. Note that upon return, the request verb will have been set (don't set it yourself).
|
|
Get the object data file descriptor <DEPRECATED, use alp_exg_utils_store_request_get_object_fd()>. If there is only a single object in the request, it may have been passed by file descriptor. Call this function to check and possibly retrieve the fd. Once you have got the fd, it belongs to you and you are responsible to close it when you are finished with it. If the fd returned is -1, then use alp_exg_utils_store_request_get_object() to retrieve the object filename.
|
|
Get info about one of the received objects. The file you get is yours. You are responsible to either move it to your private storage, or delete it when done.
|
|
Get the number of objects received. Use this function to determine how many objects you have received.
|
|
Get info about one of the received objects with data from file descriptor. The fd you get is yours. You are responsible to close it when done.
|
|
add an object by file descriptor Use this function when you want to send only a single object and specify a file descriptor. If you elect to use this function you cannot use alp_exg_utils_store_request_add_object(). Note that the fd belongs to the request if the function returns no error. It will be closed when the request is destroyed.
|