libnjb: /root/tmp/build-libnjb/libnjb-2.2.7/src/datafile.h Source File

libnjb 2.2.7

datafile.h
1 #ifndef __NJB__DATAFILE__H
2 #define __NJB__DATAFILE__H
3
4 njb_datafile_t *datafile_new (void);
5 u_int64_t datafile_size (njb_datafile_t *df);
6 void datafile_set_size (njb_datafile_t *df, u_int64_t size);
7 void datafile_set_time (njb_datafile_t *df, time_t ts);
8 int datafile_set_name (njb_datafile_t *df, const char *filename);
9 int datafile_set_folder (njb_datafile_t *df, const char *folder);
10 njb_datafile_t *datafile_unpack (unsigned char *data, size_t nbytes);
11 unsigned char *datafile_pack (njb_datafile_t *df, u_int32_t *size);
12 unsigned char *datafile_pack3 (njb_t *njb, njb_datafile_t *df, u_int32_t *size);
13 unsigned char *new_folder_pack3 (njb_t *njb, const char *name, u_int32_t *size);
14
15 #endif
datafile_new
njb_datafile_t * datafile_new(void)
Definition: datafile.c:29
libnjb.h
datafile_set_name
int datafile_set_name(njb_datafile_t *df, const char *filename)
Definition: datafile.c:118
NJB_UC_UTF8
#define NJB_UC_UTF8
Definition: libnjb.h:147
datafile_set_size
void datafile_set_size(njb_datafile_t *df, u_int64_t size)
Definition: datafile.c:89
njb_datafile_struct
Definition: libnjb.h:275
__sub_depth
int __sub_depth
Definition: base.c:62
from_64bit_to_njb1_bytes
void from_64bit_to_njb1_bytes(u_int64_t val, unsigned char *dp)
Definition: byteorder.c:52
njb_struct
Definition: libnjb.h:182
njb_datafile_struct::filesize
u_int64_t filesize
Definition: libnjb.h:325
from_16bit_to_njb1_bytes
void from_16bit_to_njb1_bytes(u_int16_t val, unsigned char *dp)
Definition: byteorder.c:183
njb_datafile_struct::timestamp
u_int32_t timestamp
Definition: libnjb.h:288
from_32bit_to_njb3_bytes
void from_32bit_to_njb3_bytes(u_int32_t val, unsigned char *dp)
Definition: byteorder.c:129
datafile_pack
unsigned char * datafile_pack(njb_datafile_t *df, u_int32_t *size)
Definition: datafile.c:238
datafile_size
u_int64_t datafile_size(njb_datafile_t *df)
Definition: datafile.c:71
NJB_DEVICE_NJB3
#define NJB_DEVICE_NJB3
Definition: libnjb.h:74
strtoutf8
char * strtoutf8(const unsigned char *str)
Definition: unicode.c:117
protocol3.h
EO_NOMEM
#define EO_NOMEM
Definition: njb_error.h:14
NJB_DEVICE_NJBZEN
#define NJB_DEVICE_NJBZEN
Definition: libnjb.h:75
strtoucs2
unsigned char * strtoucs2(const unsigned char *str)
Definition: unicode.c:255
NJB_Datafile_Destroy
void NJB_Datafile_Destroy(njb_datafile_t *df)
Definition: datafile.c:52
njb_datafile_struct::flags
u_int32_t flags
Definition: libnjb.h:290
ucs2strlen
int ucs2strlen(const unsigned char *unicstr)
Definition: unicode.c:50
njb1_bytes_to_64bit
u_int64_t njb1_bytes_to_64bit(unsigned char *dp)
Definition: byteorder.c:27
njb_datafile_struct::filename
char * filename
Definition: libnjb.h:276
njb_struct::device_type
int device_type
Definition: libnjb.h:189
NJB_FILEFLAGS_REGULAR_FILE
#define NJB_FILEFLAGS_REGULAR_FILE
Definition: libnjb.h:269
njb_datafile_struct::folder
char * folder
Definition: libnjb.h:281
datafile_unpack
njb_datafile_t * datafile_unpack(unsigned char *data, size_t nbytes)
Definition: datafile.c:164
datafile_set_folder
int datafile_set_folder(njb_datafile_t *df, const char *folder)
Definition: datafile.c:142
utf8tostr
char * utf8tostr(const unsigned char *str)
Definition: unicode.c:147
from_16bit_to_njb3_bytes
void from_16bit_to_njb3_bytes(u_int16_t val, unsigned char *dp)
Definition: byteorder.c:198
njb1_bytes_to_16bit
u_int16_t njb1_bytes_to_16bit(unsigned char *dp)
Definition: byteorder.c:146
datafile_pack3
unsigned char * datafile_pack3(njb_t *njb, njb_datafile_t *df, u_int32_t *size)
Definition: datafile.c:321
new_folder_pack3
unsigned char * new_folder_pack3(njb_t *njb, const char *name, u_int32_t *size)
Definition: datafile.c:426
datafile_set_time
void datafile_set_time(njb_datafile_t *df, time_t ts)
Definition: datafile.c:103