goad

Name

goad -- GNOME Object Activation Directory

Synopsis



const char* goad_server_activation_id       (void);
int         goad_server_register            (CORBA_Object name_server,
                                             CORBA_Object server,
                                             const char *name,
                                             const char *kind,
                                             CORBA_Environment *ev);
int         goad_server_unregister          (CORBA_Object name_server,
                                             const char *name,
                                             const char *kind,
                                             CORBA_Environment *ev);
enum        GoadServerType;
enum        GoadActivationFlags;
struct      GoadServer;
struct      GoadServerList;
GoadServerList* goad_server_list_get        (void);
void        goad_server_list_free           (GoadServerList *server_list);
CORBA_Object goad_server_activate           (GoadServer *sinfo,
                                             GoadActivationFlags flags,
                                             const char **params);
CORBA_Object goad_server_activate_with_repo_id
                                            (GoadServerList *server_list,
                                             const char *repo_id,
                                             GoadActivationFlags flags,
                                             const char **params);
CORBA_Object goad_server_activate_with_id   (GoadServerList *server_list,
                                             const char *server_id,
                                             GoadActivationFlags flags,
                                             const char **params);

Description

GOAD is the GNOME Object Activation Directory. It keeps track of the CORBA object implementations available on the system, and allows applications to activate these implementations or access currently running ones.

Details

goad_server_activation_id ()

const char* goad_server_activation_id       (void);

When an application that implements a GOAD-registered object is started, it should call this function to check if it was started to create one of those objects.


goad_server_register ()

int         goad_server_register            (CORBA_Object name_server,
                                             CORBA_Object server,
                                             const char *name,
                                             const char *kind,
                                             CORBA_Environment *ev);

Registers server in the name_server with name.


goad_server_unregister ()

int         goad_server_unregister          (CORBA_Object name_server,
                                             const char *name,
                                             const char *kind,
                                             CORBA_Environment *ev);

Removes the registration of server in the name_server.


enum GoadServerType

typedef enum {
	GOAD_SERVER_SHLIB = 1,
	GOAD_SERVER_EXE = 2,
	GOAD_SERVER_RELAY = 3,
	GOAD_SERVER_FACTORY = 4
} GoadServerType;


enum GoadActivationFlags

typedef enum {
	/* these two are mutually exclusive */
	GOAD_ACTIVATE_SHLIB = 1 << 0, 	/* prefer shlib activation */
	GOAD_ACTIVATE_REMOTE = 1 << 1, 	/* prefer remote activation */

	/* these two are mutually exclusive */
	GOAD_ACTIVATE_EXISTING_ONLY = 1 << 2, /* Only do lookup in name
					       * service for currently running
					       * version.
					       */
	GOAD_ACTIVATE_NEW_ONLY = 1 << 3,      /* No lookup in name service. */
	GOAD_ACTIVATE_ASYNC = 1 << 4 /* Just make sure that the object is running */
} GoadActivationFlags;


struct GoadServer

typedef struct {
	GoadServerType type;
        GoadActivationFlags flags; /* only GOAD_ACTIVATE_NEW_ONLY
				      currently parsed in */
	char     **repo_id;
	char     *server_id;
	char     *description;

        /*
	 * Executable/shlib path, relayer IOR, whatever.
	 * This field may disappear at any time. You have been warned ;-)
	 */
	char     *location_info;
} GoadServer;


struct GoadServerList

typedef struct {
  GoadServer *list;
  GHashTable *by_goad_id;
} GoadServerList;

'list' is an array of GoadServer structures. 'by_goad_id' is a hash table with the GOAD ID of each implementation as the key, and the GoadServer structure for that implementation as the value.


goad_server_list_get ()

GoadServerList* goad_server_list_get        (void);

Returns an array listing all the servers available for activation.


goad_server_list_free ()

void        goad_server_list_free           (GoadServerList *server_list);

Frees up all the memory associated with server_list (which should have been received from goad_server_list_get())

Side effects: Invalidates the memory pointed to by 'server_list'.


goad_server_activate ()

CORBA_Object goad_server_activate           (GoadServer *sinfo,
                                             GoadActivationFlags flags,
                                             const char **params);

Activates a CORBA server specified by 'sinfo', using the 'flags' hints on how to activate that server.


goad_server_activate_with_repo_id ()

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

Activates a CORBA server specified by 'repo_id', using the 'flags' hints on how to activate that server. Picks the first one on the list that meets criteria.

This is done by possibly making three passes through the list, the first pass checking for existing objects only, the second pass taking into account any activation method preferences, and the last pass just doing "best we can get" service.


goad_server_activate_with_id ()

CORBA_Object goad_server_activate_with_id   (GoadServerList *server_list,
                                             const char *server_id,
                                             GoadActivationFlags flags,
                                             const char **params);

Activates a CORBA server specified by 'repo_id', using the 'flags' hints on how to activate that server. Picks the first one on the list that matches.