void afgs_main_run_server gchar *  server_name,
gchar *  server_description,
gint  server_version,
glong  server_compilation_date,
gint *  argc,
gchar **  argv[],
gchar *  config_file,
gchar *  accepted_keys[],
AfgsServicesProvided  services_provided[],
gint  services_version,
AfgsMainCallback  check_function
 

Creates a new Af-Arch server using the given parameters.

Starts a new AF server with given parameters. This function is actually not used by Af-Arch programmers because Af-Gen tool creates Af-Arch servers already using this function.

However, here is an example on how to create an Af-Arch:

 gint main (gint argc, gchar * argv[])
 {

  gchar *accepted_keys[] = { NULL };


  #ifdef ENABLE_NLS
    bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
    bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
    textdomain (GETTEXT_PACKAGE);
  #endif

  afgs_log_check_and_disable_glog ();

  // COMPILATION_DATE and VERSION variables are set from 
  // makefiles using -D option for gcc
  afgs_main_run_server ("af-kernel",
                        "af-kernel server",
                        VERSION,
                        COMPILATION_DATE,
                        &argc, &argv,
                        g_build_filename (SYSCONFDIR, "af-arch",
                                            "af-kernel.cfg", NULL),
                        accepted_keys, services_provided,
                        AF_KERNEL_SERVICES_VERSION,
                        __af_kernel_startup_check);

   return 0;
 }

Parameters:
server_name Name of the server to be launched.
server_description Description of the server to be launched.
server_version Server version for the current instance.
server_compilation_date An optional time to notify when the current server have been compiled
argc Pointer to argc (por parsing and modifying argc).
argv Pointer to argv (por parsing and modifying argv).
config_file File where server must read. Provided value for this parameter should be dinamically allocated so, the function could deallocate the value. This resolves possible problems generated due to having statically or dinamically allocated values that are passed as path values.
accepted_keys Array of keys accepted for the config file.
services_provided Array of services provided by this server.
services_version Overall services version. Currently this value is not used. It is expected in the near future to implement a validation mechanism to give client STUB connectors the hability to notify which services version is expected to be found.
check_function Function this function will execute after initializing database and configuration files.