enum AfDalState
 

AfDal request layer status codes.

The enumerator AfDalState represents all posible error codes which may be returned by an afdal_request petition.

Here is an example on how to use AfDal error codes but using provided macros to check its values:

    AfDalData * request_data = afdal_af_test_get_item_list  ();
    AfDalList * item_list    = NULL;

    if (!AFDAL_IS_OK (request_data) {
         g_print ("unable to get item list, error was: %s\n", 
                   AFDAL_RESPONSE (request_data));
         afdal_data_free (request_data);
         return;
    }
    g_print ("Request completed, message was: %s\n", 
              AFDAL_RESPONSE (request_data));

    // get a reference to the item list
    item_list = request_data->data;

    // free resources no longer needed without freeing data
    // list.  
    afdal_data_free (request_data, FALSE);

    // do some stuff with requested data.
Enumerator:
AFDAL_ERROR  An error have happened while request data.

This status code indicates that the service request wasn't unable to be completed. Message status should be checked in order to know the concret error.

AFDAL_OK  The request have been successfully completed.

Only the data returned by service request should be used when error code is AFDAL_OK.

AFDAL_UPDATE_SERVICES_NEEDED  An update services is requested.

This error code is no longer handler by af-arch server nodes and never is received by af-arch client nodes.

When a server starts on first time, it notify central server which services it exports. This is done to enable central permission access control done from af-kernel central server.

It can also happen central server removes all references, permission and location for a given server. On next startup, the server will be required to register again its services.

However, this registration is done automatically so, Af-Arch server node programmer never gets this errror.

AFDAL_SESSION_EXPIRED  Error code returned when Af-Key used to request the service is expired.

Again, this error code is never handled by user space code. This error code is automacally handled by Af-Arch layers.

AFDAL_REQUEST_TIMEOUT  A timeout have occur while requesting a service execution.

This error code is mainl used while using synchronous service invocation interface. Because this type of programming makes request to be blocking, a timeout mechanism is launched to avoid infinite loops.

See this module to know more about timeouts and synchronous requests.