2 * Copyright (C) 2007 OpenedHand Ltd.
4 * Author: Jorn Baayen <jorn@openedhand.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GUPNP_SERVICE_H__
23 #define __GUPNP_SERVICE_H__
27 #include "gupnp-service-info.h"
32 gupnp_service_get_type (void) G_GNUC_CONST;
34 #define GUPNP_TYPE_SERVICE \
35 (gupnp_service_get_type ())
36 #define GUPNP_SERVICE(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
40 #define GUPNP_SERVICE_CLASS(obj) \
41 (G_TYPE_CHECK_CLASS_CAST ((obj), \
44 #define GUPNP_IS_SERVICE(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
47 #define GUPNP_IS_SERVICE_CLASS(obj) \
48 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
50 #define GUPNP_SERVICE_GET_CLASS(obj) \
51 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
58 * Opaque structure for holding in-progress action data.
60 typedef struct _GUPnPServiceAction GUPnPServiceAction;
63 gupnp_service_action_get_type (void) G_GNUC_CONST;
65 #define GUPNP_TYPE_SERVICE_ACTION (gupnp_service_action_get_type ())
67 typedef struct _GUPnPServicePrivate GUPnPServicePrivate;
72 * This struct contains private data only, and should be accessed using the
76 GUPnPServiceInfo parent;
78 GUPnPServicePrivate *priv;
82 GUPnPServiceInfoClass parent_class;
84 void (* action_invoked) (GUPnPService *service,
85 GUPnPServiceAction *action);
87 void (* query_variable) (GUPnPService *service,
91 void (* notify_failed) (GUPnPService *service,
92 const GList *callback_urls,
93 const GError *reason);
96 void (* _gupnp_reserved1) (void);
97 void (* _gupnp_reserved2) (void);
98 void (* _gupnp_reserved3) (void);
99 void (* _gupnp_reserved4) (void);
104 gupnp_service_action_get_type (void);
107 gupnp_service_action_get_name (GUPnPServiceAction *action);
110 gupnp_service_action_get_locales (GUPnPServiceAction *action);
113 gupnp_service_action_get (GUPnPServiceAction *action,
114 ...) G_GNUC_NULL_TERMINATED;
117 gupnp_service_action_get_valist (GUPnPServiceAction *action,
121 gupnp_service_action_get_values (GUPnPServiceAction *action,
126 gupnp_service_action_get_value (GUPnPServiceAction *action,
127 const char *argument,
131 gupnp_service_action_get_gvalue (GUPnPServiceAction *action,
132 const char *argument,
136 gupnp_service_action_set (GUPnPServiceAction *action,
137 ...) G_GNUC_NULL_TERMINATED;
140 gupnp_service_action_set_valist (GUPnPServiceAction *action,
144 gupnp_service_action_set_values (GUPnPServiceAction *action,
149 gupnp_service_action_set_value (GUPnPServiceAction *action,
150 const char *argument,
151 const GValue *value);
154 gupnp_service_action_return (GUPnPServiceAction *action);
157 gupnp_service_action_return_error (GUPnPServiceAction *action,
159 const char *error_description);
162 gupnp_service_action_get_message (GUPnPServiceAction *action);
165 gupnp_service_notify (GUPnPService *service,
166 ...) G_GNUC_NULL_TERMINATED;
169 gupnp_service_notify_valist (GUPnPService *service,
173 gupnp_service_notify_value (GUPnPService *service,
174 const char *variable,
175 const GValue *value);
178 gupnp_service_freeze_notify (GUPnPService *service);
181 gupnp_service_thaw_notify (GUPnPService *service);
184 gupnp_service_signals_autoconnect (GUPnPService *service,
190 #endif /* __GUPNP_SERVICE_H__ */