mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-12-11 11:03:01 +01:00
GVariantIter, GVariantBuilder
This commit is contained in:
@@ -2754,6 +2754,7 @@ g_variant_type_is_maybe
|
|||||||
g_variant_type_is_array
|
g_variant_type_is_array
|
||||||
g_variant_type_is_tuple
|
g_variant_type_is_tuple
|
||||||
g_variant_type_is_dict_entry
|
g_variant_type_is_dict_entry
|
||||||
|
g_variant_type_is_variant
|
||||||
|
|
||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
g_variant_type_hash
|
g_variant_type_hash
|
||||||
@@ -2851,6 +2852,27 @@ g_variant_equal
|
|||||||
<SUBSECTION>
|
<SUBSECTION>
|
||||||
g_variant_print
|
g_variant_print
|
||||||
g_variant_print_string
|
g_variant_print_string
|
||||||
|
|
||||||
|
<SUBSECTION>
|
||||||
|
GVariantIter
|
||||||
|
g_variant_iter_copy
|
||||||
|
g_variant_iter_free
|
||||||
|
g_variant_iter_init
|
||||||
|
g_variant_iter_n_children
|
||||||
|
g_variant_iter_new
|
||||||
|
g_variant_iter_next_value
|
||||||
|
g_variant_iter_next
|
||||||
|
g_variant_iter_loop
|
||||||
|
|
||||||
|
<SUBSECTION>
|
||||||
|
GVariantBuilder
|
||||||
|
g_variant_builder_unref
|
||||||
|
g_variant_builder_ref
|
||||||
|
g_variant_builder_new
|
||||||
|
g_variant_builder_add_value
|
||||||
|
g_variant_builder_end
|
||||||
|
g_variant_builder_open
|
||||||
|
g_variant_builder_close
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -900,73 +900,6 @@ Turns the argument into a string literal by using the '#' stringizing operator.
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### VARIABLE glib_binary_age ##### -->
|
|
||||||
<para>
|
|
||||||
This is the binary age passed to <application>libtool</application>. If
|
|
||||||
<application>libtool</application> means nothing to you, don't worry
|
|
||||||
about it. ;-)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### FUNCTION glib_check_version ##### -->
|
|
||||||
<para>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
|
|
||||||
@required_major:
|
|
||||||
@required_minor:
|
|
||||||
@required_micro:
|
|
||||||
@Returns:
|
|
||||||
|
|
||||||
<!-- ##### VARIABLE glib_interface_age ##### -->
|
|
||||||
<para>
|
|
||||||
This is the interface age passed to <application>libtool</application>. If
|
|
||||||
<application>libtool</application> means nothing to you, don't worry
|
|
||||||
about it. ;-)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### VARIABLE glib_major_version ##### -->
|
|
||||||
<para>
|
|
||||||
The major version number of the GLib library.
|
|
||||||
(e.g. in GLib version 1.2.5 this is 1.)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This variable is in the library, so represents the
|
|
||||||
GLib library you have linked against. Contrast with the
|
|
||||||
#GLIB_MAJOR_VERSION macro, which represents the major version of the
|
|
||||||
GLib headers you have included.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### VARIABLE glib_micro_version ##### -->
|
|
||||||
<para>
|
|
||||||
The micro version number of the GLib library.
|
|
||||||
(e.g. in GLib version 1.2.5 this is 5.)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This variable is in the library, so represents the GLib library you
|
|
||||||
have linked against. Contrast with the #GLIB_MICRO_VERSION macro, which
|
|
||||||
represents the micro version of the GLib headers you have included.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### VARIABLE glib_minor_version ##### -->
|
|
||||||
<para>
|
|
||||||
The minor version number of the GLib library.
|
|
||||||
(e.g. in GLib version 1.2.5 this is 2.)
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This variable is in the library, so represents the
|
|
||||||
GLib library you have linked against. Contrast with the
|
|
||||||
#GLIB_MINOR_VERSION macro, which represents the minor version of the
|
|
||||||
GLib headers you have included.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO lseek ##### -->
|
<!-- ##### MACRO lseek ##### -->
|
||||||
<para>
|
<para>
|
||||||
|
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ Since: 2.14
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO G_LIKELY ##### -->
|
<!-- ##### FUNCTION G_LIKELY ##### -->
|
||||||
<para>
|
<para>
|
||||||
Hints the compiler that the expression is likely to evaluate to a true
|
Hints the compiler that the expression is likely to evaluate to a true
|
||||||
value. The compiler may use this information for optimizations.
|
value. The compiler may use this information for optimizations.
|
||||||
@@ -413,9 +413,10 @@ if (G_LIKELY (random () != 1))
|
|||||||
g_print ("not one");
|
g_print ("not one");
|
||||||
</programlisting></informalexample>
|
</programlisting></informalexample>
|
||||||
|
|
||||||
@expr: the expression
|
|
||||||
@Returns: the value of @expr
|
@Returns: the value of @expr
|
||||||
@Since: 2.2
|
@Since: 2.2
|
||||||
|
<!-- # Unused Parameters # -->
|
||||||
|
@expr: the expression
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO G_UNLIKELY ##### -->
|
<!-- ##### MACRO G_UNLIKELY ##### -->
|
||||||
|
|||||||
@@ -19,6 +19,74 @@ typically use the features described here.
|
|||||||
<!-- ##### SECTION Stability_Level ##### -->
|
<!-- ##### SECTION Stability_Level ##### -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### VARIABLE glib_major_version ##### -->
|
||||||
|
<para>
|
||||||
|
The major version number of the GLib library.
|
||||||
|
(e.g. in GLib version 1.2.5 this is 1.)
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This variable is in the library, so represents the
|
||||||
|
GLib library you have linked against. Contrast with the
|
||||||
|
#GLIB_MAJOR_VERSION macro, which represents the major version of the
|
||||||
|
GLib headers you have included.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### VARIABLE glib_minor_version ##### -->
|
||||||
|
<para>
|
||||||
|
The minor version number of the GLib library.
|
||||||
|
(e.g. in GLib version 1.2.5 this is 2.)
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This variable is in the library, so represents the
|
||||||
|
GLib library you have linked against. Contrast with the
|
||||||
|
#GLIB_MINOR_VERSION macro, which represents the minor version of the
|
||||||
|
GLib headers you have included.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### VARIABLE glib_micro_version ##### -->
|
||||||
|
<para>
|
||||||
|
The micro version number of the GLib library.
|
||||||
|
(e.g. in GLib version 1.2.5 this is 5.)
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This variable is in the library, so represents the GLib library you
|
||||||
|
have linked against. Contrast with the #GLIB_MICRO_VERSION macro, which
|
||||||
|
represents the micro version of the GLib headers you have included.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### VARIABLE glib_binary_age ##### -->
|
||||||
|
<para>
|
||||||
|
This is the binary age passed to <application>libtool</application>. If
|
||||||
|
<application>libtool</application> means nothing to you, don't worry
|
||||||
|
about it. ;-)
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### VARIABLE glib_interface_age ##### -->
|
||||||
|
<para>
|
||||||
|
This is the interface age passed to <application>libtool</application>. If
|
||||||
|
<application>libtool</application> means nothing to you, don't worry
|
||||||
|
about it. ;-)
|
||||||
|
</para>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ##### FUNCTION glib_check_version ##### -->
|
||||||
|
<para>
|
||||||
|
|
||||||
|
</para>
|
||||||
|
|
||||||
|
@required_major:
|
||||||
|
@required_minor:
|
||||||
|
@required_micro:
|
||||||
|
@Returns:
|
||||||
|
|
||||||
|
|
||||||
<!-- ##### MACRO GLIB_MAJOR_VERSION ##### -->
|
<!-- ##### MACRO GLIB_MAJOR_VERSION ##### -->
|
||||||
<para>
|
<para>
|
||||||
The major version number of the GLib library.
|
The major version number of the GLib library.
|
||||||
|
|||||||
@@ -1671,6 +1671,7 @@ g_variant_type_is_maybe
|
|||||||
g_variant_type_is_array
|
g_variant_type_is_array
|
||||||
g_variant_type_is_tuple
|
g_variant_type_is_tuple
|
||||||
g_variant_type_is_dict_entry
|
g_variant_type_is_dict_entry
|
||||||
|
g_variant_type_is_variant
|
||||||
g_variant_type_hash
|
g_variant_type_hash
|
||||||
g_variant_type_equal
|
g_variant_type_equal
|
||||||
g_variant_type_is_subtype_of
|
g_variant_type_is_subtype_of
|
||||||
@@ -1754,6 +1755,23 @@ g_variant_print_string
|
|||||||
|
|
||||||
g_variant_hash
|
g_variant_hash
|
||||||
g_variant_equal
|
g_variant_equal
|
||||||
|
|
||||||
|
g_variant_iter_copy
|
||||||
|
g_variant_iter_free
|
||||||
|
g_variant_iter_init
|
||||||
|
g_variant_iter_n_children
|
||||||
|
g_variant_iter_new
|
||||||
|
g_variant_iter_next
|
||||||
|
g_variant_iter_loop
|
||||||
|
g_variant_iter_next_value
|
||||||
|
|
||||||
|
g_variant_builder_add_value
|
||||||
|
g_variant_builder_close
|
||||||
|
g_variant_builder_end
|
||||||
|
g_variant_builder_new
|
||||||
|
g_variant_builder_open
|
||||||
|
g_variant_builder_ref
|
||||||
|
g_variant_builder_unref
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
1387
glib/gvariant.c
1387
glib/gvariant.c
File diff suppressed because it is too large
Load Diff
@@ -135,6 +135,42 @@ guint g_variant_hash (gconstp
|
|||||||
gboolean g_variant_equal (gconstpointer one,
|
gboolean g_variant_equal (gconstpointer one,
|
||||||
gconstpointer two);
|
gconstpointer two);
|
||||||
|
|
||||||
|
typedef struct _GVariantIter GVariantIter;
|
||||||
|
struct _GVariantIter {
|
||||||
|
/*< private >*/
|
||||||
|
gsize x[8];
|
||||||
|
};
|
||||||
|
|
||||||
|
GVariantIter * g_variant_iter_new (GVariant *value);
|
||||||
|
gsize g_variant_iter_init (GVariantIter *iter,
|
||||||
|
GVariant *value);
|
||||||
|
GVariantIter * g_variant_iter_copy (GVariantIter *iter);
|
||||||
|
gsize g_variant_iter_n_children (GVariantIter *iter);
|
||||||
|
void g_variant_iter_free (GVariantIter *iter);
|
||||||
|
GVariant * g_variant_iter_next_value (GVariantIter *iter);
|
||||||
|
gboolean g_variant_iter_next (GVariantIter *iter,
|
||||||
|
const gchar *format_string,
|
||||||
|
...);
|
||||||
|
gboolean g_variant_iter_loop (GVariantIter *iter,
|
||||||
|
const gchar *format_string,
|
||||||
|
...);
|
||||||
|
|
||||||
|
|
||||||
|
typedef struct _GVariantBuilder GVariantBuilder;
|
||||||
|
|
||||||
|
void g_variant_builder_unref (GVariantBuilder *builder);
|
||||||
|
GVariantBuilder * g_variant_builder_ref (GVariantBuilder *builder);
|
||||||
|
GVariantBuilder * g_variant_builder_new (const GVariantType *type);
|
||||||
|
GVariant * g_variant_builder_end (GVariantBuilder *builder);
|
||||||
|
GVariantBuilder * g_variant_builder_open (GVariantBuilder *builder,
|
||||||
|
const GVariantType *type);
|
||||||
|
GVariantBuilder * g_variant_builder_close (GVariantBuilder *builder);
|
||||||
|
void g_variant_builder_add_value (GVariantBuilder *builder,
|
||||||
|
GVariant *value);
|
||||||
|
void g_variant_builder_add (GVariantBuilder *builder,
|
||||||
|
const gchar *format_string,
|
||||||
|
...);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __G_VARIANT_H__ */
|
#endif /* __G_VARIANT_H__ */
|
||||||
|
|||||||
@@ -959,6 +959,23 @@ g_variant_type_is_dict_entry (const GVariantType *type)
|
|||||||
return g_variant_type_peek_string (type)[0] == '{';
|
return g_variant_type_peek_string (type)[0] == '{';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* g_variant_type_is_variant:
|
||||||
|
* @type: a #GVariantType
|
||||||
|
* @returns: %TRUE if @type is the variant type
|
||||||
|
*
|
||||||
|
* Determines if the given @type is the variant type.
|
||||||
|
*
|
||||||
|
* Since 2.24
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
|
g_variant_type_is_variant (const GVariantType *type)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (g_variant_type_check (type), FALSE);
|
||||||
|
|
||||||
|
return g_variant_type_peek_string (type)[0] == 'v';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_variant_type_hash:
|
* g_variant_type_hash:
|
||||||
* @type: a #GVariantType
|
* @type: a #GVariantType
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ gboolean g_variant_type_is_maybe (const G
|
|||||||
gboolean g_variant_type_is_array (const GVariantType *type);
|
gboolean g_variant_type_is_array (const GVariantType *type);
|
||||||
gboolean g_variant_type_is_tuple (const GVariantType *type);
|
gboolean g_variant_type_is_tuple (const GVariantType *type);
|
||||||
gboolean g_variant_type_is_dict_entry (const GVariantType *type);
|
gboolean g_variant_type_is_dict_entry (const GVariantType *type);
|
||||||
|
gboolean g_variant_type_is_variant (const GVariantType *type);
|
||||||
|
|
||||||
/* for hash tables */
|
/* for hash tables */
|
||||||
guint g_variant_type_hash (gconstpointer type);
|
guint g_variant_type_hash (gconstpointer type);
|
||||||
|
|||||||
Reference in New Issue
Block a user