FrameBufferHandler ImageFilterHandler Classes Table of Contents

Global

typedef struct st_GlobalService {
   const char *id;
   void       *data;
} GlobalService;
The server class given by the name "Global" is special in that it allows multiple plug-in servers to share common data or routines. In fact, the members of the Gobal class are extensions to the set of ID strings that can be passed to the "global" function.

When a server calls the global function with an ID string, the host can service the request itself or has the option of pass unrecognized ID's to Global class servers of the same name. For example, if the ID is "Mambo Functions," the host may recognize this itself and return a pointer value. If it does not recognize it, it may attempt to activate a server of class "Global" with name "Mambo Functions." If such a server exists, it may be locked or unlocked, depending on the use type of the global request, and it will be called to get the value of the global pointer for the orignal requester.

The activation function of a Global server is called with a GlobalService structure which will be initialized with the ID string for the request. The server must fill in the data pointer with a value which will be returned to the client, which may be null if the server wishes to deny the request. The string is passed as data so that the same activation function may be used for multiple servers.