| GSF Reference Manual |
|---|
utils —
void gsf_init (void); void gsf_shutdown (void); extern int libgsf_major_version; extern int libgsf_minor_version; extern int libgsf_micro_version; #define GSF_CLASS (name, prefix, class_init, instance_init, parent) #define GSF_CLASS_FULL (name, prefix, class_init, instance_init, parent_type, \ abstract, interface_decl) #define GSF_CLASS_ABSTRACT (name, prefix, class_init, instance_init, parent) #define GSF_DYNAMIC_CLASS (name, prefix, class_init, instance_init, parent, plugin, type) #define GSF_DYNAMIC_CLASS_FULL (name, prefix, class_init, instance_init, parent_type, \ abstract, interface_decl, plugin, type) #define GSF_DYNAMIC_CLASS_ABSTRACT (name, prefix, class_init, instance_init, parent, plugin, type) #define GSF_INTERFACE (init_func, iface_type) #define GSF_INTERFACE_FULL (type, init_func, iface_type) void gsf_mem_dump (guint8 const *ptr, size_t len); void gsf_input_dump (GsfInput *input, gboolean dump_as_hex); #define GSF_OFF_T_FORMAT typedef gsf_off_t; char* gsf_filename_to_utf8 (const char *filename, gboolean quoted); void gsf_iconv_close (GIConv handle); guint8* gsf_base64_encode_simple (guint8 const *data, size_t len); size_t gsf_base64_encode_close (guint8 const *in, size_t inlen, gboolean break_lines, guint8 *out, int *state, unsigned int *save); size_t gsf_base64_encode_step (guint8 const *in, size_t len, gboolean break_lines, guint8 *out, int *state, unsigned int *save); size_t gsf_base64_decode_simple (guint8 *data, size_t len); size_t gsf_base64_decode_step (guint8 const *in, size_t len, guint8 *out, int *state, unsigned *save); #define GSF_LE_GET_GINT8 (p) #define GSF_LE_GET_GUINT64 (p) #define GSF_LE_GET_GINT16 (p) #define GSF_LE_GET_GUINT8 (p) #define GSF_LE_GET_GINT32 (p) #define GSF_LE_GET_GUINT16 (p) #define GSF_LE_GET_GUINT32 (p) #define GSF_LE_GET_FLOAT (p) #define GSF_LE_GET_DOUBLE (p) guint64 gsf_le_get_guint64 (void const *p); float gsf_le_get_float (void const *p); double gsf_le_get_double (void const *p); #define GSF_LE_SET_GUINT8 (p, dat) #define GSF_LE_SET_GUINT16 (p, dat) #define GSF_LE_SET_GUINT32 (p, dat) #define GSF_LE_SET_GINT8 (p,dat) #define GSF_LE_SET_GINT16 (p,dat) #define GSF_LE_SET_GINT32 (p,dat) #define GSF_LE_SET_FLOAT (p,dat) #define GSF_LE_SET_DOUBLE (p,dat) void gsf_le_set_float (void *p, float f); void gsf_le_set_double (void *p, double d); GsfTimestamp* gsf_timestamp_copy (GsfTimestamp const *stamp); void gsf_timestamp_free (GsfTimestamp *stamp); GsfTimestamp* gsf_timestamp_new_now (void); GType gsf_timestamp_get_type (void); char* gsf_timestamp_as_string (GsfTimestamp const *stamp); int gsf_timestamp_parse (char const *spec, GsfTimestamp *stamp); guint gsf_timestamp_hash (GsfTimestamp const *stamp); gboolean gsf_timestamp_equal (GsfTimestamp const *a, GsfTimestamp const *b); #define GSF_TIMESTAMP_TYPE struct GsfTimestamp; GsfTimestamp* gsf_timestamp_new (GDate const *date, glong seconds, char const *tz); void g_value_set_timestamp (GValue *value, GsfTimestamp const *stamp);
#define GSF_CLASS(name, prefix, class_init, instance_init, parent)
| name : | |
| prefix : | |
| class_init : | |
| instance_init : | |
| parent : |
#define GSF_CLASS_FULL(name, prefix, class_init, instance_init, parent_type, \ abstract, interface_decl)
| name : | |
| prefix : | |
| class_init : | |
| instance_init : | |
| parent_type : | @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: |
| interface_decl : |
#define GSF_CLASS_ABSTRACT(name, prefix, class_init, instance_init, parent)
| name : | |
| prefix : | |
| class_init : | |
| instance_init : | |
| parent : |
#define GSF_DYNAMIC_CLASS(name, prefix, class_init, instance_init, parent, plugin, type)
| name : | |
| prefix : | |
| class_init : | |
| instance_init : | |
| parent : | |
| plugin : | |
| type : |
#define GSF_DYNAMIC_CLASS_FULL(name, prefix, class_init, instance_init, parent_type, \ abstract, interface_decl, plugin, type)
| name : | |
| prefix : | |
| class_init : | |
| instance_init : | |
| parent_type : | @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: @\ abstract: |
| interface_decl : | |
| plugin : | |
| type : |
#define GSF_DYNAMIC_CLASS_ABSTRACT(name, prefix, class_init, instance_init, parent, plugin, type)
| name : | |
| prefix : | |
| class_init : | |
| instance_init : | |
| parent : | |
| plugin : | |
| type : |
#define GSF_INTERFACE_FULL(type, init_func, iface_type)
| type : | |
| init_func : | |
| iface_type : |
void gsf_mem_dump (guint8 const *ptr,
size_t len);Dump len bytes from the memory location given by ptr.
| ptr : | memory area to be dumped. |
| len : | how many bytes will be dumped. |
char* gsf_filename_to_utf8 (const char *filename,
gboolean quoted);A utility wrapper to make sure filenames are valid utf8. Caller must g_free the result.
| filename : | file name suitable for open(2). |
| quoted : | if TRUE, the resulting utf8 file name will be quoted (unless it is invalid). |
| Returns : | filename using utf-8 encoding for display |
guint8* gsf_base64_encode_simple (guint8 const *data,
size_t len);
| data : | |
| len : | |
| Returns : |
size_t gsf_base64_encode_close (guint8 const *in,
size_t inlen,
gboolean break_lines,
guint8 *out,
int *state,
unsigned int *save);
| in : | |
| inlen : | |
| break_lines : | |
| out : | |
| state : | |
| save : | |
| Returns : |
size_t gsf_base64_encode_step (guint8 const *in,
size_t len,
gboolean break_lines,
guint8 *out,
int *state,
unsigned int *save);
| in : | |
| len : | |
| break_lines : | |
| out : | |
| state : | |
| save : | |
| Returns : |
size_t gsf_base64_decode_simple (guint8 *data,
size_t len);
| data : | |
| len : | |
| Returns : |
size_t gsf_base64_decode_step (guint8 const *in,
size_t len,
guint8 *out,
int *state,
unsigned *save);Decodes a chunk of base64 encoded data
| in : | input stream |
| len : | max length of data to decode |
| out : | output stream |
| state : | holds the number of bits that are stored in save |
| save : | leftover bits that have not yet been decoded |
| Returns : | the number of bytes converted |
GsfTimestamp* gsf_timestamp_copy (GsfTimestamp const *stamp);
| stamp : | |
| Returns : |
char* gsf_timestamp_as_string (GsfTimestamp const *stamp);
| stamp : | |
| Returns : |
int gsf_timestamp_parse (char const *spec,
GsfTimestamp *stamp);
| spec : | |
| stamp : | |
| Returns : |
gboolean gsf_timestamp_equal (GsfTimestamp const *a, GsfTimestamp const *b);
| a : | |
| b : | |
| Returns : |
struct GsfTimestamp {
GDate date; /* In local timezone */
glong seconds; /* time of day */
GString time_zone; /* possibly blank */
guint32 timet;
};
GsfTimestamp* gsf_timestamp_new (GDate const *date, glong seconds, char const *tz);
| date : | |
| seconds : | |
| tz : | |
| Returns : |
void g_value_set_timestamp (GValue *value,
GsfTimestamp const *stamp);
| value : | |
| stamp : |
| << Miscellaneous | Index >> |