00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef INI_VALUEOBJ_H
00024 #define INI_VALUEOBJ_H
00025
00026 #include "ref_array.h"
00027 #include "simplebuffer.h"
00028 #include "ini_comment.h"
00029
00030 struct value_obj;
00031
00032 #define INI_VALUE_READ 0
00033 #define INI_VALUE_CREATED 1
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 int value_create_from_refarray(struct ref_array *raw_lines,
00050 struct ref_array *raw_lengths,
00051 uint32_t line,
00052 uint32_t origin,
00053 uint32_t key_len,
00054 uint32_t boundary,
00055 struct ini_comment *ic,
00056 struct value_obj **vo);
00057
00058
00059 void value_lines_cleanup_cb(void *elem,
00060 ref_array_del_enum type,
00061 void *data);
00062
00063
00064 int value_create_arrays(struct ref_array **raw_lines,
00065 struct ref_array **raw_lengths);
00066
00067
00068 int value_add_to_arrays(const char *strvalue,
00069 uint32_t len,
00070 struct ref_array *raw_lines,
00071 struct ref_array *raw_lengths);
00072
00073
00074 void value_destroy_arrays(struct ref_array *raw_lines,
00075 struct ref_array *raw_lengths);
00076
00077
00078
00079
00080
00081
00082 int value_create_new(const char *strvalue,
00083 uint32_t length,
00084 uint32_t origin,
00085 uint32_t key_len,
00086 uint32_t boundary,
00087 struct ini_comment *ic,
00088 struct value_obj **vo);
00089
00090
00091 void value_destroy(struct value_obj *vo);
00092
00093
00094 int value_get_concatenated(struct value_obj *vo,
00095 const char **fullstr);
00096
00097
00098 int value_get_origin(struct value_obj *vo,
00099 uint32_t *origin);
00100
00101
00102 int value_get_line(struct value_obj *vo,
00103 uint32_t *line);
00104
00105
00106 int value_set_keylen(struct value_obj *vo,
00107 uint32_t key_len);
00108
00109
00110 int value_update(struct value_obj *vo,
00111 const char *value,
00112 uint32_t length,
00113 uint32_t origin,
00114 uint32_t boundary);
00115
00116
00117 int value_extract_comment(struct value_obj *vo,
00118 struct ini_comment **ic);
00119
00120
00121 int value_put_comment(struct value_obj *vo,
00122 struct ini_comment *ic);
00123
00124
00125 int value_serialize(struct value_obj *vo,
00126 const char *key,
00127 struct simplebuffer *sbobj);
00128
00129
00130 #endif