#include "../gobj/container.h"
#include "../gobj/ids.h"
#include "../gobj/errors.h"
#include "../gobj/utils.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <dirent.h>
Compounds | |
| struct | Gj_Container_struct |
Defines | |
| #define | BASEDIR GJ_DATADIR "/containers/" |
| Base container directory. | |
| #define | DIRPREFIX "cid" |
| Directory prefix. | |
| #define | FILEPREFIX "obj" |
| Filename prefix. | |
| #define | FILESUFFIX ".bin" |
| Filename suffix. | |
| #define | MAXFILENAMELEN 20 |
| Max len of a filename. | |
Functions | |
| int | gj_container_touch (Gj_Ctx* ctx, char* name) |
| "Touch" a file via the stream function. More... | |
| Gj_Container* | Gj_container_new (Gj_Ctx* ctx, Gj_Id* id) |
| Create a new container. More... | |
| Gj_Container* | Gj_container_create (Gj_Ctx* ctx, Gj_Stream* stream) |
| Create a container from a stream. More... | |
| Gj_Container* | Gj_container_open (Gj_Ctx* ctx, Gj_Id* id, char* name) |
| Open the container specified by its id or its name. More... | |
| int | Gj_container_delete (Gj_Ctx* ctx, Gj_Container* container) |
| Delete the given container. More... | |
| int | Gj_container_destroy (Gj_Ctx* ctx, Gj_Container* container) |
| Destroy the given container PHYSICALLY. More... | |
| int | Gj_container_write (Gj_Ctx* ctx, Gj_Container* container, Gj_Stream* stream) |
| Write the given container to a stream. More... | |
| int | Gj_container_setName (Gj_Ctx* ctx, Gj_Container* container, char* name) |
| Set the name of the container. More... | |
| Gj_Id* | Gj_container_getId (Gj_Ctx* ctx, Gj_Container* container) |
| Get the id of the container. More... | |
| Gj_ContainerId | Gj_container_getNewId (Gj_Ctx* ctx, Gj_Container* container) |
| Get a new container id. More... | |
| int | Gj_container_releaseId (Gj_Ctx* ctx, Gj_Container* container, Gj_ContainerId id) |
| Release a container id and thus destroy the data linked with it. More... | |
| int | Gj_container_clear (Gj_Ctx* ctx, Gj_Container* container) |
| Clear the container (i.e. delete all data saved in it). More... | |
| Gj_Stream* | Gj_container_getStream (Gj_Ctx* ctx, Gj_Container* container, Gj_ContainerId id) |
| Ask for a stream to do I/O on a given container id. More... | |
| int | Gj_container_releaseStream (Gj_Ctx* ctx, Gj_Container* container, Gj_ContainerId id, Gj_Stream* stream) |
| Release a used stream. More... | |
|
|
"Touch" a file via the stream function.
For internal use only. |
|
|
Create a new container. If (id != 0)
|
|
|
Create a container from a stream.
|
|
|
Open the container specified by its id or its name.
|
|
|
Delete the given container. The container is NOT PHYSICALLY deleted.
|
|
|
Destroy the given container PHYSICALLY.
|
|
|
Write the given container to a stream.
|
|
|
Set the name of the container. The string is BEING DUPLICATED.
|
|
|
Get the id of the container. The id is STILL OWNED by the container. |
|
|
Get a new container id.
|
|
|
Release a container id and thus destroy the data linked with it.
|
|
|
Clear the container (i.e. delete all data saved in it).
|
|
|
Ask for a stream to do I/O on a given container id.
|
|
|
Release a used stream.
|
1.2.1 written by Dimitri van Heesch,
© 1997-2000