Top | ![]() |
![]() |
![]() |
![]() |
gint64 | camel_util_bdata_get_number () |
void | camel_util_bdata_put_number () |
gchar * | camel_util_bdata_get_string () |
void | camel_util_bdata_put_string () |
time_t | camel_time_value_apply () |
GWeakRef * | camel_utils_weak_ref_new () |
void | camel_utils_weak_ref_free () |
gint64 camel_util_bdata_get_number (gchar **bdata_ptr
,gint64 default_value
);
Reads a numeric data from the bdata_ptr
and moves the bdata_ptr
after that number. If the number cannot be read, then the default_value
is returned instead and the bdata_ptr
is left unchanged. The number
might be previously stored with the camel_util_bdata_put_number()
.
bdata_ptr |
a backend specific data (bdata) pointer |
|
default_value |
a value to return, when no data can be read |
Since: 3.24
void camel_util_bdata_put_number (GString *bdata_str
,gint64 value
);
Puts the number value
at the end of the bdata_str
. In case the bdata_str
is not empty a space is added before the numeric value
. The stored value
can be read back with the camel_util_bdata_get_number()
.
Since: 3.24
gchar * camel_util_bdata_get_string (gchar **bdata_ptr
,const gchar *default_value
);
Reads a string data from the bdata_ptr
and moves the bdata_ptr
after that string. If the string cannot be read, then the default_value
is returned instead and the bdata_ptr
is left unchanged. The string
might be previously stored with the camel_util_bdata_put_string()
.
bdata_ptr |
a backend specific data (bdata) pointer |
|
default_value |
a value to return, when no data can be read |
Newly allocated string, which was read, or
dupped the default_value
, if the bdata_ptr
doesn't point to a string.
Free returned pointer with g_free()
when done with it.
[transfer full]
Since: 3.24
void camel_util_bdata_put_string (GString *bdata_str
,const gchar *value
);
Puts the string value
at the end of the bdata_str
. In case the bdata_str
is not empty a space is added before the string value
. The stored value
can be read back with the camel_util_bdata_get_string()
.
The strings are encoded as "length-value", quotes for clarity only.
Since: 3.24
time_t camel_time_value_apply (time_t src_time
,CamelTimeUnit unit
,gint value
);
Applies the given time value
in unit unit
to the src_time
.
Use negative value to subtract it. The time part is rounded
to the beginning of the day.
src_time |
a time_t to apply the value to, or -1 to use the current time |
|
unit |
||
value |
a value to apply |
src_time
modified by the given parameters as date, with
the time part being beginning of the day.
Since: 3.24
GWeakRef *
camel_utils_weak_ref_new (gpointer object
);
Allocates a new GWeakRef and calls g_weak_ref_set()
with object
.
Free the returned GWeakRef with camel_utils_weak_ref_free()
.
[skip]
Since: 3.40
void
camel_utils_weak_ref_free (GWeakRef *weak_ref
);
Frees a GWeakRef created by camel_utils_weak_ref_new()
.
[skip]
Since: 3.40