gpointer afdal_request_close_and_return_initial_data AfDalRequestReturnData  type,
VortexChannel channel,
VortexFrame frame,
CoyoteDataSet **  returned_dataset,
GList **  returned_datasets,
gpointer *  custom_data
 

Support function for LibAfDal layer level, helping to terminate asynchronous service invocation.

Convenience function meant to be used to write process request functions more quickly and maintainable.

Process request function are those used to translate data received from remote side, as response to service invocation, into data structures with type defined. All data received from remote nodes are allways string value which have to be translated into the correct type representation. Some of the supported basic types are: boolean, int, decimal, string, datasets.

This function trusts in incoming message to be process as type variable says, so if type is set to AFDAL_REQUEST_DATA, function will expect to find a CoyoteDataSet from coyote level and will return a AfDalData pointer to the caller.

This function also free the actual afdal request made.

If type is AFDAL_REQUEST_DATA then returned_dataset is filled up with the CoyoteDataSet returned from coyote layer after parsing data.

If type is AFDAL_REQUEST_MULTI_DATA then returned_datasets (attention to the final s) is filled up with a GList of CoyoteDataSet returned from coyote layer after parsing data.

Actually this function is not needed to be used by Af-Arch programmer until it is needed to extend actual service invocation to add more supported types.

You can check actual implementation of afdal_request_process_simple_data to understand more about how responses are processed and translated into data structure so upper levels over AfDal layer manages data structures rather than plain strings.

Parameters:
type Type of afdal user space data, for example, AFDAL_REQUEST_DATA, AFDAL_REQUEST_SIMPLE_DATA, AFDAL_REQUEST_NUL_DATA.
channel Channel where frame was recieved.
frame Received frame.
returned_dataset Recieved dataset from CoyoteXML level. This variable is set to the received dataset when type is set to AFDAL_REQUEST_DATA.
returned_datasets Received set of dataset from CoyoteXML level. This is variable is set to the received set of dataset when type is AFDAL_REQUEST_MULTI_DATA.
custom_data Internal pointer used by the afdal layer.
Returns:
Return an pointer which may point to any of the following types: AfDalData, AfDalSimpleData, AfDalNulData, AfDalMultiData according to type value.