2 * Copyright (C) 2007 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
3 * Copyright (C) 2006, 2007 OpenedHand Ltd.
5 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
6 * Jorn Baayen <jorn@openedhand.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
24 #ifndef __GUPNP_SERVICE_INTROSPECTION_H__
25 #define __GUPNP_SERVICE_INTROSPECTION_H__
27 #include <glib-object.h>
32 gupnp_service_introspection_get_type (void) G_GNUC_CONST;
34 #define GUPNP_TYPE_SERVICE_INTROSPECTION \
35 (gupnp_service_introspection_get_type ())
36 #define GUPNP_SERVICE_INTROSPECTION(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
38 GUPNP_TYPE_SERVICE_INTROSPECTION, \
39 GUPnPServiceIntrospection))
40 #define GUPNP_SERVICE_INTROSPECTION_CLASS(obj) \
41 (G_TYPE_CHECK_CLASS_CAST ((obj), \
42 GUPNP_TYPE_SERVICE_INTROSPECTION, \
43 GUPnPServiceIntrospectionClass))
44 #define GUPNP_IS_SERVICE_INTROSPECTION(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
46 GUPNP_TYPE_SERVICE_INTROSPECTION))
47 #define GUPNP_IS_SERVICE_INTROSPECTION_CLASS(obj) \
48 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
49 GUPNP_TYPE_SERVICE_INTROSPECTION))
50 #define GUPNP_SERVICE_INTROSPECTION_GET_CLASS(obj) \
51 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
52 GUPNP_TYPE_SERVICE_INTROSPECTION, \
53 GUPnPServiceIntrospectionClass))
56 * GUPnPServiceActionArgDirection:
57 * @GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN: An "in" variable, to the service.
58 * @GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT: An "out" variable, from the service.
60 * Represents the direction of a service state variable.
64 GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN,
65 GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT
66 } GUPnPServiceActionArgDirection;
69 * GUPnPServiceActionArgInfo:
70 * @name: The name of the action argument.
71 * @direction: The direction of the action argument.
72 * @related_state_variable: The name of the state variable associated with this
74 * @retval: Whether this argument is the return value of the action.
76 * This structure contains information about the argument of service action.
80 GUPnPServiceActionArgDirection direction;
81 char *related_state_variable;
83 } GUPnPServiceActionArgInfo;
86 * GUPnPServiceActionInfo:
87 * @name: The name of the action argument.
88 * @arguments: (type GList) (element-type GUPnP.ServiceActionArgInfo):A GList of all the arguments
89 * (of type #GUPnPServiceActionArgInfo) of this action.
91 * This structure contains information about a service action.
95 GList *arguments; /* list of #GUPnPServiceActionArgInfo */
96 } GUPnPServiceActionInfo;
99 * GUPnPServiceStateVariableInfo:
100 * @name: The name of the state variable.
101 * @send_events: Whether this state variable can source events.
102 * @is_numeric: Wether this state variable is a numeric type (integer and
104 * @type: The GType of this state variable.
105 * @default_value: The default value of this state variable.
106 * @minimum: The minimum value of this state variable. Only applies to numeric
108 * @maximum: The maximum value of this state variable. Only applies to numeric
110 * @step: The step value of this state variable. Only applies to numeric
112 * @allowed_values: (element-type utf8): The allowed values of this state variable. Only applies to
113 * string data types. Unlike the other fields in this structure, this field
114 * contains a list of (char *) strings rather than GValues.
116 * This structure contains information about service state variable.
120 gboolean send_events;
123 GValue default_value;
127 GList *allowed_values;
128 } GUPnPServiceStateVariableInfo;
130 typedef struct _GUPnPServiceIntrospectionPrivate
131 GUPnPServiceIntrospectionPrivate;
132 typedef struct _GUPnPServiceIntrospection
133 GUPnPServiceIntrospection;
134 typedef struct _GUPnPServiceIntrospectionClass
135 GUPnPServiceIntrospectionClass;
138 * GUPnPServiceIntrospection:
140 * This struct contains private data only, and should be accessed using the
143 struct _GUPnPServiceIntrospection {
146 GUPnPServiceIntrospectionPrivate *priv;
149 struct _GUPnPServiceIntrospectionClass {
150 GObjectClass parent_class;
154 gupnp_service_introspection_list_action_names
155 (GUPnPServiceIntrospection *introspection);
158 gupnp_service_introspection_list_actions
159 (GUPnPServiceIntrospection *introspection);
161 const GUPnPServiceActionInfo *
162 gupnp_service_introspection_get_action
163 (GUPnPServiceIntrospection *introspection,
164 const gchar *action_name);
167 gupnp_service_introspection_list_state_variable_names
168 (GUPnPServiceIntrospection *introspection);
171 gupnp_service_introspection_list_state_variables
172 (GUPnPServiceIntrospection *introspection);
174 const GUPnPServiceStateVariableInfo *
175 gupnp_service_introspection_get_state_variable
176 (GUPnPServiceIntrospection *introspection,
177 const gchar *variable_name);
181 #endif /* __GUPNP_SERVICE_INTROSPECTION_H__ */