GType utility functions

## GType utility functions GType utility functions — Non-DBus-specific functions for specialized GTypes |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    void        (*DBusGTypeSpecializedCollectionIterator)
                                                (const GValue *val,
                                                 gpointer user_data);
    void        (*DBusGTypeSpecializedMapIterator)
                                                (const GValue *key_val,
                                                 const GValue *value_val,
                                                 gpointer user_data);
                DBusGTypeSpecializedAppendContext;
    gpointer    (*DBusGTypeSpecializedConstructor)
                                                (GType type);
    void        (*DBusGTypeSpecializedFreeFunc) (GType type,
                                                 gpointer val);
    gpointer    (*DBusGTypeSpecializedCopyFunc) (GType type,
                                                 gpointer src);
                DBusGTypeSpecializedVtable;
    gboolean    (*DBusGTypeSpecializedCollectionFixedAccessorFunc)
                                                (GType type,
                                                 gpointer instance,
                                                 gpointer *values,
                                                 guint *len);
    void        (*DBusGTypeSpecializedCollectionIteratorFunc)
                                                (GType type,
                                                 gpointer instance,
                                                 DBusGTypeSpecializedCollectionIterator iterator,
                                                 gpointer user_data);
    void        (*DBusGTypeSpecializedCollectionAppendFunc)
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *val);
    void        (*DBusGTypeSpecializedCollectionEndAppendFunc)
                                                (DBusGTypeSpecializedAppendContext *ctx);
                DBusGTypeSpecializedCollectionVtable;
    void        (*DBusGTypeSpecializedMapIteratorFunc)
                                                (GType type,
                                                 gpointer instance,
                                                 DBusGTypeSpecializedMapIterator iterator,
                                                 gpointer user_data);
    void        (*DBusGTypeSpecializedMapAppendFunc)
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *key,
                                                 GValue *val);
                DBusGTypeSpecializedMapVtable;
    gboolean    (*DBusGTypeSpecializedStructGetMember)
                                                (GType type,
                                                 gpointer instance,
                                                 guint member,
                                                 GValue *ret_value);
    gboolean    (*DBusGTypeSpecializedStructSetMember)
                                                (GType type,
                                                 gpointer instance,
                                                 guint member,
                                                 const GValue *new_value);
                DBusGTypeSpecializedStructVtable;
    GType       dbus_g_type_get_collection      (const char *container,
                                                 GType specialization);
    GType       dbus_g_type_get_map             (const char *container,
                                                 GType key_specialization,
                                                 GType value_specialization);
    GType       dbus_g_type_get_structv         (const char *container,
                                                 guint num_items,
                                                 GType *types);
    GType       dbus_g_type_get_struct          (const char *container,
                                                 GType first_type,
                                                 ...);
    gboolean    dbus_g_type_is_collection       (GType gtype);
    gboolean    dbus_g_type_is_map              (GType gtype);
    gboolean    dbus_g_type_is_struct           (GType gtype);
    GType       dbus_g_type_get_collection_specialization
                                                (GType gtype);
    GType       dbus_g_type_get_map_key_specialization
                                                (GType gtype);
    GType       dbus_g_type_get_map_value_specialization
                                                (GType gtype);
    GType       dbus_g_type_get_struct_member_type
                                                (GType gtype,
                                                 guint index);
    guint       dbus_g_type_get_struct_size     (GType gtype);
    gpointer    dbus_g_type_specialized_construct
                                                (GType type);
    void        dbus_g_type_specialized_init_append
                                                (GValue *val,
                                                 DBusGTypeSpecializedAppendContext *ctx);
    void        dbus_g_type_specialized_collection_append
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *elt);
    void        dbus_g_type_specialized_collection_end_append
                                                (DBusGTypeSpecializedAppendContext *ctx);
    void        dbus_g_type_specialized_map_append
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *key,
                                                 GValue *val);
    gboolean    dbus_g_type_collection_get_fixed
                                                (GValue *value,
                                                 gpointer *data,
                                                 guint *len);
    void        dbus_g_type_collection_value_iterate
                                                (const GValue *value,
                                                 DBusGTypeSpecializedCollectionIterator iterator,
                                                 gpointer user_data);
    void        dbus_g_type_map_value_iterate   (const GValue *value,
                                                 DBusGTypeSpecializedMapIterator iterator,
                                                 gpointer user_data);
    gboolean    dbus_g_type_struct_get_member   (const GValue *value,
                                                 guint index,
                                                 GValue *dest);
    gboolean    dbus_g_type_struct_set_member   (GValue *value,
                                                 guint index,
                                                 const GValue *src);
    gboolean    dbus_g_type_struct_get          (const GValue *value,
                                                 guint member,
                                                 ...);
    gboolean    dbus_g_type_struct_set          (GValue *value,
                                                 guint member,
                                                 ...);
    void        dbus_g_type_specialized_init    (void);
    void        dbus_g_type_register_collection (const char *name,
                                                 const DBusGTypeSpecializedCollectionVtable *vtable,
                                                 guint flags);
    void        dbus_g_type_register_map        (const char *name,
                                                 const DBusGTypeSpecializedMapVtable *vtable,
                                                 guint flags);
    const DBusGTypeSpecializedMapVtable* dbus_g_type_map_peek_vtable
                                                (GType map_type);
    const DBusGTypeSpecializedCollectionVtable* dbus_g_type_collection_peek_vtable
                                                (GType collection_type);
    void        dbus_g_type_register_struct     (const char *name,
                                                 const DBusGTypeSpecializedStructVtable *vtable,
                                                 guint flags);

## Description

Non-DBus-specific functions for specialized GType.

## Details

### DBusGTypeSpecializedCollectionIterator ()

    void        (*DBusGTypeSpecializedCollectionIterator)
                                                (const GValue *val,
                                                 gpointer user_data);

`val` : |
`user_data` : |

### DBusGTypeSpecializedMapIterator ()

    void        (*DBusGTypeSpecializedMapIterator)
                                                (const GValue *key_val,
                                                 const GValue *value_val,
                                                 gpointer user_data);

`key_val` : |
`value_val` : |
`user_data` : |

### DBusGTypeSpecializedAppendContext

    typedef struct {
      /* public */
      GValue *val;
      GType specialization_type;
      /* padding */
      gpointer b;
      guint c;
      gpointer d;
    } DBusGTypeSpecializedAppendContext;

### DBusGTypeSpecializedConstructor ()

    gpointer    (*DBusGTypeSpecializedConstructor)
                                                (GType type);

`type` : |
Returns : |

### DBusGTypeSpecializedFreeFunc ()

    void        (*DBusGTypeSpecializedFreeFunc) (GType type,
                                                 gpointer val);

`type` : |
`val` : |

### DBusGTypeSpecializedCopyFunc ()

    gpointer    (*DBusGTypeSpecializedCopyFunc) (GType type,
                                                 gpointer src);

`type` : |
`src` : |
Returns : |

### DBusGTypeSpecializedVtable

    typedef struct {
      DBusGTypeSpecializedConstructor    constructor;
      DBusGTypeSpecializedFreeFunc       free_func;
      DBusGTypeSpecializedCopyFunc       copy_func;
      GDestroyNotify                     simple_free_func; /* for type-independent freeing if possible */
      gpointer                           padding2;
      gpointer                           padding3;
    } DBusGTypeSpecializedVtable;

### DBusGTypeSpecializedCollectionFixedAccessorFunc ()

    gboolean    (*DBusGTypeSpecializedCollectionFixedAccessorFunc)
                                                (GType type,
                                                 gpointer instance,
                                                 gpointer *values,
                                                 guint *len);

`type` : |
`instance` : |
`values` : |
`len` : |
Returns : |

### DBusGTypeSpecializedCollectionIteratorFunc ()

    void        (*DBusGTypeSpecializedCollectionIteratorFunc)
                                                (GType type,
                                                 gpointer instance,
                                                 DBusGTypeSpecializedCollectionIterator iterator,
                                                 gpointer user_data);

`type` : |
`instance` : |
`iterator` : |
`user_data` : |

### DBusGTypeSpecializedCollectionAppendFunc ()

    void        (*DBusGTypeSpecializedCollectionAppendFunc)
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *val);

`ctx` : |
`val` : |

### DBusGTypeSpecializedCollectionEndAppendFunc ()

    void        (*DBusGTypeSpecializedCollectionEndAppendFunc)
                                                (DBusGTypeSpecializedAppendContext *ctx);

`ctx` : |

### DBusGTypeSpecializedCollectionVtable

    typedef struct {
      DBusGTypeSpecializedVtable                        base_vtable;
      DBusGTypeSpecializedCollectionFixedAccessorFunc   fixed_accessor;
      DBusGTypeSpecializedCollectionIteratorFunc        iterator;
      DBusGTypeSpecializedCollectionAppendFunc          append_func;
      DBusGTypeSpecializedCollectionEndAppendFunc       end_append_func;
    } DBusGTypeSpecializedCollectionVtable;

### DBusGTypeSpecializedMapIteratorFunc ()

    void        (*DBusGTypeSpecializedMapIteratorFunc)
                                                (GType type,
                                                 gpointer instance,
                                                 DBusGTypeSpecializedMapIterator iterator,
                                                 gpointer user_data);

`type` : |
`instance` : |
`iterator` : |
`user_data` : |

### DBusGTypeSpecializedMapAppendFunc ()

    void        (*DBusGTypeSpecializedMapAppendFunc)
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *key,
                                                 GValue *val);

`ctx` : |
`key` : |
`val` : |

### DBusGTypeSpecializedMapVtable

    typedef struct {
      DBusGTypeSpecializedVtable                        base_vtable;
      DBusGTypeSpecializedMapIteratorFunc               iterator;
      DBusGTypeSpecializedMapAppendFunc                 append_func;
    } DBusGTypeSpecializedMapVtable;

### DBusGTypeSpecializedStructGetMember ()

    gboolean    (*DBusGTypeSpecializedStructGetMember)
                                                (GType type,
                                                 gpointer instance,
                                                 guint member,
                                                 GValue *ret_value);

`type` : |
`instance` : |
`member` : |
`ret_value` : |
Returns : |

### DBusGTypeSpecializedStructSetMember ()

    gboolean    (*DBusGTypeSpecializedStructSetMember)
                                                (GType type,
                                                 gpointer instance,
                                                 guint member,
                                                 const GValue *new_value);

`type` : |
`instance` : |
`member` : |
`new_value` : |
Returns : |

### DBusGTypeSpecializedStructVtable

    typedef struct {
      DBusGTypeSpecializedVtable                        base_vtable;
      DBusGTypeSpecializedStructGetMember               get_member;
      DBusGTypeSpecializedStructSetMember               set_member;
    } DBusGTypeSpecializedStructVtable;

### dbus_g_type_get_collection ()

    GType       dbus_g_type_get_collection      (const char *container,
                                                 GType specialization);

`container` : |
`specialization` : |
Returns : |

### dbus_g_type_get_map ()

    GType       dbus_g_type_get_map             (const char *container,
                                                 GType key_specialization,
                                                 GType value_specialization);

`container` : |
`key_specialization` : |
`value_specialization` : |
Returns : |

### dbus_g_type_get_structv ()

    GType       dbus_g_type_get_structv         (const char *container,
                                                 guint num_items,
                                                 GType *types);

`container` : |
`num_items` : |
`types` : |
Returns : |

### dbus_g_type_get_struct ()

    GType       dbus_g_type_get_struct          (const char *container,
                                                 GType first_type,
                                                 ...);

`container` : |
`first_type` : |
`...` : |
Returns : |

### dbus_g_type_is_collection ()

    gboolean    dbus_g_type_is_collection       (GType gtype);

`gtype` : |
Returns : |

### dbus_g_type_is_map ()

    gboolean    dbus_g_type_is_map              (GType gtype);

`gtype` : |
Returns : |

### dbus_g_type_is_struct ()

    gboolean    dbus_g_type_is_struct           (GType gtype);

`gtype` : |
Returns : |

### dbus_g_type_get_collection_specialization ()

    GType       dbus_g_type_get_collection_specialization
                                                (GType gtype);

`gtype` : |
Returns : |

### dbus_g_type_get_map_key_specialization ()

    GType       dbus_g_type_get_map_key_specialization
                                                (GType gtype);

`gtype` : |
Returns : |

### dbus_g_type_get_map_value_specialization ()

    GType       dbus_g_type_get_map_value_specialization
                                                (GType gtype);

`gtype` : |
Returns : |

### dbus_g_type_get_struct_member_type ()

    GType       dbus_g_type_get_struct_member_type
                                                (GType gtype,
                                                 guint index);

`gtype` : |
`index` : |
Returns : |

### dbus_g_type_get_struct_size ()

    guint       dbus_g_type_get_struct_size     (GType gtype);

`gtype` : |
Returns : |

### dbus_g_type_specialized_construct ()

    gpointer    dbus_g_type_specialized_construct
                                                (GType type);

`type` : |
Returns : |

### dbus_g_type_specialized_init_append ()

    void        dbus_g_type_specialized_init_append
                                                (GValue *val,
                                                 DBusGTypeSpecializedAppendContext *ctx);

`val` : |
`ctx` : |

### dbus_g_type_specialized_collection_append ()

    void        dbus_g_type_specialized_collection_append
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *elt);

`ctx` : |
`elt` : |

### dbus_g_type_specialized_collection_end_append ()

    void        dbus_g_type_specialized_collection_end_append
                                                (DBusGTypeSpecializedAppendContext *ctx);

`ctx` : |

### dbus_g_type_specialized_map_append ()

    void        dbus_g_type_specialized_map_append
                                                (DBusGTypeSpecializedAppendContext *ctx,
                                                 GValue *key,
                                                 GValue *val);

`ctx` : |
`key` : |
`val` : |

### dbus_g_type_collection_get_fixed ()

    gboolean    dbus_g_type_collection_get_fixed
                                                (GValue *value,
                                                 gpointer *data,
                                                 guint *len);

`value` : |
`data` : |
`len` : |
Returns : |

### dbus_g_type_collection_value_iterate ()

    void        dbus_g_type_collection_value_iterate
                                                (const GValue *value,
                                                 DBusGTypeSpecializedCollectionIterator iterator,
                                                 gpointer user_data);

`value` : |
`iterator` : |
`user_data` : |

### dbus_g_type_map_value_iterate ()

    void        dbus_g_type_map_value_iterate   (const GValue *value,
                                                 DBusGTypeSpecializedMapIterator iterator,
                                                 gpointer user_data);

`value` : |
`iterator` : |
`user_data` : |

### dbus_g_type_struct_get_member ()

    gboolean    dbus_g_type_struct_get_member   (const GValue *value,
                                                 guint index,
                                                 GValue *dest);

`value` : |
`index` : |
`dest` : |
Returns : |

### dbus_g_type_struct_set_member ()

    gboolean    dbus_g_type_struct_set_member   (GValue *value,
                                                 guint index,
                                                 const GValue *src);

`value` : |
`index` : |
`src` : |
Returns : |

### dbus_g_type_struct_get ()

    gboolean    dbus_g_type_struct_get          (const GValue *value,
                                                 guint member,
                                                 ...);

Collects the selected values of this struct into the return locations provided.

`value` : | a GValue containing a DBusGTypeStruct type
`member` : | struct member to get
`...` : | location in which to return the value of this member, followed optionally by more member/return locations pairs, followed by by G_MAXUINT
Returns : | FALSE on failure

### dbus_g_type_struct_set ()

    gboolean    dbus_g_type_struct_set          (GValue *value,
                                                 guint member,
                                                 ...);

Sets the selected members of the struct in `value`.

`value` : | a GValue containing a DBusGTypeStruct type
`member` : | struct member to set
`...` : | value for the first member, followed optionally by more member/value pairs, followed by G_MAXUINT
Returns : | FALSE on failure

### dbus_g_type_specialized_init ()

    void        dbus_g_type_specialized_init    (void);

### dbus_g_type_register_collection ()

    void        dbus_g_type_register_collection (const char *name,
                                                 const DBusGTypeSpecializedCollectionVtable *vtable,
                                                 guint flags);

`name` : |
`vtable` : |
`flags` : |

### dbus_g_type_register_map ()

    void        dbus_g_type_register_map        (const char *name,
                                                 const DBusGTypeSpecializedMapVtable *vtable,
                                                 guint flags);

`name` : |
`vtable` : |
`flags` : |

### dbus_g_type_map_peek_vtable ()

    const DBusGTypeSpecializedMapVtable* dbus_g_type_map_peek_vtable
                                                (GType map_type);

`map_type` : |
Returns : |

### dbus_g_type_collection_peek_vtable ()

    const DBusGTypeSpecializedCollectionVtable* dbus_g_type_collection_peek_vtable
                                                (GType collection_type);

`collection_type` : |
Returns : |

### dbus_g_type_register_struct ()

    void        dbus_g_type_register_struct     (const char *name,
                                                 const DBusGTypeSpecializedStructVtable *vtable,
                                                 guint flags);

`name` : |
`vtable` : |
`flags` : |