Main Page   Compound List   File List   Compound Members   File Members  

lib/gobj/context.h File Reference

Context structure. More...

#include <gobjconfig.h>
#include <gobj/types.h>
#include <gobj/decls.h>
#include <gobj/system.h>
#include <gobj/persona.h>
#include <gobj/session.h>
#include <gobj/threads.h>

Go to the source code of this file.

Compounds

struct  Gj_Ctx_struct

Typedefs

typedef struct gj_CtxChild_struct gj_CtxChild
 Context child typedef.

typedef int Gj_CtxForkEntry (Gj_Ctx* ctx, void* data)
 Fork function entry typedef.


Functions

Gj_CtxGj_ctx_new (Gj_Ctx* ctx)
 Create a new context. More...

Gj_CtxGj_ctx_createInitial ()
 Create an initial context. More...

int Gj_ctx_delete (Gj_Ctx* ctx)
 Delete a context structure. More...

int gj_ctx_deleteWithoutUnreg (Gj_Ctx* ctx)
 Delete a context structure without deleting it from the parent's list. More...

int Gj_ctx_deleteChildren (Gj_Ctx* ctx)
 Delete the children of a context. More...

Gj_CtxGj_ctx_flatCopy (Gj_Ctx* ctx)
 Make a flat copy of a context.

Gj_CtxGj_ctx_fork (Gj_Ctx* ctx)
 Fork the given context.

int Gj_ctx_forkThreaded (Gj_Ctx* ctx, Gj_CtxForkEntry* entry, void* data)
 Fork the given context. More...

Gj_Bool Gj_ctx_isInit (Gj_Ctx* ctx)
 Check if the context is completely initialized.


Detailed Description

Context structure.


Function Documentation

Gj_Ctx * Gj_ctx_new ( Gj_Ctx * ctx )
 

Create a new context.

A new errormgr is created. System, persona and session are left blank.

Returns:
The pointer to the new context on success, 0 otherwise.

Gj_Ctx * Gj_ctx_createInitial ( )
 

Create an initial context.

An initial errormgr is created.

Returns:
The pointer to the new context on success, 0 otherwise.

int Gj_ctx_delete ( Gj_Ctx * ctx )
 

Delete a context structure.

System, persona and session are only being deleted if the context owns them.

Returns:
0 on success, -1 otherwise.

int gj_ctx_deleteWithoutUnreg ( Gj_Ctx * ctx )
 

Delete a context structure without deleting it from the parent's list.

System, persona and session are only being deleted if the context owns them.

Returns:
0 on success, -1 otherwise.

For internal use only.

int Gj_ctx_deleteChildren ( Gj_Ctx * ctx )
 

Delete the children of a context.

If a child context has an own thread, try first to shutdown the processing routine of that thread, then kill the thread.

Works the same way any other _delete routine works.

Returns:
0 on success, -1 otherwise.

int Gj_ctx_forkThreaded ( Gj_Ctx * ctx,
Gj_CtxForkEntry * entry,
void * data )
 

Fork the given context.

The new context runs in a own thread, i.e. entry is called with the new context and the data a parameters.

Returns:
0 on success, -1 otherwise.


Generated at Fri Aug 17 18:28:56 2001 for Gobj by doxygen1.2.1 written by Dimitri van Heesch, © 1997-2000