mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-01 16:08:01 +02:00
* glib/dbus-binding-tool-glib.c, glib/dbus-gmain.c, glib/dbus-gsignature.c, glib/dbus-gtype-specialized.c, glib/dbus-gtype-specialized.h, glib/dbus-gvalue-utils.c, glib/dbus-gvalue-utils.h, glib/dbus-gvalue.c: Patch from Rob Taylor <rob.taylor@collabora.co.uk> to add a big missing piece of the glib bindings jigsaw puzzle. This modifies the existing specialised types to have N type parameters (rather than the current 1 or 2 for arrays and dictionaries respectively). You can then use this to get a glib type to represent any arbitrary D-Bus struct type using dbus_g_type_get_struct. The only implementation of these types is with GValueArrays as before, but it's now possible to store these in arrays, emit them in signals, etc.
73 lines
2.7 KiB
C
73 lines
2.7 KiB
C
/* -*- mode: C; c-file-style: "gnu" -*- */
|
|
/* dbus-gvalue-utils.h: Non-DBus-specific functions related to GType/GValue
|
|
*
|
|
* Copyright (C) 2005 Red Hat, Inc.
|
|
*
|
|
* Licensed under the Academic Free License version 2.1
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*
|
|
*/
|
|
|
|
#ifndef DBUS_GOBJECT_VALUE_UTILS_H
|
|
#define DBUS_GOBJECT_VALUE_UTILS_H
|
|
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
void _dbus_g_type_specialized_builtins_init (void);
|
|
|
|
gboolean _dbus_g_type_is_fixed (GType gtype);
|
|
guint _dbus_g_type_fixed_get_size (GType gtype);
|
|
|
|
gboolean _dbus_gvalue_set_from_pointer (GValue *value,
|
|
gconstpointer storage);
|
|
|
|
typedef void (*DBusGHashValueForeachFunc) (GValue * key, GValue *val, gpointer data);
|
|
|
|
void _dbus_g_hash_table_value_foreach (GHashTable *table,
|
|
GType hash_type,
|
|
DBusGHashValueForeachFunc func,
|
|
gpointer data);
|
|
|
|
void _dbus_g_hash_table_insert_values (GHashTable *table,
|
|
GValue *key_val,
|
|
GValue *value_val);
|
|
void _dbus_g_hash_table_insert_steal_values (GHashTable *table,
|
|
GValue *key_val,
|
|
GValue *value_val);
|
|
|
|
gboolean _dbus_gtype_is_valid_hash_key (GType type);
|
|
gboolean _dbus_gtype_is_valid_hash_value (GType type);
|
|
|
|
GHashFunc _dbus_g_hash_func_from_gtype (GType gtype);
|
|
GEqualFunc _dbus_g_hash_equal_from_gtype (GType gtype);
|
|
GDestroyNotify _dbus_g_hash_free_from_gtype (GType gtype);
|
|
|
|
gboolean _dbus_gvalue_store (GValue *value,
|
|
gpointer storage);
|
|
|
|
gboolean _dbus_gvalue_take (GValue *value,
|
|
GTypeCValue *cvalue);
|
|
|
|
gboolean _dbus_gtype_can_signal_error (GType gtype);
|
|
gboolean _dbus_gvalue_signals_error (const GValue *value);
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
#endif
|