sc68 resources access. More...
#include "file68/istream68.h"
Go to the source code of this file.
Typedefs | |
typedef istream_t *(* | SC68rsc_handler_t )(SC68rsc_t, const char *, int) |
Resource handle function type. | |
Enumerations | |
enum | SC68rsc_t { SC68rsc_replay, SC68rsc_config, SC68rsc_sample, SC68rsc_dll } |
SC68 resource file type. More... | |
Functions | |
const char * | SC68rsc_set_share (const char *path) |
Set shared resource path. | |
const char * | SC68rsc_set_user (const char *path) |
Set user resource path. | |
void | SC68rsc_get_path (const char **share, const char **user) |
Get resource pathes. | |
SC68rsc_handler_t | SC68rsc_set_handler (SC68rsc_handler_t fct) |
Set/Get resource handler. | |
istream_t * | SC68rsc_open (SC68rsc_t type, const char *name, int mode) |
Open a resource in given mode. |
sc68 resources access.
typedef istream_t*(* SC68rsc_handler_t)(SC68rsc_t, const char *, int) |
Resource handle function type.
enum SC68rsc_t |
const char* SC68rsc_set_share | ( | const char * | path | ) |
Set shared resource path.
The SC68rsc_set_share() function set the shared resource path. The path will be duplicate by SC68strdup(). If path is null the current path is freed.
path | New shared resource path (0 for free). |
0 | error (except for freeing) |
const char* SC68rsc_set_user | ( | const char * | path | ) |
Set user resource path.
The SC68rsc_set_user() function set the user resource path. The path will be duplicate by SC68strdup(). If path is null the current path is freed.
path | New user resource path (0 for free). |
0 | error (except for freeing) |
SC68rsc_handler_t SC68rsc_set_handler | ( | SC68rsc_handler_t | fct | ) |
Set/Get resource handler.
The SC68rsc_set_handler() function set the current resource handler. If 0 is given as fct parameter the function does not set the handler. In all case the function returns the current handler. See below for more information about the default resource handler.
fct | New resource handler (0 for reading current value). |
Open a resource in given mode.
The function SC68rsc_open() function opens an istream_t to access a resource.
type | Type of resource to open. | |
name | Name of resource. | |
mode | 1:read-access, 2:write-access. |
0 | error. |