2003-08-13 22:14:47 +00:00
|
|
|
/* -*- mode: C; c-file-style: "gnu" -*- */
|
|
|
|
|
/* dbus-gidl.h data structure describing an interface, to be generated from IDL
|
|
|
|
|
* or something
|
|
|
|
|
*
|
|
|
|
|
* Copyright (C) 2003 Red Hat, Inc.
|
|
|
|
|
*
|
2004-08-10 03:07:01 +00:00
|
|
|
* Licensed under the Academic Free License version 2.1
|
2003-08-13 22:14:47 +00:00
|
|
|
*
|
|
|
|
|
* 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_GLIB_IDL_H
|
|
|
|
|
#define DBUS_GLIB_IDL_H
|
|
|
|
|
|
2003-09-07 23:04:54 +00:00
|
|
|
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
|
|
|
|
|
2003-08-13 22:14:47 +00:00
|
|
|
#include <dbus/dbus.h>
|
2003-09-17 03:52:07 +00:00
|
|
|
#include <glib-object.h>
|
2003-08-13 22:14:47 +00:00
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
2003-09-17 03:52:07 +00:00
|
|
|
typedef struct BaseInfo BaseInfo;
|
2003-09-03 02:08:25 +00:00
|
|
|
typedef struct NodeInfo NodeInfo;
|
2003-08-13 22:14:47 +00:00
|
|
|
typedef struct InterfaceInfo InterfaceInfo;
|
|
|
|
|
typedef struct MethodInfo MethodInfo;
|
|
|
|
|
typedef struct SignalInfo SignalInfo;
|
2005-01-29 19:52:19 +00:00
|
|
|
typedef struct PropertyInfo PropertyInfo;
|
2003-08-13 22:14:47 +00:00
|
|
|
typedef struct ArgInfo ArgInfo;
|
|
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
|
{
|
2005-01-29 19:52:19 +00:00
|
|
|
ARG_INVALID = -1,
|
2003-08-13 22:14:47 +00:00
|
|
|
ARG_IN,
|
|
|
|
|
ARG_OUT
|
|
|
|
|
} ArgDirection;
|
|
|
|
|
|
2005-01-29 19:52:19 +00:00
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
PROPERTY_READ = 1 << 0,
|
|
|
|
|
PROPERTY_WRITE = 1 << 1
|
|
|
|
|
} PropertyAccessFlags;
|
|
|
|
|
|
2003-09-17 03:52:07 +00:00
|
|
|
typedef enum
|
|
|
|
|
{
|
|
|
|
|
INFO_TYPE_NODE,
|
|
|
|
|
INFO_TYPE_INTERFACE,
|
|
|
|
|
INFO_TYPE_METHOD,
|
|
|
|
|
INFO_TYPE_SIGNAL,
|
2005-01-29 19:52:19 +00:00
|
|
|
INFO_TYPE_ARG,
|
|
|
|
|
INFO_TYPE_PROPERTY
|
2003-09-17 03:52:07 +00:00
|
|
|
|
|
|
|
|
} InfoType;
|
|
|
|
|
|
2003-11-27 01:25:50 +00:00
|
|
|
BaseInfo* base_info_ref (BaseInfo *info);
|
2003-09-17 03:52:07 +00:00
|
|
|
void base_info_unref (BaseInfo *info);
|
|
|
|
|
InfoType base_info_get_type (BaseInfo *info);
|
|
|
|
|
const char* base_info_get_name (BaseInfo *info);
|
|
|
|
|
void base_info_set_name (BaseInfo *info,
|
|
|
|
|
const char *name);
|
|
|
|
|
GType base_info_get_gtype (void);
|
|
|
|
|
#define BASE_INFO_TYPE (base_info_get_gtype ())
|
|
|
|
|
|
|
|
|
|
|
2005-01-29 19:52:19 +00:00
|
|
|
NodeInfo* node_info_new (const char *name);
|
|
|
|
|
NodeInfo* node_info_ref (NodeInfo *info);
|
|
|
|
|
void node_info_unref (NodeInfo *info);
|
|
|
|
|
const char* node_info_get_name (NodeInfo *info);
|
|
|
|
|
GSList* node_info_get_interfaces (NodeInfo *info);
|
|
|
|
|
GSList* node_info_get_nodes (NodeInfo *info);
|
|
|
|
|
void node_info_add_interface (NodeInfo *info,
|
|
|
|
|
InterfaceInfo *interface);
|
|
|
|
|
void node_info_add_node (NodeInfo *info,
|
|
|
|
|
NodeInfo *child);
|
2005-01-30 05:18:44 +00:00
|
|
|
void node_info_replace_node (NodeInfo *info,
|
|
|
|
|
NodeInfo *old_child,
|
|
|
|
|
NodeInfo *new_child);
|
2005-01-29 19:52:19 +00:00
|
|
|
InterfaceInfo* interface_info_new (const char *name);
|
|
|
|
|
InterfaceInfo* interface_info_ref (InterfaceInfo *info);
|
|
|
|
|
void interface_info_unref (InterfaceInfo *info);
|
|
|
|
|
const char* interface_info_get_name (InterfaceInfo *info);
|
2005-02-17 Colin Walters <walters@verbum.org>
* glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
(parse_node, parse_interface, parse_method, parse_signal)
(parse_property, parse_annotation): Lose if we're currently in an
annotation.
(parse_annotation): New function.
(parser_start_element, parser_end_element): Handle annotation.
(parse_method, parse_interface): Remove support for c_name attribute,
switch to annotations.
* glib/dbus-gidl.h (interface_info_get_binding_names)
(method_info_get_binding_names)
(interface_info_get_binding_name, method_info_get_binding_name)
(interface_info_set_binding_name, method_info_set_binding_name):
Remove.
(interface_info_get_annotations, method_info_get_annotations)
(interface_info_get_annotation, method_info_get_annotation)
(interface_info_add_annotation, method_info_add_annotation):
Prototype.
* glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
for "bindings".
(struct MethodInfo): Ditto.
Straightfoward conversion of binding methods into annotation methods
as prototyped.
* glib/dbus-glib-tool.c (pretty_print): Print annotations.
* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
* glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
Use new annotation API.
* doc/introspect.dtd: Fix a number of DTD syntax errors. Add
annotation element.
* doc/dbus-specification.xml: Discuss introspection annotations,
include list of well-known annotations.
* test/glib/test-service-glib.xml: Make validate against new DTD.
2005-02-17 21:11:18 +00:00
|
|
|
GSList* interface_info_get_annotations(InterfaceInfo *info);
|
|
|
|
|
const char* interface_info_get_annotation (InterfaceInfo*info,
|
|
|
|
|
const char *annotation);
|
2005-01-29 19:52:19 +00:00
|
|
|
GSList* interface_info_get_methods (InterfaceInfo *info);
|
|
|
|
|
GSList* interface_info_get_signals (InterfaceInfo *info);
|
|
|
|
|
GSList* interface_info_get_properties (InterfaceInfo *info);
|
2005-02-17 Colin Walters <walters@verbum.org>
* glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
(parse_node, parse_interface, parse_method, parse_signal)
(parse_property, parse_annotation): Lose if we're currently in an
annotation.
(parse_annotation): New function.
(parser_start_element, parser_end_element): Handle annotation.
(parse_method, parse_interface): Remove support for c_name attribute,
switch to annotations.
* glib/dbus-gidl.h (interface_info_get_binding_names)
(method_info_get_binding_names)
(interface_info_get_binding_name, method_info_get_binding_name)
(interface_info_set_binding_name, method_info_set_binding_name):
Remove.
(interface_info_get_annotations, method_info_get_annotations)
(interface_info_get_annotation, method_info_get_annotation)
(interface_info_add_annotation, method_info_add_annotation):
Prototype.
* glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
for "bindings".
(struct MethodInfo): Ditto.
Straightfoward conversion of binding methods into annotation methods
as prototyped.
* glib/dbus-glib-tool.c (pretty_print): Print annotations.
* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
* glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
Use new annotation API.
* doc/introspect.dtd: Fix a number of DTD syntax errors. Add
annotation element.
* doc/dbus-specification.xml: Discuss introspection annotations,
include list of well-known annotations.
* test/glib/test-service-glib.xml: Make validate against new DTD.
2005-02-17 21:11:18 +00:00
|
|
|
void interface_info_add_annotation (InterfaceInfo *info,
|
|
|
|
|
const char *name,
|
|
|
|
|
const char *value);
|
2005-01-29 19:52:19 +00:00
|
|
|
void interface_info_add_method (InterfaceInfo *info,
|
|
|
|
|
MethodInfo *method);
|
|
|
|
|
void interface_info_add_signal (InterfaceInfo *info,
|
|
|
|
|
SignalInfo *signal);
|
|
|
|
|
void interface_info_add_property (InterfaceInfo *info,
|
|
|
|
|
PropertyInfo *property);
|
2005-02-17 Colin Walters <walters@verbum.org>
This patch is based on initial work from
Paul Kuliniewicz <kuliniew@purdue.edu>.
* glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
initialization of GValue from dbus type to here.
(dbus_gvalue_genmarshal_name_from_type): New function; generates a string
for the "glib-genmarshal" program from a DBus type.
(dbus_gvalue_binding_type_from_type): New function; turns a DBus type
into the C name for it we use in the glib bindings.
(dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
glib C type (not GValue).
(dbus_gvalue_demarshal): invoke dbus_gvalue_init.
* glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
from dbus-gobject.c.
* glib/dbus-gutils.h: Prototype it.
* glib/dbus-gproxy.c: Include new dbus-gobject.h.
(marshal_dbus_message_to_g_marshaller): Use new shared function
dbus_glib_marshal_dbus_message_to_gvalue_array.
* glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
Will be changed once we have annotations.
* glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
GStaticRWLock. Callers updated.
(wincaps_to_uscore): Move to dbus-gutils.c. Callers updated.
(string_table_next): New function for iterating over zero-terminated
string value array.
(string_table_lookup): New function; retrieves specific entry in
array.
(get_method_data): New function; look up method data in object data chunk.
(object_error_domain_prefix_from_object_info)
(object_error_code_from_object_info): New functions, but not implemented yet.
(method_interface_from_object_info): New function; retrieve interface name.
(method_name_from_object_info): New function; retrieve method name.
(method_arg_info_from_object_info): New function; retrieve argument data.
(arg_iterate): New function; iterates over serialized argument data.
(method_dir_signature_from_object_info): New function; returns a
GString holding type signature for arguments for just one
direction (input or output).
(method_input_signature_from_object_info)
(method_output_signature_from_object_info): New functions.
(dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
converts dbus message arguments into a GValue array. Used for both
signal handling and method invocation.
(struct DBusGlibWriteIterfaceData): New utility structure.
(write_interface): New function; generate introspection XML for
an interface.
(introspect_interfaces): New function; gathers all interface->methods,
generates introspection XML for them.
(handle_introspect): Invoke introspect_interfaces.
(get_object_property): Be sure to zero-initalize stack-allocated GValue.
(lookup_object_and_method): New function; examines an incoming message
and attempts to match it up (via interface, method name, and argument
signature) with a known object and method.
(gerror_domaincode_to_dbus_error_name): New function; converts a
GError domain and code into a DBus error name. Needs GError data
added to object introspection to work well.
(gerror_to_dbus_error_message): Creates a DBusMessage error return from
GError.
(invoke_object_method): New function to invoke an object method
looked up via lookup_object_and_method. Parses the incoming
message, turns it into a GValue array, then invokes the marshaller
specified in the DBusGMethodInfo. Creates a new message with
either return values or error message as appropriate.
(gobject_message_function): Invoke lookup_object_and_method and
invoke_object_method.
* glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
(enum DBusBindingOutputMode): New enum for binding output modes.
(pretty_print): Print binding names.
(dbus_binding_tool_error_quark): GError bits.
(version): Fix typo.
(main): Create GIOChannel for output. Parse new --mode argument,
possible values are "pretty-print", "glib-server", "glib-client".
Use mode to invoke appropriate function.
* glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
* glib/dbus-glib-tool.h: New header, just includes GError bits
for now.
* glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
maps binding style to name.
(struct MethodInfo): Ditto.
(get_hash_keys, get_hash_key): Utility function, returns keys for
a GHashTable.
(interface_info_new, method_info_new): Initialize bindings.
(interface_info_unref, method_info_unref): Destroy bindings.
(method_info_get_binding_names, method_info_get_binding_name)
(interface_info_get_binding_names, interface_info_get_binding_name):
Functions for retrieving binding names.
(method_info_set_binding_name, interface_info_set_binding_name):
Functions for setting binding names.
* glib/dbus-binding-tool-glib.h: New file, has prototypes
for glib binding generation.
* glib/dbus-binding-tool-glib.c: New file, implements server-side
and client-side glib glue generation.
* glib/Makefile.am (dbus_binding_tool_SOURCES): Add
dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
dbus-glib-tool.h.
* dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
of using GClosureMarshal directly.
(struct DBusGObjectInfo): Add n_infos member.
* test/glib/test-service-glib.xml: New file; contains introspection data
for MyTestObject used in test-service-glib.c.
* test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
(my_object_do_nothing, my_object_increment, my_object_throw_error)
(my_object_uppercase, my_object_many_args): New test methods.
(main): Use dbus_g_object_class_install_info to include generated object
info.
* test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
as well as client-side bindings.
* test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
(main): Activate TestSuiteGLibService; test invoke a bunch of its methods
using both the dbus_gproxy stuff directly as well as the generated bindings.
2005-02-17 17:41:30 +00:00
|
|
|
MethodInfo* method_info_new (const char *name);
|
2005-01-29 19:52:19 +00:00
|
|
|
MethodInfo* method_info_ref (MethodInfo *info);
|
|
|
|
|
void method_info_unref (MethodInfo *info);
|
|
|
|
|
const char* method_info_get_name (MethodInfo *info);
|
2005-02-17 Colin Walters <walters@verbum.org>
* glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
(parse_node, parse_interface, parse_method, parse_signal)
(parse_property, parse_annotation): Lose if we're currently in an
annotation.
(parse_annotation): New function.
(parser_start_element, parser_end_element): Handle annotation.
(parse_method, parse_interface): Remove support for c_name attribute,
switch to annotations.
* glib/dbus-gidl.h (interface_info_get_binding_names)
(method_info_get_binding_names)
(interface_info_get_binding_name, method_info_get_binding_name)
(interface_info_set_binding_name, method_info_set_binding_name):
Remove.
(interface_info_get_annotations, method_info_get_annotations)
(interface_info_get_annotation, method_info_get_annotation)
(interface_info_add_annotation, method_info_add_annotation):
Prototype.
* glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
for "bindings".
(struct MethodInfo): Ditto.
Straightfoward conversion of binding methods into annotation methods
as prototyped.
* glib/dbus-glib-tool.c (pretty_print): Print annotations.
* glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
* glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
Use new annotation API.
* doc/introspect.dtd: Fix a number of DTD syntax errors. Add
annotation element.
* doc/dbus-specification.xml: Discuss introspection annotations,
include list of well-known annotations.
* test/glib/test-service-glib.xml: Make validate against new DTD.
2005-02-17 21:11:18 +00:00
|
|
|
GSList* method_info_get_annotations (MethodInfo *info);
|
|
|
|
|
const char* method_info_get_annotation (MethodInfo *info,
|
|
|
|
|
const char *annotation);
|
|
|
|
|
void method_info_add_annotation (MethodInfo *info,
|
|
|
|
|
const char *name,
|
|
|
|
|
const char *value);
|
2005-01-29 19:52:19 +00:00
|
|
|
GSList* method_info_get_args (MethodInfo *info);
|
|
|
|
|
void method_info_add_arg (MethodInfo *info,
|
|
|
|
|
ArgInfo *arg);
|
2005-02-12 20:27:45 +00:00
|
|
|
int method_info_get_n_args (MethodInfo *info);
|
2005-01-29 19:52:19 +00:00
|
|
|
SignalInfo* signal_info_new (const char *name);
|
|
|
|
|
SignalInfo* signal_info_ref (SignalInfo *info);
|
|
|
|
|
void signal_info_unref (SignalInfo *info);
|
|
|
|
|
const char* signal_info_get_name (SignalInfo *info);
|
|
|
|
|
GSList* signal_info_get_args (SignalInfo *info);
|
|
|
|
|
void signal_info_add_arg (SignalInfo *info,
|
|
|
|
|
ArgInfo *arg);
|
2005-02-12 20:27:45 +00:00
|
|
|
int signal_info_get_n_args (SignalInfo *info);
|
2005-01-29 19:52:19 +00:00
|
|
|
PropertyInfo* property_info_new (const char *name,
|
2005-02-27 Colin Walters <walters@verbum.org>
* glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
Change return value to const char * instead of int so we can do
full signatures.
(struct PropertyInfo, struct ArgInfo): Store char *.
(property_info_new, arg_info_new): Update parameters, strdup.
(property_info_unref, arg_info_unref): Free.
* glib/dbus-gidl.h: Update prototypes.
* glib/dbus-gparser.c (basic_type_from_string): Delete.
(validate_signature): New function, just validates signature and
sets GError.
(parse_property, parse_arg): Invoke validate_signature. Store
signature instead of just type code.
* glib/dbus-gvalue.c (base_type_from_signature): New utility
function to return a primary type for a signature, dropping
information about types in container types.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_binding_type_from_type)
(dbus_gvalue_ctype_from_type): Update to take full signature
instead of type code.
(dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
* glib/dbus-gvalue.h: Update prototypes for above.
* glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
(introspect_properties, introspect_signals, write_interface):
Update to handle signatures, and remove usage of
_dbus_gutils_type_to_string.
(handle_introspect): Print out type codes instead of e.g. "string"
in hardcoded introspection XML; also use x_AS_STRING constants
instead of hardcoding in string.
* glib/dbus-glib-tool.c (pretty_print): Handle signature change
to string. Remove usage of _dbus_gutils_type_to_string.
* glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
* glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
deletion.
* glib/dbus-binding-tool-glib.c (compute_marshaller)
(compute_marshaller_name, generate_glue): Handle signature change
to string.
(write_formal_parameters, write_args_for_direction): Ditto, and
remove FIXME.
* tools/dbus-tree-view.c (type_to_string): Delete.
(info_set_func_text): Update to print full signatures.
* test/glib/test-service-glib.xml: Change types to new
introspection format.
2005-02-27 17:38:12 +00:00
|
|
|
const char *type,
|
2005-01-29 19:52:19 +00:00
|
|
|
PropertyAccessFlags access);
|
|
|
|
|
PropertyInfo* property_info_ref (PropertyInfo *info);
|
|
|
|
|
void property_info_unref (PropertyInfo *info);
|
|
|
|
|
const char* property_info_get_name (PropertyInfo *info);
|
2005-02-27 Colin Walters <walters@verbum.org>
* glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
Change return value to const char * instead of int so we can do
full signatures.
(struct PropertyInfo, struct ArgInfo): Store char *.
(property_info_new, arg_info_new): Update parameters, strdup.
(property_info_unref, arg_info_unref): Free.
* glib/dbus-gidl.h: Update prototypes.
* glib/dbus-gparser.c (basic_type_from_string): Delete.
(validate_signature): New function, just validates signature and
sets GError.
(parse_property, parse_arg): Invoke validate_signature. Store
signature instead of just type code.
* glib/dbus-gvalue.c (base_type_from_signature): New utility
function to return a primary type for a signature, dropping
information about types in container types.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_binding_type_from_type)
(dbus_gvalue_ctype_from_type): Update to take full signature
instead of type code.
(dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
* glib/dbus-gvalue.h: Update prototypes for above.
* glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
(introspect_properties, introspect_signals, write_interface):
Update to handle signatures, and remove usage of
_dbus_gutils_type_to_string.
(handle_introspect): Print out type codes instead of e.g. "string"
in hardcoded introspection XML; also use x_AS_STRING constants
instead of hardcoding in string.
* glib/dbus-glib-tool.c (pretty_print): Handle signature change
to string. Remove usage of _dbus_gutils_type_to_string.
* glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
* glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
deletion.
* glib/dbus-binding-tool-glib.c (compute_marshaller)
(compute_marshaller_name, generate_glue): Handle signature change
to string.
(write_formal_parameters, write_args_for_direction): Ditto, and
remove FIXME.
* tools/dbus-tree-view.c (type_to_string): Delete.
(info_set_func_text): Update to print full signatures.
* test/glib/test-service-glib.xml: Change types to new
introspection format.
2005-02-27 17:38:12 +00:00
|
|
|
const char* property_info_get_type (PropertyInfo *info);
|
2005-01-29 19:52:19 +00:00
|
|
|
PropertyAccessFlags property_info_get_access (PropertyInfo *info);
|
|
|
|
|
ArgInfo* arg_info_new (const char *name,
|
|
|
|
|
ArgDirection direction,
|
2005-02-27 Colin Walters <walters@verbum.org>
* glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
Change return value to const char * instead of int so we can do
full signatures.
(struct PropertyInfo, struct ArgInfo): Store char *.
(property_info_new, arg_info_new): Update parameters, strdup.
(property_info_unref, arg_info_unref): Free.
* glib/dbus-gidl.h: Update prototypes.
* glib/dbus-gparser.c (basic_type_from_string): Delete.
(validate_signature): New function, just validates signature and
sets GError.
(parse_property, parse_arg): Invoke validate_signature. Store
signature instead of just type code.
* glib/dbus-gvalue.c (base_type_from_signature): New utility
function to return a primary type for a signature, dropping
information about types in container types.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_binding_type_from_type)
(dbus_gvalue_ctype_from_type): Update to take full signature
instead of type code.
(dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
* glib/dbus-gvalue.h: Update prototypes for above.
* glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
(introspect_properties, introspect_signals, write_interface):
Update to handle signatures, and remove usage of
_dbus_gutils_type_to_string.
(handle_introspect): Print out type codes instead of e.g. "string"
in hardcoded introspection XML; also use x_AS_STRING constants
instead of hardcoding in string.
* glib/dbus-glib-tool.c (pretty_print): Handle signature change
to string. Remove usage of _dbus_gutils_type_to_string.
* glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
* glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
deletion.
* glib/dbus-binding-tool-glib.c (compute_marshaller)
(compute_marshaller_name, generate_glue): Handle signature change
to string.
(write_formal_parameters, write_args_for_direction): Ditto, and
remove FIXME.
* tools/dbus-tree-view.c (type_to_string): Delete.
(info_set_func_text): Update to print full signatures.
* test/glib/test-service-glib.xml: Change types to new
introspection format.
2005-02-27 17:38:12 +00:00
|
|
|
const char *type);
|
2005-01-29 19:52:19 +00:00
|
|
|
ArgInfo* arg_info_ref (ArgInfo *info);
|
|
|
|
|
void arg_info_unref (ArgInfo *info);
|
|
|
|
|
const char* arg_info_get_name (ArgInfo *info);
|
2005-02-27 Colin Walters <walters@verbum.org>
* glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
Change return value to const char * instead of int so we can do
full signatures.
(struct PropertyInfo, struct ArgInfo): Store char *.
(property_info_new, arg_info_new): Update parameters, strdup.
(property_info_unref, arg_info_unref): Free.
* glib/dbus-gidl.h: Update prototypes.
* glib/dbus-gparser.c (basic_type_from_string): Delete.
(validate_signature): New function, just validates signature and
sets GError.
(parse_property, parse_arg): Invoke validate_signature. Store
signature instead of just type code.
* glib/dbus-gvalue.c (base_type_from_signature): New utility
function to return a primary type for a signature, dropping
information about types in container types.
(dbus_gvalue_genmarshal_name_from_type)
(dbus_gvalue_binding_type_from_type)
(dbus_gvalue_ctype_from_type): Update to take full signature
instead of type code.
(dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
* glib/dbus-gvalue.h: Update prototypes for above.
* glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
(introspect_properties, introspect_signals, write_interface):
Update to handle signatures, and remove usage of
_dbus_gutils_type_to_string.
(handle_introspect): Print out type codes instead of e.g. "string"
in hardcoded introspection XML; also use x_AS_STRING constants
instead of hardcoding in string.
* glib/dbus-glib-tool.c (pretty_print): Handle signature change
to string. Remove usage of _dbus_gutils_type_to_string.
* glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
* glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
deletion.
* glib/dbus-binding-tool-glib.c (compute_marshaller)
(compute_marshaller_name, generate_glue): Handle signature change
to string.
(write_formal_parameters, write_args_for_direction): Ditto, and
remove FIXME.
* tools/dbus-tree-view.c (type_to_string): Delete.
(info_set_func_text): Update to print full signatures.
* test/glib/test-service-glib.xml: Change types to new
introspection format.
2005-02-27 17:38:12 +00:00
|
|
|
const char* arg_info_get_type (ArgInfo *info);
|
2005-01-29 19:52:19 +00:00
|
|
|
ArgDirection arg_info_get_direction (ArgInfo *info);
|
2003-08-13 22:14:47 +00:00
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
|
|
#endif /* DBUS_GLIB_IDL_H */
|
2003-09-07 23:04:54 +00:00
|
|
|
|
|
|
|
|
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
|