Back to index

lightning-sunbird  0.9+nobinonly
nsres.h
Go to the documentation of this file.
00001 #ifndef NSRES_H
00002 #define NSRES_H
00003 #include "mcom_db.h"
00004 
00005 __BEGIN_DECLS
00006 
00007 /* C version */
00008 #define NSRESHANDLE void *
00009 
00010 typedef void (*NSRESTHREADFUNC)(void *);
00011 
00012 typedef struct NSRESTHREADINFO
00013 {
00014        void *lock;
00015        NSRESTHREADFUNC fn_lock;
00016        NSRESTHREADFUNC fn_unlock;
00017 } NSRESTHREADINFO;
00018 
00019 #define MAXBUFNUM 10
00020 #define MAXSTRINGLEN 300
00021 
00022 #define NSRES_CREATE 1
00023 #define NSRES_OPEN 2
00024 
00025 
00026 
00027 NSRESHANDLE NSResCreateTable(const char *filename, NSRESTHREADINFO *threadinfo);
00028 NSRESHANDLE NSResOpenTable(const char *filename, NSRESTHREADINFO *threadinfo);
00029 void NSResCloseTable(NSRESHANDLE handle);
00030 
00031 char *NSResLoadString(NSRESHANDLE handle, const char * library, int32 id, 
00032        unsigned int charsetid, char *retbuf);
00033 int32 NSResGetSize(NSRESHANDLE handle, const char *library, int32 id);
00034 int32 NSResLoadResource(NSRESHANDLE handle, const char *library, int32 id, char *retbuf);
00035 int NSResAddString(NSRESHANDLE handle, const char *library, int32 id, const char *string, unsigned int charset);
00036 
00037 __END_DECLS
00038 
00039 
00040 #endif
00041