sw_salt

OVERVIEW

An sw_salt structure contains configuration parameters for a Howl function.


FUNCTION

sw_salt_init

SYNOPSIS

sw_result
sw_salt_init(
   sw_salt    *self,
   sw_context  context,
   int         argc,
   char      **argv)

DESCRIPTION

Creates an sw_salt structure. self is allocated by the user and filled in by Howl.

@@scott: anything to say about command-line parameters?

EXAMPLE

void run_rendezvous_in_gui(int argc, char **argv) {
   sw_result result;
   sw_salt salt;
   sw_salt_init(&salt, SW_CONTEXT_GUI, argc, argv);
   sw_rendezvous session;
   result = sw_rendezvous_init_with_salt(&session, salt);
   if (result == SW_OKAY) {
      . . .
   }
   sw_salt_fina(salt);
}

SEE ALSO

sw_context, sw_rendezvous_init_with_salt


FUNCTION

sw_salt_fina

SYNOPSIS

sw_result
sw_salt_fina(sw_salt self);

DESCRIPTION

Deallocates all resources, such as memory, associated with a sw_salt structure. Once sw_salt_fina has been called, the memory occupied by self may safely be freed.


ENUM

sw_context

SYNOPSIS

typedef enum
{
   SW_CONTEXT_CONSOLE,
   SW_CONTEXT_GUI
} sw_context;

DESCRIPTION

Possible values for the salt for sw_rendezvous_init_with_salt, indicating how the Rendezvous session should plug into the GUI event loop, if there is one.

SW_CONTEXT_CONSOLE: No event loop. sw_rendezvous_run must be called to yield the CPU to Howl. Rendezvous code must run in a separate thread from the GUI thread, if there is one.

SW_CONTEXT_GUI: Howl incorporates itself into the GUI event loop. There is no need to call sw_rendezvous_run.

SEE ALSO

sw_salt_init, sw_rendezvous_run, sw_rendezvous_init_with_salt