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

exgtransport.h File Reference


Detailed Description

Exchange Manager reserved transport plug-in headers.

#include <hiker/exgmgr.h>

Go to the source code of this file.

Data Structures

struct  _AlpExgClientExecuteData
struct  _AlpExgClientExecGSource
struct  _AlpExgWaitExecuteResultMsg
#define ALP_EXG_TRANSPORT_EVENT_INCOMING_REQUEST   1
 Transport events that can be notified back to the daemon transport has an incoming ready to dispatch.
#define ALP_EXG_TRANSPORT_EVENT_FATAL_ERROR   2
 transport encountered an unrecoverable error

Defines

#define ALP_EXG_TRANSPORTS_MAX_COUNT   5
#define ALP_EXG_TRANSPORT_NAME_MAX_LEN   30
#define EXG_MAX_ASYNC_EXEC_COUNT   3
#define ALP_EXG_TRANSPORT_EXECUTE_INIT_STATE   0
#define ALP_EXG_TRANSPORT_EXECUTE_COMPLETE_STATE   0xffff
#define ALP_EXG_MSG_RESULT   1
#define ALP_EXG_MSG_PROGRESS_PREPARING   2
#define ALP_EXG_MSG_PROGRESS_CONNECTING   3
#define ALP_EXG_MSG_PROGRESS_SENDING   4
#define ALP_EXG_MSG_PROGRESS_DISCONNECTING   5
#define ALP_EXG_MSG_PROGRESS_ABORTING   6
#define ALP_EXG_MSG_RX_BT_CONNECTING   10
#define ALP_EXG_MSG_RX_IR_CONNECTING   11
#define ALP_EXG_MSG_RX_BT_INIT_OBJECT   12
#define ALP_EXG_MSG_RX_IR_INIT_OBJECT   13
#define ALP_EXG_MSG_RX_BT_FILENAME   14
#define ALP_EXG_MSG_RX_IR_FILENAME   15
#define ALP_EXG_MSG_RX_BT_RECEIVING_INFO   16
#define ALP_EXG_MSG_RX_IR_RECEIVING_INFO   17
#define ALP_EXG_MSG_RX_BT_RECEIVING_INFO_NODESC   18
#define ALP_EXG_MSG_RX_IR_RECEIVING_INFO_NODESC   19
#define ALP_EXG_RCV_PROGRESS_NOTIF_TYPE   "exg_obex_rcv_progress"
#define ALP_EXG_MSG_PROGRESS_INFO_MAX_LEN   50

Typedefs

typedef alp_status_t(* alp_exg_transport_event_notify_func )(int iTransportId, int iTransportEvent, void *iTransportEventData, size_t iTransportEventDataSize)
typedef alp_status_t(* alp_exg_transport_init_func )(alp_exg_transport_event_notify_func iTransportEventNotifyFunc, int iTransportId)
typedef alp_status_t(* alp_exg_transport_deinit_func )()
typedef alp_status_t(* alp_exg_transport_dispatch_result_func )(AlpExgRequest iRequest, alp_status_t iHandlerErr)
typedef alp_status_t(* alp_exg_transport_execute_request_func )(AlpExgRequest iRequest, GPollFD *iPollFd, int *iState)
typedef alp_status_t(* alp_exg_transport_ask_params_func )(char **oTransportParams)
typedef alp_status_t(* alp_exg_transport_cancel_func )(int iGuid)
typedef _AlpExgClientExecuteData AlpExgClientExecuteData
typedef _AlpExgClientExecGSource AlpExgClientExecGSource
typedef _AlpExgWaitExecuteResultMsg AlpExgWaitExecuteResultMsg

Functions

alp_status_t alp_exg_transport_event_notify (int iTransportId, int iTransportEvent, void *iTransportEventData, size_t iTransportEventDataSize)
 Prototype of the daemon function to be called back when the transport has an event to notify.
alp_status_t alp_exg_transport_init (alp_exg_transport_event_notify_func iTransportEventNotifyFunc, int iTransportId)
 Initialize the transport.
alp_status_t alp_exg_transport_deinit ()
 Uninitialize the transport.
alp_status_t alp_exg_transport_dispatch_result (AlpExgRequest iRequest, alp_status_t iHandlerErr)
 Receive the request dispatch result.
alp_status_t alp_exg_transport_execute_request (AlpExgRequest iRequest, GPollFD *iPollFd, int *iState)
 Transmit request to destination.
alp_status_t alp_exg_transport_ask_params (char **oTransportParams)
 Builds a full transport string.
alp_status_t alp_exg_transport_cancel (int iGuid)
 Cancel a request executing in the transport.


Define Documentation

#define ALP_EXG_MSG_PROGRESS_ABORTING   6
 

#define ALP_EXG_MSG_PROGRESS_CONNECTING   3
 

#define ALP_EXG_MSG_PROGRESS_DISCONNECTING   5
 

#define ALP_EXG_MSG_PROGRESS_INFO_MAX_LEN   50
 

#define ALP_EXG_MSG_PROGRESS_PREPARING   2
 

#define ALP_EXG_MSG_PROGRESS_SENDING   4
 

#define ALP_EXG_MSG_RESULT   1
 

#define ALP_EXG_MSG_RX_BT_CONNECTING   10
 

#define ALP_EXG_MSG_RX_BT_FILENAME   14
 

#define ALP_EXG_MSG_RX_BT_INIT_OBJECT   12
 

#define ALP_EXG_MSG_RX_BT_RECEIVING_INFO   16
 

#define ALP_EXG_MSG_RX_BT_RECEIVING_INFO_NODESC   18
 

#define ALP_EXG_MSG_RX_IR_CONNECTING   11
 

#define ALP_EXG_MSG_RX_IR_FILENAME   15
 

#define ALP_EXG_MSG_RX_IR_INIT_OBJECT   13
 

#define ALP_EXG_MSG_RX_IR_RECEIVING_INFO   17
 

#define ALP_EXG_MSG_RX_IR_RECEIVING_INFO_NODESC   19
 

#define ALP_EXG_RCV_PROGRESS_NOTIF_TYPE   "exg_obex_rcv_progress"
 

#define ALP_EXG_TRANSPORT_EVENT_FATAL_ERROR   2
 

transport encountered an unrecoverable error

#define ALP_EXG_TRANSPORT_EVENT_INCOMING_REQUEST   1
 

Transport events that can be notified back to the daemon transport has an incoming ready to dispatch.

#define ALP_EXG_TRANSPORT_EXECUTE_COMPLETE_STATE   0xffff
 

#define ALP_EXG_TRANSPORT_EXECUTE_INIT_STATE   0
 

#define ALP_EXG_TRANSPORT_NAME_MAX_LEN   30
 

#define ALP_EXG_TRANSPORTS_MAX_COUNT   5
 

#define EXG_MAX_ASYNC_EXEC_COUNT   3
 


Typedef Documentation

typedef alp_status_t(* alp_exg_transport_ask_params_func)(char **oTransportParams)
 

typedef alp_status_t(* alp_exg_transport_cancel_func)(int iGuid)
 

typedef alp_status_t(* alp_exg_transport_deinit_func)()
 

typedef alp_status_t(* alp_exg_transport_dispatch_result_func)(AlpExgRequest iRequest, alp_status_t iHandlerErr)
 

typedef alp_status_t(* alp_exg_transport_event_notify_func)(int iTransportId, int iTransportEvent, void *iTransportEventData, size_t iTransportEventDataSize)
 

typedef alp_status_t(* alp_exg_transport_execute_request_func)(AlpExgRequest iRequest, GPollFD *iPollFd, int *iState)
 

typedef alp_status_t(* alp_exg_transport_init_func)(alp_exg_transport_event_notify_func iTransportEventNotifyFunc, int iTransportId)
 

typedef struct _AlpExgClientExecGSource AlpExgClientExecGSource
 

typedef struct _AlpExgClientExecuteData AlpExgClientExecuteData
 

typedef struct _AlpExgWaitExecuteResultMsg AlpExgWaitExecuteResultMsg
 


Function Documentation

alp_status_t alp_exg_transport_ask_params char **  oTransportParams  ) 
 

Builds a full transport string.

This function builds a full transport parameter string, using UI if necessary to ask for missing parameters.

Parameters:
[out] oTransportParams a pointer to a string that will be allocated by this function and returned. Caller must free it when done.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_transport_cancel int  iGuid  ) 
 

Cancel a request executing in the transport.

This function is only usefull for transports that get requests from the client side and directly execute or send them to a remote destination. Its purpose is to cancel the currently executing request.

Parameters:
[in] iGuid is a unique id that is contained in the request to be canceled.
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success
ALP_EXG_MGR_ERR_NO_SUCH_REQUEST_ERROR - transport is not currectly executing a request with tihs guid

alp_status_t alp_exg_transport_deinit  ) 
 

Uninitialize the transport.

This function runs in the context of the daemon. It is called right before closing the plug-in, and only if alp_exg_transport_init returned no error.

Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_transport_dispatch_result AlpExgRequest  iRequest,
alp_status_t  iHandlerErr
 

Receive the request dispatch result.

This function runs in the context of the daemon. It is called when the handler has completed execution and returned the result. The transport gets the handler result and may send the request back to the initiator.

Parameters:
[in] iRequest the request that must be transmitted
[in] iHandlerErr the result of the handler execution
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_transport_event_notify int  iTransportId,
int  iTransportEvent,
void *  iTransportEventData,
size_t  iTransportEventDataSize
 

Prototype of the daemon function to be called back when the transport has an event to notify.

Parameters:
[in] iTransportId our transport Id, given by daemon at init time
[in] iTransportEvent 
[in] iTransportEventData 
[in] iTransportEventDataSize the number of bytes passed in iTransportEventData
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_transport_execute_request AlpExgRequest  iRequest,
GPollFD *  iPollFd,
int *  iState
 

Transmit request to destination.

This function runs in the context of the request initiator

Parameters:
[in] iRequest the request that must be transmitted
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success

alp_status_t alp_exg_transport_init alp_exg_transport_event_notify_func  iTransportEventNotifyFunc,
int  iTransportId
 

Initialize the transport.

This function runs in the context of the daemon. It must install its event sources in the GTK event loop, in order to be called back as necessary. The function callback passed must be called when an incoming request has been formed and is ready to be dispatched, or an unrecoverable error occurs in the transport. If this function returns an error, alp_exg_transport_deinit WILL NOT be called.

Parameters:
[in] iRequestReadyFuncP daemon callback to dispatch an incoming request
[in] iTransportId transport Id assigned by daemon, to be passed back with incoming request
Returns:
ALP_EXGMGR_ERR_NO_ERROR - success


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