(1) regenerate leaner genfiles, we're not using the object manager functionality...
[systembsd.git] / src / interfaces / localed / localed-gen.c
CommitLineData
5047f6bf 1/*
2 * Generated by gdbus-codegen 2.40.0. DO NOT EDIT.
3 *
4 * The license of this code is the same as for the source it was derived from.
5 */
6
7#ifdef HAVE_CONFIG_H
8# include "config.h"
9#endif
10
1aa981f7 11#include "localed-gen.h"
5047f6bf 12
13#include <string.h>
14#ifdef G_OS_UNIX
15# include <gio/gunixfdlist.h>
16#endif
17
5047f6bf 18/* ------------------------------------------------------------------------
19 * Code for interface org.freedesktop.locale1
20 * ------------------------------------------------------------------------
21 */
22
23/**
1aa981f7 24 * SECTION:localedLocale1
25 * @title: localedLocale1
5047f6bf 26 * @short_description: Generated C code for the org.freedesktop.locale1 D-Bus interface
27 *
28 * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link> D-Bus interface in C.
29 */
30
31/* ---- Introspection data for org.freedesktop.locale1 ---- */
32
1aa981f7 33static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg0 =
5047f6bf 34{
35 {
36 -1,
1aa981f7 37 (gchar *) "unnamed_arg0",
5047f6bf 38 (gchar *) "as",
39 NULL
40 },
41 FALSE
42};
43
1aa981f7 44static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg1 =
5047f6bf 45{
46 {
47 -1,
1aa981f7 48 (gchar *) "unnamed_arg1",
5047f6bf 49 (gchar *) "b",
50 NULL
51 },
52 FALSE
53};
54
1aa981f7 55static const _ExtendedGDBusArgInfo * const _localed_locale1_method_info_set_locale_IN_ARG_pointers[] =
5047f6bf 56{
1aa981f7 57 &_localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg0,
58 &_localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg1,
5047f6bf 59 NULL
60};
61
1aa981f7 62static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_locale =
5047f6bf 63{
64 {
65 -1,
66 (gchar *) "SetLocale",
1aa981f7 67 (GDBusArgInfo **) &_localed_locale1_method_info_set_locale_IN_ARG_pointers,
5047f6bf 68 NULL,
69 NULL
70 },
71 "handle-set-locale",
72 FALSE
73};
74
1aa981f7 75static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg0 =
5047f6bf 76{
77 {
78 -1,
1aa981f7 79 (gchar *) "unnamed_arg0",
5047f6bf 80 (gchar *) "s",
81 NULL
82 },
83 FALSE
84};
85
1aa981f7 86static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg1 =
5047f6bf 87{
88 {
89 -1,
1aa981f7 90 (gchar *) "unnamed_arg1",
5047f6bf 91 (gchar *) "s",
92 NULL
93 },
94 FALSE
95};
96
1aa981f7 97static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg2 =
5047f6bf 98{
99 {
100 -1,
1aa981f7 101 (gchar *) "unnamed_arg2",
5047f6bf 102 (gchar *) "b",
103 NULL
104 },
105 FALSE
106};
107
1aa981f7 108static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg3 =
5047f6bf 109{
110 {
111 -1,
1aa981f7 112 (gchar *) "unnamed_arg3",
5047f6bf 113 (gchar *) "b",
114 NULL
115 },
116 FALSE
117};
118
1aa981f7 119static const _ExtendedGDBusArgInfo * const _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers[] =
5047f6bf 120{
1aa981f7 121 &_localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg0,
122 &_localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg1,
123 &_localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg2,
124 &_localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg3,
5047f6bf 125 NULL
126};
127
1aa981f7 128static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_vconsole_keyboard =
5047f6bf 129{
130 {
131 -1,
132 (gchar *) "SetVConsoleKeyboard",
1aa981f7 133 (GDBusArgInfo **) &_localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers,
5047f6bf 134 NULL,
135 NULL
136 },
137 "handle-set-vconsole-keyboard",
138 FALSE
139};
140
1aa981f7 141static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg0 =
5047f6bf 142{
143 {
144 -1,
1aa981f7 145 (gchar *) "unnamed_arg0",
5047f6bf 146 (gchar *) "s",
147 NULL
148 },
149 FALSE
150};
151
1aa981f7 152static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg1 =
5047f6bf 153{
154 {
155 -1,
1aa981f7 156 (gchar *) "unnamed_arg1",
5047f6bf 157 (gchar *) "s",
158 NULL
159 },
160 FALSE
161};
162
1aa981f7 163static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg2 =
5047f6bf 164{
165 {
166 -1,
1aa981f7 167 (gchar *) "unnamed_arg2",
5047f6bf 168 (gchar *) "s",
169 NULL
170 },
171 FALSE
172};
173
1aa981f7 174static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg3 =
5047f6bf 175{
176 {
177 -1,
1aa981f7 178 (gchar *) "unnamed_arg3",
5047f6bf 179 (gchar *) "s",
180 NULL
181 },
182 FALSE
183};
184
1aa981f7 185static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg4 =
5047f6bf 186{
187 {
188 -1,
1aa981f7 189 (gchar *) "unnamed_arg4",
5047f6bf 190 (gchar *) "b",
191 NULL
192 },
193 FALSE
194};
195
1aa981f7 196static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg5 =
5047f6bf 197{
198 {
199 -1,
1aa981f7 200 (gchar *) "unnamed_arg5",
5047f6bf 201 (gchar *) "b",
202 NULL
203 },
204 FALSE
205};
206
1aa981f7 207static const _ExtendedGDBusArgInfo * const _localed_locale1_method_info_set_x11_keyboard_IN_ARG_pointers[] =
5047f6bf 208{
1aa981f7 209 &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg0,
210 &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg1,
211 &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg2,
212 &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg3,
213 &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg4,
214 &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg5,
5047f6bf 215 NULL
216};
217
1aa981f7 218static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_x11_keyboard =
5047f6bf 219{
220 {
221 -1,
222 (gchar *) "SetX11Keyboard",
1aa981f7 223 (GDBusArgInfo **) &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_pointers,
5047f6bf 224 NULL,
225 NULL
226 },
227 "handle-set-x11-keyboard",
228 FALSE
229};
230
1aa981f7 231static const _ExtendedGDBusMethodInfo * const _localed_locale1_method_info_pointers[] =
5047f6bf 232{
1aa981f7 233 &_localed_locale1_method_info_set_locale,
234 &_localed_locale1_method_info_set_vconsole_keyboard,
235 &_localed_locale1_method_info_set_x11_keyboard,
5047f6bf 236 NULL
237};
238
1aa981f7 239static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_locale =
5047f6bf 240{
241 {
242 -1,
243 (gchar *) "Locale",
244 (gchar *) "as",
245 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
246 NULL
247 },
248 "locale",
249 FALSE
250};
251
1aa981f7 252static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_layout =
5047f6bf 253{
254 {
255 -1,
1aa981f7 256 (gchar *) "X11Layout",
5047f6bf 257 (gchar *) "s",
258 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
259 NULL
260 },
1aa981f7 261 "x11-layout",
5047f6bf 262 FALSE
263};
264
1aa981f7 265static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_model =
5047f6bf 266{
267 {
268 -1,
1aa981f7 269 (gchar *) "X11Model",
5047f6bf 270 (gchar *) "s",
271 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
272 NULL
273 },
1aa981f7 274 "x11-model",
5047f6bf 275 FALSE
276};
277
1aa981f7 278static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_variant =
5047f6bf 279{
280 {
281 -1,
1aa981f7 282 (gchar *) "X11Variant",
5047f6bf 283 (gchar *) "s",
284 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
285 NULL
286 },
1aa981f7 287 "x11-variant",
5047f6bf 288 FALSE
289};
290
1aa981f7 291static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_options =
5047f6bf 292{
293 {
294 -1,
1aa981f7 295 (gchar *) "X11Options",
5047f6bf 296 (gchar *) "s",
297 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
298 NULL
299 },
1aa981f7 300 "x11-options",
5047f6bf 301 FALSE
302};
303
1aa981f7 304static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_vconsole_keymap =
5047f6bf 305{
306 {
307 -1,
1aa981f7 308 (gchar *) "VConsoleKeymap",
5047f6bf 309 (gchar *) "s",
310 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
311 NULL
312 },
1aa981f7 313 "vconsole-keymap",
5047f6bf 314 FALSE
315};
316
1aa981f7 317static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_vconsole_keymap_toggle =
5047f6bf 318{
319 {
320 -1,
1aa981f7 321 (gchar *) "VConsoleKeymapToggle",
5047f6bf 322 (gchar *) "s",
323 G_DBUS_PROPERTY_INFO_FLAGS_READABLE,
324 NULL
325 },
1aa981f7 326 "vconsole-keymap-toggle",
5047f6bf 327 FALSE
328};
329
1aa981f7 330static const _ExtendedGDBusPropertyInfo * const _localed_locale1_property_info_pointers[] =
5047f6bf 331{
1aa981f7 332 &_localed_locale1_property_info_locale,
333 &_localed_locale1_property_info_x11_layout,
334 &_localed_locale1_property_info_x11_model,
335 &_localed_locale1_property_info_x11_variant,
336 &_localed_locale1_property_info_x11_options,
337 &_localed_locale1_property_info_vconsole_keymap,
338 &_localed_locale1_property_info_vconsole_keymap_toggle,
5047f6bf 339 NULL
340};
341
1aa981f7 342static const _ExtendedGDBusInterfaceInfo _localed_locale1_interface_info =
5047f6bf 343{
344 {
345 -1,
346 (gchar *) "org.freedesktop.locale1",
1aa981f7 347 (GDBusMethodInfo **) &_localed_locale1_method_info_pointers,
5047f6bf 348 NULL,
1aa981f7 349 (GDBusPropertyInfo **) &_localed_locale1_property_info_pointers,
5047f6bf 350 NULL
351 },
352 "locale1",
353};
354
355
356/**
1aa981f7 357 * localed_locale1_interface_info:
5047f6bf 358 *
359 * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link> D-Bus interface.
360 *
361 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
362 */
363GDBusInterfaceInfo *
1aa981f7 364localed_locale1_interface_info (void)
5047f6bf 365{
1aa981f7 366 return (GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct;
5047f6bf 367}
368
369/**
1aa981f7 370 * localed_locale1_override_properties:
5047f6bf 371 * @klass: The class structure for a #GObject<!-- -->-derived class.
372 * @property_id_begin: The property id to assign to the first overridden property.
373 *
1aa981f7 374 * Overrides all #GObject properties in the #localedLocale1 interface for a concrete class.
5047f6bf 375 * The properties are overridden in the order they are defined.
376 *
377 * Returns: The last property id.
378 */
379guint
1aa981f7 380localed_locale1_override_properties (GObjectClass *klass, guint property_id_begin)
5047f6bf 381{
382 g_object_class_override_property (klass, property_id_begin++, "locale");
5047f6bf 383 g_object_class_override_property (klass, property_id_begin++, "x11-layout");
384 g_object_class_override_property (klass, property_id_begin++, "x11-model");
385 g_object_class_override_property (klass, property_id_begin++, "x11-variant");
386 g_object_class_override_property (klass, property_id_begin++, "x11-options");
1aa981f7 387 g_object_class_override_property (klass, property_id_begin++, "vconsole-keymap");
388 g_object_class_override_property (klass, property_id_begin++, "vconsole-keymap-toggle");
5047f6bf 389 return property_id_begin - 1;
390}
391
392
393
394/**
1aa981f7 395 * localedLocale1:
5047f6bf 396 *
397 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>.
398 */
399
400/**
1aa981f7 401 * localedLocale1Iface:
5047f6bf 402 * @parent_iface: The parent interface.
1aa981f7 403 * @handle_set_locale: Handler for the #localedLocale1::handle-set-locale signal.
404 * @handle_set_vconsole_keyboard: Handler for the #localedLocale1::handle-set-vconsole-keyboard signal.
405 * @handle_set_x11_keyboard: Handler for the #localedLocale1::handle-set-x11-keyboard signal.
406 * @get_locale: Getter for the #localedLocale1:locale property.
407 * @get_vconsole_keymap: Getter for the #localedLocale1:vconsole-keymap property.
408 * @get_vconsole_keymap_toggle: Getter for the #localedLocale1:vconsole-keymap-toggle property.
409 * @get_x11_layout: Getter for the #localedLocale1:x11-layout property.
410 * @get_x11_model: Getter for the #localedLocale1:x11-model property.
411 * @get_x11_options: Getter for the #localedLocale1:x11-options property.
412 * @get_x11_variant: Getter for the #localedLocale1:x11-variant property.
5047f6bf 413 *
414 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>.
415 */
416
1aa981f7 417typedef localedLocale1Iface localedLocale1Interface;
418G_DEFINE_INTERFACE (localedLocale1, localed_locale1, G_TYPE_OBJECT);
5047f6bf 419
420static void
1aa981f7 421localed_locale1_default_init (localedLocale1Iface *iface)
5047f6bf 422{
423 /* GObject signals for incoming D-Bus method calls: */
424 /**
1aa981f7 425 * localedLocale1::handle-set-locale:
426 * @object: A #localedLocale1.
5047f6bf 427 * @invocation: A #GDBusMethodInvocation.
1aa981f7 428 * @arg_unnamed_arg0: Argument passed by remote caller.
429 * @arg_unnamed_arg1: Argument passed by remote caller.
5047f6bf 430 *
431 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-locale1.SetLocale">SetLocale()</link> D-Bus method.
432 *
1aa981f7 433 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call localed_locale1_complete_set_locale() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
5047f6bf 434 *
435 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
436 */
437 g_signal_new ("handle-set-locale",
438 G_TYPE_FROM_INTERFACE (iface),
439 G_SIGNAL_RUN_LAST,
1aa981f7 440 G_STRUCT_OFFSET (localedLocale1Iface, handle_set_locale),
5047f6bf 441 g_signal_accumulator_true_handled,
442 NULL,
443 g_cclosure_marshal_generic,
444 G_TYPE_BOOLEAN,
445 3,
446 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV, G_TYPE_BOOLEAN);
447
448 /**
1aa981f7 449 * localedLocale1::handle-set-vconsole-keyboard:
450 * @object: A #localedLocale1.
5047f6bf 451 * @invocation: A #GDBusMethodInvocation.
1aa981f7 452 * @arg_unnamed_arg0: Argument passed by remote caller.
453 * @arg_unnamed_arg1: Argument passed by remote caller.
454 * @arg_unnamed_arg2: Argument passed by remote caller.
455 * @arg_unnamed_arg3: Argument passed by remote caller.
5047f6bf 456 *
457 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-locale1.SetVConsoleKeyboard">SetVConsoleKeyboard()</link> D-Bus method.
458 *
1aa981f7 459 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call localed_locale1_complete_set_vconsole_keyboard() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
5047f6bf 460 *
461 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
462 */
463 g_signal_new ("handle-set-vconsole-keyboard",
464 G_TYPE_FROM_INTERFACE (iface),
465 G_SIGNAL_RUN_LAST,
1aa981f7 466 G_STRUCT_OFFSET (localedLocale1Iface, handle_set_vconsole_keyboard),
5047f6bf 467 g_signal_accumulator_true_handled,
468 NULL,
469 g_cclosure_marshal_generic,
470 G_TYPE_BOOLEAN,
471 5,
472 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
473
474 /**
1aa981f7 475 * localedLocale1::handle-set-x11-keyboard:
476 * @object: A #localedLocale1.
5047f6bf 477 * @invocation: A #GDBusMethodInvocation.
1aa981f7 478 * @arg_unnamed_arg0: Argument passed by remote caller.
479 * @arg_unnamed_arg1: Argument passed by remote caller.
480 * @arg_unnamed_arg2: Argument passed by remote caller.
481 * @arg_unnamed_arg3: Argument passed by remote caller.
482 * @arg_unnamed_arg4: Argument passed by remote caller.
483 * @arg_unnamed_arg5: Argument passed by remote caller.
5047f6bf 484 *
485 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-locale1.SetX11Keyboard">SetX11Keyboard()</link> D-Bus method.
486 *
1aa981f7 487 * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call localed_locale1_complete_set_x11_keyboard() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
5047f6bf 488 *
489 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
490 */
491 g_signal_new ("handle-set-x11-keyboard",
492 G_TYPE_FROM_INTERFACE (iface),
493 G_SIGNAL_RUN_LAST,
1aa981f7 494 G_STRUCT_OFFSET (localedLocale1Iface, handle_set_x11_keyboard),
5047f6bf 495 g_signal_accumulator_true_handled,
496 NULL,
497 g_cclosure_marshal_generic,
498 G_TYPE_BOOLEAN,
499 7,
500 G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
501
502 /* GObject properties for D-Bus properties: */
503 /**
1aa981f7 504 * localedLocale1:locale:
5047f6bf 505 *
506 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link>.
507 *
508 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
509 */
510 g_object_interface_install_property (iface,
511 g_param_spec_boxed ("locale", "Locale", "Locale", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
512 /**
1aa981f7 513 * localedLocale1:x11-layout:
5047f6bf 514 *
1aa981f7 515 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link>.
5047f6bf 516 *
517 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
518 */
519 g_object_interface_install_property (iface,
1aa981f7 520 g_param_spec_string ("x11-layout", "X11Layout", "X11Layout", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
5047f6bf 521 /**
1aa981f7 522 * localedLocale1:x11-model:
5047f6bf 523 *
1aa981f7 524 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link>.
5047f6bf 525 *
526 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
527 */
528 g_object_interface_install_property (iface,
1aa981f7 529 g_param_spec_string ("x11-model", "X11Model", "X11Model", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
5047f6bf 530 /**
1aa981f7 531 * localedLocale1:x11-variant:
5047f6bf 532 *
1aa981f7 533 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link>.
5047f6bf 534 *
535 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
536 */
537 g_object_interface_install_property (iface,
1aa981f7 538 g_param_spec_string ("x11-variant", "X11Variant", "X11Variant", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
5047f6bf 539 /**
1aa981f7 540 * localedLocale1:x11-options:
5047f6bf 541 *
1aa981f7 542 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link>.
5047f6bf 543 *
544 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
545 */
546 g_object_interface_install_property (iface,
1aa981f7 547 g_param_spec_string ("x11-options", "X11Options", "X11Options", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
5047f6bf 548 /**
1aa981f7 549 * localedLocale1:vconsole-keymap:
5047f6bf 550 *
1aa981f7 551 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link>.
5047f6bf 552 *
553 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
554 */
555 g_object_interface_install_property (iface,
1aa981f7 556 g_param_spec_string ("vconsole-keymap", "VConsoleKeymap", "VConsoleKeymap", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
5047f6bf 557 /**
1aa981f7 558 * localedLocale1:vconsole-keymap-toggle:
5047f6bf 559 *
1aa981f7 560 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link>.
5047f6bf 561 *
562 * Since the D-Bus property for this #GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
563 */
564 g_object_interface_install_property (iface,
1aa981f7 565 g_param_spec_string ("vconsole-keymap-toggle", "VConsoleKeymapToggle", "VConsoleKeymapToggle", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
5047f6bf 566}
567
568/**
1aa981f7 569 * localed_locale1_get_locale: (skip)
570 * @object: A #localedLocale1.
5047f6bf 571 *
572 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link> D-Bus property.
573 *
574 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
575 *
1aa981f7 576 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use localed_locale1_dup_locale() if on another thread.</warning>
5047f6bf 577 *
578 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
579 */
580const gchar *const *
1aa981f7 581localed_locale1_get_locale (localedLocale1 *object)
5047f6bf 582{
1aa981f7 583 return LOCALED_LOCALE1_GET_IFACE (object)->get_locale (object);
5047f6bf 584}
585
586/**
1aa981f7 587 * localed_locale1_dup_locale: (skip)
588 * @object: A #localedLocale1.
5047f6bf 589 *
590 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link> D-Bus property.
591 *
592 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
593 *
594 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
595 */
596gchar **
1aa981f7 597localed_locale1_dup_locale (localedLocale1 *object)
5047f6bf 598{
599 gchar **value;
600 g_object_get (G_OBJECT (object), "locale", &value, NULL);
601 return value;
602}
603
604/**
1aa981f7 605 * localed_locale1_set_locale: (skip)
606 * @object: A #localedLocale1.
5047f6bf 607 * @value: The value to set.
608 *
609 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link> D-Bus property to @value.
610 *
611 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
612 */
613void
1aa981f7 614localed_locale1_set_locale (localedLocale1 *object, const gchar *const *value)
5047f6bf 615{
616 g_object_set (G_OBJECT (object), "locale", value, NULL);
617}
618
619/**
1aa981f7 620 * localed_locale1_get_x11_layout: (skip)
621 * @object: A #localedLocale1.
5047f6bf 622 *
1aa981f7 623 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property.
5047f6bf 624 *
625 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
626 *
1aa981f7 627 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use localed_locale1_dup_x11_layout() if on another thread.</warning>
5047f6bf 628 *
629 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
630 */
631const gchar *
1aa981f7 632localed_locale1_get_x11_layout (localedLocale1 *object)
5047f6bf 633{
1aa981f7 634 return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_layout (object);
5047f6bf 635}
636
637/**
1aa981f7 638 * localed_locale1_dup_x11_layout: (skip)
639 * @object: A #localedLocale1.
5047f6bf 640 *
1aa981f7 641 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property.
5047f6bf 642 *
643 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
644 *
645 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
646 */
647gchar *
1aa981f7 648localed_locale1_dup_x11_layout (localedLocale1 *object)
5047f6bf 649{
650 gchar *value;
1aa981f7 651 g_object_get (G_OBJECT (object), "x11-layout", &value, NULL);
5047f6bf 652 return value;
653}
654
655/**
1aa981f7 656 * localed_locale1_set_x11_layout: (skip)
657 * @object: A #localedLocale1.
5047f6bf 658 * @value: The value to set.
659 *
1aa981f7 660 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property to @value.
5047f6bf 661 *
662 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
663 */
664void
1aa981f7 665localed_locale1_set_x11_layout (localedLocale1 *object, const gchar *value)
5047f6bf 666{
1aa981f7 667 g_object_set (G_OBJECT (object), "x11-layout", value, NULL);
5047f6bf 668}
669
670/**
1aa981f7 671 * localed_locale1_get_x11_model: (skip)
672 * @object: A #localedLocale1.
5047f6bf 673 *
1aa981f7 674 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property.
5047f6bf 675 *
676 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
677 *
1aa981f7 678 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use localed_locale1_dup_x11_model() if on another thread.</warning>
5047f6bf 679 *
680 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
681 */
682const gchar *
1aa981f7 683localed_locale1_get_x11_model (localedLocale1 *object)
5047f6bf 684{
1aa981f7 685 return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_model (object);
5047f6bf 686}
687
688/**
1aa981f7 689 * localed_locale1_dup_x11_model: (skip)
690 * @object: A #localedLocale1.
5047f6bf 691 *
1aa981f7 692 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property.
5047f6bf 693 *
694 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
695 *
696 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
697 */
698gchar *
1aa981f7 699localed_locale1_dup_x11_model (localedLocale1 *object)
5047f6bf 700{
701 gchar *value;
1aa981f7 702 g_object_get (G_OBJECT (object), "x11-model", &value, NULL);
5047f6bf 703 return value;
704}
705
706/**
1aa981f7 707 * localed_locale1_set_x11_model: (skip)
708 * @object: A #localedLocale1.
5047f6bf 709 * @value: The value to set.
710 *
1aa981f7 711 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property to @value.
5047f6bf 712 *
713 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
714 */
715void
1aa981f7 716localed_locale1_set_x11_model (localedLocale1 *object, const gchar *value)
5047f6bf 717{
1aa981f7 718 g_object_set (G_OBJECT (object), "x11-model", value, NULL);
5047f6bf 719}
720
721/**
1aa981f7 722 * localed_locale1_get_x11_variant: (skip)
723 * @object: A #localedLocale1.
5047f6bf 724 *
1aa981f7 725 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property.
5047f6bf 726 *
727 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
728 *
1aa981f7 729 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use localed_locale1_dup_x11_variant() if on another thread.</warning>
5047f6bf 730 *
731 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
732 */
733const gchar *
1aa981f7 734localed_locale1_get_x11_variant (localedLocale1 *object)
5047f6bf 735{
1aa981f7 736 return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_variant (object);
5047f6bf 737}
738
739/**
1aa981f7 740 * localed_locale1_dup_x11_variant: (skip)
741 * @object: A #localedLocale1.
5047f6bf 742 *
1aa981f7 743 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property.
5047f6bf 744 *
745 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
746 *
747 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
748 */
749gchar *
1aa981f7 750localed_locale1_dup_x11_variant (localedLocale1 *object)
5047f6bf 751{
752 gchar *value;
1aa981f7 753 g_object_get (G_OBJECT (object), "x11-variant", &value, NULL);
5047f6bf 754 return value;
755}
756
757/**
1aa981f7 758 * localed_locale1_set_x11_variant: (skip)
759 * @object: A #localedLocale1.
5047f6bf 760 * @value: The value to set.
761 *
1aa981f7 762 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property to @value.
5047f6bf 763 *
764 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
765 */
766void
1aa981f7 767localed_locale1_set_x11_variant (localedLocale1 *object, const gchar *value)
5047f6bf 768{
1aa981f7 769 g_object_set (G_OBJECT (object), "x11-variant", value, NULL);
5047f6bf 770}
771
772/**
1aa981f7 773 * localed_locale1_get_x11_options: (skip)
774 * @object: A #localedLocale1.
5047f6bf 775 *
1aa981f7 776 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property.
5047f6bf 777 *
778 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
779 *
1aa981f7 780 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use localed_locale1_dup_x11_options() if on another thread.</warning>
5047f6bf 781 *
782 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
783 */
784const gchar *
1aa981f7 785localed_locale1_get_x11_options (localedLocale1 *object)
5047f6bf 786{
1aa981f7 787 return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_options (object);
5047f6bf 788}
789
790/**
1aa981f7 791 * localed_locale1_dup_x11_options: (skip)
792 * @object: A #localedLocale1.
5047f6bf 793 *
1aa981f7 794 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property.
5047f6bf 795 *
796 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
797 *
798 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
799 */
800gchar *
1aa981f7 801localed_locale1_dup_x11_options (localedLocale1 *object)
5047f6bf 802{
803 gchar *value;
1aa981f7 804 g_object_get (G_OBJECT (object), "x11-options", &value, NULL);
5047f6bf 805 return value;
806}
807
808/**
1aa981f7 809 * localed_locale1_set_x11_options: (skip)
810 * @object: A #localedLocale1.
5047f6bf 811 * @value: The value to set.
812 *
1aa981f7 813 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property to @value.
5047f6bf 814 *
815 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
816 */
817void
1aa981f7 818localed_locale1_set_x11_options (localedLocale1 *object, const gchar *value)
5047f6bf 819{
1aa981f7 820 g_object_set (G_OBJECT (object), "x11-options", value, NULL);
5047f6bf 821}
822
823/**
1aa981f7 824 * localed_locale1_get_vconsole_keymap: (skip)
825 * @object: A #localedLocale1.
5047f6bf 826 *
1aa981f7 827 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property.
5047f6bf 828 *
829 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
830 *
1aa981f7 831 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use localed_locale1_dup_vconsole_keymap() if on another thread.</warning>
5047f6bf 832 *
833 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
834 */
835const gchar *
1aa981f7 836localed_locale1_get_vconsole_keymap (localedLocale1 *object)
5047f6bf 837{
1aa981f7 838 return LOCALED_LOCALE1_GET_IFACE (object)->get_vconsole_keymap (object);
5047f6bf 839}
840
841/**
1aa981f7 842 * localed_locale1_dup_vconsole_keymap: (skip)
843 * @object: A #localedLocale1.
5047f6bf 844 *
1aa981f7 845 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property.
5047f6bf 846 *
847 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
848 *
849 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
850 */
851gchar *
1aa981f7 852localed_locale1_dup_vconsole_keymap (localedLocale1 *object)
5047f6bf 853{
854 gchar *value;
1aa981f7 855 g_object_get (G_OBJECT (object), "vconsole-keymap", &value, NULL);
5047f6bf 856 return value;
857}
858
859/**
1aa981f7 860 * localed_locale1_set_vconsole_keymap: (skip)
861 * @object: A #localedLocale1.
5047f6bf 862 * @value: The value to set.
863 *
1aa981f7 864 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property to @value.
5047f6bf 865 *
866 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
867 */
868void
1aa981f7 869localed_locale1_set_vconsole_keymap (localedLocale1 *object, const gchar *value)
5047f6bf 870{
1aa981f7 871 g_object_set (G_OBJECT (object), "vconsole-keymap", value, NULL);
5047f6bf 872}
873
874/**
1aa981f7 875 * localed_locale1_get_vconsole_keymap_toggle: (skip)
876 * @object: A #localedLocale1.
5047f6bf 877 *
1aa981f7 878 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property.
5047f6bf 879 *
880 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
881 *
1aa981f7 882 * <warning>The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where @object was constructed. Use localed_locale1_dup_vconsole_keymap_toggle() if on another thread.</warning>
5047f6bf 883 *
884 * Returns: (transfer none): The property value or %NULL if the property is not set. Do not free the returned value, it belongs to @object.
885 */
886const gchar *
1aa981f7 887localed_locale1_get_vconsole_keymap_toggle (localedLocale1 *object)
5047f6bf 888{
1aa981f7 889 return LOCALED_LOCALE1_GET_IFACE (object)->get_vconsole_keymap_toggle (object);
5047f6bf 890}
891
892/**
1aa981f7 893 * localed_locale1_dup_vconsole_keymap_toggle: (skip)
894 * @object: A #localedLocale1.
5047f6bf 895 *
1aa981f7 896 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property.
5047f6bf 897 *
898 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
899 *
900 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
901 */
902gchar *
1aa981f7 903localed_locale1_dup_vconsole_keymap_toggle (localedLocale1 *object)
5047f6bf 904{
905 gchar *value;
1aa981f7 906 g_object_get (G_OBJECT (object), "vconsole-keymap-toggle", &value, NULL);
5047f6bf 907 return value;
908}
909
910/**
1aa981f7 911 * localed_locale1_set_vconsole_keymap_toggle: (skip)
912 * @object: A #localedLocale1.
5047f6bf 913 * @value: The value to set.
914 *
1aa981f7 915 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property to @value.
5047f6bf 916 *
917 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
918 */
919void
1aa981f7 920localed_locale1_set_vconsole_keymap_toggle (localedLocale1 *object, const gchar *value)
5047f6bf 921{
1aa981f7 922 g_object_set (G_OBJECT (object), "vconsole-keymap-toggle", value, NULL);
5047f6bf 923}
924
925/**
1aa981f7 926 * localed_locale1_call_set_locale:
927 * @proxy: A #localedLocale1Proxy.
928 * @arg_unnamed_arg0: Argument to pass with the method invocation.
929 * @arg_unnamed_arg1: Argument to pass with the method invocation.
5047f6bf 930 * @cancellable: (allow-none): A #GCancellable or %NULL.
931 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
932 * @user_data: User data to pass to @callback.
933 *
934 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-locale1.SetLocale">SetLocale()</link> D-Bus method on @proxy.
935 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1aa981f7 936 * You can then call localed_locale1_call_set_locale_finish() to get the result of the operation.
5047f6bf 937 *
1aa981f7 938 * See localed_locale1_call_set_locale_sync() for the synchronous, blocking version of this method.
5047f6bf 939 */
940void
1aa981f7 941localed_locale1_call_set_locale (
942 localedLocale1 *proxy,
943 const gchar *const *arg_unnamed_arg0,
944 gboolean arg_unnamed_arg1,
5047f6bf 945 GCancellable *cancellable,
946 GAsyncReadyCallback callback,
947 gpointer user_data)
948{
949 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
950 "SetLocale",
951 g_variant_new ("(^asb)",
1aa981f7 952 arg_unnamed_arg0,
953 arg_unnamed_arg1),
5047f6bf 954 G_DBUS_CALL_FLAGS_NONE,
955 -1,
956 cancellable,
957 callback,
958 user_data);
959}
960
961/**
1aa981f7 962 * localed_locale1_call_set_locale_finish:
963 * @proxy: A #localedLocale1Proxy.
964 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to localed_locale1_call_set_locale().
5047f6bf 965 * @error: Return location for error or %NULL.
966 *
1aa981f7 967 * Finishes an operation started with localed_locale1_call_set_locale().
5047f6bf 968 *
969 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
970 */
971gboolean
1aa981f7 972localed_locale1_call_set_locale_finish (
973 localedLocale1 *proxy,
5047f6bf 974 GAsyncResult *res,
975 GError **error)
976{
977 GVariant *_ret;
978 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
979 if (_ret == NULL)
980 goto _out;
981 g_variant_get (_ret,
982 "()");
983 g_variant_unref (_ret);
984_out:
985 return _ret != NULL;
986}
987
988/**
1aa981f7 989 * localed_locale1_call_set_locale_sync:
990 * @proxy: A #localedLocale1Proxy.
991 * @arg_unnamed_arg0: Argument to pass with the method invocation.
992 * @arg_unnamed_arg1: Argument to pass with the method invocation.
5047f6bf 993 * @cancellable: (allow-none): A #GCancellable or %NULL.
994 * @error: Return location for error or %NULL.
995 *
996 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-locale1.SetLocale">SetLocale()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
997 *
1aa981f7 998 * See localed_locale1_call_set_locale() for the asynchronous version of this method.
5047f6bf 999 *
1000 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1001 */
1002gboolean
1aa981f7 1003localed_locale1_call_set_locale_sync (
1004 localedLocale1 *proxy,
1005 const gchar *const *arg_unnamed_arg0,
1006 gboolean arg_unnamed_arg1,
5047f6bf 1007 GCancellable *cancellable,
1008 GError **error)
1009{
1010 GVariant *_ret;
1011 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1012 "SetLocale",
1013 g_variant_new ("(^asb)",
1aa981f7 1014 arg_unnamed_arg0,
1015 arg_unnamed_arg1),
5047f6bf 1016 G_DBUS_CALL_FLAGS_NONE,
1017 -1,
1018 cancellable,
1019 error);
1020 if (_ret == NULL)
1021 goto _out;
1022 g_variant_get (_ret,
1023 "()");
1024 g_variant_unref (_ret);
1025_out:
1026 return _ret != NULL;
1027}
1028
1029/**
1aa981f7 1030 * localed_locale1_call_set_vconsole_keyboard:
1031 * @proxy: A #localedLocale1Proxy.
1032 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1033 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1034 * @arg_unnamed_arg2: Argument to pass with the method invocation.
1035 * @arg_unnamed_arg3: Argument to pass with the method invocation.
5047f6bf 1036 * @cancellable: (allow-none): A #GCancellable or %NULL.
1037 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1038 * @user_data: User data to pass to @callback.
1039 *
1040 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-locale1.SetVConsoleKeyboard">SetVConsoleKeyboard()</link> D-Bus method on @proxy.
1041 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1aa981f7 1042 * You can then call localed_locale1_call_set_vconsole_keyboard_finish() to get the result of the operation.
5047f6bf 1043 *
1aa981f7 1044 * See localed_locale1_call_set_vconsole_keyboard_sync() for the synchronous, blocking version of this method.
5047f6bf 1045 */
1046void
1aa981f7 1047localed_locale1_call_set_vconsole_keyboard (
1048 localedLocale1 *proxy,
1049 const gchar *arg_unnamed_arg0,
1050 const gchar *arg_unnamed_arg1,
1051 gboolean arg_unnamed_arg2,
1052 gboolean arg_unnamed_arg3,
5047f6bf 1053 GCancellable *cancellable,
1054 GAsyncReadyCallback callback,
1055 gpointer user_data)
1056{
1057 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1058 "SetVConsoleKeyboard",
1059 g_variant_new ("(ssbb)",
1aa981f7 1060 arg_unnamed_arg0,
1061 arg_unnamed_arg1,
1062 arg_unnamed_arg2,
1063 arg_unnamed_arg3),
5047f6bf 1064 G_DBUS_CALL_FLAGS_NONE,
1065 -1,
1066 cancellable,
1067 callback,
1068 user_data);
1069}
1070
1071/**
1aa981f7 1072 * localed_locale1_call_set_vconsole_keyboard_finish:
1073 * @proxy: A #localedLocale1Proxy.
1074 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to localed_locale1_call_set_vconsole_keyboard().
5047f6bf 1075 * @error: Return location for error or %NULL.
1076 *
1aa981f7 1077 * Finishes an operation started with localed_locale1_call_set_vconsole_keyboard().
5047f6bf 1078 *
1079 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1080 */
1081gboolean
1aa981f7 1082localed_locale1_call_set_vconsole_keyboard_finish (
1083 localedLocale1 *proxy,
5047f6bf 1084 GAsyncResult *res,
1085 GError **error)
1086{
1087 GVariant *_ret;
1088 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1089 if (_ret == NULL)
1090 goto _out;
1091 g_variant_get (_ret,
1092 "()");
1093 g_variant_unref (_ret);
1094_out:
1095 return _ret != NULL;
1096}
1097
1098/**
1aa981f7 1099 * localed_locale1_call_set_vconsole_keyboard_sync:
1100 * @proxy: A #localedLocale1Proxy.
1101 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1102 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1103 * @arg_unnamed_arg2: Argument to pass with the method invocation.
1104 * @arg_unnamed_arg3: Argument to pass with the method invocation.
5047f6bf 1105 * @cancellable: (allow-none): A #GCancellable or %NULL.
1106 * @error: Return location for error or %NULL.
1107 *
1108 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-locale1.SetVConsoleKeyboard">SetVConsoleKeyboard()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1109 *
1aa981f7 1110 * See localed_locale1_call_set_vconsole_keyboard() for the asynchronous version of this method.
5047f6bf 1111 *
1112 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1113 */
1114gboolean
1aa981f7 1115localed_locale1_call_set_vconsole_keyboard_sync (
1116 localedLocale1 *proxy,
1117 const gchar *arg_unnamed_arg0,
1118 const gchar *arg_unnamed_arg1,
1119 gboolean arg_unnamed_arg2,
1120 gboolean arg_unnamed_arg3,
5047f6bf 1121 GCancellable *cancellable,
1122 GError **error)
1123{
1124 GVariant *_ret;
1125 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1126 "SetVConsoleKeyboard",
1127 g_variant_new ("(ssbb)",
1aa981f7 1128 arg_unnamed_arg0,
1129 arg_unnamed_arg1,
1130 arg_unnamed_arg2,
1131 arg_unnamed_arg3),
5047f6bf 1132 G_DBUS_CALL_FLAGS_NONE,
1133 -1,
1134 cancellable,
1135 error);
1136 if (_ret == NULL)
1137 goto _out;
1138 g_variant_get (_ret,
1139 "()");
1140 g_variant_unref (_ret);
1141_out:
1142 return _ret != NULL;
1143}
1144
1145/**
1aa981f7 1146 * localed_locale1_call_set_x11_keyboard:
1147 * @proxy: A #localedLocale1Proxy.
1148 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1149 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1150 * @arg_unnamed_arg2: Argument to pass with the method invocation.
1151 * @arg_unnamed_arg3: Argument to pass with the method invocation.
1152 * @arg_unnamed_arg4: Argument to pass with the method invocation.
1153 * @arg_unnamed_arg5: Argument to pass with the method invocation.
5047f6bf 1154 * @cancellable: (allow-none): A #GCancellable or %NULL.
1155 * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1156 * @user_data: User data to pass to @callback.
1157 *
1158 * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-locale1.SetX11Keyboard">SetX11Keyboard()</link> D-Bus method on @proxy.
1159 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1aa981f7 1160 * You can then call localed_locale1_call_set_x11_keyboard_finish() to get the result of the operation.
5047f6bf 1161 *
1aa981f7 1162 * See localed_locale1_call_set_x11_keyboard_sync() for the synchronous, blocking version of this method.
5047f6bf 1163 */
1164void
1aa981f7 1165localed_locale1_call_set_x11_keyboard (
1166 localedLocale1 *proxy,
1167 const gchar *arg_unnamed_arg0,
1168 const gchar *arg_unnamed_arg1,
1169 const gchar *arg_unnamed_arg2,
1170 const gchar *arg_unnamed_arg3,
1171 gboolean arg_unnamed_arg4,
1172 gboolean arg_unnamed_arg5,
5047f6bf 1173 GCancellable *cancellable,
1174 GAsyncReadyCallback callback,
1175 gpointer user_data)
1176{
1177 g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1178 "SetX11Keyboard",
1179 g_variant_new ("(ssssbb)",
1aa981f7 1180 arg_unnamed_arg0,
1181 arg_unnamed_arg1,
1182 arg_unnamed_arg2,
1183 arg_unnamed_arg3,
1184 arg_unnamed_arg4,
1185 arg_unnamed_arg5),
5047f6bf 1186 G_DBUS_CALL_FLAGS_NONE,
1187 -1,
1188 cancellable,
1189 callback,
1190 user_data);
1191}
1192
1193/**
1aa981f7 1194 * localed_locale1_call_set_x11_keyboard_finish:
1195 * @proxy: A #localedLocale1Proxy.
1196 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to localed_locale1_call_set_x11_keyboard().
5047f6bf 1197 * @error: Return location for error or %NULL.
1198 *
1aa981f7 1199 * Finishes an operation started with localed_locale1_call_set_x11_keyboard().
5047f6bf 1200 *
1201 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1202 */
1203gboolean
1aa981f7 1204localed_locale1_call_set_x11_keyboard_finish (
1205 localedLocale1 *proxy,
5047f6bf 1206 GAsyncResult *res,
1207 GError **error)
1208{
1209 GVariant *_ret;
1210 _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1211 if (_ret == NULL)
1212 goto _out;
1213 g_variant_get (_ret,
1214 "()");
1215 g_variant_unref (_ret);
1216_out:
1217 return _ret != NULL;
1218}
1219
1220/**
1aa981f7 1221 * localed_locale1_call_set_x11_keyboard_sync:
1222 * @proxy: A #localedLocale1Proxy.
1223 * @arg_unnamed_arg0: Argument to pass with the method invocation.
1224 * @arg_unnamed_arg1: Argument to pass with the method invocation.
1225 * @arg_unnamed_arg2: Argument to pass with the method invocation.
1226 * @arg_unnamed_arg3: Argument to pass with the method invocation.
1227 * @arg_unnamed_arg4: Argument to pass with the method invocation.
1228 * @arg_unnamed_arg5: Argument to pass with the method invocation.
5047f6bf 1229 * @cancellable: (allow-none): A #GCancellable or %NULL.
1230 * @error: Return location for error or %NULL.
1231 *
1232 * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-locale1.SetX11Keyboard">SetX11Keyboard()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1233 *
1aa981f7 1234 * See localed_locale1_call_set_x11_keyboard() for the asynchronous version of this method.
5047f6bf 1235 *
1236 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1237 */
1238gboolean
1aa981f7 1239localed_locale1_call_set_x11_keyboard_sync (
1240 localedLocale1 *proxy,
1241 const gchar *arg_unnamed_arg0,
1242 const gchar *arg_unnamed_arg1,
1243 const gchar *arg_unnamed_arg2,
1244 const gchar *arg_unnamed_arg3,
1245 gboolean arg_unnamed_arg4,
1246 gboolean arg_unnamed_arg5,
5047f6bf 1247 GCancellable *cancellable,
1248 GError **error)
1249{
1250 GVariant *_ret;
1251 _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1252 "SetX11Keyboard",
1253 g_variant_new ("(ssssbb)",
1aa981f7 1254 arg_unnamed_arg0,
1255 arg_unnamed_arg1,
1256 arg_unnamed_arg2,
1257 arg_unnamed_arg3,
1258 arg_unnamed_arg4,
1259 arg_unnamed_arg5),
5047f6bf 1260 G_DBUS_CALL_FLAGS_NONE,
1261 -1,
1262 cancellable,
1263 error);
1264 if (_ret == NULL)
1265 goto _out;
1266 g_variant_get (_ret,
1267 "()");
1268 g_variant_unref (_ret);
1269_out:
1270 return _ret != NULL;
1271}
1272
1273/**
1aa981f7 1274 * localed_locale1_complete_set_locale:
1275 * @object: A #localedLocale1.
5047f6bf 1276 * @invocation: (transfer full): A #GDBusMethodInvocation.
1277 *
1278 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-locale1.SetLocale">SetLocale()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1279 *
1280 * This method will free @invocation, you cannot use it afterwards.
1281 */
1282void
1aa981f7 1283localed_locale1_complete_set_locale (
1284 localedLocale1 *object,
5047f6bf 1285 GDBusMethodInvocation *invocation)
1286{
1287 g_dbus_method_invocation_return_value (invocation,
1288 g_variant_new ("()"));
1289}
1290
1291/**
1aa981f7 1292 * localed_locale1_complete_set_vconsole_keyboard:
1293 * @object: A #localedLocale1.
5047f6bf 1294 * @invocation: (transfer full): A #GDBusMethodInvocation.
1295 *
1296 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-locale1.SetVConsoleKeyboard">SetVConsoleKeyboard()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1297 *
1298 * This method will free @invocation, you cannot use it afterwards.
1299 */
1300void
1aa981f7 1301localed_locale1_complete_set_vconsole_keyboard (
1302 localedLocale1 *object,
5047f6bf 1303 GDBusMethodInvocation *invocation)
1304{
1305 g_dbus_method_invocation_return_value (invocation,
1306 g_variant_new ("()"));
1307}
1308
1309/**
1aa981f7 1310 * localed_locale1_complete_set_x11_keyboard:
1311 * @object: A #localedLocale1.
5047f6bf 1312 * @invocation: (transfer full): A #GDBusMethodInvocation.
1313 *
1314 * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-locale1.SetX11Keyboard">SetX11Keyboard()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1315 *
1316 * This method will free @invocation, you cannot use it afterwards.
1317 */
1318void
1aa981f7 1319localed_locale1_complete_set_x11_keyboard (
1320 localedLocale1 *object,
5047f6bf 1321 GDBusMethodInvocation *invocation)
1322{
1323 g_dbus_method_invocation_return_value (invocation,
1324 g_variant_new ("()"));
1325}
1326
1327/* ------------------------------------------------------------------------ */
1328
1329/**
1aa981f7 1330 * localedLocale1Proxy:
5047f6bf 1331 *
1aa981f7 1332 * The #localedLocale1Proxy structure contains only private data and should only be accessed using the provided API.
5047f6bf 1333 */
1334
1335/**
1aa981f7 1336 * localedLocale1ProxyClass:
5047f6bf 1337 * @parent_class: The parent class.
1338 *
1aa981f7 1339 * Class structure for #localedLocale1Proxy.
5047f6bf 1340 */
1341
1aa981f7 1342struct _localedLocale1ProxyPrivate
5047f6bf 1343{
1344 GData *qdata;
1345};
1346
1aa981f7 1347static void localed_locale1_proxy_iface_init (localedLocale1Iface *iface);
5047f6bf 1348
1349#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1aa981f7 1350G_DEFINE_TYPE_WITH_CODE (localedLocale1Proxy, localed_locale1_proxy, G_TYPE_DBUS_PROXY,
1351 G_ADD_PRIVATE (localedLocale1Proxy)
1352 G_IMPLEMENT_INTERFACE (LOCALED_TYPE_LOCALE1, localed_locale1_proxy_iface_init));
5047f6bf 1353
1354#else
1aa981f7 1355G_DEFINE_TYPE_WITH_CODE (localedLocale1Proxy, localed_locale1_proxy, G_TYPE_DBUS_PROXY,
1356 G_IMPLEMENT_INTERFACE (LOCALED_TYPE_LOCALE1, localed_locale1_proxy_iface_init));
5047f6bf 1357
1358#endif
1359static void
1aa981f7 1360localed_locale1_proxy_finalize (GObject *object)
5047f6bf 1361{
1aa981f7 1362 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1363 g_datalist_clear (&proxy->priv->qdata);
1aa981f7 1364 G_OBJECT_CLASS (localed_locale1_proxy_parent_class)->finalize (object);
5047f6bf 1365}
1366
1367static void
1aa981f7 1368localed_locale1_proxy_get_property (GObject *object,
5047f6bf 1369 guint prop_id,
1370 GValue *value,
1371 GParamSpec *pspec G_GNUC_UNUSED)
1372{
1373 const _ExtendedGDBusPropertyInfo *info;
1374 GVariant *variant;
1375 g_assert (prop_id != 0 && prop_id - 1 < 7);
1aa981f7 1376 info = _localed_locale1_property_info_pointers[prop_id - 1];
5047f6bf 1377 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object), info->parent_struct.name);
1378 if (info->use_gvariant)
1379 {
1380 g_value_set_variant (value, variant);
1381 }
1382 else
1383 {
1384 if (variant != NULL)
1385 g_dbus_gvariant_to_gvalue (variant, value);
1386 }
1387 if (variant != NULL)
1388 g_variant_unref (variant);
1389}
1390
1391static void
1aa981f7 1392localed_locale1_proxy_set_property_cb (GDBusProxy *proxy,
5047f6bf 1393 GAsyncResult *res,
1394 gpointer user_data)
1395{
1396 const _ExtendedGDBusPropertyInfo *info = user_data;
1397 GError *error;
1398 GVariant *_ret;
1399 error = NULL;
1400 _ret = g_dbus_proxy_call_finish (proxy, res, &error);
1401 if (!_ret)
1402 {
1403 g_warning ("Error setting property '%s' on interface org.freedesktop.locale1: %s (%s, %d)",
1404 info->parent_struct.name,
1405 error->message, g_quark_to_string (error->domain), error->code);
1406 g_error_free (error);
1407 }
1408 else
1409 {
1410 g_variant_unref (_ret);
1411 }
1412}
1413
1414static void
1aa981f7 1415localed_locale1_proxy_set_property (GObject *object,
5047f6bf 1416 guint prop_id,
1417 const GValue *value,
1418 GParamSpec *pspec G_GNUC_UNUSED)
1419{
1420 const _ExtendedGDBusPropertyInfo *info;
1421 GVariant *variant;
1422 g_assert (prop_id != 0 && prop_id - 1 < 7);
1aa981f7 1423 info = _localed_locale1_property_info_pointers[prop_id - 1];
5047f6bf 1424 variant = g_dbus_gvalue_to_gvariant (value, G_VARIANT_TYPE (info->parent_struct.signature));
1425 g_dbus_proxy_call (G_DBUS_PROXY (object),
1426 "org.freedesktop.DBus.Properties.Set",
1427 g_variant_new ("(ssv)", "org.freedesktop.locale1", info->parent_struct.name, variant),
1428 G_DBUS_CALL_FLAGS_NONE,
1429 -1,
1aa981f7 1430 NULL, (GAsyncReadyCallback) localed_locale1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct);
5047f6bf 1431 g_variant_unref (variant);
1432}
1433
1434static void
1aa981f7 1435localed_locale1_proxy_g_signal (GDBusProxy *proxy,
5047f6bf 1436 const gchar *sender_name G_GNUC_UNUSED,
1437 const gchar *signal_name,
1438 GVariant *parameters)
1439{
1440 _ExtendedGDBusSignalInfo *info;
1441 GVariantIter iter;
1442 GVariant *child;
1443 GValue *paramv;
1444 guint num_params;
1445 guint n;
1446 guint signal_id;
1aa981f7 1447 info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct, signal_name);
5047f6bf 1448 if (info == NULL)
1449 return;
1450 num_params = g_variant_n_children (parameters);
1451 paramv = g_new0 (GValue, num_params + 1);
1aa981f7 1452 g_value_init (&paramv[0], LOCALED_TYPE_LOCALE1);
5047f6bf 1453 g_value_set_object (&paramv[0], proxy);
1454 g_variant_iter_init (&iter, parameters);
1455 n = 1;
1456 while ((child = g_variant_iter_next_value (&iter)) != NULL)
1457 {
1458 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1459 if (arg_info->use_gvariant)
1460 {
1461 g_value_init (&paramv[n], G_TYPE_VARIANT);
1462 g_value_set_variant (&paramv[n], child);
1463 n++;
1464 }
1465 else
1466 g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
1467 g_variant_unref (child);
1468 }
1aa981f7 1469 signal_id = g_signal_lookup (info->signal_name, LOCALED_TYPE_LOCALE1);
5047f6bf 1470 g_signal_emitv (paramv, signal_id, 0, NULL);
1471 for (n = 0; n < num_params + 1; n++)
1472 g_value_unset (&paramv[n]);
1473 g_free (paramv);
1474}
1475
1476static void
1aa981f7 1477localed_locale1_proxy_g_properties_changed (GDBusProxy *_proxy,
5047f6bf 1478 GVariant *changed_properties,
1479 const gchar *const *invalidated_properties)
1480{
1aa981f7 1481 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (_proxy);
5047f6bf 1482 guint n;
1483 const gchar *key;
1484 GVariantIter *iter;
1485 _ExtendedGDBusPropertyInfo *info;
1486 g_variant_get (changed_properties, "a{sv}", &iter);
1487 while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
1488 {
1aa981f7 1489 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct, key);
5047f6bf 1490 g_datalist_remove_data (&proxy->priv->qdata, key);
1491 if (info != NULL)
1492 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1493 }
1494 g_variant_iter_free (iter);
1495 for (n = 0; invalidated_properties[n] != NULL; n++)
1496 {
1aa981f7 1497 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct, invalidated_properties[n]);
5047f6bf 1498 g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
1499 if (info != NULL)
1500 g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1501 }
1502}
1503
1504static const gchar *const *
1aa981f7 1505localed_locale1_proxy_get_locale (localedLocale1 *object)
5047f6bf 1506{
1aa981f7 1507 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1508 GVariant *variant;
1509 const gchar *const *value = NULL;
1510 value = g_datalist_get_data (&proxy->priv->qdata, "Locale");
1511 if (value != NULL)
1512 return value;
1513 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "Locale");
1514 if (variant != NULL)
1515 {
1516 value = g_variant_get_strv (variant, NULL);
1517 g_datalist_set_data_full (&proxy->priv->qdata, "Locale", (gpointer) value, g_free);
1518 g_variant_unref (variant);
1519 }
1520 return value;
1521}
1522
1523static const gchar *
1aa981f7 1524localed_locale1_proxy_get_x11_layout (localedLocale1 *object)
5047f6bf 1525{
1aa981f7 1526 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1527 GVariant *variant;
1528 const gchar *value = NULL;
1aa981f7 1529 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Layout");
5047f6bf 1530 if (variant != NULL)
1531 {
1532 value = g_variant_get_string (variant, NULL);
1533 g_variant_unref (variant);
1534 }
1535 return value;
1536}
1537
1538static const gchar *
1aa981f7 1539localed_locale1_proxy_get_x11_model (localedLocale1 *object)
5047f6bf 1540{
1aa981f7 1541 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1542 GVariant *variant;
1543 const gchar *value = NULL;
1aa981f7 1544 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Model");
5047f6bf 1545 if (variant != NULL)
1546 {
1547 value = g_variant_get_string (variant, NULL);
1548 g_variant_unref (variant);
1549 }
1550 return value;
1551}
1552
1553static const gchar *
1aa981f7 1554localed_locale1_proxy_get_x11_variant (localedLocale1 *object)
5047f6bf 1555{
1aa981f7 1556 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1557 GVariant *variant;
1558 const gchar *value = NULL;
1aa981f7 1559 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Variant");
5047f6bf 1560 if (variant != NULL)
1561 {
1562 value = g_variant_get_string (variant, NULL);
1563 g_variant_unref (variant);
1564 }
1565 return value;
1566}
1567
1568static const gchar *
1aa981f7 1569localed_locale1_proxy_get_x11_options (localedLocale1 *object)
5047f6bf 1570{
1aa981f7 1571 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1572 GVariant *variant;
1573 const gchar *value = NULL;
1aa981f7 1574 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Options");
5047f6bf 1575 if (variant != NULL)
1576 {
1577 value = g_variant_get_string (variant, NULL);
1578 g_variant_unref (variant);
1579 }
1580 return value;
1581}
1582
1583static const gchar *
1aa981f7 1584localed_locale1_proxy_get_vconsole_keymap (localedLocale1 *object)
5047f6bf 1585{
1aa981f7 1586 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1587 GVariant *variant;
1588 const gchar *value = NULL;
1aa981f7 1589 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "VConsoleKeymap");
5047f6bf 1590 if (variant != NULL)
1591 {
1592 value = g_variant_get_string (variant, NULL);
1593 g_variant_unref (variant);
1594 }
1595 return value;
1596}
1597
1598static const gchar *
1aa981f7 1599localed_locale1_proxy_get_vconsole_keymap_toggle (localedLocale1 *object)
5047f6bf 1600{
1aa981f7 1601 localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object);
5047f6bf 1602 GVariant *variant;
1603 const gchar *value = NULL;
1aa981f7 1604 variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "VConsoleKeymapToggle");
5047f6bf 1605 if (variant != NULL)
1606 {
1607 value = g_variant_get_string (variant, NULL);
1608 g_variant_unref (variant);
1609 }
1610 return value;
1611}
1612
1613static void
1aa981f7 1614localed_locale1_proxy_init (localedLocale1Proxy *proxy)
5047f6bf 1615{
1616#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1aa981f7 1617 proxy->priv = localed_locale1_proxy_get_instance_private (proxy);
5047f6bf 1618#else
1aa981f7 1619 proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, LOCALED_TYPE_LOCALE1_PROXY, localedLocale1ProxyPrivate);
5047f6bf 1620#endif
1621
1aa981f7 1622 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), localed_locale1_interface_info ());
5047f6bf 1623}
1624
1625static void
1aa981f7 1626localed_locale1_proxy_class_init (localedLocale1ProxyClass *klass)
5047f6bf 1627{
1628 GObjectClass *gobject_class;
1629 GDBusProxyClass *proxy_class;
1630
1631 gobject_class = G_OBJECT_CLASS (klass);
1aa981f7 1632 gobject_class->finalize = localed_locale1_proxy_finalize;
1633 gobject_class->get_property = localed_locale1_proxy_get_property;
1634 gobject_class->set_property = localed_locale1_proxy_set_property;
5047f6bf 1635
1636 proxy_class = G_DBUS_PROXY_CLASS (klass);
1aa981f7 1637 proxy_class->g_signal = localed_locale1_proxy_g_signal;
1638 proxy_class->g_properties_changed = localed_locale1_proxy_g_properties_changed;
5047f6bf 1639
1aa981f7 1640 localed_locale1_override_properties (gobject_class, 1);
5047f6bf 1641
1642#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1aa981f7 1643 g_type_class_add_private (klass, sizeof (localedLocale1ProxyPrivate));
5047f6bf 1644#endif
1645}
1646
1647static void
1aa981f7 1648localed_locale1_proxy_iface_init (localedLocale1Iface *iface)
5047f6bf 1649{
1aa981f7 1650 iface->get_locale = localed_locale1_proxy_get_locale;
1651 iface->get_x11_layout = localed_locale1_proxy_get_x11_layout;
1652 iface->get_x11_model = localed_locale1_proxy_get_x11_model;
1653 iface->get_x11_variant = localed_locale1_proxy_get_x11_variant;
1654 iface->get_x11_options = localed_locale1_proxy_get_x11_options;
1655 iface->get_vconsole_keymap = localed_locale1_proxy_get_vconsole_keymap;
1656 iface->get_vconsole_keymap_toggle = localed_locale1_proxy_get_vconsole_keymap_toggle;
5047f6bf 1657}
1658
1659/**
1aa981f7 1660 * localed_locale1_proxy_new:
5047f6bf 1661 * @connection: A #GDBusConnection.
1662 * @flags: Flags from the #GDBusProxyFlags enumeration.
1663 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1664 * @object_path: An object path.
1665 * @cancellable: (allow-none): A #GCancellable or %NULL.
1666 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1667 * @user_data: User data to pass to @callback.
1668 *
1669 * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>. See g_dbus_proxy_new() for more details.
1670 *
1671 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1aa981f7 1672 * You can then call localed_locale1_proxy_new_finish() to get the result of the operation.
5047f6bf 1673 *
1aa981f7 1674 * See localed_locale1_proxy_new_sync() for the synchronous, blocking version of this constructor.
5047f6bf 1675 */
1676void
1aa981f7 1677localed_locale1_proxy_new (
5047f6bf 1678 GDBusConnection *connection,
1679 GDBusProxyFlags flags,
1680 const gchar *name,
1681 const gchar *object_path,
1682 GCancellable *cancellable,
1683 GAsyncReadyCallback callback,
1684 gpointer user_data)
1685{
1aa981f7 1686 g_async_initable_new_async (LOCALED_TYPE_LOCALE1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL);
5047f6bf 1687}
1688
1689/**
1aa981f7 1690 * localed_locale1_proxy_new_finish:
1691 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to localed_locale1_proxy_new().
5047f6bf 1692 * @error: Return location for error or %NULL
1693 *
1aa981f7 1694 * Finishes an operation started with localed_locale1_proxy_new().
5047f6bf 1695 *
1aa981f7 1696 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
5047f6bf 1697 */
1aa981f7 1698localedLocale1 *
1699localed_locale1_proxy_new_finish (
5047f6bf 1700 GAsyncResult *res,
1701 GError **error)
1702{
1703 GObject *ret;
1704 GObject *source_object;
1705 source_object = g_async_result_get_source_object (res);
1706 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1707 g_object_unref (source_object);
1708 if (ret != NULL)
1aa981f7 1709 return LOCALED_LOCALE1 (ret);
5047f6bf 1710 else
1711 return NULL;
1712}
1713
1714/**
1aa981f7 1715 * localed_locale1_proxy_new_sync:
5047f6bf 1716 * @connection: A #GDBusConnection.
1717 * @flags: Flags from the #GDBusProxyFlags enumeration.
1718 * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1719 * @object_path: An object path.
1720 * @cancellable: (allow-none): A #GCancellable or %NULL.
1721 * @error: Return location for error or %NULL
1722 *
1723 * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>. See g_dbus_proxy_new_sync() for more details.
1724 *
1725 * The calling thread is blocked until a reply is received.
1726 *
1aa981f7 1727 * See localed_locale1_proxy_new() for the asynchronous version of this constructor.
5047f6bf 1728 *
1aa981f7 1729 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
5047f6bf 1730 */
1aa981f7 1731localedLocale1 *
1732localed_locale1_proxy_new_sync (
5047f6bf 1733 GDBusConnection *connection,
1734 GDBusProxyFlags flags,
1735 const gchar *name,
1736 const gchar *object_path,
1737 GCancellable *cancellable,
1738 GError **error)
1739{
1740 GInitable *ret;
1aa981f7 1741 ret = g_initable_new (LOCALED_TYPE_LOCALE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL);
5047f6bf 1742 if (ret != NULL)
1aa981f7 1743 return LOCALED_LOCALE1 (ret);
5047f6bf 1744 else
1745 return NULL;
1746}
1747
1748
1749/**
1aa981f7 1750 * localed_locale1_proxy_new_for_bus:
5047f6bf 1751 * @bus_type: A #GBusType.
1752 * @flags: Flags from the #GDBusProxyFlags enumeration.
1753 * @name: A bus name (well-known or unique).
1754 * @object_path: An object path.
1755 * @cancellable: (allow-none): A #GCancellable or %NULL.
1756 * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1757 * @user_data: User data to pass to @callback.
1758 *
1aa981f7 1759 * Like localed_locale1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
5047f6bf 1760 *
1761 * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1aa981f7 1762 * You can then call localed_locale1_proxy_new_for_bus_finish() to get the result of the operation.
5047f6bf 1763 *
1aa981f7 1764 * See localed_locale1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
5047f6bf 1765 */
1766void
1aa981f7 1767localed_locale1_proxy_new_for_bus (
5047f6bf 1768 GBusType bus_type,
1769 GDBusProxyFlags flags,
1770 const gchar *name,
1771 const gchar *object_path,
1772 GCancellable *cancellable,
1773 GAsyncReadyCallback callback,
1774 gpointer user_data)
1775{
1aa981f7 1776 g_async_initable_new_async (LOCALED_TYPE_LOCALE1_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL);
5047f6bf 1777}
1778
1779/**
1aa981f7 1780 * localed_locale1_proxy_new_for_bus_finish:
1781 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to localed_locale1_proxy_new_for_bus().
5047f6bf 1782 * @error: Return location for error or %NULL
1783 *
1aa981f7 1784 * Finishes an operation started with localed_locale1_proxy_new_for_bus().
5047f6bf 1785 *
1aa981f7 1786 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
5047f6bf 1787 */
1aa981f7 1788localedLocale1 *
1789localed_locale1_proxy_new_for_bus_finish (
5047f6bf 1790 GAsyncResult *res,
1791 GError **error)
1792{
1793 GObject *ret;
1794 GObject *source_object;
1795 source_object = g_async_result_get_source_object (res);
1796 ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1797 g_object_unref (source_object);
1798 if (ret != NULL)
1aa981f7 1799 return LOCALED_LOCALE1 (ret);
5047f6bf 1800 else
1801 return NULL;
1802}
1803
1804/**
1aa981f7 1805 * localed_locale1_proxy_new_for_bus_sync:
5047f6bf 1806 * @bus_type: A #GBusType.
1807 * @flags: Flags from the #GDBusProxyFlags enumeration.
1808 * @name: A bus name (well-known or unique).
1809 * @object_path: An object path.
1810 * @cancellable: (allow-none): A #GCancellable or %NULL.
1811 * @error: Return location for error or %NULL
1812 *
1aa981f7 1813 * Like localed_locale1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
5047f6bf 1814 *
1815 * The calling thread is blocked until a reply is received.
1816 *
1aa981f7 1817 * See localed_locale1_proxy_new_for_bus() for the asynchronous version of this constructor.
5047f6bf 1818 *
1aa981f7 1819 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
5047f6bf 1820 */
1aa981f7 1821localedLocale1 *
1822localed_locale1_proxy_new_for_bus_sync (
5047f6bf 1823 GBusType bus_type,
1824 GDBusProxyFlags flags,
1825 const gchar *name,
1826 const gchar *object_path,
1827 GCancellable *cancellable,
1828 GError **error)
1829{
1830 GInitable *ret;
1aa981f7 1831 ret = g_initable_new (LOCALED_TYPE_LOCALE1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.locale1", NULL);
5047f6bf 1832 if (ret != NULL)
1aa981f7 1833 return LOCALED_LOCALE1 (ret);
5047f6bf 1834 else
1835 return NULL;
1836}
1837
1838
1839/* ------------------------------------------------------------------------ */
1840
1841/**
1aa981f7 1842 * localedLocale1Skeleton:
5047f6bf 1843 *
1aa981f7 1844 * The #localedLocale1Skeleton structure contains only private data and should only be accessed using the provided API.
5047f6bf 1845 */
1846
1847/**
1aa981f7 1848 * localedLocale1SkeletonClass:
5047f6bf 1849 * @parent_class: The parent class.
1850 *
1aa981f7 1851 * Class structure for #localedLocale1Skeleton.
5047f6bf 1852 */
1853
1aa981f7 1854struct _localedLocale1SkeletonPrivate
5047f6bf 1855{
1856 GValue *properties;
1857 GList *changed_properties;
1858 GSource *changed_properties_idle_source;
1859 GMainContext *context;
1860 GMutex lock;
1861};
1862
1863static void
1aa981f7 1864_localed_locale1_skeleton_handle_method_call (
5047f6bf 1865 GDBusConnection *connection G_GNUC_UNUSED,
1866 const gchar *sender G_GNUC_UNUSED,
1867 const gchar *object_path G_GNUC_UNUSED,
1868 const gchar *interface_name,
1869 const gchar *method_name,
1870 GVariant *parameters,
1871 GDBusMethodInvocation *invocation,
1872 gpointer user_data)
1873{
1aa981f7 1874 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data);
5047f6bf 1875 _ExtendedGDBusMethodInfo *info;
1876 GVariantIter iter;
1877 GVariant *child;
1878 GValue *paramv;
1879 guint num_params;
1880 guint num_extra;
1881 guint n;
1882 guint signal_id;
1883 GValue return_value = G_VALUE_INIT;
1884 info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
1885 g_assert (info != NULL);
1886 num_params = g_variant_n_children (parameters);
1887 num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
1888 n = 0;
1aa981f7 1889 g_value_init (&paramv[n], LOCALED_TYPE_LOCALE1);
5047f6bf 1890 g_value_set_object (&paramv[n++], skeleton);
1891 g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
1892 g_value_set_object (&paramv[n++], invocation);
1893 if (info->pass_fdlist)
1894 {
1895#ifdef G_OS_UNIX
1896 g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
1897 g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
1898#else
1899 g_assert_not_reached ();
1900#endif
1901 }
1902 g_variant_iter_init (&iter, parameters);
1903 while ((child = g_variant_iter_next_value (&iter)) != NULL)
1904 {
1905 _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
1906 if (arg_info->use_gvariant)
1907 {
1908 g_value_init (&paramv[n], G_TYPE_VARIANT);
1909 g_value_set_variant (&paramv[n], child);
1910 n++;
1911 }
1912 else
1913 g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
1914 g_variant_unref (child);
1915 }
1aa981f7 1916 signal_id = g_signal_lookup (info->signal_name, LOCALED_TYPE_LOCALE1);
5047f6bf 1917 g_value_init (&return_value, G_TYPE_BOOLEAN);
1918 g_signal_emitv (paramv, signal_id, 0, &return_value);
1919 if (!g_value_get_boolean (&return_value))
1920 g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
1921 g_value_unset (&return_value);
1922 for (n = 0; n < num_params + num_extra; n++)
1923 g_value_unset (&paramv[n]);
1924 g_free (paramv);
1925}
1926
1927static GVariant *
1aa981f7 1928_localed_locale1_skeleton_handle_get_property (
5047f6bf 1929 GDBusConnection *connection G_GNUC_UNUSED,
1930 const gchar *sender G_GNUC_UNUSED,
1931 const gchar *object_path G_GNUC_UNUSED,
1932 const gchar *interface_name G_GNUC_UNUSED,
1933 const gchar *property_name,
1934 GError **error,
1935 gpointer user_data)
1936{
1aa981f7 1937 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data);
5047f6bf 1938 GValue value = G_VALUE_INIT;
1939 GParamSpec *pspec;
1940 _ExtendedGDBusPropertyInfo *info;
1941 GVariant *ret;
1942 ret = NULL;
1aa981f7 1943 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct, property_name);
5047f6bf 1944 g_assert (info != NULL);
1945 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1946 if (pspec == NULL)
1947 {
1948 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1949 }
1950 else
1951 {
1952 g_value_init (&value, pspec->value_type);
1953 g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1954 ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
1955 g_value_unset (&value);
1956 }
1957 return ret;
1958}
1959
1960static gboolean
1aa981f7 1961_localed_locale1_skeleton_handle_set_property (
5047f6bf 1962 GDBusConnection *connection G_GNUC_UNUSED,
1963 const gchar *sender G_GNUC_UNUSED,
1964 const gchar *object_path G_GNUC_UNUSED,
1965 const gchar *interface_name G_GNUC_UNUSED,
1966 const gchar *property_name,
1967 GVariant *variant,
1968 GError **error,
1969 gpointer user_data)
1970{
1aa981f7 1971 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data);
5047f6bf 1972 GValue value = G_VALUE_INIT;
1973 GParamSpec *pspec;
1974 _ExtendedGDBusPropertyInfo *info;
1975 gboolean ret;
1976 ret = FALSE;
1aa981f7 1977 info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct, property_name);
5047f6bf 1978 g_assert (info != NULL);
1979 pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1980 if (pspec == NULL)
1981 {
1982 g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1983 }
1984 else
1985 {
1986 if (info->use_gvariant)
1987 g_value_set_variant (&value, variant);
1988 else
1989 g_dbus_gvariant_to_gvalue (variant, &value);
1990 g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1991 g_value_unset (&value);
1992 ret = TRUE;
1993 }
1994 return ret;
1995}
1996
1aa981f7 1997static const GDBusInterfaceVTable _localed_locale1_skeleton_vtable =
5047f6bf 1998{
1aa981f7 1999 _localed_locale1_skeleton_handle_method_call,
2000 _localed_locale1_skeleton_handle_get_property,
2001 _localed_locale1_skeleton_handle_set_property,
5047f6bf 2002 {NULL}
2003};
2004
2005static GDBusInterfaceInfo *
1aa981f7 2006localed_locale1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
5047f6bf 2007{
1aa981f7 2008 return localed_locale1_interface_info ();
5047f6bf 2009}
2010
2011static GDBusInterfaceVTable *
1aa981f7 2012localed_locale1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED)
5047f6bf 2013{
1aa981f7 2014 return (GDBusInterfaceVTable *) &_localed_locale1_skeleton_vtable;
5047f6bf 2015}
2016
2017static GVariant *
1aa981f7 2018localed_locale1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
5047f6bf 2019{
1aa981f7 2020 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (_skeleton);
5047f6bf 2021
2022 GVariantBuilder builder;
2023 guint n;
2024 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
1aa981f7 2025 if (_localed_locale1_interface_info.parent_struct.properties == NULL)
5047f6bf 2026 goto out;
1aa981f7 2027 for (n = 0; _localed_locale1_interface_info.parent_struct.properties[n] != NULL; n++)
5047f6bf 2028 {
1aa981f7 2029 GDBusPropertyInfo *info = _localed_locale1_interface_info.parent_struct.properties[n];
5047f6bf 2030 if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
2031 {
2032 GVariant *value;
1aa981f7 2033 value = _localed_locale1_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.locale1", info->name, NULL, skeleton);
5047f6bf 2034 if (value != NULL)
2035 {
2036 g_variant_take_ref (value);
2037 g_variant_builder_add (&builder, "{sv}", info->name, value);
2038 g_variant_unref (value);
2039 }
2040 }
2041 }
2042out:
2043 return g_variant_builder_end (&builder);
2044}
2045
1aa981f7 2046static gboolean _localed_locale1_emit_changed (gpointer user_data);
5047f6bf 2047
2048static void
1aa981f7 2049localed_locale1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
5047f6bf 2050{
1aa981f7 2051 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (_skeleton);
5047f6bf 2052 gboolean emit_changed = FALSE;
2053
2054 g_mutex_lock (&skeleton->priv->lock);
2055 if (skeleton->priv->changed_properties_idle_source != NULL)
2056 {
2057 g_source_destroy (skeleton->priv->changed_properties_idle_source);
2058 skeleton->priv->changed_properties_idle_source = NULL;
2059 emit_changed = TRUE;
2060 }
2061 g_mutex_unlock (&skeleton->priv->lock);
2062
2063 if (emit_changed)
1aa981f7 2064 _localed_locale1_emit_changed (skeleton);
5047f6bf 2065}
2066
1aa981f7 2067static void localed_locale1_skeleton_iface_init (localedLocale1Iface *iface);
5047f6bf 2068#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1aa981f7 2069G_DEFINE_TYPE_WITH_CODE (localedLocale1Skeleton, localed_locale1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
2070 G_ADD_PRIVATE (localedLocale1Skeleton)
2071 G_IMPLEMENT_INTERFACE (LOCALED_TYPE_LOCALE1, localed_locale1_skeleton_iface_init));
5047f6bf 2072
2073#else
1aa981f7 2074G_DEFINE_TYPE_WITH_CODE (localedLocale1Skeleton, localed_locale1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
2075 G_IMPLEMENT_INTERFACE (LOCALED_TYPE_LOCALE1, localed_locale1_skeleton_iface_init));
5047f6bf 2076
2077#endif
2078static void
1aa981f7 2079localed_locale1_skeleton_finalize (GObject *object)
5047f6bf 2080{
1aa981f7 2081 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2082 guint n;
2083 for (n = 0; n < 7; n++)
2084 g_value_unset (&skeleton->priv->properties[n]);
2085 g_free (skeleton->priv->properties);
2086 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2087 if (skeleton->priv->changed_properties_idle_source != NULL)
2088 g_source_destroy (skeleton->priv->changed_properties_idle_source);
2089 g_main_context_unref (skeleton->priv->context);
2090 g_mutex_clear (&skeleton->priv->lock);
1aa981f7 2091 G_OBJECT_CLASS (localed_locale1_skeleton_parent_class)->finalize (object);
5047f6bf 2092}
2093
2094static void
1aa981f7 2095localed_locale1_skeleton_get_property (GObject *object,
5047f6bf 2096 guint prop_id,
2097 GValue *value,
2098 GParamSpec *pspec G_GNUC_UNUSED)
2099{
1aa981f7 2100 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2101 g_assert (prop_id != 0 && prop_id - 1 < 7);
2102 g_mutex_lock (&skeleton->priv->lock);
2103 g_value_copy (&skeleton->priv->properties[prop_id - 1], value);
2104 g_mutex_unlock (&skeleton->priv->lock);
2105}
2106
2107static gboolean
1aa981f7 2108_localed_locale1_emit_changed (gpointer user_data)
5047f6bf 2109{
1aa981f7 2110 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data);
5047f6bf 2111 GList *l;
2112 GVariantBuilder builder;
2113 GVariantBuilder invalidated_builder;
2114 guint num_changes;
2115
2116 g_mutex_lock (&skeleton->priv->lock);
2117 g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
2118 g_variant_builder_init (&invalidated_builder, G_VARIANT_TYPE ("as"));
2119 for (l = skeleton->priv->changed_properties, num_changes = 0; l != NULL; l = l->next)
2120 {
2121 ChangedProperty *cp = l->data;
2122 GVariant *variant;
2123 const GValue *cur_value;
2124
2125 cur_value = &skeleton->priv->properties[cp->prop_id - 1];
2126 if (!_g_value_equal (cur_value, &cp->orig_value))
2127 {
2128 variant = g_dbus_gvalue_to_gvariant (cur_value, G_VARIANT_TYPE (cp->info->parent_struct.signature));
2129 g_variant_builder_add (&builder, "{sv}", cp->info->parent_struct.name, variant);
2130 g_variant_unref (variant);
2131 num_changes++;
2132 }
2133 }
2134 if (num_changes > 0)
2135 {
2136 GList *connections, *ll;
2137 GVariant *signal_variant;
2138 signal_variant = g_variant_ref_sink (g_variant_new ("(sa{sv}as)", "org.freedesktop.locale1",
2139 &builder, &invalidated_builder));
2140 connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2141 for (ll = connections; ll != NULL; ll = ll->next)
2142 {
2143 GDBusConnection *connection = ll->data;
2144
2145 g_dbus_connection_emit_signal (connection,
2146 NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)),
2147 "org.freedesktop.DBus.Properties",
2148 "PropertiesChanged",
2149 signal_variant,
2150 NULL);
2151 }
2152 g_variant_unref (signal_variant);
2153 g_list_free_full (connections, g_object_unref);
2154 }
2155 else
2156 {
2157 g_variant_builder_clear (&builder);
2158 g_variant_builder_clear (&invalidated_builder);
2159 }
2160 g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2161 skeleton->priv->changed_properties = NULL;
2162 skeleton->priv->changed_properties_idle_source = NULL;
2163 g_mutex_unlock (&skeleton->priv->lock);
2164 return FALSE;
2165}
2166
2167static void
1aa981f7 2168_localed_locale1_schedule_emit_changed (localedLocale1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value)
5047f6bf 2169{
2170 ChangedProperty *cp;
2171 GList *l;
2172 cp = NULL;
2173 for (l = skeleton->priv->changed_properties; l != NULL; l = l->next)
2174 {
2175 ChangedProperty *i_cp = l->data;
2176 if (i_cp->info == info)
2177 {
2178 cp = i_cp;
2179 break;
2180 }
2181 }
2182 if (cp == NULL)
2183 {
2184 cp = g_new0 (ChangedProperty, 1);
2185 cp->prop_id = prop_id;
2186 cp->info = info;
2187 skeleton->priv->changed_properties = g_list_prepend (skeleton->priv->changed_properties, cp);
2188 g_value_init (&cp->orig_value, G_VALUE_TYPE (orig_value));
2189 g_value_copy (orig_value, &cp->orig_value);
2190 }
2191}
2192
2193static void
1aa981f7 2194localed_locale1_skeleton_notify (GObject *object,
5047f6bf 2195 GParamSpec *pspec G_GNUC_UNUSED)
2196{
1aa981f7 2197 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2198 g_mutex_lock (&skeleton->priv->lock);
2199 if (skeleton->priv->changed_properties != NULL &&
2200 skeleton->priv->changed_properties_idle_source == NULL)
2201 {
2202 skeleton->priv->changed_properties_idle_source = g_idle_source_new ();
2203 g_source_set_priority (skeleton->priv->changed_properties_idle_source, G_PRIORITY_DEFAULT);
1aa981f7 2204 g_source_set_callback (skeleton->priv->changed_properties_idle_source, _localed_locale1_emit_changed, g_object_ref (skeleton), (GDestroyNotify) g_object_unref);
5047f6bf 2205 g_source_attach (skeleton->priv->changed_properties_idle_source, skeleton->priv->context);
2206 g_source_unref (skeleton->priv->changed_properties_idle_source);
2207 }
2208 g_mutex_unlock (&skeleton->priv->lock);
2209}
2210
2211static void
1aa981f7 2212localed_locale1_skeleton_set_property (GObject *object,
5047f6bf 2213 guint prop_id,
2214 const GValue *value,
2215 GParamSpec *pspec)
2216{
1aa981f7 2217 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2218 g_assert (prop_id != 0 && prop_id - 1 < 7);
2219 g_mutex_lock (&skeleton->priv->lock);
2220 g_object_freeze_notify (object);
2221 if (!_g_value_equal (value, &skeleton->priv->properties[prop_id - 1]))
2222 {
2223 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)) != NULL)
1aa981f7 2224 _localed_locale1_schedule_emit_changed (skeleton, _localed_locale1_property_info_pointers[prop_id - 1], prop_id, &skeleton->priv->properties[prop_id - 1]);
5047f6bf 2225 g_value_copy (value, &skeleton->priv->properties[prop_id - 1]);
2226 g_object_notify_by_pspec (object, pspec);
2227 }
2228 g_mutex_unlock (&skeleton->priv->lock);
2229 g_object_thaw_notify (object);
2230}
2231
2232static void
1aa981f7 2233localed_locale1_skeleton_init (localedLocale1Skeleton *skeleton)
5047f6bf 2234{
2235#if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1aa981f7 2236 skeleton->priv = localed_locale1_skeleton_get_instance_private (skeleton);
5047f6bf 2237#else
1aa981f7 2238 skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, LOCALED_TYPE_LOCALE1_SKELETON, localedLocale1SkeletonPrivate);
5047f6bf 2239#endif
2240
2241 g_mutex_init (&skeleton->priv->lock);
2242 skeleton->priv->context = g_main_context_ref_thread_default ();
2243 skeleton->priv->properties = g_new0 (GValue, 7);
2244 g_value_init (&skeleton->priv->properties[0], G_TYPE_STRV);
2245 g_value_init (&skeleton->priv->properties[1], G_TYPE_STRING);
2246 g_value_init (&skeleton->priv->properties[2], G_TYPE_STRING);
2247 g_value_init (&skeleton->priv->properties[3], G_TYPE_STRING);
2248 g_value_init (&skeleton->priv->properties[4], G_TYPE_STRING);
2249 g_value_init (&skeleton->priv->properties[5], G_TYPE_STRING);
2250 g_value_init (&skeleton->priv->properties[6], G_TYPE_STRING);
2251}
2252
2253static const gchar *const *
1aa981f7 2254localed_locale1_skeleton_get_locale (localedLocale1 *object)
5047f6bf 2255{
1aa981f7 2256 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2257 const gchar *const *value;
2258 g_mutex_lock (&skeleton->priv->lock);
2259 value = g_value_get_boxed (&(skeleton->priv->properties[0]));
2260 g_mutex_unlock (&skeleton->priv->lock);
2261 return value;
2262}
2263
2264static const gchar *
1aa981f7 2265localed_locale1_skeleton_get_x11_layout (localedLocale1 *object)
5047f6bf 2266{
1aa981f7 2267 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2268 const gchar *value;
2269 g_mutex_lock (&skeleton->priv->lock);
2270 value = g_value_get_string (&(skeleton->priv->properties[1]));
2271 g_mutex_unlock (&skeleton->priv->lock);
2272 return value;
2273}
2274
2275static const gchar *
1aa981f7 2276localed_locale1_skeleton_get_x11_model (localedLocale1 *object)
5047f6bf 2277{
1aa981f7 2278 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2279 const gchar *value;
2280 g_mutex_lock (&skeleton->priv->lock);
2281 value = g_value_get_string (&(skeleton->priv->properties[2]));
2282 g_mutex_unlock (&skeleton->priv->lock);
2283 return value;
2284}
2285
2286static const gchar *
1aa981f7 2287localed_locale1_skeleton_get_x11_variant (localedLocale1 *object)
5047f6bf 2288{
1aa981f7 2289 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2290 const gchar *value;
2291 g_mutex_lock (&skeleton->priv->lock);
2292 value = g_value_get_string (&(skeleton->priv->properties[3]));
2293 g_mutex_unlock (&skeleton->priv->lock);
2294 return value;
2295}
2296
2297static const gchar *
1aa981f7 2298localed_locale1_skeleton_get_x11_options (localedLocale1 *object)
5047f6bf 2299{
1aa981f7 2300 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2301 const gchar *value;
2302 g_mutex_lock (&skeleton->priv->lock);
2303 value = g_value_get_string (&(skeleton->priv->properties[4]));
2304 g_mutex_unlock (&skeleton->priv->lock);
2305 return value;
2306}
2307
2308static const gchar *
1aa981f7 2309localed_locale1_skeleton_get_vconsole_keymap (localedLocale1 *object)
5047f6bf 2310{
1aa981f7 2311 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2312 const gchar *value;
2313 g_mutex_lock (&skeleton->priv->lock);
2314 value = g_value_get_string (&(skeleton->priv->properties[5]));
2315 g_mutex_unlock (&skeleton->priv->lock);
2316 return value;
2317}
2318
2319static const gchar *
1aa981f7 2320localed_locale1_skeleton_get_vconsole_keymap_toggle (localedLocale1 *object)
5047f6bf 2321{
1aa981f7 2322 localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object);
5047f6bf 2323 const gchar *value;
2324 g_mutex_lock (&skeleton->priv->lock);
2325 value = g_value_get_string (&(skeleton->priv->properties[6]));
2326 g_mutex_unlock (&skeleton->priv->lock);
2327 return value;
2328}
2329
2330static void
1aa981f7 2331localed_locale1_skeleton_class_init (localedLocale1SkeletonClass *klass)
5047f6bf 2332{
2333 GObjectClass *gobject_class;
2334 GDBusInterfaceSkeletonClass *skeleton_class;
2335
2336 gobject_class = G_OBJECT_CLASS (klass);
1aa981f7 2337 gobject_class->finalize = localed_locale1_skeleton_finalize;
2338 gobject_class->get_property = localed_locale1_skeleton_get_property;
2339 gobject_class->set_property = localed_locale1_skeleton_set_property;
2340 gobject_class->notify = localed_locale1_skeleton_notify;
5047f6bf 2341
2342
1aa981f7 2343 localed_locale1_override_properties (gobject_class, 1);
5047f6bf 2344
2345 skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
1aa981f7 2346 skeleton_class->get_info = localed_locale1_skeleton_dbus_interface_get_info;
2347 skeleton_class->get_properties = localed_locale1_skeleton_dbus_interface_get_properties;
2348 skeleton_class->flush = localed_locale1_skeleton_dbus_interface_flush;
2349 skeleton_class->get_vtable = localed_locale1_skeleton_dbus_interface_get_vtable;
5047f6bf 2350
2351#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1aa981f7 2352 g_type_class_add_private (klass, sizeof (localedLocale1SkeletonPrivate));
5047f6bf 2353#endif
2354}
2355
2356static void
1aa981f7 2357localed_locale1_skeleton_iface_init (localedLocale1Iface *iface)
5047f6bf 2358{
1aa981f7 2359 iface->get_locale = localed_locale1_skeleton_get_locale;
2360 iface->get_x11_layout = localed_locale1_skeleton_get_x11_layout;
2361 iface->get_x11_model = localed_locale1_skeleton_get_x11_model;
2362 iface->get_x11_variant = localed_locale1_skeleton_get_x11_variant;
2363 iface->get_x11_options = localed_locale1_skeleton_get_x11_options;
2364 iface->get_vconsole_keymap = localed_locale1_skeleton_get_vconsole_keymap;
2365 iface->get_vconsole_keymap_toggle = localed_locale1_skeleton_get_vconsole_keymap_toggle;
5047f6bf 2366}
2367
2368/**
1aa981f7 2369 * localed_locale1_skeleton_new:
5047f6bf 2370 *
2371 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>.
2372 *
1aa981f7 2373 * Returns: (transfer full) (type localedLocale1Skeleton): The skeleton object.
2374 */
2375localedLocale1 *
2376localed_locale1_skeleton_new (void)
2377{
2378 return LOCALED_LOCALE1 (g_object_new (LOCALED_TYPE_LOCALE1_SKELETON, NULL));
2379}
2380