#define AFGS_DATABASE_ACCESS_SEMANTIC   "database access semantic"
 

Definition to get compile safe access to database access semantic setting.

Allowed values for this setting can be:

Using the AfGsConfig module in a proper way:

Previous values are just a way to keep control source code written using this setting. You could go directly and write something like:

     // works but no compile protection
     gchar * value = afgs_config_get_ref (NULL, "database access semantic");
 
     // works but no compile protection
     if (!g_strcasecmp ("permanent", value)) {
          // we have a permanent connection semantic 
     }

Previous code writes raw access to config keys and posible values used on Af-Arch servers. To prevent you falling into writing the config or the value to check in a wrong way, causing you to get wrong behaviours macros are provided.

Using macros to access defined config values will allow you to write source code that is ensured to work once compiled.

Let's see how to perform previous task using the right way (TM):

     // works but no compile protection
     gchar * value = afgs_config_get_ref (NULL, AFGS_DATABASE_ACCESS_SEMANTIC);
 
     // works but no compile protection
     if (!g_strcasecmp (AFGS_DATABASE_ACCESS_SEMANTIC_PERMANENT, value)) {
          // we have a permanent connection semantic 
     }

Previous example have no way to be written wrong because you are using a macro value which the compiler will require to be written properly.