LibGnorba Documentation

GOAD (Gnome Object Activation Directory)

Author(s)

Elliot Lee <sopwith@redhat.com>

Description

A set of routines for getting a listing of available CORBA object servers, and connecting to new or existing servers using specified parameters.

goad_server_list_get - get a listing of objects which we know how to bootstrap

GoadServer *goad_server_list_get(void);

Description

This function returns an array of GoadServer structures that list the objects that a program can use.

Usage

GoadServer *servlist = goad_server_list_get();
/* use servlist */
goad_server_list_free(servlist);

goad_server_activate - get a specified server

CORBA_Object goad_server_activate(GoadServer *sinfo, GoadActivationFlags flags);

Description

When passed the address of a GoadServer structure (one retrieved from goad_server_list_get), this function will try to either connect to an existing server for the object, or start a new one up.

Usage

GoadServer *servlist, *chosen = NULL;
CORBA_Object dothings;
int i;
servlist = goad_server_list_get();
for(i = 0; servlist[i].repo_id; i++) {
    if(!strcmp(servlist[i].id, "gnumeric")) {
	    chosen = &servlist[i];
	    break;
    }
}
dothings = goad_server_activate(chosen, GOAD_ACTIVATE_SHLIB|GOAD_NO_NS_REGISTER);

Parameters

  • GoadServer *sinfo

    A structure holding information on the server to be started.

  • GoadActivationFlags flags

    Flags indicating how the application wishes to have the server started. Possible values (ANDed together) include:

    • GOAD_ACTIVATE_SHLIB

      If a new server needs to be created, the application would prefer that it be loaded from a shared library into the application's address space.

    • GOAD_ACTIVATE_REMOTE

      If a new server needs to be created, the application would prefer that it be started by running a separate program.

    • GOAD_ACTIVATE_EXISTING_ONLY

      Do not start a new server for the specified activation - only check if an existing one is running.

    • GOAD_ACTIVATE_NEW_ONLY

      Do not check if an existing server is running for the specified activation - only start a new one.

    • GOAD_ACTIVATE_NO_NS_REGISTER

      Do not register the newly started server with the naming service (only valid if the server happens to be activated as a shared library).

goad_server_activate_with_repo_id - get a server that offers a specified interface.

CORBA_Object goad_server_activate_with_repo_id(GoadServer *server_list, const char *repo_id, GoadActivationFlags flags);

Description

When passed the repository ID of an object, this function will try to either connect to an existing server for an object offering that interface, or start a new one up.

Usage

CORBA_Object dothings;
dothings = goad_server_activate_with_repo_id(NULL, "IDL:GNOME/HelpBrowser", 0);

Parameters

  • GoadServer *server_list

    A server listing previously obtained from goad_server_list_get(), or NULL. If NULL is passed, a server list will be obtained, used, and freed inside the routine.

  • const char *repo_id

    The repository ID of the interface that a returned object should have. This currently must be the specific interface. In the future the Interface Repository may be used to find servers with interfaces that inherit from the specified interface - caveat user.

  • GoadActivationFlags flags

    See the parameter documentation for goad_server_activate