Main Page | Modules | Data Structures | File List | Data Fields | Globals

Data Management System (DMS)
[File and data management]

Load, save data, and get icons from files. More...


Files

file  dms2.c
 DMS core file (provided into kernel).

Functions

PSubCodec GetSubCodecFile (l_text File, l_ulong TypeId)
 Found the sub-codec for the specified file and data type.
PSubCodec GetDefaultSubCodec (l_ulong TypeId)
 Get default sub-codec for specified data type.
l_bool SaveData2 (l_text File, void *Data, l_ulong TypeId)
 Saves specified data to a file.
void * LoadDataEx (l_text File, l_ulong TypeId, l_ulong CodecId, l_ulong *ExtraLoad, PErrorHandler h)
 Loads data from a file as spefied type usign the specified codec.
void * LoadData2 (l_text File, l_ulong TypeId)
 Loads data from a file as specified type.
void FreeData2 (l_ulong TypeId, void *Data)
 Frees specified data, characterized by its type.
void * DuplicateData2 (l_ulong TypeId, void *Data)
 Ducplicates specified data, characterized by its type.

Detailed Description

Load, save data, and get icons from files.

Duplicates and free data.


Function Documentation

void* DuplicateData2 l_ulong  TypeId,
void *  Data
 

Ducplicates specified data, characterized by its type.

Parameters:
TypeId Data type identifier
Data Pointer to data to duplicate
Returns:
On sucess, pointer to duplicated data, or NULL on error (not enough memory most of times)

void FreeData2 l_ulong  TypeId,
void *  Data
 

Frees specified data, characterized by its type.

Parameters:
TypeId Data type identifier
Data Pointer to data to free

PSubCodec GetDefaultSubCodec l_ulong  TypeId  ) 
 

Get default sub-codec for specified data type.

Parameters:
TypeId Type
Returns:
Pointer to sub-codec, or NULL if none installed

PSubCodec GetSubCodecFile l_text  File,
l_ulong  TypeId
 

Found the sub-codec for the specified file and data type.

Determines the codec using the file extention.

Parameters:
File File path
TypeId Data type identifier
Returns:
Pointer to sub-codec, or null if not none corresponding

void* LoadData2 l_text  File,
l_ulong  TypeId
 

Loads data from a file as specified type.

Parameters:
File Path to the file to load
TypeId Identifier of data type to return
Returns:
On sucess returns pointer to data, else return NULL if sytem was unable to load file as the specified data type (no codec or data type not avaible for this codec or file error)
Note:
Don't forget to free data : you can use FreeData2(TypeId, Data); You can load an item form a ressource susing this syntax : "/path/to/file.res#item"; ex: "/system/xlib/cons.dl#ICON32"
See also:
LoadDataEx

SaveData2

void* LoadDataEx l_text  File,
l_ulong  TypeId,
l_ulong  CodecId,
l_ulong *  ExtraLoad,
PErrorHandler  h
 

Loads data from a file as spefied type usign the specified codec.

Parameters:
File Path to the file
TypeId Type of data to return
CodecId Identifier of codec to use (if 0 autodetect codec)
ExtraLoad Pointer to extra load options of codec (if NULL autofill values)
h Error handler to get information on eventual error
Returns:
On sucess returns pointer to data, else return NULL if sytem was unable to load file as the specified data type (no codec or data type not avaible for this codec or file error)
See also:
LoadData2

SaveData2

Note:
This function doesn't support ressources adressing.

l_bool SaveData2 l_text  File,
void *  Data,
l_ulong  TypeId
 

Saves specified data to a file.

Parameters:
File Path to the file
Data Data to write
TypeId Type of data
Returns:
true on sucess, else returns false (no codec, or codec can't write, or file error)
Note:
use SaveDataEx for advanced options Similar to SaveDataEx(File,Data,TypeId,0,NULL);
See also:
SaveDataEx

LoadData2

Note:
This function doesn't support ressources adressing.


Generated on Fri Oct 29 14:32:53 2004 for oZone GUI by doxygen 1.3.8