2 * Generated by gdbus-codegen 2.40.0. DO NOT EDIT.
4 * The license of this code is the same as for the source it was derived from.
11 #include "localed-gen.h"
15 # include <gio/gunixfdlist.h>
18 /* ------------------------------------------------------------------------
19 * Code for interface org.freedesktop.locale1
20 * ------------------------------------------------------------------------
24 * SECTION:localedLocale1
25 * @title: localedLocale1
26 * @short_description: Generated C code for the org.freedesktop.locale1 D-Bus interface
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.
31 /* ---- Introspection data for org.freedesktop.locale1 ---- */
33 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg0
=
37 (gchar
*) "unnamed_arg0",
44 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg1
=
48 (gchar
*) "unnamed_arg1",
55 static const _ExtendedGDBusArgInfo
* const _localed_locale1_method_info_set_locale_IN_ARG_pointers
[] =
57 &_localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg0
,
58 &_localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg1
,
62 static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_locale
=
66 (gchar
*) "SetLocale",
67 (GDBusArgInfo
**) &_localed_locale1_method_info_set_locale_IN_ARG_pointers
,
75 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg0
=
79 (gchar
*) "unnamed_arg0",
86 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg1
=
90 (gchar
*) "unnamed_arg1",
97 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg2
=
101 (gchar
*) "unnamed_arg2",
108 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg3
=
112 (gchar
*) "unnamed_arg3",
119 static const _ExtendedGDBusArgInfo
* const _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers
[] =
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
,
128 static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_vconsole_keyboard
=
132 (gchar
*) "SetVConsoleKeyboard",
133 (GDBusArgInfo
**) &_localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers
,
137 "handle-set-vconsole-keyboard",
141 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg0
=
145 (gchar
*) "unnamed_arg0",
152 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg1
=
156 (gchar
*) "unnamed_arg1",
163 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg2
=
167 (gchar
*) "unnamed_arg2",
174 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg3
=
178 (gchar
*) "unnamed_arg3",
185 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg4
=
189 (gchar
*) "unnamed_arg4",
196 static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg5
=
200 (gchar
*) "unnamed_arg5",
207 static const _ExtendedGDBusArgInfo
* const _localed_locale1_method_info_set_x11_keyboard_IN_ARG_pointers
[] =
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
,
218 static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_x11_keyboard
=
222 (gchar
*) "SetX11Keyboard",
223 (GDBusArgInfo
**) &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_pointers
,
227 "handle-set-x11-keyboard",
231 static const _ExtendedGDBusMethodInfo
* const _localed_locale1_method_info_pointers
[] =
233 &_localed_locale1_method_info_set_locale
,
234 &_localed_locale1_method_info_set_vconsole_keyboard
,
235 &_localed_locale1_method_info_set_x11_keyboard
,
239 static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_locale
=
245 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
252 static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_layout
=
256 (gchar
*) "X11Layout",
258 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
265 static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_model
=
269 (gchar
*) "X11Model",
271 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
278 static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_variant
=
282 (gchar
*) "X11Variant",
284 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
291 static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_options
=
295 (gchar
*) "X11Options",
297 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
304 static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_vconsole_keymap
=
308 (gchar
*) "VConsoleKeymap",
310 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
317 static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_vconsole_keymap_toggle
=
321 (gchar
*) "VConsoleKeymapToggle",
323 G_DBUS_PROPERTY_INFO_FLAGS_READABLE
,
326 "vconsole-keymap-toggle",
330 static const _ExtendedGDBusPropertyInfo
* const _localed_locale1_property_info_pointers
[] =
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
,
342 static const _ExtendedGDBusInterfaceInfo _localed_locale1_interface_info
=
346 (gchar
*) "org.freedesktop.locale1",
347 (GDBusMethodInfo
**) &_localed_locale1_method_info_pointers
,
349 (GDBusPropertyInfo
**) &_localed_locale1_property_info_pointers
,
357 * localed_locale1_interface_info:
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.
361 * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
364 localed_locale1_interface_info (void)
366 return (GDBusInterfaceInfo
*) &_localed_locale1_interface_info
.parent_struct
;
370 * localed_locale1_override_properties:
371 * @klass: The class structure for a #GObject<!-- -->-derived class.
372 * @property_id_begin: The property id to assign to the first overridden property.
374 * Overrides all #GObject properties in the #localedLocale1 interface for a concrete class.
375 * The properties are overridden in the order they are defined.
377 * Returns: The last property id.
380 localed_locale1_override_properties (GObjectClass
*klass
, guint property_id_begin
)
382 g_object_class_override_property (klass
, property_id_begin
++, "locale");
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");
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");
389 return property_id_begin
- 1;
397 * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>.
401 * localedLocale1Iface:
402 * @parent_iface: The parent interface.
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.
414 * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>.
417 typedef localedLocale1Iface localedLocale1Interface
;
418 G_DEFINE_INTERFACE (localedLocale1
, localed_locale1
, G_TYPE_OBJECT
);
421 localed_locale1_default_init (localedLocale1Iface
*iface
)
423 /* GObject signals for incoming D-Bus method calls: */
425 * localedLocale1::handle-set-locale:
426 * @object: A #localedLocale1.
427 * @invocation: A #GDBusMethodInvocation.
428 * @arg_unnamed_arg0: Argument passed by remote caller.
429 * @arg_unnamed_arg1: Argument passed by remote caller.
431 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-locale1.SetLocale">SetLocale()</link> D-Bus method.
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.
435 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
437 g_signal_new ("handle-set-locale",
438 G_TYPE_FROM_INTERFACE (iface
),
440 G_STRUCT_OFFSET (localedLocale1Iface
, handle_set_locale
),
441 g_signal_accumulator_true_handled
,
443 g_cclosure_marshal_generic
,
446 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRV
, G_TYPE_BOOLEAN
);
449 * localedLocale1::handle-set-vconsole-keyboard:
450 * @object: A #localedLocale1.
451 * @invocation: A #GDBusMethodInvocation.
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.
457 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-locale1.SetVConsoleKeyboard">SetVConsoleKeyboard()</link> D-Bus method.
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.
461 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
463 g_signal_new ("handle-set-vconsole-keyboard",
464 G_TYPE_FROM_INTERFACE (iface
),
466 G_STRUCT_OFFSET (localedLocale1Iface
, handle_set_vconsole_keyboard
),
467 g_signal_accumulator_true_handled
,
469 g_cclosure_marshal_generic
,
472 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRING
, G_TYPE_STRING
, G_TYPE_BOOLEAN
, G_TYPE_BOOLEAN
);
475 * localedLocale1::handle-set-x11-keyboard:
476 * @object: A #localedLocale1.
477 * @invocation: A #GDBusMethodInvocation.
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.
485 * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-locale1.SetX11Keyboard">SetX11Keyboard()</link> D-Bus method.
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.
489 * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
491 g_signal_new ("handle-set-x11-keyboard",
492 G_TYPE_FROM_INTERFACE (iface
),
494 G_STRUCT_OFFSET (localedLocale1Iface
, handle_set_x11_keyboard
),
495 g_signal_accumulator_true_handled
,
497 g_cclosure_marshal_generic
,
500 G_TYPE_DBUS_METHOD_INVOCATION
, G_TYPE_STRING
, G_TYPE_STRING
, G_TYPE_STRING
, G_TYPE_STRING
, G_TYPE_BOOLEAN
, G_TYPE_BOOLEAN
);
502 /* GObject properties for D-Bus properties: */
504 * localedLocale1:locale:
506 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link>.
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.
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
));
513 * localedLocale1:x11-layout:
515 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link>.
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.
519 g_object_interface_install_property (iface
,
520 g_param_spec_string ("x11-layout", "X11Layout", "X11Layout", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
522 * localedLocale1:x11-model:
524 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link>.
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.
528 g_object_interface_install_property (iface
,
529 g_param_spec_string ("x11-model", "X11Model", "X11Model", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
531 * localedLocale1:x11-variant:
533 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link>.
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.
537 g_object_interface_install_property (iface
,
538 g_param_spec_string ("x11-variant", "X11Variant", "X11Variant", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
540 * localedLocale1:x11-options:
542 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link>.
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.
546 g_object_interface_install_property (iface
,
547 g_param_spec_string ("x11-options", "X11Options", "X11Options", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
549 * localedLocale1:vconsole-keymap:
551 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link>.
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.
555 g_object_interface_install_property (iface
,
556 g_param_spec_string ("vconsole-keymap", "VConsoleKeymap", "VConsoleKeymap", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
558 * localedLocale1:vconsole-keymap-toggle:
560 * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link>.
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.
564 g_object_interface_install_property (iface
,
565 g_param_spec_string ("vconsole-keymap-toggle", "VConsoleKeymapToggle", "VConsoleKeymapToggle", NULL
, G_PARAM_READWRITE
| G_PARAM_STATIC_STRINGS
));
569 * localed_locale1_get_locale: (skip)
570 * @object: A #localedLocale1.
572 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link> D-Bus property.
574 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
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>
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.
581 localed_locale1_get_locale (localedLocale1
*object
)
583 return LOCALED_LOCALE1_GET_IFACE (object
)->get_locale (object
);
587 * localed_locale1_dup_locale: (skip)
588 * @object: A #localedLocale1.
590 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link> D-Bus property.
592 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
594 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_strfreev().
597 localed_locale1_dup_locale (localedLocale1
*object
)
600 g_object_get (G_OBJECT (object
), "locale", &value
, NULL
);
605 * localed_locale1_set_locale: (skip)
606 * @object: A #localedLocale1.
607 * @value: The value to set.
609 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.Locale">"Locale"</link> D-Bus property to @value.
611 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
614 localed_locale1_set_locale (localedLocale1
*object
, const gchar
*const *value
)
616 g_object_set (G_OBJECT (object
), "locale", value
, NULL
);
620 * localed_locale1_get_x11_layout: (skip)
621 * @object: A #localedLocale1.
623 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property.
625 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
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>
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.
632 localed_locale1_get_x11_layout (localedLocale1
*object
)
634 return LOCALED_LOCALE1_GET_IFACE (object
)->get_x11_layout (object
);
638 * localed_locale1_dup_x11_layout: (skip)
639 * @object: A #localedLocale1.
641 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property.
643 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
645 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
648 localed_locale1_dup_x11_layout (localedLocale1
*object
)
651 g_object_get (G_OBJECT (object
), "x11-layout", &value
, NULL
);
656 * localed_locale1_set_x11_layout: (skip)
657 * @object: A #localedLocale1.
658 * @value: The value to set.
660 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property to @value.
662 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
665 localed_locale1_set_x11_layout (localedLocale1
*object
, const gchar
*value
)
667 g_object_set (G_OBJECT (object
), "x11-layout", value
, NULL
);
671 * localed_locale1_get_x11_model: (skip)
672 * @object: A #localedLocale1.
674 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property.
676 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
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>
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.
683 localed_locale1_get_x11_model (localedLocale1
*object
)
685 return LOCALED_LOCALE1_GET_IFACE (object
)->get_x11_model (object
);
689 * localed_locale1_dup_x11_model: (skip)
690 * @object: A #localedLocale1.
692 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property.
694 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
696 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
699 localed_locale1_dup_x11_model (localedLocale1
*object
)
702 g_object_get (G_OBJECT (object
), "x11-model", &value
, NULL
);
707 * localed_locale1_set_x11_model: (skip)
708 * @object: A #localedLocale1.
709 * @value: The value to set.
711 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property to @value.
713 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
716 localed_locale1_set_x11_model (localedLocale1
*object
, const gchar
*value
)
718 g_object_set (G_OBJECT (object
), "x11-model", value
, NULL
);
722 * localed_locale1_get_x11_variant: (skip)
723 * @object: A #localedLocale1.
725 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property.
727 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
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>
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.
734 localed_locale1_get_x11_variant (localedLocale1
*object
)
736 return LOCALED_LOCALE1_GET_IFACE (object
)->get_x11_variant (object
);
740 * localed_locale1_dup_x11_variant: (skip)
741 * @object: A #localedLocale1.
743 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property.
745 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
747 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
750 localed_locale1_dup_x11_variant (localedLocale1
*object
)
753 g_object_get (G_OBJECT (object
), "x11-variant", &value
, NULL
);
758 * localed_locale1_set_x11_variant: (skip)
759 * @object: A #localedLocale1.
760 * @value: The value to set.
762 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property to @value.
764 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
767 localed_locale1_set_x11_variant (localedLocale1
*object
, const gchar
*value
)
769 g_object_set (G_OBJECT (object
), "x11-variant", value
, NULL
);
773 * localed_locale1_get_x11_options: (skip)
774 * @object: A #localedLocale1.
776 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property.
778 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
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>
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.
785 localed_locale1_get_x11_options (localedLocale1
*object
)
787 return LOCALED_LOCALE1_GET_IFACE (object
)->get_x11_options (object
);
791 * localed_locale1_dup_x11_options: (skip)
792 * @object: A #localedLocale1.
794 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property.
796 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
798 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
801 localed_locale1_dup_x11_options (localedLocale1
*object
)
804 g_object_get (G_OBJECT (object
), "x11-options", &value
, NULL
);
809 * localed_locale1_set_x11_options: (skip)
810 * @object: A #localedLocale1.
811 * @value: The value to set.
813 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property to @value.
815 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
818 localed_locale1_set_x11_options (localedLocale1
*object
, const gchar
*value
)
820 g_object_set (G_OBJECT (object
), "x11-options", value
, NULL
);
824 * localed_locale1_get_vconsole_keymap: (skip)
825 * @object: A #localedLocale1.
827 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property.
829 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
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>
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.
836 localed_locale1_get_vconsole_keymap (localedLocale1
*object
)
838 return LOCALED_LOCALE1_GET_IFACE (object
)->get_vconsole_keymap (object
);
842 * localed_locale1_dup_vconsole_keymap: (skip)
843 * @object: A #localedLocale1.
845 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property.
847 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
849 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
852 localed_locale1_dup_vconsole_keymap (localedLocale1
*object
)
855 g_object_get (G_OBJECT (object
), "vconsole-keymap", &value
, NULL
);
860 * localed_locale1_set_vconsole_keymap: (skip)
861 * @object: A #localedLocale1.
862 * @value: The value to set.
864 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property to @value.
866 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
869 localed_locale1_set_vconsole_keymap (localedLocale1
*object
, const gchar
*value
)
871 g_object_set (G_OBJECT (object
), "vconsole-keymap", value
, NULL
);
875 * localed_locale1_get_vconsole_keymap_toggle: (skip)
876 * @object: A #localedLocale1.
878 * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property.
880 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
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>
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.
887 localed_locale1_get_vconsole_keymap_toggle (localedLocale1
*object
)
889 return LOCALED_LOCALE1_GET_IFACE (object
)->get_vconsole_keymap_toggle (object
);
893 * localed_locale1_dup_vconsole_keymap_toggle: (skip)
894 * @object: A #localedLocale1.
896 * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property.
898 * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.
900 * Returns: (transfer full): The property value or %NULL if the property is not set. The returned value should be freed with g_free().
903 localed_locale1_dup_vconsole_keymap_toggle (localedLocale1
*object
)
906 g_object_get (G_OBJECT (object
), "vconsole-keymap-toggle", &value
, NULL
);
911 * localed_locale1_set_vconsole_keymap_toggle: (skip)
912 * @object: A #localedLocale1.
913 * @value: The value to set.
915 * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property to @value.
917 * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.
920 localed_locale1_set_vconsole_keymap_toggle (localedLocale1
*object
, const gchar
*value
)
922 g_object_set (G_OBJECT (object
), "vconsole-keymap-toggle", value
, NULL
);
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.
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.
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.
936 * You can then call localed_locale1_call_set_locale_finish() to get the result of the operation.
938 * See localed_locale1_call_set_locale_sync() for the synchronous, blocking version of this method.
941 localed_locale1_call_set_locale (
942 localedLocale1
*proxy
,
943 const gchar
*const *arg_unnamed_arg0
,
944 gboolean arg_unnamed_arg1
,
945 GCancellable
*cancellable
,
946 GAsyncReadyCallback callback
,
949 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
951 g_variant_new ("(^asb)",
954 G_DBUS_CALL_FLAGS_NONE
,
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().
965 * @error: Return location for error or %NULL.
967 * Finishes an operation started with localed_locale1_call_set_locale().
969 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
972 localed_locale1_call_set_locale_finish (
973 localedLocale1
*proxy
,
978 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
983 g_variant_unref (_ret
);
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.
993 * @cancellable: (allow-none): A #GCancellable or %NULL.
994 * @error: Return location for error or %NULL.
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.
998 * See localed_locale1_call_set_locale() for the asynchronous version of this method.
1000 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1003 localed_locale1_call_set_locale_sync (
1004 localedLocale1
*proxy
,
1005 const gchar
*const *arg_unnamed_arg0
,
1006 gboolean arg_unnamed_arg1
,
1007 GCancellable
*cancellable
,
1011 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1013 g_variant_new ("(^asb)",
1016 G_DBUS_CALL_FLAGS_NONE
,
1022 g_variant_get (_ret
,
1024 g_variant_unref (_ret
);
1026 return _ret
!= NULL
;
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.
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.
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.
1042 * You can then call localed_locale1_call_set_vconsole_keyboard_finish() to get the result of the operation.
1044 * See localed_locale1_call_set_vconsole_keyboard_sync() for the synchronous, blocking version of this method.
1047 localed_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
,
1053 GCancellable
*cancellable
,
1054 GAsyncReadyCallback callback
,
1057 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
1058 "SetVConsoleKeyboard",
1059 g_variant_new ("(ssbb)",
1064 G_DBUS_CALL_FLAGS_NONE
,
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().
1075 * @error: Return location for error or %NULL.
1077 * Finishes an operation started with localed_locale1_call_set_vconsole_keyboard().
1079 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1082 localed_locale1_call_set_vconsole_keyboard_finish (
1083 localedLocale1
*proxy
,
1088 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
1091 g_variant_get (_ret
,
1093 g_variant_unref (_ret
);
1095 return _ret
!= NULL
;
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.
1105 * @cancellable: (allow-none): A #GCancellable or %NULL.
1106 * @error: Return location for error or %NULL.
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.
1110 * See localed_locale1_call_set_vconsole_keyboard() for the asynchronous version of this method.
1112 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1115 localed_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
,
1121 GCancellable
*cancellable
,
1125 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1126 "SetVConsoleKeyboard",
1127 g_variant_new ("(ssbb)",
1132 G_DBUS_CALL_FLAGS_NONE
,
1138 g_variant_get (_ret
,
1140 g_variant_unref (_ret
);
1142 return _ret
!= NULL
;
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.
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.
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.
1160 * You can then call localed_locale1_call_set_x11_keyboard_finish() to get the result of the operation.
1162 * See localed_locale1_call_set_x11_keyboard_sync() for the synchronous, blocking version of this method.
1165 localed_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
,
1173 GCancellable
*cancellable
,
1174 GAsyncReadyCallback callback
,
1177 g_dbus_proxy_call (G_DBUS_PROXY (proxy
),
1179 g_variant_new ("(ssssbb)",
1186 G_DBUS_CALL_FLAGS_NONE
,
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().
1197 * @error: Return location for error or %NULL.
1199 * Finishes an operation started with localed_locale1_call_set_x11_keyboard().
1201 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1204 localed_locale1_call_set_x11_keyboard_finish (
1205 localedLocale1
*proxy
,
1210 _ret
= g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy
), res
, error
);
1213 g_variant_get (_ret
,
1215 g_variant_unref (_ret
);
1217 return _ret
!= NULL
;
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.
1229 * @cancellable: (allow-none): A #GCancellable or %NULL.
1230 * @error: Return location for error or %NULL.
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.
1234 * See localed_locale1_call_set_x11_keyboard() for the asynchronous version of this method.
1236 * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1239 localed_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
,
1247 GCancellable
*cancellable
,
1251 _ret
= g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy
),
1253 g_variant_new ("(ssssbb)",
1260 G_DBUS_CALL_FLAGS_NONE
,
1266 g_variant_get (_ret
,
1268 g_variant_unref (_ret
);
1270 return _ret
!= NULL
;
1274 * localed_locale1_complete_set_locale:
1275 * @object: A #localedLocale1.
1276 * @invocation: (transfer full): A #GDBusMethodInvocation.
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.
1280 * This method will free @invocation, you cannot use it afterwards.
1283 localed_locale1_complete_set_locale (
1284 localedLocale1
*object
,
1285 GDBusMethodInvocation
*invocation
)
1287 g_dbus_method_invocation_return_value (invocation
,
1288 g_variant_new ("()"));
1292 * localed_locale1_complete_set_vconsole_keyboard:
1293 * @object: A #localedLocale1.
1294 * @invocation: (transfer full): A #GDBusMethodInvocation.
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.
1298 * This method will free @invocation, you cannot use it afterwards.
1301 localed_locale1_complete_set_vconsole_keyboard (
1302 localedLocale1
*object
,
1303 GDBusMethodInvocation
*invocation
)
1305 g_dbus_method_invocation_return_value (invocation
,
1306 g_variant_new ("()"));
1310 * localed_locale1_complete_set_x11_keyboard:
1311 * @object: A #localedLocale1.
1312 * @invocation: (transfer full): A #GDBusMethodInvocation.
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.
1316 * This method will free @invocation, you cannot use it afterwards.
1319 localed_locale1_complete_set_x11_keyboard (
1320 localedLocale1
*object
,
1321 GDBusMethodInvocation
*invocation
)
1323 g_dbus_method_invocation_return_value (invocation
,
1324 g_variant_new ("()"));
1327 /* ------------------------------------------------------------------------ */
1330 * localedLocale1Proxy:
1332 * The #localedLocale1Proxy structure contains only private data and should only be accessed using the provided API.
1336 * localedLocale1ProxyClass:
1337 * @parent_class: The parent class.
1339 * Class structure for #localedLocale1Proxy.
1342 struct _localedLocale1ProxyPrivate
1347 static void localed_locale1_proxy_iface_init (localedLocale1Iface
*iface
);
1349 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1350 G_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
));
1355 G_DEFINE_TYPE_WITH_CODE (localedLocale1Proxy
, localed_locale1_proxy
, G_TYPE_DBUS_PROXY
,
1356 G_IMPLEMENT_INTERFACE (LOCALED_TYPE_LOCALE1
, localed_locale1_proxy_iface_init
));
1360 localed_locale1_proxy_finalize (GObject
*object
)
1362 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1363 g_datalist_clear (&proxy
->priv
->qdata
);
1364 G_OBJECT_CLASS (localed_locale1_proxy_parent_class
)->finalize (object
);
1368 localed_locale1_proxy_get_property (GObject
*object
,
1371 GParamSpec
*pspec G_GNUC_UNUSED
)
1373 const _ExtendedGDBusPropertyInfo
*info
;
1375 g_assert (prop_id
!= 0 && prop_id
- 1 < 7);
1376 info
= _localed_locale1_property_info_pointers
[prop_id
- 1];
1377 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (object
), info
->parent_struct
.name
);
1378 if (info
->use_gvariant
)
1380 g_value_set_variant (value
, variant
);
1384 if (variant
!= NULL
)
1385 g_dbus_gvariant_to_gvalue (variant
, value
);
1387 if (variant
!= NULL
)
1388 g_variant_unref (variant
);
1392 localed_locale1_proxy_set_property_cb (GDBusProxy
*proxy
,
1396 const _ExtendedGDBusPropertyInfo
*info
= user_data
;
1400 _ret
= g_dbus_proxy_call_finish (proxy
, res
, &error
);
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
);
1410 g_variant_unref (_ret
);
1415 localed_locale1_proxy_set_property (GObject
*object
,
1417 const GValue
*value
,
1418 GParamSpec
*pspec G_GNUC_UNUSED
)
1420 const _ExtendedGDBusPropertyInfo
*info
;
1422 g_assert (prop_id
!= 0 && prop_id
- 1 < 7);
1423 info
= _localed_locale1_property_info_pointers
[prop_id
- 1];
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
,
1430 NULL
, (GAsyncReadyCallback
) localed_locale1_proxy_set_property_cb
, (GDBusPropertyInfo
*) &info
->parent_struct
);
1431 g_variant_unref (variant
);
1435 localed_locale1_proxy_g_signal (GDBusProxy
*proxy
,
1436 const gchar
*sender_name G_GNUC_UNUSED
,
1437 const gchar
*signal_name
,
1438 GVariant
*parameters
)
1440 _ExtendedGDBusSignalInfo
*info
;
1447 info
= (_ExtendedGDBusSignalInfo
*) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo
*) &_localed_locale1_interface_info
.parent_struct
, signal_name
);
1450 num_params
= g_variant_n_children (parameters
);
1451 paramv
= g_new0 (GValue
, num_params
+ 1);
1452 g_value_init (¶mv
[0], LOCALED_TYPE_LOCALE1
);
1453 g_value_set_object (¶mv
[0], proxy
);
1454 g_variant_iter_init (&iter
, parameters
);
1456 while ((child
= g_variant_iter_next_value (&iter
)) != NULL
)
1458 _ExtendedGDBusArgInfo
*arg_info
= (_ExtendedGDBusArgInfo
*) info
->parent_struct
.args
[n
- 1];
1459 if (arg_info
->use_gvariant
)
1461 g_value_init (¶mv
[n
], G_TYPE_VARIANT
);
1462 g_value_set_variant (¶mv
[n
], child
);
1466 g_dbus_gvariant_to_gvalue (child
, ¶mv
[n
++]);
1467 g_variant_unref (child
);
1469 signal_id
= g_signal_lookup (info
->signal_name
, LOCALED_TYPE_LOCALE1
);
1470 g_signal_emitv (paramv
, signal_id
, 0, NULL
);
1471 for (n
= 0; n
< num_params
+ 1; n
++)
1472 g_value_unset (¶mv
[n
]);
1477 localed_locale1_proxy_g_properties_changed (GDBusProxy
*_proxy
,
1478 GVariant
*changed_properties
,
1479 const gchar
*const *invalidated_properties
)
1481 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (_proxy
);
1485 _ExtendedGDBusPropertyInfo
*info
;
1486 g_variant_get (changed_properties
, "a{sv}", &iter
);
1487 while (g_variant_iter_next (iter
, "{&sv}", &key
, NULL
))
1489 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_localed_locale1_interface_info
.parent_struct
, key
);
1490 g_datalist_remove_data (&proxy
->priv
->qdata
, key
);
1492 g_object_notify (G_OBJECT (proxy
), info
->hyphen_name
);
1494 g_variant_iter_free (iter
);
1495 for (n
= 0; invalidated_properties
[n
] != NULL
; n
++)
1497 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_localed_locale1_interface_info
.parent_struct
, invalidated_properties
[n
]);
1498 g_datalist_remove_data (&proxy
->priv
->qdata
, invalidated_properties
[n
]);
1500 g_object_notify (G_OBJECT (proxy
), info
->hyphen_name
);
1504 static const gchar
*const *
1505 localed_locale1_proxy_get_locale (localedLocale1
*object
)
1507 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1509 const gchar
*const *value
= NULL
;
1510 value
= g_datalist_get_data (&proxy
->priv
->qdata
, "Locale");
1513 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "Locale");
1514 if (variant
!= NULL
)
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
);
1523 static const gchar
*
1524 localed_locale1_proxy_get_x11_layout (localedLocale1
*object
)
1526 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1528 const gchar
*value
= NULL
;
1529 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "X11Layout");
1530 if (variant
!= NULL
)
1532 value
= g_variant_get_string (variant
, NULL
);
1533 g_variant_unref (variant
);
1538 static const gchar
*
1539 localed_locale1_proxy_get_x11_model (localedLocale1
*object
)
1541 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1543 const gchar
*value
= NULL
;
1544 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "X11Model");
1545 if (variant
!= NULL
)
1547 value
= g_variant_get_string (variant
, NULL
);
1548 g_variant_unref (variant
);
1553 static const gchar
*
1554 localed_locale1_proxy_get_x11_variant (localedLocale1
*object
)
1556 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1558 const gchar
*value
= NULL
;
1559 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "X11Variant");
1560 if (variant
!= NULL
)
1562 value
= g_variant_get_string (variant
, NULL
);
1563 g_variant_unref (variant
);
1568 static const gchar
*
1569 localed_locale1_proxy_get_x11_options (localedLocale1
*object
)
1571 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1573 const gchar
*value
= NULL
;
1574 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "X11Options");
1575 if (variant
!= NULL
)
1577 value
= g_variant_get_string (variant
, NULL
);
1578 g_variant_unref (variant
);
1583 static const gchar
*
1584 localed_locale1_proxy_get_vconsole_keymap (localedLocale1
*object
)
1586 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1588 const gchar
*value
= NULL
;
1589 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "VConsoleKeymap");
1590 if (variant
!= NULL
)
1592 value
= g_variant_get_string (variant
, NULL
);
1593 g_variant_unref (variant
);
1598 static const gchar
*
1599 localed_locale1_proxy_get_vconsole_keymap_toggle (localedLocale1
*object
)
1601 localedLocale1Proxy
*proxy
= LOCALED_LOCALE1_PROXY (object
);
1603 const gchar
*value
= NULL
;
1604 variant
= g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy
), "VConsoleKeymapToggle");
1605 if (variant
!= NULL
)
1607 value
= g_variant_get_string (variant
, NULL
);
1608 g_variant_unref (variant
);
1614 localed_locale1_proxy_init (localedLocale1Proxy
*proxy
)
1616 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
1617 proxy
->priv
= localed_locale1_proxy_get_instance_private (proxy
);
1619 proxy
->priv
= G_TYPE_INSTANCE_GET_PRIVATE (proxy
, LOCALED_TYPE_LOCALE1_PROXY
, localedLocale1ProxyPrivate
);
1622 g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy
), localed_locale1_interface_info ());
1626 localed_locale1_proxy_class_init (localedLocale1ProxyClass
*klass
)
1628 GObjectClass
*gobject_class
;
1629 GDBusProxyClass
*proxy_class
;
1631 gobject_class
= G_OBJECT_CLASS (klass
);
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
;
1636 proxy_class
= G_DBUS_PROXY_CLASS (klass
);
1637 proxy_class
->g_signal
= localed_locale1_proxy_g_signal
;
1638 proxy_class
->g_properties_changed
= localed_locale1_proxy_g_properties_changed
;
1640 localed_locale1_override_properties (gobject_class
, 1);
1642 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
1643 g_type_class_add_private (klass
, sizeof (localedLocale1ProxyPrivate
));
1648 localed_locale1_proxy_iface_init (localedLocale1Iface
*iface
)
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
;
1660 * localed_locale1_proxy_new:
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.
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.
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.
1672 * You can then call localed_locale1_proxy_new_finish() to get the result of the operation.
1674 * See localed_locale1_proxy_new_sync() for the synchronous, blocking version of this constructor.
1677 localed_locale1_proxy_new (
1678 GDBusConnection
*connection
,
1679 GDBusProxyFlags flags
,
1681 const gchar
*object_path
,
1682 GCancellable
*cancellable
,
1683 GAsyncReadyCallback callback
,
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
);
1690 * localed_locale1_proxy_new_finish:
1691 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to localed_locale1_proxy_new().
1692 * @error: Return location for error or %NULL
1694 * Finishes an operation started with localed_locale1_proxy_new().
1696 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
1699 localed_locale1_proxy_new_finish (
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
);
1709 return LOCALED_LOCALE1 (ret
);
1715 * localed_locale1_proxy_new_sync:
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
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.
1725 * The calling thread is blocked until a reply is received.
1727 * See localed_locale1_proxy_new() for the asynchronous version of this constructor.
1729 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
1732 localed_locale1_proxy_new_sync (
1733 GDBusConnection
*connection
,
1734 GDBusProxyFlags flags
,
1736 const gchar
*object_path
,
1737 GCancellable
*cancellable
,
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
);
1743 return LOCALED_LOCALE1 (ret
);
1750 * localed_locale1_proxy_new_for_bus:
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.
1759 * Like localed_locale1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
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.
1762 * You can then call localed_locale1_proxy_new_for_bus_finish() to get the result of the operation.
1764 * See localed_locale1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
1767 localed_locale1_proxy_new_for_bus (
1769 GDBusProxyFlags flags
,
1771 const gchar
*object_path
,
1772 GCancellable
*cancellable
,
1773 GAsyncReadyCallback callback
,
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
);
1780 * localed_locale1_proxy_new_for_bus_finish:
1781 * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to localed_locale1_proxy_new_for_bus().
1782 * @error: Return location for error or %NULL
1784 * Finishes an operation started with localed_locale1_proxy_new_for_bus().
1786 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
1789 localed_locale1_proxy_new_for_bus_finish (
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
);
1799 return LOCALED_LOCALE1 (ret
);
1805 * localed_locale1_proxy_new_for_bus_sync:
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
1813 * Like localed_locale1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
1815 * The calling thread is blocked until a reply is received.
1817 * See localed_locale1_proxy_new_for_bus() for the asynchronous version of this constructor.
1819 * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set.
1822 localed_locale1_proxy_new_for_bus_sync (
1824 GDBusProxyFlags flags
,
1826 const gchar
*object_path
,
1827 GCancellable
*cancellable
,
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
);
1833 return LOCALED_LOCALE1 (ret
);
1839 /* ------------------------------------------------------------------------ */
1842 * localedLocale1Skeleton:
1844 * The #localedLocale1Skeleton structure contains only private data and should only be accessed using the provided API.
1848 * localedLocale1SkeletonClass:
1849 * @parent_class: The parent class.
1851 * Class structure for #localedLocale1Skeleton.
1854 struct _localedLocale1SkeletonPrivate
1857 GList
*changed_properties
;
1858 GSource
*changed_properties_idle_source
;
1859 GMainContext
*context
;
1864 _localed_locale1_skeleton_handle_method_call (
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
,
1874 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (user_data
);
1875 _ExtendedGDBusMethodInfo
*info
;
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
);
1889 g_value_init (¶mv
[n
], LOCALED_TYPE_LOCALE1
);
1890 g_value_set_object (¶mv
[n
++], skeleton
);
1891 g_value_init (¶mv
[n
], G_TYPE_DBUS_METHOD_INVOCATION
);
1892 g_value_set_object (¶mv
[n
++], invocation
);
1893 if (info
->pass_fdlist
)
1896 g_value_init (¶mv
[n
], G_TYPE_UNIX_FD_LIST
);
1897 g_value_set_object (¶mv
[n
++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation
)));
1899 g_assert_not_reached ();
1902 g_variant_iter_init (&iter
, parameters
);
1903 while ((child
= g_variant_iter_next_value (&iter
)) != NULL
)
1905 _ExtendedGDBusArgInfo
*arg_info
= (_ExtendedGDBusArgInfo
*) info
->parent_struct
.in_args
[n
- num_extra
];
1906 if (arg_info
->use_gvariant
)
1908 g_value_init (¶mv
[n
], G_TYPE_VARIANT
);
1909 g_value_set_variant (¶mv
[n
], child
);
1913 g_dbus_gvariant_to_gvalue (child
, ¶mv
[n
++]);
1914 g_variant_unref (child
);
1916 signal_id
= g_signal_lookup (info
->signal_name
, LOCALED_TYPE_LOCALE1
);
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 (¶mv
[n
]);
1928 _localed_locale1_skeleton_handle_get_property (
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
,
1937 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (user_data
);
1938 GValue value
= G_VALUE_INIT
;
1940 _ExtendedGDBusPropertyInfo
*info
;
1943 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_localed_locale1_interface_info
.parent_struct
, property_name
);
1944 g_assert (info
!= NULL
);
1945 pspec
= g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton
), info
->hyphen_name
);
1948 g_set_error (error
, G_DBUS_ERROR
, G_DBUS_ERROR_INVALID_ARGS
, "No property with name %s", property_name
);
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
);
1961 _localed_locale1_skeleton_handle_set_property (
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
,
1971 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (user_data
);
1972 GValue value
= G_VALUE_INIT
;
1974 _ExtendedGDBusPropertyInfo
*info
;
1977 info
= (_ExtendedGDBusPropertyInfo
*) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo
*) &_localed_locale1_interface_info
.parent_struct
, property_name
);
1978 g_assert (info
!= NULL
);
1979 pspec
= g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton
), info
->hyphen_name
);
1982 g_set_error (error
, G_DBUS_ERROR
, G_DBUS_ERROR_INVALID_ARGS
, "No property with name %s", property_name
);
1986 if (info
->use_gvariant
)
1987 g_value_set_variant (&value
, variant
);
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
);
1997 static const GDBusInterfaceVTable _localed_locale1_skeleton_vtable
=
1999 _localed_locale1_skeleton_handle_method_call
,
2000 _localed_locale1_skeleton_handle_get_property
,
2001 _localed_locale1_skeleton_handle_set_property
,
2005 static GDBusInterfaceInfo
*
2006 localed_locale1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton
*skeleton G_GNUC_UNUSED
)
2008 return localed_locale1_interface_info ();
2011 static GDBusInterfaceVTable
*
2012 localed_locale1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton
*skeleton G_GNUC_UNUSED
)
2014 return (GDBusInterfaceVTable
*) &_localed_locale1_skeleton_vtable
;
2018 localed_locale1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton
*_skeleton
)
2020 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (_skeleton
);
2022 GVariantBuilder builder
;
2024 g_variant_builder_init (&builder
, G_VARIANT_TYPE ("a{sv}"));
2025 if (_localed_locale1_interface_info
.parent_struct
.properties
== NULL
)
2027 for (n
= 0; _localed_locale1_interface_info
.parent_struct
.properties
[n
] != NULL
; n
++)
2029 GDBusPropertyInfo
*info
= _localed_locale1_interface_info
.parent_struct
.properties
[n
];
2030 if (info
->flags
& G_DBUS_PROPERTY_INFO_FLAGS_READABLE
)
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
);
2036 g_variant_take_ref (value
);
2037 g_variant_builder_add (&builder
, "{sv}", info
->name
, value
);
2038 g_variant_unref (value
);
2043 return g_variant_builder_end (&builder
);
2046 static gboolean
_localed_locale1_emit_changed (gpointer user_data
);
2049 localed_locale1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton
*_skeleton
)
2051 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (_skeleton
);
2052 gboolean emit_changed
= FALSE
;
2054 g_mutex_lock (&skeleton
->priv
->lock
);
2055 if (skeleton
->priv
->changed_properties_idle_source
!= NULL
)
2057 g_source_destroy (skeleton
->priv
->changed_properties_idle_source
);
2058 skeleton
->priv
->changed_properties_idle_source
= NULL
;
2059 emit_changed
= TRUE
;
2061 g_mutex_unlock (&skeleton
->priv
->lock
);
2064 _localed_locale1_emit_changed (skeleton
);
2067 static void localed_locale1_skeleton_iface_init (localedLocale1Iface
*iface
);
2068 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
2069 G_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
));
2074 G_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
));
2079 localed_locale1_skeleton_finalize (GObject
*object
)
2081 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
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
);
2091 G_OBJECT_CLASS (localed_locale1_skeleton_parent_class
)->finalize (object
);
2095 localed_locale1_skeleton_get_property (GObject
*object
,
2098 GParamSpec
*pspec G_GNUC_UNUSED
)
2100 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
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
);
2108 _localed_locale1_emit_changed (gpointer user_data
)
2110 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (user_data
);
2112 GVariantBuilder builder
;
2113 GVariantBuilder invalidated_builder
;
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
)
2121 ChangedProperty
*cp
= l
->data
;
2123 const GValue
*cur_value
;
2125 cur_value
= &skeleton
->priv
->properties
[cp
->prop_id
- 1];
2126 if (!_g_value_equal (cur_value
, &cp
->orig_value
))
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
);
2134 if (num_changes
> 0)
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
)
2143 GDBusConnection
*connection
= ll
->data
;
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",
2152 g_variant_unref (signal_variant
);
2153 g_list_free_full (connections
, g_object_unref
);
2157 g_variant_builder_clear (&builder
);
2158 g_variant_builder_clear (&invalidated_builder
);
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
);
2168 _localed_locale1_schedule_emit_changed (localedLocale1Skeleton
*skeleton
, const _ExtendedGDBusPropertyInfo
*info
, guint prop_id
, const GValue
*orig_value
)
2170 ChangedProperty
*cp
;
2173 for (l
= skeleton
->priv
->changed_properties
; l
!= NULL
; l
= l
->next
)
2175 ChangedProperty
*i_cp
= l
->data
;
2176 if (i_cp
->info
== info
)
2184 cp
= g_new0 (ChangedProperty
, 1);
2185 cp
->prop_id
= prop_id
;
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
);
2194 localed_locale1_skeleton_notify (GObject
*object
,
2195 GParamSpec
*pspec G_GNUC_UNUSED
)
2197 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
2198 g_mutex_lock (&skeleton
->priv
->lock
);
2199 if (skeleton
->priv
->changed_properties
!= NULL
&&
2200 skeleton
->priv
->changed_properties_idle_source
== NULL
)
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
);
2204 g_source_set_callback (skeleton
->priv
->changed_properties_idle_source
, _localed_locale1_emit_changed
, g_object_ref (skeleton
), (GDestroyNotify
) g_object_unref
);
2205 g_source_attach (skeleton
->priv
->changed_properties_idle_source
, skeleton
->priv
->context
);
2206 g_source_unref (skeleton
->priv
->changed_properties_idle_source
);
2208 g_mutex_unlock (&skeleton
->priv
->lock
);
2212 localed_locale1_skeleton_set_property (GObject
*object
,
2214 const GValue
*value
,
2217 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
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]))
2223 if (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton
)) != NULL
)
2224 _localed_locale1_schedule_emit_changed (skeleton
, _localed_locale1_property_info_pointers
[prop_id
- 1], prop_id
, &skeleton
->priv
->properties
[prop_id
- 1]);
2225 g_value_copy (value
, &skeleton
->priv
->properties
[prop_id
- 1]);
2226 g_object_notify_by_pspec (object
, pspec
);
2228 g_mutex_unlock (&skeleton
->priv
->lock
);
2229 g_object_thaw_notify (object
);
2233 localed_locale1_skeleton_init (localedLocale1Skeleton
*skeleton
)
2235 #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38
2236 skeleton
->priv
= localed_locale1_skeleton_get_instance_private (skeleton
);
2238 skeleton
->priv
= G_TYPE_INSTANCE_GET_PRIVATE (skeleton
, LOCALED_TYPE_LOCALE1_SKELETON
, localedLocale1SkeletonPrivate
);
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
);
2253 static const gchar
*const *
2254 localed_locale1_skeleton_get_locale (localedLocale1
*object
)
2256 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
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
);
2264 static const gchar
*
2265 localed_locale1_skeleton_get_x11_layout (localedLocale1
*object
)
2267 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
2269 g_mutex_lock (&skeleton
->priv
->lock
);
2270 value
= g_value_get_string (&(skeleton
->priv
->properties
[1]));
2271 g_mutex_unlock (&skeleton
->priv
->lock
);
2275 static const gchar
*
2276 localed_locale1_skeleton_get_x11_model (localedLocale1
*object
)
2278 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
2280 g_mutex_lock (&skeleton
->priv
->lock
);
2281 value
= g_value_get_string (&(skeleton
->priv
->properties
[2]));
2282 g_mutex_unlock (&skeleton
->priv
->lock
);
2286 static const gchar
*
2287 localed_locale1_skeleton_get_x11_variant (localedLocale1
*object
)
2289 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
2291 g_mutex_lock (&skeleton
->priv
->lock
);
2292 value
= g_value_get_string (&(skeleton
->priv
->properties
[3]));
2293 g_mutex_unlock (&skeleton
->priv
->lock
);
2297 static const gchar
*
2298 localed_locale1_skeleton_get_x11_options (localedLocale1
*object
)
2300 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
2302 g_mutex_lock (&skeleton
->priv
->lock
);
2303 value
= g_value_get_string (&(skeleton
->priv
->properties
[4]));
2304 g_mutex_unlock (&skeleton
->priv
->lock
);
2308 static const gchar
*
2309 localed_locale1_skeleton_get_vconsole_keymap (localedLocale1
*object
)
2311 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
2313 g_mutex_lock (&skeleton
->priv
->lock
);
2314 value
= g_value_get_string (&(skeleton
->priv
->properties
[5]));
2315 g_mutex_unlock (&skeleton
->priv
->lock
);
2319 static const gchar
*
2320 localed_locale1_skeleton_get_vconsole_keymap_toggle (localedLocale1
*object
)
2322 localedLocale1Skeleton
*skeleton
= LOCALED_LOCALE1_SKELETON (object
);
2324 g_mutex_lock (&skeleton
->priv
->lock
);
2325 value
= g_value_get_string (&(skeleton
->priv
->properties
[6]));
2326 g_mutex_unlock (&skeleton
->priv
->lock
);
2331 localed_locale1_skeleton_class_init (localedLocale1SkeletonClass
*klass
)
2333 GObjectClass
*gobject_class
;
2334 GDBusInterfaceSkeletonClass
*skeleton_class
;
2336 gobject_class
= G_OBJECT_CLASS (klass
);
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
;
2343 localed_locale1_override_properties (gobject_class
, 1);
2345 skeleton_class
= G_DBUS_INTERFACE_SKELETON_CLASS (klass
);
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
;
2351 #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38
2352 g_type_class_add_private (klass
, sizeof (localedLocale1SkeletonPrivate
));
2357 localed_locale1_skeleton_iface_init (localedLocale1Iface
*iface
)
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
;
2369 * localed_locale1_skeleton_new:
2371 * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-locale1.top_of_page">org.freedesktop.locale1</link>.
2373 * Returns: (transfer full) (type localedLocale1Skeleton): The skeleton object.
2376 localed_locale1_skeleton_new (void)
2378 return LOCALED_LOCALE1 (g_object_new (LOCALED_TYPE_LOCALE1_SKELETON
, NULL
));