| 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 | |
| 11 | #include "localed-gen.h" |
| 12 | |
| 13 | #include <string.h> |
| 14 | #ifdef G_OS_UNIX |
| 15 | # include <gio/gunixfdlist.h> |
| 16 | #endif |
| 17 | |
| 18 | /* ------------------------------------------------------------------------ |
| 19 | * Code for interface org.freedesktop.locale1 |
| 20 | * ------------------------------------------------------------------------ |
| 21 | */ |
| 22 | |
| 23 | /** |
| 24 | * SECTION:localedLocale1 |
| 25 | * @title: localedLocale1 |
| 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 | |
| 33 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg0 = |
| 34 | { |
| 35 | { |
| 36 | -1, |
| 37 | (gchar *) "unnamed_arg0", |
| 38 | (gchar *) "as", |
| 39 | NULL |
| 40 | }, |
| 41 | FALSE |
| 42 | }; |
| 43 | |
| 44 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg1 = |
| 45 | { |
| 46 | { |
| 47 | -1, |
| 48 | (gchar *) "unnamed_arg1", |
| 49 | (gchar *) "b", |
| 50 | NULL |
| 51 | }, |
| 52 | FALSE |
| 53 | }; |
| 54 | |
| 55 | static const _ExtendedGDBusArgInfo * const _localed_locale1_method_info_set_locale_IN_ARG_pointers[] = |
| 56 | { |
| 57 | &_localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg0, |
| 58 | &_localed_locale1_method_info_set_locale_IN_ARG_unnamed_arg1, |
| 59 | NULL |
| 60 | }; |
| 61 | |
| 62 | static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_locale = |
| 63 | { |
| 64 | { |
| 65 | -1, |
| 66 | (gchar *) "SetLocale", |
| 67 | (GDBusArgInfo **) &_localed_locale1_method_info_set_locale_IN_ARG_pointers, |
| 68 | NULL, |
| 69 | NULL |
| 70 | }, |
| 71 | "handle-set-locale", |
| 72 | FALSE |
| 73 | }; |
| 74 | |
| 75 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg0 = |
| 76 | { |
| 77 | { |
| 78 | -1, |
| 79 | (gchar *) "unnamed_arg0", |
| 80 | (gchar *) "s", |
| 81 | NULL |
| 82 | }, |
| 83 | FALSE |
| 84 | }; |
| 85 | |
| 86 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg1 = |
| 87 | { |
| 88 | { |
| 89 | -1, |
| 90 | (gchar *) "unnamed_arg1", |
| 91 | (gchar *) "s", |
| 92 | NULL |
| 93 | }, |
| 94 | FALSE |
| 95 | }; |
| 96 | |
| 97 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg2 = |
| 98 | { |
| 99 | { |
| 100 | -1, |
| 101 | (gchar *) "unnamed_arg2", |
| 102 | (gchar *) "b", |
| 103 | NULL |
| 104 | }, |
| 105 | FALSE |
| 106 | }; |
| 107 | |
| 108 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_unnamed_arg3 = |
| 109 | { |
| 110 | { |
| 111 | -1, |
| 112 | (gchar *) "unnamed_arg3", |
| 113 | (gchar *) "b", |
| 114 | NULL |
| 115 | }, |
| 116 | FALSE |
| 117 | }; |
| 118 | |
| 119 | static const _ExtendedGDBusArgInfo * const _localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers[] = |
| 120 | { |
| 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, |
| 125 | NULL |
| 126 | }; |
| 127 | |
| 128 | static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_vconsole_keyboard = |
| 129 | { |
| 130 | { |
| 131 | -1, |
| 132 | (gchar *) "SetVConsoleKeyboard", |
| 133 | (GDBusArgInfo **) &_localed_locale1_method_info_set_vconsole_keyboard_IN_ARG_pointers, |
| 134 | NULL, |
| 135 | NULL |
| 136 | }, |
| 137 | "handle-set-vconsole-keyboard", |
| 138 | FALSE |
| 139 | }; |
| 140 | |
| 141 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg0 = |
| 142 | { |
| 143 | { |
| 144 | -1, |
| 145 | (gchar *) "unnamed_arg0", |
| 146 | (gchar *) "s", |
| 147 | NULL |
| 148 | }, |
| 149 | FALSE |
| 150 | }; |
| 151 | |
| 152 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg1 = |
| 153 | { |
| 154 | { |
| 155 | -1, |
| 156 | (gchar *) "unnamed_arg1", |
| 157 | (gchar *) "s", |
| 158 | NULL |
| 159 | }, |
| 160 | FALSE |
| 161 | }; |
| 162 | |
| 163 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg2 = |
| 164 | { |
| 165 | { |
| 166 | -1, |
| 167 | (gchar *) "unnamed_arg2", |
| 168 | (gchar *) "s", |
| 169 | NULL |
| 170 | }, |
| 171 | FALSE |
| 172 | }; |
| 173 | |
| 174 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg3 = |
| 175 | { |
| 176 | { |
| 177 | -1, |
| 178 | (gchar *) "unnamed_arg3", |
| 179 | (gchar *) "s", |
| 180 | NULL |
| 181 | }, |
| 182 | FALSE |
| 183 | }; |
| 184 | |
| 185 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg4 = |
| 186 | { |
| 187 | { |
| 188 | -1, |
| 189 | (gchar *) "unnamed_arg4", |
| 190 | (gchar *) "b", |
| 191 | NULL |
| 192 | }, |
| 193 | FALSE |
| 194 | }; |
| 195 | |
| 196 | static const _ExtendedGDBusArgInfo _localed_locale1_method_info_set_x11_keyboard_IN_ARG_unnamed_arg5 = |
| 197 | { |
| 198 | { |
| 199 | -1, |
| 200 | (gchar *) "unnamed_arg5", |
| 201 | (gchar *) "b", |
| 202 | NULL |
| 203 | }, |
| 204 | FALSE |
| 205 | }; |
| 206 | |
| 207 | static const _ExtendedGDBusArgInfo * const _localed_locale1_method_info_set_x11_keyboard_IN_ARG_pointers[] = |
| 208 | { |
| 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, |
| 215 | NULL |
| 216 | }; |
| 217 | |
| 218 | static const _ExtendedGDBusMethodInfo _localed_locale1_method_info_set_x11_keyboard = |
| 219 | { |
| 220 | { |
| 221 | -1, |
| 222 | (gchar *) "SetX11Keyboard", |
| 223 | (GDBusArgInfo **) &_localed_locale1_method_info_set_x11_keyboard_IN_ARG_pointers, |
| 224 | NULL, |
| 225 | NULL |
| 226 | }, |
| 227 | "handle-set-x11-keyboard", |
| 228 | FALSE |
| 229 | }; |
| 230 | |
| 231 | static const _ExtendedGDBusMethodInfo * const _localed_locale1_method_info_pointers[] = |
| 232 | { |
| 233 | &_localed_locale1_method_info_set_locale, |
| 234 | &_localed_locale1_method_info_set_vconsole_keyboard, |
| 235 | &_localed_locale1_method_info_set_x11_keyboard, |
| 236 | NULL |
| 237 | }; |
| 238 | |
| 239 | static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_locale = |
| 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 | |
| 252 | static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_layout = |
| 253 | { |
| 254 | { |
| 255 | -1, |
| 256 | (gchar *) "X11Layout", |
| 257 | (gchar *) "s", |
| 258 | G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
| 259 | NULL |
| 260 | }, |
| 261 | "x11-layout", |
| 262 | FALSE |
| 263 | }; |
| 264 | |
| 265 | static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_model = |
| 266 | { |
| 267 | { |
| 268 | -1, |
| 269 | (gchar *) "X11Model", |
| 270 | (gchar *) "s", |
| 271 | G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
| 272 | NULL |
| 273 | }, |
| 274 | "x11-model", |
| 275 | FALSE |
| 276 | }; |
| 277 | |
| 278 | static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_variant = |
| 279 | { |
| 280 | { |
| 281 | -1, |
| 282 | (gchar *) "X11Variant", |
| 283 | (gchar *) "s", |
| 284 | G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
| 285 | NULL |
| 286 | }, |
| 287 | "x11-variant", |
| 288 | FALSE |
| 289 | }; |
| 290 | |
| 291 | static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_x11_options = |
| 292 | { |
| 293 | { |
| 294 | -1, |
| 295 | (gchar *) "X11Options", |
| 296 | (gchar *) "s", |
| 297 | G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
| 298 | NULL |
| 299 | }, |
| 300 | "x11-options", |
| 301 | FALSE |
| 302 | }; |
| 303 | |
| 304 | static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_vconsole_keymap = |
| 305 | { |
| 306 | { |
| 307 | -1, |
| 308 | (gchar *) "VConsoleKeymap", |
| 309 | (gchar *) "s", |
| 310 | G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
| 311 | NULL |
| 312 | }, |
| 313 | "vconsole-keymap", |
| 314 | FALSE |
| 315 | }; |
| 316 | |
| 317 | static const _ExtendedGDBusPropertyInfo _localed_locale1_property_info_vconsole_keymap_toggle = |
| 318 | { |
| 319 | { |
| 320 | -1, |
| 321 | (gchar *) "VConsoleKeymapToggle", |
| 322 | (gchar *) "s", |
| 323 | G_DBUS_PROPERTY_INFO_FLAGS_READABLE, |
| 324 | NULL |
| 325 | }, |
| 326 | "vconsole-keymap-toggle", |
| 327 | FALSE |
| 328 | }; |
| 329 | |
| 330 | static const _ExtendedGDBusPropertyInfo * const _localed_locale1_property_info_pointers[] = |
| 331 | { |
| 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, |
| 339 | NULL |
| 340 | }; |
| 341 | |
| 342 | static const _ExtendedGDBusInterfaceInfo _localed_locale1_interface_info = |
| 343 | { |
| 344 | { |
| 345 | -1, |
| 346 | (gchar *) "org.freedesktop.locale1", |
| 347 | (GDBusMethodInfo **) &_localed_locale1_method_info_pointers, |
| 348 | NULL, |
| 349 | (GDBusPropertyInfo **) &_localed_locale1_property_info_pointers, |
| 350 | NULL |
| 351 | }, |
| 352 | "locale1", |
| 353 | }; |
| 354 | |
| 355 | |
| 356 | /** |
| 357 | * localed_locale1_interface_info: |
| 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 | */ |
| 363 | GDBusInterfaceInfo * |
| 364 | localed_locale1_interface_info (void) |
| 365 | { |
| 366 | return (GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct; |
| 367 | } |
| 368 | |
| 369 | /** |
| 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. |
| 373 | * |
| 374 | * Overrides all #GObject properties in the #localedLocale1 interface for a concrete class. |
| 375 | * The properties are overridden in the order they are defined. |
| 376 | * |
| 377 | * Returns: The last property id. |
| 378 | */ |
| 379 | guint |
| 380 | localed_locale1_override_properties (GObjectClass *klass, guint property_id_begin) |
| 381 | { |
| 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; |
| 390 | } |
| 391 | |
| 392 | |
| 393 | |
| 394 | /** |
| 395 | * localedLocale1: |
| 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 | /** |
| 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. |
| 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 | |
| 417 | typedef localedLocale1Iface localedLocale1Interface; |
| 418 | G_DEFINE_INTERFACE (localedLocale1, localed_locale1, G_TYPE_OBJECT); |
| 419 | |
| 420 | static void |
| 421 | localed_locale1_default_init (localedLocale1Iface *iface) |
| 422 | { |
| 423 | /* GObject signals for incoming D-Bus method calls: */ |
| 424 | /** |
| 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. |
| 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 | * |
| 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. |
| 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, |
| 440 | G_STRUCT_OFFSET (localedLocale1Iface, handle_set_locale), |
| 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 | /** |
| 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. |
| 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 | * |
| 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. |
| 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, |
| 466 | G_STRUCT_OFFSET (localedLocale1Iface, handle_set_vconsole_keyboard), |
| 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 | /** |
| 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. |
| 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 | * |
| 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. |
| 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, |
| 494 | G_STRUCT_OFFSET (localedLocale1Iface, handle_set_x11_keyboard), |
| 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 | /** |
| 504 | * localedLocale1:locale: |
| 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 | /** |
| 513 | * localedLocale1:x11-layout: |
| 514 | * |
| 515 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link>. |
| 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, |
| 520 | g_param_spec_string ("x11-layout", "X11Layout", "X11Layout", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 521 | /** |
| 522 | * localedLocale1:x11-model: |
| 523 | * |
| 524 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link>. |
| 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, |
| 529 | g_param_spec_string ("x11-model", "X11Model", "X11Model", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 530 | /** |
| 531 | * localedLocale1:x11-variant: |
| 532 | * |
| 533 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link>. |
| 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, |
| 538 | g_param_spec_string ("x11-variant", "X11Variant", "X11Variant", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 539 | /** |
| 540 | * localedLocale1:x11-options: |
| 541 | * |
| 542 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link>. |
| 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, |
| 547 | g_param_spec_string ("x11-options", "X11Options", "X11Options", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 548 | /** |
| 549 | * localedLocale1:vconsole-keymap: |
| 550 | * |
| 551 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link>. |
| 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, |
| 556 | g_param_spec_string ("vconsole-keymap", "VConsoleKeymap", "VConsoleKeymap", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 557 | /** |
| 558 | * localedLocale1:vconsole-keymap-toggle: |
| 559 | * |
| 560 | * Represents the D-Bus property <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link>. |
| 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, |
| 565 | g_param_spec_string ("vconsole-keymap-toggle", "VConsoleKeymapToggle", "VConsoleKeymapToggle", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); |
| 566 | } |
| 567 | |
| 568 | /** |
| 569 | * localed_locale1_get_locale: (skip) |
| 570 | * @object: A #localedLocale1. |
| 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 | * |
| 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> |
| 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 | */ |
| 580 | const gchar *const * |
| 581 | localed_locale1_get_locale (localedLocale1 *object) |
| 582 | { |
| 583 | return LOCALED_LOCALE1_GET_IFACE (object)->get_locale (object); |
| 584 | } |
| 585 | |
| 586 | /** |
| 587 | * localed_locale1_dup_locale: (skip) |
| 588 | * @object: A #localedLocale1. |
| 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 | */ |
| 596 | gchar ** |
| 597 | localed_locale1_dup_locale (localedLocale1 *object) |
| 598 | { |
| 599 | gchar **value; |
| 600 | g_object_get (G_OBJECT (object), "locale", &value, NULL); |
| 601 | return value; |
| 602 | } |
| 603 | |
| 604 | /** |
| 605 | * localed_locale1_set_locale: (skip) |
| 606 | * @object: A #localedLocale1. |
| 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 | */ |
| 613 | void |
| 614 | localed_locale1_set_locale (localedLocale1 *object, const gchar *const *value) |
| 615 | { |
| 616 | g_object_set (G_OBJECT (object), "locale", value, NULL); |
| 617 | } |
| 618 | |
| 619 | /** |
| 620 | * localed_locale1_get_x11_layout: (skip) |
| 621 | * @object: A #localedLocale1. |
| 622 | * |
| 623 | * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property. |
| 624 | * |
| 625 | * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
| 626 | * |
| 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> |
| 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 | */ |
| 631 | const gchar * |
| 632 | localed_locale1_get_x11_layout (localedLocale1 *object) |
| 633 | { |
| 634 | return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_layout (object); |
| 635 | } |
| 636 | |
| 637 | /** |
| 638 | * localed_locale1_dup_x11_layout: (skip) |
| 639 | * @object: A #localedLocale1. |
| 640 | * |
| 641 | * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property. |
| 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 | */ |
| 647 | gchar * |
| 648 | localed_locale1_dup_x11_layout (localedLocale1 *object) |
| 649 | { |
| 650 | gchar *value; |
| 651 | g_object_get (G_OBJECT (object), "x11-layout", &value, NULL); |
| 652 | return value; |
| 653 | } |
| 654 | |
| 655 | /** |
| 656 | * localed_locale1_set_x11_layout: (skip) |
| 657 | * @object: A #localedLocale1. |
| 658 | * @value: The value to set. |
| 659 | * |
| 660 | * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Layout">"X11Layout"</link> D-Bus property to @value. |
| 661 | * |
| 662 | * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
| 663 | */ |
| 664 | void |
| 665 | localed_locale1_set_x11_layout (localedLocale1 *object, const gchar *value) |
| 666 | { |
| 667 | g_object_set (G_OBJECT (object), "x11-layout", value, NULL); |
| 668 | } |
| 669 | |
| 670 | /** |
| 671 | * localed_locale1_get_x11_model: (skip) |
| 672 | * @object: A #localedLocale1. |
| 673 | * |
| 674 | * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property. |
| 675 | * |
| 676 | * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
| 677 | * |
| 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> |
| 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 | */ |
| 682 | const gchar * |
| 683 | localed_locale1_get_x11_model (localedLocale1 *object) |
| 684 | { |
| 685 | return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_model (object); |
| 686 | } |
| 687 | |
| 688 | /** |
| 689 | * localed_locale1_dup_x11_model: (skip) |
| 690 | * @object: A #localedLocale1. |
| 691 | * |
| 692 | * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property. |
| 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 | */ |
| 698 | gchar * |
| 699 | localed_locale1_dup_x11_model (localedLocale1 *object) |
| 700 | { |
| 701 | gchar *value; |
| 702 | g_object_get (G_OBJECT (object), "x11-model", &value, NULL); |
| 703 | return value; |
| 704 | } |
| 705 | |
| 706 | /** |
| 707 | * localed_locale1_set_x11_model: (skip) |
| 708 | * @object: A #localedLocale1. |
| 709 | * @value: The value to set. |
| 710 | * |
| 711 | * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Model">"X11Model"</link> D-Bus property to @value. |
| 712 | * |
| 713 | * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
| 714 | */ |
| 715 | void |
| 716 | localed_locale1_set_x11_model (localedLocale1 *object, const gchar *value) |
| 717 | { |
| 718 | g_object_set (G_OBJECT (object), "x11-model", value, NULL); |
| 719 | } |
| 720 | |
| 721 | /** |
| 722 | * localed_locale1_get_x11_variant: (skip) |
| 723 | * @object: A #localedLocale1. |
| 724 | * |
| 725 | * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property. |
| 726 | * |
| 727 | * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
| 728 | * |
| 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> |
| 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 | */ |
| 733 | const gchar * |
| 734 | localed_locale1_get_x11_variant (localedLocale1 *object) |
| 735 | { |
| 736 | return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_variant (object); |
| 737 | } |
| 738 | |
| 739 | /** |
| 740 | * localed_locale1_dup_x11_variant: (skip) |
| 741 | * @object: A #localedLocale1. |
| 742 | * |
| 743 | * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property. |
| 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 | */ |
| 749 | gchar * |
| 750 | localed_locale1_dup_x11_variant (localedLocale1 *object) |
| 751 | { |
| 752 | gchar *value; |
| 753 | g_object_get (G_OBJECT (object), "x11-variant", &value, NULL); |
| 754 | return value; |
| 755 | } |
| 756 | |
| 757 | /** |
| 758 | * localed_locale1_set_x11_variant: (skip) |
| 759 | * @object: A #localedLocale1. |
| 760 | * @value: The value to set. |
| 761 | * |
| 762 | * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Variant">"X11Variant"</link> D-Bus property to @value. |
| 763 | * |
| 764 | * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
| 765 | */ |
| 766 | void |
| 767 | localed_locale1_set_x11_variant (localedLocale1 *object, const gchar *value) |
| 768 | { |
| 769 | g_object_set (G_OBJECT (object), "x11-variant", value, NULL); |
| 770 | } |
| 771 | |
| 772 | /** |
| 773 | * localed_locale1_get_x11_options: (skip) |
| 774 | * @object: A #localedLocale1. |
| 775 | * |
| 776 | * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property. |
| 777 | * |
| 778 | * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
| 779 | * |
| 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> |
| 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 | */ |
| 784 | const gchar * |
| 785 | localed_locale1_get_x11_options (localedLocale1 *object) |
| 786 | { |
| 787 | return LOCALED_LOCALE1_GET_IFACE (object)->get_x11_options (object); |
| 788 | } |
| 789 | |
| 790 | /** |
| 791 | * localed_locale1_dup_x11_options: (skip) |
| 792 | * @object: A #localedLocale1. |
| 793 | * |
| 794 | * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property. |
| 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 | */ |
| 800 | gchar * |
| 801 | localed_locale1_dup_x11_options (localedLocale1 *object) |
| 802 | { |
| 803 | gchar *value; |
| 804 | g_object_get (G_OBJECT (object), "x11-options", &value, NULL); |
| 805 | return value; |
| 806 | } |
| 807 | |
| 808 | /** |
| 809 | * localed_locale1_set_x11_options: (skip) |
| 810 | * @object: A #localedLocale1. |
| 811 | * @value: The value to set. |
| 812 | * |
| 813 | * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.X11Options">"X11Options"</link> D-Bus property to @value. |
| 814 | * |
| 815 | * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
| 816 | */ |
| 817 | void |
| 818 | localed_locale1_set_x11_options (localedLocale1 *object, const gchar *value) |
| 819 | { |
| 820 | g_object_set (G_OBJECT (object), "x11-options", value, NULL); |
| 821 | } |
| 822 | |
| 823 | /** |
| 824 | * localed_locale1_get_vconsole_keymap: (skip) |
| 825 | * @object: A #localedLocale1. |
| 826 | * |
| 827 | * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property. |
| 828 | * |
| 829 | * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
| 830 | * |
| 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> |
| 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 | */ |
| 835 | const gchar * |
| 836 | localed_locale1_get_vconsole_keymap (localedLocale1 *object) |
| 837 | { |
| 838 | return LOCALED_LOCALE1_GET_IFACE (object)->get_vconsole_keymap (object); |
| 839 | } |
| 840 | |
| 841 | /** |
| 842 | * localed_locale1_dup_vconsole_keymap: (skip) |
| 843 | * @object: A #localedLocale1. |
| 844 | * |
| 845 | * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property. |
| 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 | */ |
| 851 | gchar * |
| 852 | localed_locale1_dup_vconsole_keymap (localedLocale1 *object) |
| 853 | { |
| 854 | gchar *value; |
| 855 | g_object_get (G_OBJECT (object), "vconsole-keymap", &value, NULL); |
| 856 | return value; |
| 857 | } |
| 858 | |
| 859 | /** |
| 860 | * localed_locale1_set_vconsole_keymap: (skip) |
| 861 | * @object: A #localedLocale1. |
| 862 | * @value: The value to set. |
| 863 | * |
| 864 | * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymap">"VConsoleKeymap"</link> D-Bus property to @value. |
| 865 | * |
| 866 | * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
| 867 | */ |
| 868 | void |
| 869 | localed_locale1_set_vconsole_keymap (localedLocale1 *object, const gchar *value) |
| 870 | { |
| 871 | g_object_set (G_OBJECT (object), "vconsole-keymap", value, NULL); |
| 872 | } |
| 873 | |
| 874 | /** |
| 875 | * localed_locale1_get_vconsole_keymap_toggle: (skip) |
| 876 | * @object: A #localedLocale1. |
| 877 | * |
| 878 | * Gets the value of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property. |
| 879 | * |
| 880 | * Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side. |
| 881 | * |
| 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> |
| 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 | */ |
| 886 | const gchar * |
| 887 | localed_locale1_get_vconsole_keymap_toggle (localedLocale1 *object) |
| 888 | { |
| 889 | return LOCALED_LOCALE1_GET_IFACE (object)->get_vconsole_keymap_toggle (object); |
| 890 | } |
| 891 | |
| 892 | /** |
| 893 | * localed_locale1_dup_vconsole_keymap_toggle: (skip) |
| 894 | * @object: A #localedLocale1. |
| 895 | * |
| 896 | * Gets a copy of the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property. |
| 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 | */ |
| 902 | gchar * |
| 903 | localed_locale1_dup_vconsole_keymap_toggle (localedLocale1 *object) |
| 904 | { |
| 905 | gchar *value; |
| 906 | g_object_get (G_OBJECT (object), "vconsole-keymap-toggle", &value, NULL); |
| 907 | return value; |
| 908 | } |
| 909 | |
| 910 | /** |
| 911 | * localed_locale1_set_vconsole_keymap_toggle: (skip) |
| 912 | * @object: A #localedLocale1. |
| 913 | * @value: The value to set. |
| 914 | * |
| 915 | * Sets the <link linkend="gdbus-property-org-freedesktop-locale1.VConsoleKeymapToggle">"VConsoleKeymapToggle"</link> D-Bus property to @value. |
| 916 | * |
| 917 | * Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side. |
| 918 | */ |
| 919 | void |
| 920 | localed_locale1_set_vconsole_keymap_toggle (localedLocale1 *object, const gchar *value) |
| 921 | { |
| 922 | g_object_set (G_OBJECT (object), "vconsole-keymap-toggle", value, NULL); |
| 923 | } |
| 924 | |
| 925 | /** |
| 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. |
| 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. |
| 936 | * You can then call localed_locale1_call_set_locale_finish() to get the result of the operation. |
| 937 | * |
| 938 | * See localed_locale1_call_set_locale_sync() for the synchronous, blocking version of this method. |
| 939 | */ |
| 940 | void |
| 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, |
| 947 | gpointer user_data) |
| 948 | { |
| 949 | g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
| 950 | "SetLocale", |
| 951 | g_variant_new ("(^asb)", |
| 952 | arg_unnamed_arg0, |
| 953 | arg_unnamed_arg1), |
| 954 | G_DBUS_CALL_FLAGS_NONE, |
| 955 | -1, |
| 956 | cancellable, |
| 957 | callback, |
| 958 | user_data); |
| 959 | } |
| 960 | |
| 961 | /** |
| 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. |
| 966 | * |
| 967 | * Finishes an operation started with localed_locale1_call_set_locale(). |
| 968 | * |
| 969 | * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. |
| 970 | */ |
| 971 | gboolean |
| 972 | localed_locale1_call_set_locale_finish ( |
| 973 | localedLocale1 *proxy, |
| 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 | /** |
| 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. |
| 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 | * |
| 998 | * See localed_locale1_call_set_locale() for the asynchronous version of this method. |
| 999 | * |
| 1000 | * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. |
| 1001 | */ |
| 1002 | gboolean |
| 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, |
| 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)", |
| 1014 | arg_unnamed_arg0, |
| 1015 | arg_unnamed_arg1), |
| 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 | /** |
| 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. |
| 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. |
| 1042 | * You can then call localed_locale1_call_set_vconsole_keyboard_finish() to get the result of the operation. |
| 1043 | * |
| 1044 | * See localed_locale1_call_set_vconsole_keyboard_sync() for the synchronous, blocking version of this method. |
| 1045 | */ |
| 1046 | void |
| 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, |
| 1055 | gpointer user_data) |
| 1056 | { |
| 1057 | g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
| 1058 | "SetVConsoleKeyboard", |
| 1059 | g_variant_new ("(ssbb)", |
| 1060 | arg_unnamed_arg0, |
| 1061 | arg_unnamed_arg1, |
| 1062 | arg_unnamed_arg2, |
| 1063 | arg_unnamed_arg3), |
| 1064 | G_DBUS_CALL_FLAGS_NONE, |
| 1065 | -1, |
| 1066 | cancellable, |
| 1067 | callback, |
| 1068 | user_data); |
| 1069 | } |
| 1070 | |
| 1071 | /** |
| 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. |
| 1076 | * |
| 1077 | * Finishes an operation started with localed_locale1_call_set_vconsole_keyboard(). |
| 1078 | * |
| 1079 | * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. |
| 1080 | */ |
| 1081 | gboolean |
| 1082 | localed_locale1_call_set_vconsole_keyboard_finish ( |
| 1083 | localedLocale1 *proxy, |
| 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 | /** |
| 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. |
| 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 | * |
| 1110 | * See localed_locale1_call_set_vconsole_keyboard() for the asynchronous version of this method. |
| 1111 | * |
| 1112 | * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. |
| 1113 | */ |
| 1114 | gboolean |
| 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, |
| 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)", |
| 1128 | arg_unnamed_arg0, |
| 1129 | arg_unnamed_arg1, |
| 1130 | arg_unnamed_arg2, |
| 1131 | arg_unnamed_arg3), |
| 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 | /** |
| 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. |
| 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. |
| 1160 | * You can then call localed_locale1_call_set_x11_keyboard_finish() to get the result of the operation. |
| 1161 | * |
| 1162 | * See localed_locale1_call_set_x11_keyboard_sync() for the synchronous, blocking version of this method. |
| 1163 | */ |
| 1164 | void |
| 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, |
| 1175 | gpointer user_data) |
| 1176 | { |
| 1177 | g_dbus_proxy_call (G_DBUS_PROXY (proxy), |
| 1178 | "SetX11Keyboard", |
| 1179 | g_variant_new ("(ssssbb)", |
| 1180 | arg_unnamed_arg0, |
| 1181 | arg_unnamed_arg1, |
| 1182 | arg_unnamed_arg2, |
| 1183 | arg_unnamed_arg3, |
| 1184 | arg_unnamed_arg4, |
| 1185 | arg_unnamed_arg5), |
| 1186 | G_DBUS_CALL_FLAGS_NONE, |
| 1187 | -1, |
| 1188 | cancellable, |
| 1189 | callback, |
| 1190 | user_data); |
| 1191 | } |
| 1192 | |
| 1193 | /** |
| 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. |
| 1198 | * |
| 1199 | * Finishes an operation started with localed_locale1_call_set_x11_keyboard(). |
| 1200 | * |
| 1201 | * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. |
| 1202 | */ |
| 1203 | gboolean |
| 1204 | localed_locale1_call_set_x11_keyboard_finish ( |
| 1205 | localedLocale1 *proxy, |
| 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 | /** |
| 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. |
| 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 | * |
| 1234 | * See localed_locale1_call_set_x11_keyboard() for the asynchronous version of this method. |
| 1235 | * |
| 1236 | * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set. |
| 1237 | */ |
| 1238 | gboolean |
| 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, |
| 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)", |
| 1254 | arg_unnamed_arg0, |
| 1255 | arg_unnamed_arg1, |
| 1256 | arg_unnamed_arg2, |
| 1257 | arg_unnamed_arg3, |
| 1258 | arg_unnamed_arg4, |
| 1259 | arg_unnamed_arg5), |
| 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 | /** |
| 1274 | * localed_locale1_complete_set_locale: |
| 1275 | * @object: A #localedLocale1. |
| 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 | */ |
| 1282 | void |
| 1283 | localed_locale1_complete_set_locale ( |
| 1284 | localedLocale1 *object, |
| 1285 | GDBusMethodInvocation *invocation) |
| 1286 | { |
| 1287 | g_dbus_method_invocation_return_value (invocation, |
| 1288 | g_variant_new ("()")); |
| 1289 | } |
| 1290 | |
| 1291 | /** |
| 1292 | * localed_locale1_complete_set_vconsole_keyboard: |
| 1293 | * @object: A #localedLocale1. |
| 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 | */ |
| 1300 | void |
| 1301 | localed_locale1_complete_set_vconsole_keyboard ( |
| 1302 | localedLocale1 *object, |
| 1303 | GDBusMethodInvocation *invocation) |
| 1304 | { |
| 1305 | g_dbus_method_invocation_return_value (invocation, |
| 1306 | g_variant_new ("()")); |
| 1307 | } |
| 1308 | |
| 1309 | /** |
| 1310 | * localed_locale1_complete_set_x11_keyboard: |
| 1311 | * @object: A #localedLocale1. |
| 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 | */ |
| 1318 | void |
| 1319 | localed_locale1_complete_set_x11_keyboard ( |
| 1320 | localedLocale1 *object, |
| 1321 | GDBusMethodInvocation *invocation) |
| 1322 | { |
| 1323 | g_dbus_method_invocation_return_value (invocation, |
| 1324 | g_variant_new ("()")); |
| 1325 | } |
| 1326 | |
| 1327 | /* ------------------------------------------------------------------------ */ |
| 1328 | |
| 1329 | /** |
| 1330 | * localedLocale1Proxy: |
| 1331 | * |
| 1332 | * The #localedLocale1Proxy structure contains only private data and should only be accessed using the provided API. |
| 1333 | */ |
| 1334 | |
| 1335 | /** |
| 1336 | * localedLocale1ProxyClass: |
| 1337 | * @parent_class: The parent class. |
| 1338 | * |
| 1339 | * Class structure for #localedLocale1Proxy. |
| 1340 | */ |
| 1341 | |
| 1342 | struct _localedLocale1ProxyPrivate |
| 1343 | { |
| 1344 | GData *qdata; |
| 1345 | }; |
| 1346 | |
| 1347 | static void localed_locale1_proxy_iface_init (localedLocale1Iface *iface); |
| 1348 | |
| 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)); |
| 1353 | |
| 1354 | #else |
| 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)); |
| 1357 | |
| 1358 | #endif |
| 1359 | static void |
| 1360 | localed_locale1_proxy_finalize (GObject *object) |
| 1361 | { |
| 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); |
| 1365 | } |
| 1366 | |
| 1367 | static void |
| 1368 | localed_locale1_proxy_get_property (GObject *object, |
| 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); |
| 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) |
| 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 | |
| 1391 | static void |
| 1392 | localed_locale1_proxy_set_property_cb (GDBusProxy *proxy, |
| 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 | |
| 1414 | static void |
| 1415 | localed_locale1_proxy_set_property (GObject *object, |
| 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); |
| 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, |
| 1429 | -1, |
| 1430 | NULL, (GAsyncReadyCallback) localed_locale1_proxy_set_property_cb, (GDBusPropertyInfo *) &info->parent_struct); |
| 1431 | g_variant_unref (variant); |
| 1432 | } |
| 1433 | |
| 1434 | static void |
| 1435 | localed_locale1_proxy_g_signal (GDBusProxy *proxy, |
| 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; |
| 1447 | info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_localed_locale1_interface_info.parent_struct, signal_name); |
| 1448 | if (info == NULL) |
| 1449 | return; |
| 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); |
| 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 (¶mv[n], G_TYPE_VARIANT); |
| 1462 | g_value_set_variant (¶mv[n], child); |
| 1463 | n++; |
| 1464 | } |
| 1465 | else |
| 1466 | g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
| 1467 | g_variant_unref (child); |
| 1468 | } |
| 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]); |
| 1473 | g_free (paramv); |
| 1474 | } |
| 1475 | |
| 1476 | static void |
| 1477 | localed_locale1_proxy_g_properties_changed (GDBusProxy *_proxy, |
| 1478 | GVariant *changed_properties, |
| 1479 | const gchar *const *invalidated_properties) |
| 1480 | { |
| 1481 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (_proxy); |
| 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 | { |
| 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); |
| 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 | { |
| 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]); |
| 1499 | if (info != NULL) |
| 1500 | g_object_notify (G_OBJECT (proxy), info->hyphen_name); |
| 1501 | } |
| 1502 | } |
| 1503 | |
| 1504 | static const gchar *const * |
| 1505 | localed_locale1_proxy_get_locale (localedLocale1 *object) |
| 1506 | { |
| 1507 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object); |
| 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 | |
| 1523 | static const gchar * |
| 1524 | localed_locale1_proxy_get_x11_layout (localedLocale1 *object) |
| 1525 | { |
| 1526 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object); |
| 1527 | GVariant *variant; |
| 1528 | const gchar *value = NULL; |
| 1529 | variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Layout"); |
| 1530 | if (variant != NULL) |
| 1531 | { |
| 1532 | value = g_variant_get_string (variant, NULL); |
| 1533 | g_variant_unref (variant); |
| 1534 | } |
| 1535 | return value; |
| 1536 | } |
| 1537 | |
| 1538 | static const gchar * |
| 1539 | localed_locale1_proxy_get_x11_model (localedLocale1 *object) |
| 1540 | { |
| 1541 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object); |
| 1542 | GVariant *variant; |
| 1543 | const gchar *value = NULL; |
| 1544 | variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Model"); |
| 1545 | if (variant != NULL) |
| 1546 | { |
| 1547 | value = g_variant_get_string (variant, NULL); |
| 1548 | g_variant_unref (variant); |
| 1549 | } |
| 1550 | return value; |
| 1551 | } |
| 1552 | |
| 1553 | static const gchar * |
| 1554 | localed_locale1_proxy_get_x11_variant (localedLocale1 *object) |
| 1555 | { |
| 1556 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object); |
| 1557 | GVariant *variant; |
| 1558 | const gchar *value = NULL; |
| 1559 | variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Variant"); |
| 1560 | if (variant != NULL) |
| 1561 | { |
| 1562 | value = g_variant_get_string (variant, NULL); |
| 1563 | g_variant_unref (variant); |
| 1564 | } |
| 1565 | return value; |
| 1566 | } |
| 1567 | |
| 1568 | static const gchar * |
| 1569 | localed_locale1_proxy_get_x11_options (localedLocale1 *object) |
| 1570 | { |
| 1571 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object); |
| 1572 | GVariant *variant; |
| 1573 | const gchar *value = NULL; |
| 1574 | variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "X11Options"); |
| 1575 | if (variant != NULL) |
| 1576 | { |
| 1577 | value = g_variant_get_string (variant, NULL); |
| 1578 | g_variant_unref (variant); |
| 1579 | } |
| 1580 | return value; |
| 1581 | } |
| 1582 | |
| 1583 | static const gchar * |
| 1584 | localed_locale1_proxy_get_vconsole_keymap (localedLocale1 *object) |
| 1585 | { |
| 1586 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object); |
| 1587 | GVariant *variant; |
| 1588 | const gchar *value = NULL; |
| 1589 | variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "VConsoleKeymap"); |
| 1590 | if (variant != NULL) |
| 1591 | { |
| 1592 | value = g_variant_get_string (variant, NULL); |
| 1593 | g_variant_unref (variant); |
| 1594 | } |
| 1595 | return value; |
| 1596 | } |
| 1597 | |
| 1598 | static const gchar * |
| 1599 | localed_locale1_proxy_get_vconsole_keymap_toggle (localedLocale1 *object) |
| 1600 | { |
| 1601 | localedLocale1Proxy *proxy = LOCALED_LOCALE1_PROXY (object); |
| 1602 | GVariant *variant; |
| 1603 | const gchar *value = NULL; |
| 1604 | variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (proxy), "VConsoleKeymapToggle"); |
| 1605 | if (variant != NULL) |
| 1606 | { |
| 1607 | value = g_variant_get_string (variant, NULL); |
| 1608 | g_variant_unref (variant); |
| 1609 | } |
| 1610 | return value; |
| 1611 | } |
| 1612 | |
| 1613 | static void |
| 1614 | localed_locale1_proxy_init (localedLocale1Proxy *proxy) |
| 1615 | { |
| 1616 | #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
| 1617 | proxy->priv = localed_locale1_proxy_get_instance_private (proxy); |
| 1618 | #else |
| 1619 | proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, LOCALED_TYPE_LOCALE1_PROXY, localedLocale1ProxyPrivate); |
| 1620 | #endif |
| 1621 | |
| 1622 | g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), localed_locale1_interface_info ()); |
| 1623 | } |
| 1624 | |
| 1625 | static void |
| 1626 | localed_locale1_proxy_class_init (localedLocale1ProxyClass *klass) |
| 1627 | { |
| 1628 | GObjectClass *gobject_class; |
| 1629 | GDBusProxyClass *proxy_class; |
| 1630 | |
| 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; |
| 1635 | |
| 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; |
| 1639 | |
| 1640 | localed_locale1_override_properties (gobject_class, 1); |
| 1641 | |
| 1642 | #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 |
| 1643 | g_type_class_add_private (klass, sizeof (localedLocale1ProxyPrivate)); |
| 1644 | #endif |
| 1645 | } |
| 1646 | |
| 1647 | static void |
| 1648 | localed_locale1_proxy_iface_init (localedLocale1Iface *iface) |
| 1649 | { |
| 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; |
| 1657 | } |
| 1658 | |
| 1659 | /** |
| 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. |
| 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. |
| 1672 | * You can then call localed_locale1_proxy_new_finish() to get the result of the operation. |
| 1673 | * |
| 1674 | * See localed_locale1_proxy_new_sync() for the synchronous, blocking version of this constructor. |
| 1675 | */ |
| 1676 | void |
| 1677 | localed_locale1_proxy_new ( |
| 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 | { |
| 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); |
| 1687 | } |
| 1688 | |
| 1689 | /** |
| 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 |
| 1693 | * |
| 1694 | * Finishes an operation started with localed_locale1_proxy_new(). |
| 1695 | * |
| 1696 | * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set. |
| 1697 | */ |
| 1698 | localedLocale1 * |
| 1699 | localed_locale1_proxy_new_finish ( |
| 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) |
| 1709 | return LOCALED_LOCALE1 (ret); |
| 1710 | else |
| 1711 | return NULL; |
| 1712 | } |
| 1713 | |
| 1714 | /** |
| 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 |
| 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 | * |
| 1727 | * See localed_locale1_proxy_new() for the asynchronous version of this constructor. |
| 1728 | * |
| 1729 | * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set. |
| 1730 | */ |
| 1731 | localedLocale1 * |
| 1732 | localed_locale1_proxy_new_sync ( |
| 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; |
| 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); |
| 1742 | if (ret != NULL) |
| 1743 | return LOCALED_LOCALE1 (ret); |
| 1744 | else |
| 1745 | return NULL; |
| 1746 | } |
| 1747 | |
| 1748 | |
| 1749 | /** |
| 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. |
| 1758 | * |
| 1759 | * Like localed_locale1_proxy_new() but takes a #GBusType instead of a #GDBusConnection. |
| 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. |
| 1762 | * You can then call localed_locale1_proxy_new_for_bus_finish() to get the result of the operation. |
| 1763 | * |
| 1764 | * See localed_locale1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor. |
| 1765 | */ |
| 1766 | void |
| 1767 | localed_locale1_proxy_new_for_bus ( |
| 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 | { |
| 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); |
| 1777 | } |
| 1778 | |
| 1779 | /** |
| 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 |
| 1783 | * |
| 1784 | * Finishes an operation started with localed_locale1_proxy_new_for_bus(). |
| 1785 | * |
| 1786 | * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set. |
| 1787 | */ |
| 1788 | localedLocale1 * |
| 1789 | localed_locale1_proxy_new_for_bus_finish ( |
| 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) |
| 1799 | return LOCALED_LOCALE1 (ret); |
| 1800 | else |
| 1801 | return NULL; |
| 1802 | } |
| 1803 | |
| 1804 | /** |
| 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 |
| 1812 | * |
| 1813 | * Like localed_locale1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. |
| 1814 | * |
| 1815 | * The calling thread is blocked until a reply is received. |
| 1816 | * |
| 1817 | * See localed_locale1_proxy_new_for_bus() for the asynchronous version of this constructor. |
| 1818 | * |
| 1819 | * Returns: (transfer full) (type localedLocale1Proxy): The constructed proxy object or %NULL if @error is set. |
| 1820 | */ |
| 1821 | localedLocale1 * |
| 1822 | localed_locale1_proxy_new_for_bus_sync ( |
| 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; |
| 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); |
| 1832 | if (ret != NULL) |
| 1833 | return LOCALED_LOCALE1 (ret); |
| 1834 | else |
| 1835 | return NULL; |
| 1836 | } |
| 1837 | |
| 1838 | |
| 1839 | /* ------------------------------------------------------------------------ */ |
| 1840 | |
| 1841 | /** |
| 1842 | * localedLocale1Skeleton: |
| 1843 | * |
| 1844 | * The #localedLocale1Skeleton structure contains only private data and should only be accessed using the provided API. |
| 1845 | */ |
| 1846 | |
| 1847 | /** |
| 1848 | * localedLocale1SkeletonClass: |
| 1849 | * @parent_class: The parent class. |
| 1850 | * |
| 1851 | * Class structure for #localedLocale1Skeleton. |
| 1852 | */ |
| 1853 | |
| 1854 | struct _localedLocale1SkeletonPrivate |
| 1855 | { |
| 1856 | GValue *properties; |
| 1857 | GList *changed_properties; |
| 1858 | GSource *changed_properties_idle_source; |
| 1859 | GMainContext *context; |
| 1860 | GMutex lock; |
| 1861 | }; |
| 1862 | |
| 1863 | static void |
| 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, |
| 1872 | gpointer user_data) |
| 1873 | { |
| 1874 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data); |
| 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; |
| 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) |
| 1894 | { |
| 1895 | #ifdef G_OS_UNIX |
| 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))); |
| 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 (¶mv[n], G_TYPE_VARIANT); |
| 1909 | g_value_set_variant (¶mv[n], child); |
| 1910 | n++; |
| 1911 | } |
| 1912 | else |
| 1913 | g_dbus_gvariant_to_gvalue (child, ¶mv[n++]); |
| 1914 | g_variant_unref (child); |
| 1915 | } |
| 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]); |
| 1924 | g_free (paramv); |
| 1925 | } |
| 1926 | |
| 1927 | static GVariant * |
| 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, |
| 1934 | GError **error, |
| 1935 | gpointer user_data) |
| 1936 | { |
| 1937 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data); |
| 1938 | GValue value = G_VALUE_INIT; |
| 1939 | GParamSpec *pspec; |
| 1940 | _ExtendedGDBusPropertyInfo *info; |
| 1941 | GVariant *ret; |
| 1942 | ret = NULL; |
| 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); |
| 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 | |
| 1960 | static gboolean |
| 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, |
| 1967 | GVariant *variant, |
| 1968 | GError **error, |
| 1969 | gpointer user_data) |
| 1970 | { |
| 1971 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data); |
| 1972 | GValue value = G_VALUE_INIT; |
| 1973 | GParamSpec *pspec; |
| 1974 | _ExtendedGDBusPropertyInfo *info; |
| 1975 | gboolean ret; |
| 1976 | ret = FALSE; |
| 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); |
| 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 | |
| 1997 | static const GDBusInterfaceVTable _localed_locale1_skeleton_vtable = |
| 1998 | { |
| 1999 | _localed_locale1_skeleton_handle_method_call, |
| 2000 | _localed_locale1_skeleton_handle_get_property, |
| 2001 | _localed_locale1_skeleton_handle_set_property, |
| 2002 | {NULL} |
| 2003 | }; |
| 2004 | |
| 2005 | static GDBusInterfaceInfo * |
| 2006 | localed_locale1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) |
| 2007 | { |
| 2008 | return localed_locale1_interface_info (); |
| 2009 | } |
| 2010 | |
| 2011 | static GDBusInterfaceVTable * |
| 2012 | localed_locale1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton G_GNUC_UNUSED) |
| 2013 | { |
| 2014 | return (GDBusInterfaceVTable *) &_localed_locale1_skeleton_vtable; |
| 2015 | } |
| 2016 | |
| 2017 | static GVariant * |
| 2018 | localed_locale1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton) |
| 2019 | { |
| 2020 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (_skeleton); |
| 2021 | |
| 2022 | GVariantBuilder builder; |
| 2023 | guint n; |
| 2024 | g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); |
| 2025 | if (_localed_locale1_interface_info.parent_struct.properties == NULL) |
| 2026 | goto out; |
| 2027 | for (n = 0; _localed_locale1_interface_info.parent_struct.properties[n] != NULL; n++) |
| 2028 | { |
| 2029 | GDBusPropertyInfo *info = _localed_locale1_interface_info.parent_struct.properties[n]; |
| 2030 | if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE) |
| 2031 | { |
| 2032 | GVariant *value; |
| 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); |
| 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 | } |
| 2042 | out: |
| 2043 | return g_variant_builder_end (&builder); |
| 2044 | } |
| 2045 | |
| 2046 | static gboolean _localed_locale1_emit_changed (gpointer user_data); |
| 2047 | |
| 2048 | static void |
| 2049 | localed_locale1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton) |
| 2050 | { |
| 2051 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (_skeleton); |
| 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) |
| 2064 | _localed_locale1_emit_changed (skeleton); |
| 2065 | } |
| 2066 | |
| 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)); |
| 2072 | |
| 2073 | #else |
| 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)); |
| 2076 | |
| 2077 | #endif |
| 2078 | static void |
| 2079 | localed_locale1_skeleton_finalize (GObject *object) |
| 2080 | { |
| 2081 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object); |
| 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); |
| 2091 | G_OBJECT_CLASS (localed_locale1_skeleton_parent_class)->finalize (object); |
| 2092 | } |
| 2093 | |
| 2094 | static void |
| 2095 | localed_locale1_skeleton_get_property (GObject *object, |
| 2096 | guint prop_id, |
| 2097 | GValue *value, |
| 2098 | GParamSpec *pspec G_GNUC_UNUSED) |
| 2099 | { |
| 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); |
| 2105 | } |
| 2106 | |
| 2107 | static gboolean |
| 2108 | _localed_locale1_emit_changed (gpointer user_data) |
| 2109 | { |
| 2110 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (user_data); |
| 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 | |
| 2167 | static void |
| 2168 | _localed_locale1_schedule_emit_changed (localedLocale1Skeleton *skeleton, const _ExtendedGDBusPropertyInfo *info, guint prop_id, const GValue *orig_value) |
| 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 | |
| 2193 | static void |
| 2194 | localed_locale1_skeleton_notify (GObject *object, |
| 2195 | GParamSpec *pspec G_GNUC_UNUSED) |
| 2196 | { |
| 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) |
| 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); |
| 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); |
| 2207 | } |
| 2208 | g_mutex_unlock (&skeleton->priv->lock); |
| 2209 | } |
| 2210 | |
| 2211 | static void |
| 2212 | localed_locale1_skeleton_set_property (GObject *object, |
| 2213 | guint prop_id, |
| 2214 | const GValue *value, |
| 2215 | GParamSpec *pspec) |
| 2216 | { |
| 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])) |
| 2222 | { |
| 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); |
| 2227 | } |
| 2228 | g_mutex_unlock (&skeleton->priv->lock); |
| 2229 | g_object_thaw_notify (object); |
| 2230 | } |
| 2231 | |
| 2232 | static void |
| 2233 | localed_locale1_skeleton_init (localedLocale1Skeleton *skeleton) |
| 2234 | { |
| 2235 | #if GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_38 |
| 2236 | skeleton->priv = localed_locale1_skeleton_get_instance_private (skeleton); |
| 2237 | #else |
| 2238 | skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, LOCALED_TYPE_LOCALE1_SKELETON, localedLocale1SkeletonPrivate); |
| 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 | |
| 2253 | static const gchar *const * |
| 2254 | localed_locale1_skeleton_get_locale (localedLocale1 *object) |
| 2255 | { |
| 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); |
| 2261 | return value; |
| 2262 | } |
| 2263 | |
| 2264 | static const gchar * |
| 2265 | localed_locale1_skeleton_get_x11_layout (localedLocale1 *object) |
| 2266 | { |
| 2267 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object); |
| 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 | |
| 2275 | static const gchar * |
| 2276 | localed_locale1_skeleton_get_x11_model (localedLocale1 *object) |
| 2277 | { |
| 2278 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object); |
| 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 | |
| 2286 | static const gchar * |
| 2287 | localed_locale1_skeleton_get_x11_variant (localedLocale1 *object) |
| 2288 | { |
| 2289 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object); |
| 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 | |
| 2297 | static const gchar * |
| 2298 | localed_locale1_skeleton_get_x11_options (localedLocale1 *object) |
| 2299 | { |
| 2300 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object); |
| 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 | |
| 2308 | static const gchar * |
| 2309 | localed_locale1_skeleton_get_vconsole_keymap (localedLocale1 *object) |
| 2310 | { |
| 2311 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object); |
| 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 | |
| 2319 | static const gchar * |
| 2320 | localed_locale1_skeleton_get_vconsole_keymap_toggle (localedLocale1 *object) |
| 2321 | { |
| 2322 | localedLocale1Skeleton *skeleton = LOCALED_LOCALE1_SKELETON (object); |
| 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 | |
| 2330 | static void |
| 2331 | localed_locale1_skeleton_class_init (localedLocale1SkeletonClass *klass) |
| 2332 | { |
| 2333 | GObjectClass *gobject_class; |
| 2334 | GDBusInterfaceSkeletonClass *skeleton_class; |
| 2335 | |
| 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; |
| 2341 | |
| 2342 | |
| 2343 | localed_locale1_override_properties (gobject_class, 1); |
| 2344 | |
| 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; |
| 2350 | |
| 2351 | #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 |
| 2352 | g_type_class_add_private (klass, sizeof (localedLocale1SkeletonPrivate)); |
| 2353 | #endif |
| 2354 | } |
| 2355 | |
| 2356 | static void |
| 2357 | localed_locale1_skeleton_iface_init (localedLocale1Iface *iface) |
| 2358 | { |
| 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; |
| 2366 | } |
| 2367 | |
| 2368 | /** |
| 2369 | * localed_locale1_skeleton_new: |
| 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 | * |
| 2373 | * Returns: (transfer full) (type localedLocale1Skeleton): The skeleton object. |
| 2374 | */ |
| 2375 | localedLocale1 * |
| 2376 | localed_locale1_skeleton_new (void) |
| 2377 | { |
| 2378 | return LOCALED_LOCALE1 (g_object_new (LOCALED_TYPE_LOCALE1_SKELETON, NULL)); |
| 2379 | } |
| 2380 | |