GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSD / V0-4-5 > qsu / rhel4-32
#include <string.h>
#include <stdlib.h>
Classes | |
struct | _QFR_fileCfgStems |
Holds onto the production, development and user file stems. More... | |
struct | _QFR_fileCfg |
The configuration parameters for the file resolution facility. More... | |
Typedefs | |
typedef struct _QFR_fileCtx | QFR_fileCtx |
typedef enum _QFR_fileRoot | QFR_fileRoot |
Typedef for enum _QFR_fileRoot. | |
typedef struct _QFR_fileCfgStems | QFR_fileCfgStems |
Typedef for struct _QFR_fileCfgStems. | |
typedef struct _QFR_fileCfg | QFR_fileCfg |
Typedef for struct _QFR_fileCfg. | |
typedef int(* | QFR_resolver )(QFR_fileCtx *ctx, unsigned int key, const char *dirName, const char *fileName, char *name, unsigned int nameLen) |
Function signature to resolve a file key. | |
Enumerations | |
enum | _QFR_fileRoot { QFR_FILEROOT_K_NONE = -1, QFR_FILEROOT_K_FMX = 0, QFR_FILEROOT_K_PROD = 1, QFR_FILEROOT_K_DEV = 2, QFR_FILEROOT_K_TEST = 3 } |
Enumeration of the file root. More... | |
Functions | |
int | QFR_fileCtxSizeof (const QFR_fileCfg *cfg) |
Returns the size in bytes need to hold the file resolution context. | |
void * | QFR_fileCtxConstruct (QFR_fileCtx *ctx, const QFR_fileCfg *cfg) |
Constructs the file resolution translation context. | |
int | QFR_fileResolve (QFR_fileCtx *ctx, unsigned int key, const char *dirName, const char *fileName, char *name, unsigned int nameLen) |
int | QFR_cdmResolve (QFR_fileCtx *ctx, unsigned int key, const char *dirName, const char *fileName, char *name, unsigned int nameLen) |
Resolves a CDM file key. | |
int | QFR_fofResolve (QFR_fileCtx *ctx, unsigned int key, const char *dirName, const char *fileName, char *name, unsigned int nameLen) |
Resolves a FOF (file of file) file key. | |
int | QFR_sbsResolve (QFR_fileCtx *ctx, unsigned int key, const char *dirName, const char *fileName, char *name, unsigned int nameLen) |
Resolves a SBS (secondary boot script) file key. | |
int | QFR_latcResolve (QFR_fileCtx *ctx, unsigned int key, const char *dirName, const char *fileName, char *name, unsigned int nameLen) |
Resolves a LATc file key. | |
const char * | QFR_rootGet (const QFR_fileCtx *ctx, QFR_fileRoot which) |
Returns the requested root. | |
int | QFR_compose (const QFR_fileCtx *ctx, char *name, int namelen, QFR_fileRoot which, const char *nam, const char *prj, const char *pkg, const char *ver, const char *cons) |
CVS $Id: QFR_file.h,v 1.1.1.1 2008/04/02 01:05:53 russell Exp $
Typedef for struct _QFR_fileCfg.
int(* QFR_resolver)(QFR_fileCtx *ctx, unsigned int key, const char *dirName, const char *fileName, char *name, unsigned int nameLen) |
Function signature to resolve a file key.
ctx | The QFR context handle | |
key | The LFR file key | |
dirName | The directory root, used if and only if the key is a CMX-style key. | |
fileName | The file name, used if and only if the key is a CMX-style key. | |
name | Buffer to receive the fully resolved file name | |
nameLen | The size of the name buffer |
enum _QFR_fileRoot |
int QFR_cdmResolve | ( | QFR_fileCtx * | ctx, | |
unsigned int | key, | |||
const char * | dirName, | |||
const char * | fileName, | |||
char * | name, | |||
unsigned int | nameLen | |||
) |
Resolves a CDM file key.
ctx | The QFR context handle | |
key | The LFR file key | |
dirName | The directory root, used if and only if the key is a CMX-style key. | |
fileName | The file name, used if and only if the key is a CMX-style key. | |
name | Buffer to receive the fully resolved file name | |
nameLen | The size of the name buffer |
References connect(), and _QFR_fileCtx::fmx.
void* QFR_fileCtxConstruct | ( | QFR_fileCtx * | ctx, | |
const QFR_fileCfg * | cfg | |||
) |
Constructs the file resolution translation context.
ctx | The context to construct | |
cfg | The configuration |
References _QFR_fileCfg::facilities, _QFR_fileCtx::fmx, _QFR_fileRoots::len, _QFR_fileRoots::nam, _QFR_fileCfgStems::prd, QFR_FILEROOT_K_FMX, QFR_FILEROOT_K_PROD, QFR_FILEROOT_K_TEST, _QFR_fileCtx::roots, _QFR_fileCfg::stems, Suffixes, and translatem().
int QFR_fileCtxSizeof | ( | const QFR_fileCfg * | cfg | ) |
Returns the size in bytes need to hold the file resolution context.
cfg | The file resolution configuration |
References _QFR_fileCfgStems::dev, _QFR_fileCfg::facilities, _QFR_fileCfgStems::prd, size(), sizem(), _QFR_fileCfg::stems, Suffixes, and _QFR_fileCfgStems::tst.
int QFR_fofResolve | ( | QFR_fileCtx * | ctx, | |
unsigned int | key, | |||
const char * | dirName, | |||
const char * | fileName, | |||
char * | name, | |||
unsigned int | nameLen | |||
) |
Resolves a FOF (file of file) file key.
ctx | The QFR context handle | |
key | The LFR file key | |
dirName | The directory root, used if and only if the key is a CMX-style key. | |
fileName | The file name, used if and only if the key is a CMX-style key. | |
name | Buffer to receive the fully resolved file name | |
nameLen | The size of the name buffer |
int QFR_latcResolve | ( | QFR_fileCtx * | ctx, | |
unsigned int | key, | |||
const char * | dirName, | |||
const char * | fileName, | |||
char * | name, | |||
unsigned int | nameLen | |||
) |
Resolves a LATc file key.
ctx | The QFR context handle | |
key | The LFR file key | |
dirName | The directory root, used if and only if the key is a CMX-style key. | |
fileName | The file name, used if and only if the key is a CMX-style key. | |
name | Buffer to receive the fully resolved file name | |
nameLen | The size of the name buffer |
const char* QFR_rootGet | ( | const QFR_fileCtx * | ctx, | |
QFR_fileRoot | which | |||
) |
Returns the requested root.
ctx | The file resolution context | |
which | Which root |
References _QFR_fileRoots::nam, QFR_FILEROOT_K_TEST, and _QFR_fileCtx::roots.
int QFR_sbsResolve | ( | QFR_fileCtx * | ctx, | |
unsigned int | key, | |||
const char * | dirName, | |||
const char * | fileName, | |||
char * | name, | |||
unsigned int | nameLen | |||
) |
Resolves a SBS (secondary boot script) file key.
ctx | The QFR context handle | |
key | The LFR file key | |
dirName | The directory root, used if and only if the key is a CMX-style key. | |
fileName | The file name, used if and only if the key is a CMX-style key. | |
name | Buffer to receive the fully resolved file name | |
nameLen | The size of the name buffer |