cqdb.h File Reference


Detailed Description


Typedefs

typedef tag_cqdb_writer cqdb_writer_t
 Typedef of a CQDB writer.
typedef tag_cqdb cqdb_t
 Typedef of a CQDB reader.

Enumerations

enum  { CQDB_NONE = 0, CQDB_ONEWAY = 0x00000001, CQDB_ERROR_OCCURRED = 0x00010000 }
 CQDB flags. More...
enum  {
  CQDB_SUCCESS = 0, CQDB_ERROR = -1024, CQDB_ERROR_NOTFOUND, CQDB_ERROR_OUTOFMEMORY,
  CQDB_ERROR_FILEWRITE, CQDB_ERROR_FILETELL, CQDB_ERROR_FILESEEK, CQDB_ERROR_INVALIDID
}
 CQDB status codes. More...

Functions

cqdb_writer_tcqdb_writer (FILE *fp, int flag)
 Create a new CQDB writer on a seekable stream.
int cqdb_writer_put (cqdb_writer_t *dbw, const char *str, int id)
 Put a string/identifier association to the database.
int cqdb_writer_close (cqdb_writer_t *dbw)
 Close a CQDB writer.
cqdb_tcqdb_reader (void *buffer, size_t size)
 Open a new CQDB reader on a memory block.
void cqdb_delete (cqdb_t *db)
 Delete the CQDB reader.
int cqdb_to_id (cqdb_t *db, const char *str)
 Retrieve the identifier associated with a string.
const char * cqdb_to_string (cqdb_t *db, int id)
 Retrieve the string associated with an identifier.
int cqdb_num (cqdb_t *db)
 Get the number of associations in the database.


Copyright (c) 2002-2007 by Naoaki Okazaki
Sat Dec 1 18:09:34 2007