Back to index

indicator-session  12.10.0
dbus-consolekit-manager.c
Go to the documentation of this file.
00001 /*
00002  * Generated by gdbus-codegen 2.33.3. DO NOT EDIT.
00003  *
00004  * The license of this code is the same as for the source it was derived from.
00005  */
00006 
00007 #ifdef HAVE_CONFIG_H
00008 #  include "config.h"
00009 #endif
00010 
00011 #include "dbus-consolekit-manager.h"
00012 
00013 #include <string.h>
00014 #ifdef G_OS_UNIX
00015 #  include <gio/gunixfdlist.h>
00016 #endif
00017 
00018 typedef struct
00019 {
00020   GDBusArgInfo parent_struct;
00021   gboolean use_gvariant;
00022 } _ExtendedGDBusArgInfo;
00023 
00024 typedef struct
00025 {
00026   GDBusMethodInfo parent_struct;
00027   const gchar *signal_name;
00028   gboolean pass_fdlist;
00029 } _ExtendedGDBusMethodInfo;
00030 
00031 typedef struct
00032 {
00033   GDBusSignalInfo parent_struct;
00034   const gchar *signal_name;
00035 } _ExtendedGDBusSignalInfo;
00036 
00037 typedef struct
00038 {
00039   GDBusPropertyInfo parent_struct;
00040   const gchar *hyphen_name;
00041   gboolean use_gvariant;
00042 } _ExtendedGDBusPropertyInfo;
00043 
00044 typedef struct
00045 {
00046   GDBusInterfaceInfo parent_struct;
00047   const gchar *hyphen_name;
00048 } _ExtendedGDBusInterfaceInfo;
00049 
00050 typedef struct
00051 {
00052   const _ExtendedGDBusPropertyInfo *info;
00053   guint prop_id;
00054   GValue orig_value; /* the value before the change */
00055 } ChangedProperty;
00056 
00057 static void
00058 _changed_property_free (ChangedProperty *data)
00059 {
00060   g_value_unset (&data->orig_value);
00061   g_free (data);
00062 }
00063 
00064 static gboolean
00065 _g_strv_equal0 (gchar **a, gchar **b)
00066 {
00067   gboolean ret = FALSE;
00068   guint n;
00069   if (a == NULL && b == NULL)
00070     {
00071       ret = TRUE;
00072       goto out;
00073     }
00074   if (a == NULL || b == NULL)
00075     goto out;
00076   if (g_strv_length (a) != g_strv_length (b))
00077     goto out;
00078   for (n = 0; a[n] != NULL; n++)
00079     if (g_strcmp0 (a[n], b[n]) != 0)
00080       goto out;
00081   ret = TRUE;
00082 out:
00083   return ret;
00084 }
00085 
00086 static gboolean
00087 _g_variant_equal0 (GVariant *a, GVariant *b)
00088 {
00089   gboolean ret = FALSE;
00090   if (a == NULL && b == NULL)
00091     {
00092       ret = TRUE;
00093       goto out;
00094     }
00095   if (a == NULL || b == NULL)
00096     goto out;
00097   ret = g_variant_equal (a, b);
00098 out:
00099   return ret;
00100 }
00101 
00102 G_GNUC_UNUSED static gboolean
00103 _g_value_equal (const GValue *a, const GValue *b)
00104 {
00105   gboolean ret = FALSE;
00106   g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
00107   switch (G_VALUE_TYPE (a))
00108     {
00109       case G_TYPE_BOOLEAN:
00110         ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
00111         break;
00112       case G_TYPE_UCHAR:
00113         ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
00114         break;
00115       case G_TYPE_INT:
00116         ret = (g_value_get_int (a) == g_value_get_int (b));
00117         break;
00118       case G_TYPE_UINT:
00119         ret = (g_value_get_uint (a) == g_value_get_uint (b));
00120         break;
00121       case G_TYPE_INT64:
00122         ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
00123         break;
00124       case G_TYPE_UINT64:
00125         ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
00126         break;
00127       case G_TYPE_DOUBLE:
00128         {
00129           /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
00130           gdouble da = g_value_get_double (a);
00131           gdouble db = g_value_get_double (b);
00132           ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
00133         }
00134         break;
00135       case G_TYPE_STRING:
00136         ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
00137         break;
00138       case G_TYPE_VARIANT:
00139         ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
00140         break;
00141       default:
00142         if (G_VALUE_TYPE (a) == G_TYPE_STRV)
00143           ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
00144         else
00145           g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
00146         break;
00147     }
00148   return ret;
00149 }
00150 
00151 /* ------------------------------------------------------------------------
00152  * Code for interface org.freedesktop.ConsoleKit.Manager
00153  * ------------------------------------------------------------------------
00154  */
00155 
00164 /* ---- Introspection data for org.freedesktop.ConsoleKit.Manager ---- */
00165 
00166 static const GDBusAnnotationInfo _console_kit_manager_method_restart_annotation_info_0 =
00167 {
00168   -1,
00169   (gchar *) "org.freedesktop.DBus.GLib.Async",
00170   (gchar *) "",
00171   NULL
00172 };
00173 
00174 static const GDBusAnnotationInfo * const _console_kit_manager_method_restart_annotation_info_pointers[] =
00175 {
00176   &_console_kit_manager_method_restart_annotation_info_0,
00177   NULL
00178 };
00179 
00180 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_restart =
00181 {
00182   {
00183     -1,
00184     (gchar *) "Restart",
00185     NULL,
00186     NULL,
00187     (GDBusAnnotationInfo **) &_console_kit_manager_method_restart_annotation_info_pointers
00188   },
00189   "handle-restart",
00190   FALSE
00191 };
00192 
00193 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_can_restart_OUT_ARG_can_restart =
00194 {
00195   {
00196     -1,
00197     (gchar *) "can_restart",
00198     (gchar *) "b",
00199     NULL
00200   },
00201   FALSE
00202 };
00203 
00204 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_can_restart_OUT_ARG_pointers[] =
00205 {
00206   &_console_kit_manager_method_info_can_restart_OUT_ARG_can_restart,
00207   NULL
00208 };
00209 
00210 static const GDBusAnnotationInfo _console_kit_manager_method_can_restart_annotation_info_0 =
00211 {
00212   -1,
00213   (gchar *) "org.freedesktop.DBus.GLib.Async",
00214   (gchar *) "",
00215   NULL
00216 };
00217 
00218 static const GDBusAnnotationInfo * const _console_kit_manager_method_can_restart_annotation_info_pointers[] =
00219 {
00220   &_console_kit_manager_method_can_restart_annotation_info_0,
00221   NULL
00222 };
00223 
00224 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_can_restart =
00225 {
00226   {
00227     -1,
00228     (gchar *) "CanRestart",
00229     NULL,
00230     (GDBusArgInfo **) &_console_kit_manager_method_info_can_restart_OUT_ARG_pointers,
00231     (GDBusAnnotationInfo **) &_console_kit_manager_method_can_restart_annotation_info_pointers
00232   },
00233   "handle-can-restart",
00234   FALSE
00235 };
00236 
00237 static const GDBusAnnotationInfo _console_kit_manager_method_stop_annotation_info_0 =
00238 {
00239   -1,
00240   (gchar *) "org.freedesktop.DBus.GLib.Async",
00241   (gchar *) "",
00242   NULL
00243 };
00244 
00245 static const GDBusAnnotationInfo * const _console_kit_manager_method_stop_annotation_info_pointers[] =
00246 {
00247   &_console_kit_manager_method_stop_annotation_info_0,
00248   NULL
00249 };
00250 
00251 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_stop =
00252 {
00253   {
00254     -1,
00255     (gchar *) "Stop",
00256     NULL,
00257     NULL,
00258     (GDBusAnnotationInfo **) &_console_kit_manager_method_stop_annotation_info_pointers
00259   },
00260   "handle-stop",
00261   FALSE
00262 };
00263 
00264 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_can_stop_OUT_ARG_can_stop =
00265 {
00266   {
00267     -1,
00268     (gchar *) "can_stop",
00269     (gchar *) "b",
00270     NULL
00271   },
00272   FALSE
00273 };
00274 
00275 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_can_stop_OUT_ARG_pointers[] =
00276 {
00277   &_console_kit_manager_method_info_can_stop_OUT_ARG_can_stop,
00278   NULL
00279 };
00280 
00281 static const GDBusAnnotationInfo _console_kit_manager_method_can_stop_annotation_info_0 =
00282 {
00283   -1,
00284   (gchar *) "org.freedesktop.DBus.GLib.Async",
00285   (gchar *) "",
00286   NULL
00287 };
00288 
00289 static const GDBusAnnotationInfo * const _console_kit_manager_method_can_stop_annotation_info_pointers[] =
00290 {
00291   &_console_kit_manager_method_can_stop_annotation_info_0,
00292   NULL
00293 };
00294 
00295 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_can_stop =
00296 {
00297   {
00298     -1,
00299     (gchar *) "CanStop",
00300     NULL,
00301     (GDBusArgInfo **) &_console_kit_manager_method_info_can_stop_OUT_ARG_pointers,
00302     (GDBusAnnotationInfo **) &_console_kit_manager_method_can_stop_annotation_info_pointers
00303   },
00304   "handle-can-stop",
00305   FALSE
00306 };
00307 
00308 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_open_session_OUT_ARG_cookie =
00309 {
00310   {
00311     -1,
00312     (gchar *) "cookie",
00313     (gchar *) "s",
00314     NULL
00315   },
00316   FALSE
00317 };
00318 
00319 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_open_session_OUT_ARG_pointers[] =
00320 {
00321   &_console_kit_manager_method_info_open_session_OUT_ARG_cookie,
00322   NULL
00323 };
00324 
00325 static const GDBusAnnotationInfo _console_kit_manager_method_open_session_annotation_info_0 =
00326 {
00327   -1,
00328   (gchar *) "org.freedesktop.DBus.GLib.Async",
00329   (gchar *) "",
00330   NULL
00331 };
00332 
00333 static const GDBusAnnotationInfo * const _console_kit_manager_method_open_session_annotation_info_pointers[] =
00334 {
00335   &_console_kit_manager_method_open_session_annotation_info_0,
00336   NULL
00337 };
00338 
00339 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_open_session =
00340 {
00341   {
00342     -1,
00343     (gchar *) "OpenSession",
00344     NULL,
00345     (GDBusArgInfo **) &_console_kit_manager_method_info_open_session_OUT_ARG_pointers,
00346     (GDBusAnnotationInfo **) &_console_kit_manager_method_open_session_annotation_info_pointers
00347   },
00348   "handle-open-session",
00349   FALSE
00350 };
00351 
00352 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_open_session_with_parameters_IN_ARG_parameters =
00353 {
00354   {
00355     -1,
00356     (gchar *) "parameters",
00357     (gchar *) "a(sv)",
00358     NULL
00359   },
00360   FALSE
00361 };
00362 
00363 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_open_session_with_parameters_IN_ARG_pointers[] =
00364 {
00365   &_console_kit_manager_method_info_open_session_with_parameters_IN_ARG_parameters,
00366   NULL
00367 };
00368 
00369 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_cookie =
00370 {
00371   {
00372     -1,
00373     (gchar *) "cookie",
00374     (gchar *) "s",
00375     NULL
00376   },
00377   FALSE
00378 };
00379 
00380 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_pointers[] =
00381 {
00382   &_console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_cookie,
00383   NULL
00384 };
00385 
00386 static const GDBusAnnotationInfo _console_kit_manager_method_open_session_with_parameters_annotation_info_0 =
00387 {
00388   -1,
00389   (gchar *) "org.freedesktop.DBus.GLib.Async",
00390   (gchar *) "",
00391   NULL
00392 };
00393 
00394 static const GDBusAnnotationInfo * const _console_kit_manager_method_open_session_with_parameters_annotation_info_pointers[] =
00395 {
00396   &_console_kit_manager_method_open_session_with_parameters_annotation_info_0,
00397   NULL
00398 };
00399 
00400 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_open_session_with_parameters =
00401 {
00402   {
00403     -1,
00404     (gchar *) "OpenSessionWithParameters",
00405     (GDBusArgInfo **) &_console_kit_manager_method_info_open_session_with_parameters_IN_ARG_pointers,
00406     (GDBusArgInfo **) &_console_kit_manager_method_info_open_session_with_parameters_OUT_ARG_pointers,
00407     (GDBusAnnotationInfo **) &_console_kit_manager_method_open_session_with_parameters_annotation_info_pointers
00408   },
00409   "handle-open-session-with-parameters",
00410   FALSE
00411 };
00412 
00413 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_close_session_IN_ARG_cookie =
00414 {
00415   {
00416     -1,
00417     (gchar *) "cookie",
00418     (gchar *) "s",
00419     NULL
00420   },
00421   FALSE
00422 };
00423 
00424 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_close_session_IN_ARG_pointers[] =
00425 {
00426   &_console_kit_manager_method_info_close_session_IN_ARG_cookie,
00427   NULL
00428 };
00429 
00430 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_close_session_OUT_ARG_result =
00431 {
00432   {
00433     -1,
00434     (gchar *) "result",
00435     (gchar *) "b",
00436     NULL
00437   },
00438   FALSE
00439 };
00440 
00441 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_close_session_OUT_ARG_pointers[] =
00442 {
00443   &_console_kit_manager_method_info_close_session_OUT_ARG_result,
00444   NULL
00445 };
00446 
00447 static const GDBusAnnotationInfo _console_kit_manager_method_close_session_annotation_info_0 =
00448 {
00449   -1,
00450   (gchar *) "org.freedesktop.DBus.GLib.Async",
00451   (gchar *) "",
00452   NULL
00453 };
00454 
00455 static const GDBusAnnotationInfo * const _console_kit_manager_method_close_session_annotation_info_pointers[] =
00456 {
00457   &_console_kit_manager_method_close_session_annotation_info_0,
00458   NULL
00459 };
00460 
00461 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_close_session =
00462 {
00463   {
00464     -1,
00465     (gchar *) "CloseSession",
00466     (GDBusArgInfo **) &_console_kit_manager_method_info_close_session_IN_ARG_pointers,
00467     (GDBusArgInfo **) &_console_kit_manager_method_info_close_session_OUT_ARG_pointers,
00468     (GDBusAnnotationInfo **) &_console_kit_manager_method_close_session_annotation_info_pointers
00469   },
00470   "handle-close-session",
00471   FALSE
00472 };
00473 
00474 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_seats_OUT_ARG_seats =
00475 {
00476   {
00477     -1,
00478     (gchar *) "seats",
00479     (gchar *) "ao",
00480     NULL
00481   },
00482   FALSE
00483 };
00484 
00485 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_seats_OUT_ARG_pointers[] =
00486 {
00487   &_console_kit_manager_method_info_get_seats_OUT_ARG_seats,
00488   NULL
00489 };
00490 
00491 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_seats =
00492 {
00493   {
00494     -1,
00495     (gchar *) "GetSeats",
00496     NULL,
00497     (GDBusArgInfo **) &_console_kit_manager_method_info_get_seats_OUT_ARG_pointers,
00498     NULL
00499   },
00500   "handle-get-seats",
00501   FALSE
00502 };
00503 
00504 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_OUT_ARG_sessions =
00505 {
00506   {
00507     -1,
00508     (gchar *) "sessions",
00509     (gchar *) "ao",
00510     NULL
00511   },
00512   FALSE
00513 };
00514 
00515 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_OUT_ARG_pointers[] =
00516 {
00517   &_console_kit_manager_method_info_get_sessions_OUT_ARG_sessions,
00518   NULL
00519 };
00520 
00521 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_sessions =
00522 {
00523   {
00524     -1,
00525     (gchar *) "GetSessions",
00526     NULL,
00527     (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_OUT_ARG_pointers,
00528     NULL
00529   },
00530   "handle-get-sessions",
00531   FALSE
00532 };
00533 
00534 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_cookie_IN_ARG_cookie =
00535 {
00536   {
00537     -1,
00538     (gchar *) "cookie",
00539     (gchar *) "s",
00540     NULL
00541   },
00542   FALSE
00543 };
00544 
00545 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_cookie_IN_ARG_pointers[] =
00546 {
00547   &_console_kit_manager_method_info_get_session_for_cookie_IN_ARG_cookie,
00548   NULL
00549 };
00550 
00551 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_ssid =
00552 {
00553   {
00554     -1,
00555     (gchar *) "ssid",
00556     (gchar *) "o",
00557     NULL
00558   },
00559   FALSE
00560 };
00561 
00562 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_pointers[] =
00563 {
00564   &_console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_ssid,
00565   NULL
00566 };
00567 
00568 static const GDBusAnnotationInfo _console_kit_manager_method_get_session_for_cookie_annotation_info_0 =
00569 {
00570   -1,
00571   (gchar *) "org.freedesktop.DBus.GLib.Async",
00572   (gchar *) "",
00573   NULL
00574 };
00575 
00576 static const GDBusAnnotationInfo * const _console_kit_manager_method_get_session_for_cookie_annotation_info_pointers[] =
00577 {
00578   &_console_kit_manager_method_get_session_for_cookie_annotation_info_0,
00579   NULL
00580 };
00581 
00582 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_session_for_cookie =
00583 {
00584   {
00585     -1,
00586     (gchar *) "GetSessionForCookie",
00587     (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_cookie_IN_ARG_pointers,
00588     (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_cookie_OUT_ARG_pointers,
00589     (GDBusAnnotationInfo **) &_console_kit_manager_method_get_session_for_cookie_annotation_info_pointers
00590   },
00591   "handle-get-session-for-cookie",
00592   FALSE
00593 };
00594 
00595 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pid =
00596 {
00597   {
00598     -1,
00599     (gchar *) "pid",
00600     (gchar *) "u",
00601     NULL
00602   },
00603   FALSE
00604 };
00605 
00606 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pointers[] =
00607 {
00608   &_console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pid,
00609   NULL
00610 };
00611 
00612 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_ssid =
00613 {
00614   {
00615     -1,
00616     (gchar *) "ssid",
00617     (gchar *) "o",
00618     NULL
00619   },
00620   FALSE
00621 };
00622 
00623 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_pointers[] =
00624 {
00625   &_console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_ssid,
00626   NULL
00627 };
00628 
00629 static const GDBusAnnotationInfo _console_kit_manager_method_get_session_for_unix_process_annotation_info_0 =
00630 {
00631   -1,
00632   (gchar *) "org.freedesktop.DBus.GLib.Async",
00633   (gchar *) "",
00634   NULL
00635 };
00636 
00637 static const GDBusAnnotationInfo * const _console_kit_manager_method_get_session_for_unix_process_annotation_info_pointers[] =
00638 {
00639   &_console_kit_manager_method_get_session_for_unix_process_annotation_info_0,
00640   NULL
00641 };
00642 
00643 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_session_for_unix_process =
00644 {
00645   {
00646     -1,
00647     (gchar *) "GetSessionForUnixProcess",
00648     (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_unix_process_IN_ARG_pointers,
00649     (GDBusArgInfo **) &_console_kit_manager_method_info_get_session_for_unix_process_OUT_ARG_pointers,
00650     (GDBusAnnotationInfo **) &_console_kit_manager_method_get_session_for_unix_process_annotation_info_pointers
00651   },
00652   "handle-get-session-for-unix-process",
00653   FALSE
00654 };
00655 
00656 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_current_session_OUT_ARG_ssid =
00657 {
00658   {
00659     -1,
00660     (gchar *) "ssid",
00661     (gchar *) "o",
00662     NULL
00663   },
00664   FALSE
00665 };
00666 
00667 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_current_session_OUT_ARG_pointers[] =
00668 {
00669   &_console_kit_manager_method_info_get_current_session_OUT_ARG_ssid,
00670   NULL
00671 };
00672 
00673 static const GDBusAnnotationInfo _console_kit_manager_method_get_current_session_annotation_info_0 =
00674 {
00675   -1,
00676   (gchar *) "org.freedesktop.DBus.GLib.Async",
00677   (gchar *) "",
00678   NULL
00679 };
00680 
00681 static const GDBusAnnotationInfo * const _console_kit_manager_method_get_current_session_annotation_info_pointers[] =
00682 {
00683   &_console_kit_manager_method_get_current_session_annotation_info_0,
00684   NULL
00685 };
00686 
00687 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_current_session =
00688 {
00689   {
00690     -1,
00691     (gchar *) "GetCurrentSession",
00692     NULL,
00693     (GDBusArgInfo **) &_console_kit_manager_method_info_get_current_session_OUT_ARG_pointers,
00694     (GDBusAnnotationInfo **) &_console_kit_manager_method_get_current_session_annotation_info_pointers
00695   },
00696   "handle-get-current-session",
00697   FALSE
00698 };
00699 
00700 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_uid =
00701 {
00702   {
00703     -1,
00704     (gchar *) "uid",
00705     (gchar *) "u",
00706     NULL
00707   },
00708   FALSE
00709 };
00710 
00711 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_pointers[] =
00712 {
00713   &_console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_uid,
00714   NULL
00715 };
00716 
00717 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_sessions =
00718 {
00719   {
00720     -1,
00721     (gchar *) "sessions",
00722     (gchar *) "ao",
00723     NULL
00724   },
00725   FALSE
00726 };
00727 
00728 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_pointers[] =
00729 {
00730   &_console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_sessions,
00731   NULL
00732 };
00733 
00734 static const GDBusAnnotationInfo _console_kit_manager_method_get_sessions_for_unix_user_annotation_info_0 =
00735 {
00736   -1,
00737   (gchar *) "org.freedesktop.DBus.GLib.Async",
00738   (gchar *) "",
00739   NULL
00740 };
00741 
00742 static const GDBusAnnotationInfo * const _console_kit_manager_method_get_sessions_for_unix_user_annotation_info_pointers[] =
00743 {
00744   &_console_kit_manager_method_get_sessions_for_unix_user_annotation_info_0,
00745   NULL
00746 };
00747 
00748 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_sessions_for_unix_user =
00749 {
00750   {
00751     -1,
00752     (gchar *) "GetSessionsForUnixUser",
00753     (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_unix_user_IN_ARG_pointers,
00754     (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_unix_user_OUT_ARG_pointers,
00755     (GDBusAnnotationInfo **) &_console_kit_manager_method_get_sessions_for_unix_user_annotation_info_pointers
00756   },
00757   "handle-get-sessions-for-unix-user",
00758   FALSE
00759 };
00760 
00761 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_user_IN_ARG_uid =
00762 {
00763   {
00764     -1,
00765     (gchar *) "uid",
00766     (gchar *) "u",
00767     NULL
00768   },
00769   FALSE
00770 };
00771 
00772 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_user_IN_ARG_pointers[] =
00773 {
00774   &_console_kit_manager_method_info_get_sessions_for_user_IN_ARG_uid,
00775   NULL
00776 };
00777 
00778 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_sessions =
00779 {
00780   {
00781     -1,
00782     (gchar *) "sessions",
00783     (gchar *) "ao",
00784     NULL
00785   },
00786   FALSE
00787 };
00788 
00789 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_pointers[] =
00790 {
00791   &_console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_sessions,
00792   NULL
00793 };
00794 
00795 static const GDBusAnnotationInfo _console_kit_manager_method_get_sessions_for_user_annotation_info_0 =
00796 {
00797   -1,
00798   (gchar *) "org.freedesktop.DBus.GLib.Async",
00799   (gchar *) "",
00800   NULL
00801 };
00802 
00803 static const GDBusAnnotationInfo * const _console_kit_manager_method_get_sessions_for_user_annotation_info_pointers[] =
00804 {
00805   &_console_kit_manager_method_get_sessions_for_user_annotation_info_0,
00806   NULL
00807 };
00808 
00809 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_sessions_for_user =
00810 {
00811   {
00812     -1,
00813     (gchar *) "GetSessionsForUser",
00814     (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_user_IN_ARG_pointers,
00815     (GDBusArgInfo **) &_console_kit_manager_method_info_get_sessions_for_user_OUT_ARG_pointers,
00816     (GDBusAnnotationInfo **) &_console_kit_manager_method_get_sessions_for_user_annotation_info_pointers
00817   },
00818   "handle-get-sessions-for-user",
00819   FALSE
00820 };
00821 
00822 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_idle_hint =
00823 {
00824   {
00825     -1,
00826     (gchar *) "idle_hint",
00827     (gchar *) "b",
00828     NULL
00829   },
00830   FALSE
00831 };
00832 
00833 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_pointers[] =
00834 {
00835   &_console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_idle_hint,
00836   NULL
00837 };
00838 
00839 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_system_idle_hint =
00840 {
00841   {
00842     -1,
00843     (gchar *) "GetSystemIdleHint",
00844     NULL,
00845     (GDBusArgInfo **) &_console_kit_manager_method_info_get_system_idle_hint_OUT_ARG_pointers,
00846     NULL
00847   },
00848   "handle-get-system-idle-hint",
00849   FALSE
00850 };
00851 
00852 static const _ExtendedGDBusArgInfo _console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_iso8601_datetime =
00853 {
00854   {
00855     -1,
00856     (gchar *) "iso8601_datetime",
00857     (gchar *) "s",
00858     NULL
00859   },
00860   FALSE
00861 };
00862 
00863 static const _ExtendedGDBusArgInfo * const _console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_pointers[] =
00864 {
00865   &_console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_iso8601_datetime,
00866   NULL
00867 };
00868 
00869 static const _ExtendedGDBusMethodInfo _console_kit_manager_method_info_get_system_idle_since_hint =
00870 {
00871   {
00872     -1,
00873     (gchar *) "GetSystemIdleSinceHint",
00874     NULL,
00875     (GDBusArgInfo **) &_console_kit_manager_method_info_get_system_idle_since_hint_OUT_ARG_pointers,
00876     NULL
00877   },
00878   "handle-get-system-idle-since-hint",
00879   FALSE
00880 };
00881 
00882 static const _ExtendedGDBusMethodInfo * const _console_kit_manager_method_info_pointers[] =
00883 {
00884   &_console_kit_manager_method_info_restart,
00885   &_console_kit_manager_method_info_can_restart,
00886   &_console_kit_manager_method_info_stop,
00887   &_console_kit_manager_method_info_can_stop,
00888   &_console_kit_manager_method_info_open_session,
00889   &_console_kit_manager_method_info_open_session_with_parameters,
00890   &_console_kit_manager_method_info_close_session,
00891   &_console_kit_manager_method_info_get_seats,
00892   &_console_kit_manager_method_info_get_sessions,
00893   &_console_kit_manager_method_info_get_session_for_cookie,
00894   &_console_kit_manager_method_info_get_session_for_unix_process,
00895   &_console_kit_manager_method_info_get_current_session,
00896   &_console_kit_manager_method_info_get_sessions_for_unix_user,
00897   &_console_kit_manager_method_info_get_sessions_for_user,
00898   &_console_kit_manager_method_info_get_system_idle_hint,
00899   &_console_kit_manager_method_info_get_system_idle_since_hint,
00900   NULL
00901 };
00902 
00903 static const _ExtendedGDBusArgInfo _console_kit_manager_signal_info_seat_added_ARG_sid =
00904 {
00905   {
00906     -1,
00907     (gchar *) "sid",
00908     (gchar *) "o",
00909     NULL
00910   },
00911   FALSE
00912 };
00913 
00914 static const _ExtendedGDBusArgInfo * const _console_kit_manager_signal_info_seat_added_ARG_pointers[] =
00915 {
00916   &_console_kit_manager_signal_info_seat_added_ARG_sid,
00917   NULL
00918 };
00919 
00920 static const _ExtendedGDBusSignalInfo _console_kit_manager_signal_info_seat_added =
00921 {
00922   {
00923     -1,
00924     (gchar *) "SeatAdded",
00925     (GDBusArgInfo **) &_console_kit_manager_signal_info_seat_added_ARG_pointers,
00926     NULL
00927   },
00928   "seat-added"
00929 };
00930 
00931 static const _ExtendedGDBusArgInfo _console_kit_manager_signal_info_seat_removed_ARG_sid =
00932 {
00933   {
00934     -1,
00935     (gchar *) "sid",
00936     (gchar *) "o",
00937     NULL
00938   },
00939   FALSE
00940 };
00941 
00942 static const _ExtendedGDBusArgInfo * const _console_kit_manager_signal_info_seat_removed_ARG_pointers[] =
00943 {
00944   &_console_kit_manager_signal_info_seat_removed_ARG_sid,
00945   NULL
00946 };
00947 
00948 static const _ExtendedGDBusSignalInfo _console_kit_manager_signal_info_seat_removed =
00949 {
00950   {
00951     -1,
00952     (gchar *) "SeatRemoved",
00953     (GDBusArgInfo **) &_console_kit_manager_signal_info_seat_removed_ARG_pointers,
00954     NULL
00955   },
00956   "seat-removed"
00957 };
00958 
00959 static const _ExtendedGDBusArgInfo _console_kit_manager_signal_info_system_idle_hint_changed_ARG_hint =
00960 {
00961   {
00962     -1,
00963     (gchar *) "hint",
00964     (gchar *) "b",
00965     NULL
00966   },
00967   FALSE
00968 };
00969 
00970 static const _ExtendedGDBusArgInfo * const _console_kit_manager_signal_info_system_idle_hint_changed_ARG_pointers[] =
00971 {
00972   &_console_kit_manager_signal_info_system_idle_hint_changed_ARG_hint,
00973   NULL
00974 };
00975 
00976 static const _ExtendedGDBusSignalInfo _console_kit_manager_signal_info_system_idle_hint_changed =
00977 {
00978   {
00979     -1,
00980     (gchar *) "SystemIdleHintChanged",
00981     (GDBusArgInfo **) &_console_kit_manager_signal_info_system_idle_hint_changed_ARG_pointers,
00982     NULL
00983   },
00984   "system-idle-hint-changed"
00985 };
00986 
00987 static const _ExtendedGDBusSignalInfo * const _console_kit_manager_signal_info_pointers[] =
00988 {
00989   &_console_kit_manager_signal_info_seat_added,
00990   &_console_kit_manager_signal_info_seat_removed,
00991   &_console_kit_manager_signal_info_system_idle_hint_changed,
00992   NULL
00993 };
00994 
00995 static const _ExtendedGDBusInterfaceInfo _console_kit_manager_interface_info =
00996 {
00997   {
00998     -1,
00999     (gchar *) "org.freedesktop.ConsoleKit.Manager",
01000     (GDBusMethodInfo **) &_console_kit_manager_method_info_pointers,
01001     (GDBusSignalInfo **) &_console_kit_manager_signal_info_pointers,
01002     NULL,
01003     NULL
01004   },
01005   "console-kit-manager",
01006 };
01007 
01008 
01016 GDBusInterfaceInfo *
01017 console_kit_manager_interface_info (void)
01018 {
01019   return (GDBusInterfaceInfo *) &_console_kit_manager_interface_info;
01020 }
01021 
01032 guint
01033 console_kit_manager_override_properties (GObjectClass *klass, guint property_id_begin)
01034 {
01035   return property_id_begin - 1;
01036 }
01037 
01038 
01039 
01072 static void
01073 console_kit_manager_default_init (ConsoleKitManagerIface *iface)
01074 {
01075   /* GObject signals for incoming D-Bus method calls: */
01087   g_signal_new ("handle-restart",
01088     G_TYPE_FROM_INTERFACE (iface),
01089     G_SIGNAL_RUN_LAST,
01090     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_restart),
01091     g_signal_accumulator_true_handled,
01092     NULL,
01093     g_cclosure_marshal_generic,
01094     G_TYPE_BOOLEAN,
01095     1,
01096     G_TYPE_DBUS_METHOD_INVOCATION);
01097 
01109   g_signal_new ("handle-can-restart",
01110     G_TYPE_FROM_INTERFACE (iface),
01111     G_SIGNAL_RUN_LAST,
01112     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_can_restart),
01113     g_signal_accumulator_true_handled,
01114     NULL,
01115     g_cclosure_marshal_generic,
01116     G_TYPE_BOOLEAN,
01117     1,
01118     G_TYPE_DBUS_METHOD_INVOCATION);
01119 
01131   g_signal_new ("handle-stop",
01132     G_TYPE_FROM_INTERFACE (iface),
01133     G_SIGNAL_RUN_LAST,
01134     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_stop),
01135     g_signal_accumulator_true_handled,
01136     NULL,
01137     g_cclosure_marshal_generic,
01138     G_TYPE_BOOLEAN,
01139     1,
01140     G_TYPE_DBUS_METHOD_INVOCATION);
01141 
01153   g_signal_new ("handle-can-stop",
01154     G_TYPE_FROM_INTERFACE (iface),
01155     G_SIGNAL_RUN_LAST,
01156     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_can_stop),
01157     g_signal_accumulator_true_handled,
01158     NULL,
01159     g_cclosure_marshal_generic,
01160     G_TYPE_BOOLEAN,
01161     1,
01162     G_TYPE_DBUS_METHOD_INVOCATION);
01163 
01175   g_signal_new ("handle-open-session",
01176     G_TYPE_FROM_INTERFACE (iface),
01177     G_SIGNAL_RUN_LAST,
01178     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_open_session),
01179     g_signal_accumulator_true_handled,
01180     NULL,
01181     g_cclosure_marshal_generic,
01182     G_TYPE_BOOLEAN,
01183     1,
01184     G_TYPE_DBUS_METHOD_INVOCATION);
01185 
01198   g_signal_new ("handle-open-session-with-parameters",
01199     G_TYPE_FROM_INTERFACE (iface),
01200     G_SIGNAL_RUN_LAST,
01201     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_open_session_with_parameters),
01202     g_signal_accumulator_true_handled,
01203     NULL,
01204     g_cclosure_marshal_generic,
01205     G_TYPE_BOOLEAN,
01206     2,
01207     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_VARIANT);
01208 
01221   g_signal_new ("handle-close-session",
01222     G_TYPE_FROM_INTERFACE (iface),
01223     G_SIGNAL_RUN_LAST,
01224     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_close_session),
01225     g_signal_accumulator_true_handled,
01226     NULL,
01227     g_cclosure_marshal_generic,
01228     G_TYPE_BOOLEAN,
01229     2,
01230     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
01231 
01243   g_signal_new ("handle-get-seats",
01244     G_TYPE_FROM_INTERFACE (iface),
01245     G_SIGNAL_RUN_LAST,
01246     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_seats),
01247     g_signal_accumulator_true_handled,
01248     NULL,
01249     g_cclosure_marshal_generic,
01250     G_TYPE_BOOLEAN,
01251     1,
01252     G_TYPE_DBUS_METHOD_INVOCATION);
01253 
01265   g_signal_new ("handle-get-sessions",
01266     G_TYPE_FROM_INTERFACE (iface),
01267     G_SIGNAL_RUN_LAST,
01268     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_sessions),
01269     g_signal_accumulator_true_handled,
01270     NULL,
01271     g_cclosure_marshal_generic,
01272     G_TYPE_BOOLEAN,
01273     1,
01274     G_TYPE_DBUS_METHOD_INVOCATION);
01275 
01288   g_signal_new ("handle-get-session-for-cookie",
01289     G_TYPE_FROM_INTERFACE (iface),
01290     G_SIGNAL_RUN_LAST,
01291     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_session_for_cookie),
01292     g_signal_accumulator_true_handled,
01293     NULL,
01294     g_cclosure_marshal_generic,
01295     G_TYPE_BOOLEAN,
01296     2,
01297     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
01298 
01311   g_signal_new ("handle-get-session-for-unix-process",
01312     G_TYPE_FROM_INTERFACE (iface),
01313     G_SIGNAL_RUN_LAST,
01314     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_session_for_unix_process),
01315     g_signal_accumulator_true_handled,
01316     NULL,
01317     g_cclosure_marshal_generic,
01318     G_TYPE_BOOLEAN,
01319     2,
01320     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT);
01321 
01333   g_signal_new ("handle-get-current-session",
01334     G_TYPE_FROM_INTERFACE (iface),
01335     G_SIGNAL_RUN_LAST,
01336     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_current_session),
01337     g_signal_accumulator_true_handled,
01338     NULL,
01339     g_cclosure_marshal_generic,
01340     G_TYPE_BOOLEAN,
01341     1,
01342     G_TYPE_DBUS_METHOD_INVOCATION);
01343 
01356   g_signal_new ("handle-get-sessions-for-unix-user",
01357     G_TYPE_FROM_INTERFACE (iface),
01358     G_SIGNAL_RUN_LAST,
01359     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_sessions_for_unix_user),
01360     g_signal_accumulator_true_handled,
01361     NULL,
01362     g_cclosure_marshal_generic,
01363     G_TYPE_BOOLEAN,
01364     2,
01365     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT);
01366 
01379   g_signal_new ("handle-get-sessions-for-user",
01380     G_TYPE_FROM_INTERFACE (iface),
01381     G_SIGNAL_RUN_LAST,
01382     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_sessions_for_user),
01383     g_signal_accumulator_true_handled,
01384     NULL,
01385     g_cclosure_marshal_generic,
01386     G_TYPE_BOOLEAN,
01387     2,
01388     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT);
01389 
01401   g_signal_new ("handle-get-system-idle-hint",
01402     G_TYPE_FROM_INTERFACE (iface),
01403     G_SIGNAL_RUN_LAST,
01404     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_system_idle_hint),
01405     g_signal_accumulator_true_handled,
01406     NULL,
01407     g_cclosure_marshal_generic,
01408     G_TYPE_BOOLEAN,
01409     1,
01410     G_TYPE_DBUS_METHOD_INVOCATION);
01411 
01423   g_signal_new ("handle-get-system-idle-since-hint",
01424     G_TYPE_FROM_INTERFACE (iface),
01425     G_SIGNAL_RUN_LAST,
01426     G_STRUCT_OFFSET (ConsoleKitManagerIface, handle_get_system_idle_since_hint),
01427     g_signal_accumulator_true_handled,
01428     NULL,
01429     g_cclosure_marshal_generic,
01430     G_TYPE_BOOLEAN,
01431     1,
01432     G_TYPE_DBUS_METHOD_INVOCATION);
01433 
01434   /* GObject signals for received D-Bus signals: */
01444   g_signal_new ("seat-added",
01445     G_TYPE_FROM_INTERFACE (iface),
01446     G_SIGNAL_RUN_LAST,
01447     G_STRUCT_OFFSET (ConsoleKitManagerIface, seat_added),
01448     NULL,
01449     NULL,
01450     g_cclosure_marshal_generic,
01451     G_TYPE_NONE,
01452     1, G_TYPE_STRING);
01453 
01463   g_signal_new ("seat-removed",
01464     G_TYPE_FROM_INTERFACE (iface),
01465     G_SIGNAL_RUN_LAST,
01466     G_STRUCT_OFFSET (ConsoleKitManagerIface, seat_removed),
01467     NULL,
01468     NULL,
01469     g_cclosure_marshal_generic,
01470     G_TYPE_NONE,
01471     1, G_TYPE_STRING);
01472 
01482   g_signal_new ("system-idle-hint-changed",
01483     G_TYPE_FROM_INTERFACE (iface),
01484     G_SIGNAL_RUN_LAST,
01485     G_STRUCT_OFFSET (ConsoleKitManagerIface, system_idle_hint_changed),
01486     NULL,
01487     NULL,
01488     g_cclosure_marshal_generic,
01489     G_TYPE_NONE,
01490     1, G_TYPE_BOOLEAN);
01491 
01492 }
01493 
01494 typedef ConsoleKitManagerIface ConsoleKitManagerInterface;
01495 G_DEFINE_INTERFACE (ConsoleKitManager, console_kit_manager, G_TYPE_OBJECT);
01496 
01504 void
01505 console_kit_manager_emit_seat_added (
01506     ConsoleKitManager *object,
01507     const gchar *arg_sid)
01508 {
01509   g_signal_emit_by_name (object, "seat-added", arg_sid);
01510 }
01511 
01519 void
01520 console_kit_manager_emit_seat_removed (
01521     ConsoleKitManager *object,
01522     const gchar *arg_sid)
01523 {
01524   g_signal_emit_by_name (object, "seat-removed", arg_sid);
01525 }
01526 
01534 void
01535 console_kit_manager_emit_system_idle_hint_changed (
01536     ConsoleKitManager *object,
01537     gboolean arg_hint)
01538 {
01539   g_signal_emit_by_name (object, "system-idle-hint-changed", arg_hint);
01540 }
01541 
01555 void
01556 console_kit_manager_call_restart (
01557     ConsoleKitManager *proxy,
01558     GCancellable *cancellable,
01559     GAsyncReadyCallback callback,
01560     gpointer user_data)
01561 {
01562   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
01563     "Restart",
01564     g_variant_new ("()"),
01565     G_DBUS_CALL_FLAGS_NONE,
01566     -1,
01567     cancellable,
01568     callback,
01569     user_data);
01570 }
01571 
01582 gboolean
01583 console_kit_manager_call_restart_finish (
01584     ConsoleKitManager *proxy,
01585     GAsyncResult *res,
01586     GError **error)
01587 {
01588   GVariant *_ret;
01589   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
01590   if (_ret == NULL)
01591     goto _out;
01592   g_variant_get (_ret,
01593                  "()");
01594   g_variant_unref (_ret);
01595 _out:
01596   return _ret != NULL;
01597 }
01598 
01611 gboolean
01612 console_kit_manager_call_restart_sync (
01613     ConsoleKitManager *proxy,
01614     GCancellable *cancellable,
01615     GError **error)
01616 {
01617   GVariant *_ret;
01618   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
01619     "Restart",
01620     g_variant_new ("()"),
01621     G_DBUS_CALL_FLAGS_NONE,
01622     -1,
01623     cancellable,
01624     error);
01625   if (_ret == NULL)
01626     goto _out;
01627   g_variant_get (_ret,
01628                  "()");
01629   g_variant_unref (_ret);
01630 _out:
01631   return _ret != NULL;
01632 }
01633 
01647 void
01648 console_kit_manager_call_can_restart (
01649     ConsoleKitManager *proxy,
01650     GCancellable *cancellable,
01651     GAsyncReadyCallback callback,
01652     gpointer user_data)
01653 {
01654   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
01655     "CanRestart",
01656     g_variant_new ("()"),
01657     G_DBUS_CALL_FLAGS_NONE,
01658     -1,
01659     cancellable,
01660     callback,
01661     user_data);
01662 }
01663 
01675 gboolean
01676 console_kit_manager_call_can_restart_finish (
01677     ConsoleKitManager *proxy,
01678     gboolean *out_can_restart,
01679     GAsyncResult *res,
01680     GError **error)
01681 {
01682   GVariant *_ret;
01683   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
01684   if (_ret == NULL)
01685     goto _out;
01686   g_variant_get (_ret,
01687                  "(b)",
01688                  out_can_restart);
01689   g_variant_unref (_ret);
01690 _out:
01691   return _ret != NULL;
01692 }
01693 
01707 gboolean
01708 console_kit_manager_call_can_restart_sync (
01709     ConsoleKitManager *proxy,
01710     gboolean *out_can_restart,
01711     GCancellable *cancellable,
01712     GError **error)
01713 {
01714   GVariant *_ret;
01715   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
01716     "CanRestart",
01717     g_variant_new ("()"),
01718     G_DBUS_CALL_FLAGS_NONE,
01719     -1,
01720     cancellable,
01721     error);
01722   if (_ret == NULL)
01723     goto _out;
01724   g_variant_get (_ret,
01725                  "(b)",
01726                  out_can_restart);
01727   g_variant_unref (_ret);
01728 _out:
01729   return _ret != NULL;
01730 }
01731 
01745 void
01746 console_kit_manager_call_stop (
01747     ConsoleKitManager *proxy,
01748     GCancellable *cancellable,
01749     GAsyncReadyCallback callback,
01750     gpointer user_data)
01751 {
01752   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
01753     "Stop",
01754     g_variant_new ("()"),
01755     G_DBUS_CALL_FLAGS_NONE,
01756     -1,
01757     cancellable,
01758     callback,
01759     user_data);
01760 }
01761 
01772 gboolean
01773 console_kit_manager_call_stop_finish (
01774     ConsoleKitManager *proxy,
01775     GAsyncResult *res,
01776     GError **error)
01777 {
01778   GVariant *_ret;
01779   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
01780   if (_ret == NULL)
01781     goto _out;
01782   g_variant_get (_ret,
01783                  "()");
01784   g_variant_unref (_ret);
01785 _out:
01786   return _ret != NULL;
01787 }
01788 
01801 gboolean
01802 console_kit_manager_call_stop_sync (
01803     ConsoleKitManager *proxy,
01804     GCancellable *cancellable,
01805     GError **error)
01806 {
01807   GVariant *_ret;
01808   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
01809     "Stop",
01810     g_variant_new ("()"),
01811     G_DBUS_CALL_FLAGS_NONE,
01812     -1,
01813     cancellable,
01814     error);
01815   if (_ret == NULL)
01816     goto _out;
01817   g_variant_get (_ret,
01818                  "()");
01819   g_variant_unref (_ret);
01820 _out:
01821   return _ret != NULL;
01822 }
01823 
01837 void
01838 console_kit_manager_call_can_stop (
01839     ConsoleKitManager *proxy,
01840     GCancellable *cancellable,
01841     GAsyncReadyCallback callback,
01842     gpointer user_data)
01843 {
01844   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
01845     "CanStop",
01846     g_variant_new ("()"),
01847     G_DBUS_CALL_FLAGS_NONE,
01848     -1,
01849     cancellable,
01850     callback,
01851     user_data);
01852 }
01853 
01865 gboolean
01866 console_kit_manager_call_can_stop_finish (
01867     ConsoleKitManager *proxy,
01868     gboolean *out_can_stop,
01869     GAsyncResult *res,
01870     GError **error)
01871 {
01872   GVariant *_ret;
01873   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
01874   if (_ret == NULL)
01875     goto _out;
01876   g_variant_get (_ret,
01877                  "(b)",
01878                  out_can_stop);
01879   g_variant_unref (_ret);
01880 _out:
01881   return _ret != NULL;
01882 }
01883 
01897 gboolean
01898 console_kit_manager_call_can_stop_sync (
01899     ConsoleKitManager *proxy,
01900     gboolean *out_can_stop,
01901     GCancellable *cancellable,
01902     GError **error)
01903 {
01904   GVariant *_ret;
01905   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
01906     "CanStop",
01907     g_variant_new ("()"),
01908     G_DBUS_CALL_FLAGS_NONE,
01909     -1,
01910     cancellable,
01911     error);
01912   if (_ret == NULL)
01913     goto _out;
01914   g_variant_get (_ret,
01915                  "(b)",
01916                  out_can_stop);
01917   g_variant_unref (_ret);
01918 _out:
01919   return _ret != NULL;
01920 }
01921 
01935 void
01936 console_kit_manager_call_open_session (
01937     ConsoleKitManager *proxy,
01938     GCancellable *cancellable,
01939     GAsyncReadyCallback callback,
01940     gpointer user_data)
01941 {
01942   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
01943     "OpenSession",
01944     g_variant_new ("()"),
01945     G_DBUS_CALL_FLAGS_NONE,
01946     -1,
01947     cancellable,
01948     callback,
01949     user_data);
01950 }
01951 
01963 gboolean
01964 console_kit_manager_call_open_session_finish (
01965     ConsoleKitManager *proxy,
01966     gchar **out_cookie,
01967     GAsyncResult *res,
01968     GError **error)
01969 {
01970   GVariant *_ret;
01971   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
01972   if (_ret == NULL)
01973     goto _out;
01974   g_variant_get (_ret,
01975                  "(s)",
01976                  out_cookie);
01977   g_variant_unref (_ret);
01978 _out:
01979   return _ret != NULL;
01980 }
01981 
01995 gboolean
01996 console_kit_manager_call_open_session_sync (
01997     ConsoleKitManager *proxy,
01998     gchar **out_cookie,
01999     GCancellable *cancellable,
02000     GError **error)
02001 {
02002   GVariant *_ret;
02003   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02004     "OpenSession",
02005     g_variant_new ("()"),
02006     G_DBUS_CALL_FLAGS_NONE,
02007     -1,
02008     cancellable,
02009     error);
02010   if (_ret == NULL)
02011     goto _out;
02012   g_variant_get (_ret,
02013                  "(s)",
02014                  out_cookie);
02015   g_variant_unref (_ret);
02016 _out:
02017   return _ret != NULL;
02018 }
02019 
02034 void
02035 console_kit_manager_call_open_session_with_parameters (
02036     ConsoleKitManager *proxy,
02037     GVariant *arg_parameters,
02038     GCancellable *cancellable,
02039     GAsyncReadyCallback callback,
02040     gpointer user_data)
02041 {
02042   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02043     "OpenSessionWithParameters",
02044     g_variant_new ("(@a(sv))",
02045                    arg_parameters),
02046     G_DBUS_CALL_FLAGS_NONE,
02047     -1,
02048     cancellable,
02049     callback,
02050     user_data);
02051 }
02052 
02064 gboolean
02065 console_kit_manager_call_open_session_with_parameters_finish (
02066     ConsoleKitManager *proxy,
02067     gchar **out_cookie,
02068     GAsyncResult *res,
02069     GError **error)
02070 {
02071   GVariant *_ret;
02072   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02073   if (_ret == NULL)
02074     goto _out;
02075   g_variant_get (_ret,
02076                  "(s)",
02077                  out_cookie);
02078   g_variant_unref (_ret);
02079 _out:
02080   return _ret != NULL;
02081 }
02082 
02097 gboolean
02098 console_kit_manager_call_open_session_with_parameters_sync (
02099     ConsoleKitManager *proxy,
02100     GVariant *arg_parameters,
02101     gchar **out_cookie,
02102     GCancellable *cancellable,
02103     GError **error)
02104 {
02105   GVariant *_ret;
02106   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02107     "OpenSessionWithParameters",
02108     g_variant_new ("(@a(sv))",
02109                    arg_parameters),
02110     G_DBUS_CALL_FLAGS_NONE,
02111     -1,
02112     cancellable,
02113     error);
02114   if (_ret == NULL)
02115     goto _out;
02116   g_variant_get (_ret,
02117                  "(s)",
02118                  out_cookie);
02119   g_variant_unref (_ret);
02120 _out:
02121   return _ret != NULL;
02122 }
02123 
02138 void
02139 console_kit_manager_call_close_session (
02140     ConsoleKitManager *proxy,
02141     const gchar *arg_cookie,
02142     GCancellable *cancellable,
02143     GAsyncReadyCallback callback,
02144     gpointer user_data)
02145 {
02146   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02147     "CloseSession",
02148     g_variant_new ("(s)",
02149                    arg_cookie),
02150     G_DBUS_CALL_FLAGS_NONE,
02151     -1,
02152     cancellable,
02153     callback,
02154     user_data);
02155 }
02156 
02168 gboolean
02169 console_kit_manager_call_close_session_finish (
02170     ConsoleKitManager *proxy,
02171     gboolean *out_result,
02172     GAsyncResult *res,
02173     GError **error)
02174 {
02175   GVariant *_ret;
02176   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02177   if (_ret == NULL)
02178     goto _out;
02179   g_variant_get (_ret,
02180                  "(b)",
02181                  out_result);
02182   g_variant_unref (_ret);
02183 _out:
02184   return _ret != NULL;
02185 }
02186 
02201 gboolean
02202 console_kit_manager_call_close_session_sync (
02203     ConsoleKitManager *proxy,
02204     const gchar *arg_cookie,
02205     gboolean *out_result,
02206     GCancellable *cancellable,
02207     GError **error)
02208 {
02209   GVariant *_ret;
02210   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02211     "CloseSession",
02212     g_variant_new ("(s)",
02213                    arg_cookie),
02214     G_DBUS_CALL_FLAGS_NONE,
02215     -1,
02216     cancellable,
02217     error);
02218   if (_ret == NULL)
02219     goto _out;
02220   g_variant_get (_ret,
02221                  "(b)",
02222                  out_result);
02223   g_variant_unref (_ret);
02224 _out:
02225   return _ret != NULL;
02226 }
02227 
02241 void
02242 console_kit_manager_call_get_seats (
02243     ConsoleKitManager *proxy,
02244     GCancellable *cancellable,
02245     GAsyncReadyCallback callback,
02246     gpointer user_data)
02247 {
02248   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02249     "GetSeats",
02250     g_variant_new ("()"),
02251     G_DBUS_CALL_FLAGS_NONE,
02252     -1,
02253     cancellable,
02254     callback,
02255     user_data);
02256 }
02257 
02269 gboolean
02270 console_kit_manager_call_get_seats_finish (
02271     ConsoleKitManager *proxy,
02272     gchar ***out_seats,
02273     GAsyncResult *res,
02274     GError **error)
02275 {
02276   GVariant *_ret;
02277   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02278   if (_ret == NULL)
02279     goto _out;
02280   g_variant_get (_ret,
02281                  "(^ao)",
02282                  out_seats);
02283   g_variant_unref (_ret);
02284 _out:
02285   return _ret != NULL;
02286 }
02287 
02301 gboolean
02302 console_kit_manager_call_get_seats_sync (
02303     ConsoleKitManager *proxy,
02304     gchar ***out_seats,
02305     GCancellable *cancellable,
02306     GError **error)
02307 {
02308   GVariant *_ret;
02309   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02310     "GetSeats",
02311     g_variant_new ("()"),
02312     G_DBUS_CALL_FLAGS_NONE,
02313     -1,
02314     cancellable,
02315     error);
02316   if (_ret == NULL)
02317     goto _out;
02318   g_variant_get (_ret,
02319                  "(^ao)",
02320                  out_seats);
02321   g_variant_unref (_ret);
02322 _out:
02323   return _ret != NULL;
02324 }
02325 
02339 void
02340 console_kit_manager_call_get_sessions (
02341     ConsoleKitManager *proxy,
02342     GCancellable *cancellable,
02343     GAsyncReadyCallback callback,
02344     gpointer user_data)
02345 {
02346   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02347     "GetSessions",
02348     g_variant_new ("()"),
02349     G_DBUS_CALL_FLAGS_NONE,
02350     -1,
02351     cancellable,
02352     callback,
02353     user_data);
02354 }
02355 
02367 gboolean
02368 console_kit_manager_call_get_sessions_finish (
02369     ConsoleKitManager *proxy,
02370     gchar ***out_sessions,
02371     GAsyncResult *res,
02372     GError **error)
02373 {
02374   GVariant *_ret;
02375   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02376   if (_ret == NULL)
02377     goto _out;
02378   g_variant_get (_ret,
02379                  "(^ao)",
02380                  out_sessions);
02381   g_variant_unref (_ret);
02382 _out:
02383   return _ret != NULL;
02384 }
02385 
02399 gboolean
02400 console_kit_manager_call_get_sessions_sync (
02401     ConsoleKitManager *proxy,
02402     gchar ***out_sessions,
02403     GCancellable *cancellable,
02404     GError **error)
02405 {
02406   GVariant *_ret;
02407   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02408     "GetSessions",
02409     g_variant_new ("()"),
02410     G_DBUS_CALL_FLAGS_NONE,
02411     -1,
02412     cancellable,
02413     error);
02414   if (_ret == NULL)
02415     goto _out;
02416   g_variant_get (_ret,
02417                  "(^ao)",
02418                  out_sessions);
02419   g_variant_unref (_ret);
02420 _out:
02421   return _ret != NULL;
02422 }
02423 
02438 void
02439 console_kit_manager_call_get_session_for_cookie (
02440     ConsoleKitManager *proxy,
02441     const gchar *arg_cookie,
02442     GCancellable *cancellable,
02443     GAsyncReadyCallback callback,
02444     gpointer user_data)
02445 {
02446   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02447     "GetSessionForCookie",
02448     g_variant_new ("(s)",
02449                    arg_cookie),
02450     G_DBUS_CALL_FLAGS_NONE,
02451     -1,
02452     cancellable,
02453     callback,
02454     user_data);
02455 }
02456 
02468 gboolean
02469 console_kit_manager_call_get_session_for_cookie_finish (
02470     ConsoleKitManager *proxy,
02471     gchar **out_ssid,
02472     GAsyncResult *res,
02473     GError **error)
02474 {
02475   GVariant *_ret;
02476   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02477   if (_ret == NULL)
02478     goto _out;
02479   g_variant_get (_ret,
02480                  "(o)",
02481                  out_ssid);
02482   g_variant_unref (_ret);
02483 _out:
02484   return _ret != NULL;
02485 }
02486 
02501 gboolean
02502 console_kit_manager_call_get_session_for_cookie_sync (
02503     ConsoleKitManager *proxy,
02504     const gchar *arg_cookie,
02505     gchar **out_ssid,
02506     GCancellable *cancellable,
02507     GError **error)
02508 {
02509   GVariant *_ret;
02510   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02511     "GetSessionForCookie",
02512     g_variant_new ("(s)",
02513                    arg_cookie),
02514     G_DBUS_CALL_FLAGS_NONE,
02515     -1,
02516     cancellable,
02517     error);
02518   if (_ret == NULL)
02519     goto _out;
02520   g_variant_get (_ret,
02521                  "(o)",
02522                  out_ssid);
02523   g_variant_unref (_ret);
02524 _out:
02525   return _ret != NULL;
02526 }
02527 
02542 void
02543 console_kit_manager_call_get_session_for_unix_process (
02544     ConsoleKitManager *proxy,
02545     guint arg_pid,
02546     GCancellable *cancellable,
02547     GAsyncReadyCallback callback,
02548     gpointer user_data)
02549 {
02550   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02551     "GetSessionForUnixProcess",
02552     g_variant_new ("(u)",
02553                    arg_pid),
02554     G_DBUS_CALL_FLAGS_NONE,
02555     -1,
02556     cancellable,
02557     callback,
02558     user_data);
02559 }
02560 
02572 gboolean
02573 console_kit_manager_call_get_session_for_unix_process_finish (
02574     ConsoleKitManager *proxy,
02575     gchar **out_ssid,
02576     GAsyncResult *res,
02577     GError **error)
02578 {
02579   GVariant *_ret;
02580   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02581   if (_ret == NULL)
02582     goto _out;
02583   g_variant_get (_ret,
02584                  "(o)",
02585                  out_ssid);
02586   g_variant_unref (_ret);
02587 _out:
02588   return _ret != NULL;
02589 }
02590 
02605 gboolean
02606 console_kit_manager_call_get_session_for_unix_process_sync (
02607     ConsoleKitManager *proxy,
02608     guint arg_pid,
02609     gchar **out_ssid,
02610     GCancellable *cancellable,
02611     GError **error)
02612 {
02613   GVariant *_ret;
02614   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02615     "GetSessionForUnixProcess",
02616     g_variant_new ("(u)",
02617                    arg_pid),
02618     G_DBUS_CALL_FLAGS_NONE,
02619     -1,
02620     cancellable,
02621     error);
02622   if (_ret == NULL)
02623     goto _out;
02624   g_variant_get (_ret,
02625                  "(o)",
02626                  out_ssid);
02627   g_variant_unref (_ret);
02628 _out:
02629   return _ret != NULL;
02630 }
02631 
02645 void
02646 console_kit_manager_call_get_current_session (
02647     ConsoleKitManager *proxy,
02648     GCancellable *cancellable,
02649     GAsyncReadyCallback callback,
02650     gpointer user_data)
02651 {
02652   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02653     "GetCurrentSession",
02654     g_variant_new ("()"),
02655     G_DBUS_CALL_FLAGS_NONE,
02656     -1,
02657     cancellable,
02658     callback,
02659     user_data);
02660 }
02661 
02673 gboolean
02674 console_kit_manager_call_get_current_session_finish (
02675     ConsoleKitManager *proxy,
02676     gchar **out_ssid,
02677     GAsyncResult *res,
02678     GError **error)
02679 {
02680   GVariant *_ret;
02681   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02682   if (_ret == NULL)
02683     goto _out;
02684   g_variant_get (_ret,
02685                  "(o)",
02686                  out_ssid);
02687   g_variant_unref (_ret);
02688 _out:
02689   return _ret != NULL;
02690 }
02691 
02705 gboolean
02706 console_kit_manager_call_get_current_session_sync (
02707     ConsoleKitManager *proxy,
02708     gchar **out_ssid,
02709     GCancellable *cancellable,
02710     GError **error)
02711 {
02712   GVariant *_ret;
02713   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02714     "GetCurrentSession",
02715     g_variant_new ("()"),
02716     G_DBUS_CALL_FLAGS_NONE,
02717     -1,
02718     cancellable,
02719     error);
02720   if (_ret == NULL)
02721     goto _out;
02722   g_variant_get (_ret,
02723                  "(o)",
02724                  out_ssid);
02725   g_variant_unref (_ret);
02726 _out:
02727   return _ret != NULL;
02728 }
02729 
02744 void
02745 console_kit_manager_call_get_sessions_for_unix_user (
02746     ConsoleKitManager *proxy,
02747     guint arg_uid,
02748     GCancellable *cancellable,
02749     GAsyncReadyCallback callback,
02750     gpointer user_data)
02751 {
02752   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02753     "GetSessionsForUnixUser",
02754     g_variant_new ("(u)",
02755                    arg_uid),
02756     G_DBUS_CALL_FLAGS_NONE,
02757     -1,
02758     cancellable,
02759     callback,
02760     user_data);
02761 }
02762 
02774 gboolean
02775 console_kit_manager_call_get_sessions_for_unix_user_finish (
02776     ConsoleKitManager *proxy,
02777     gchar ***out_sessions,
02778     GAsyncResult *res,
02779     GError **error)
02780 {
02781   GVariant *_ret;
02782   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02783   if (_ret == NULL)
02784     goto _out;
02785   g_variant_get (_ret,
02786                  "(^ao)",
02787                  out_sessions);
02788   g_variant_unref (_ret);
02789 _out:
02790   return _ret != NULL;
02791 }
02792 
02807 gboolean
02808 console_kit_manager_call_get_sessions_for_unix_user_sync (
02809     ConsoleKitManager *proxy,
02810     guint arg_uid,
02811     gchar ***out_sessions,
02812     GCancellable *cancellable,
02813     GError **error)
02814 {
02815   GVariant *_ret;
02816   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02817     "GetSessionsForUnixUser",
02818     g_variant_new ("(u)",
02819                    arg_uid),
02820     G_DBUS_CALL_FLAGS_NONE,
02821     -1,
02822     cancellable,
02823     error);
02824   if (_ret == NULL)
02825     goto _out;
02826   g_variant_get (_ret,
02827                  "(^ao)",
02828                  out_sessions);
02829   g_variant_unref (_ret);
02830 _out:
02831   return _ret != NULL;
02832 }
02833 
02848 void
02849 console_kit_manager_call_get_sessions_for_user (
02850     ConsoleKitManager *proxy,
02851     guint arg_uid,
02852     GCancellable *cancellable,
02853     GAsyncReadyCallback callback,
02854     gpointer user_data)
02855 {
02856   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02857     "GetSessionsForUser",
02858     g_variant_new ("(u)",
02859                    arg_uid),
02860     G_DBUS_CALL_FLAGS_NONE,
02861     -1,
02862     cancellable,
02863     callback,
02864     user_data);
02865 }
02866 
02878 gboolean
02879 console_kit_manager_call_get_sessions_for_user_finish (
02880     ConsoleKitManager *proxy,
02881     gchar ***out_sessions,
02882     GAsyncResult *res,
02883     GError **error)
02884 {
02885   GVariant *_ret;
02886   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02887   if (_ret == NULL)
02888     goto _out;
02889   g_variant_get (_ret,
02890                  "(^ao)",
02891                  out_sessions);
02892   g_variant_unref (_ret);
02893 _out:
02894   return _ret != NULL;
02895 }
02896 
02911 gboolean
02912 console_kit_manager_call_get_sessions_for_user_sync (
02913     ConsoleKitManager *proxy,
02914     guint arg_uid,
02915     gchar ***out_sessions,
02916     GCancellable *cancellable,
02917     GError **error)
02918 {
02919   GVariant *_ret;
02920   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
02921     "GetSessionsForUser",
02922     g_variant_new ("(u)",
02923                    arg_uid),
02924     G_DBUS_CALL_FLAGS_NONE,
02925     -1,
02926     cancellable,
02927     error);
02928   if (_ret == NULL)
02929     goto _out;
02930   g_variant_get (_ret,
02931                  "(^ao)",
02932                  out_sessions);
02933   g_variant_unref (_ret);
02934 _out:
02935   return _ret != NULL;
02936 }
02937 
02951 void
02952 console_kit_manager_call_get_system_idle_hint (
02953     ConsoleKitManager *proxy,
02954     GCancellable *cancellable,
02955     GAsyncReadyCallback callback,
02956     gpointer user_data)
02957 {
02958   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
02959     "GetSystemIdleHint",
02960     g_variant_new ("()"),
02961     G_DBUS_CALL_FLAGS_NONE,
02962     -1,
02963     cancellable,
02964     callback,
02965     user_data);
02966 }
02967 
02979 gboolean
02980 console_kit_manager_call_get_system_idle_hint_finish (
02981     ConsoleKitManager *proxy,
02982     gboolean *out_idle_hint,
02983     GAsyncResult *res,
02984     GError **error)
02985 {
02986   GVariant *_ret;
02987   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
02988   if (_ret == NULL)
02989     goto _out;
02990   g_variant_get (_ret,
02991                  "(b)",
02992                  out_idle_hint);
02993   g_variant_unref (_ret);
02994 _out:
02995   return _ret != NULL;
02996 }
02997 
03011 gboolean
03012 console_kit_manager_call_get_system_idle_hint_sync (
03013     ConsoleKitManager *proxy,
03014     gboolean *out_idle_hint,
03015     GCancellable *cancellable,
03016     GError **error)
03017 {
03018   GVariant *_ret;
03019   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03020     "GetSystemIdleHint",
03021     g_variant_new ("()"),
03022     G_DBUS_CALL_FLAGS_NONE,
03023     -1,
03024     cancellable,
03025     error);
03026   if (_ret == NULL)
03027     goto _out;
03028   g_variant_get (_ret,
03029                  "(b)",
03030                  out_idle_hint);
03031   g_variant_unref (_ret);
03032 _out:
03033   return _ret != NULL;
03034 }
03035 
03049 void
03050 console_kit_manager_call_get_system_idle_since_hint (
03051     ConsoleKitManager *proxy,
03052     GCancellable *cancellable,
03053     GAsyncReadyCallback callback,
03054     gpointer user_data)
03055 {
03056   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03057     "GetSystemIdleSinceHint",
03058     g_variant_new ("()"),
03059     G_DBUS_CALL_FLAGS_NONE,
03060     -1,
03061     cancellable,
03062     callback,
03063     user_data);
03064 }
03065 
03077 gboolean
03078 console_kit_manager_call_get_system_idle_since_hint_finish (
03079     ConsoleKitManager *proxy,
03080     gchar **out_iso8601_datetime,
03081     GAsyncResult *res,
03082     GError **error)
03083 {
03084   GVariant *_ret;
03085   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03086   if (_ret == NULL)
03087     goto _out;
03088   g_variant_get (_ret,
03089                  "(s)",
03090                  out_iso8601_datetime);
03091   g_variant_unref (_ret);
03092 _out:
03093   return _ret != NULL;
03094 }
03095 
03109 gboolean
03110 console_kit_manager_call_get_system_idle_since_hint_sync (
03111     ConsoleKitManager *proxy,
03112     gchar **out_iso8601_datetime,
03113     GCancellable *cancellable,
03114     GError **error)
03115 {
03116   GVariant *_ret;
03117   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03118     "GetSystemIdleSinceHint",
03119     g_variant_new ("()"),
03120     G_DBUS_CALL_FLAGS_NONE,
03121     -1,
03122     cancellable,
03123     error);
03124   if (_ret == NULL)
03125     goto _out;
03126   g_variant_get (_ret,
03127                  "(s)",
03128                  out_iso8601_datetime);
03129   g_variant_unref (_ret);
03130 _out:
03131   return _ret != NULL;
03132 }
03133 
03143 void
03144 console_kit_manager_complete_restart (
03145     ConsoleKitManager *object,
03146     GDBusMethodInvocation *invocation)
03147 {
03148   g_dbus_method_invocation_return_value (invocation,
03149     g_variant_new ("()"));
03150 }
03151 
03162 void
03163 console_kit_manager_complete_can_restart (
03164     ConsoleKitManager *object,
03165     GDBusMethodInvocation *invocation,
03166     gboolean can_restart)
03167 {
03168   g_dbus_method_invocation_return_value (invocation,
03169     g_variant_new ("(b)",
03170                    can_restart));
03171 }
03172 
03182 void
03183 console_kit_manager_complete_stop (
03184     ConsoleKitManager *object,
03185     GDBusMethodInvocation *invocation)
03186 {
03187   g_dbus_method_invocation_return_value (invocation,
03188     g_variant_new ("()"));
03189 }
03190 
03201 void
03202 console_kit_manager_complete_can_stop (
03203     ConsoleKitManager *object,
03204     GDBusMethodInvocation *invocation,
03205     gboolean can_stop)
03206 {
03207   g_dbus_method_invocation_return_value (invocation,
03208     g_variant_new ("(b)",
03209                    can_stop));
03210 }
03211 
03222 void
03223 console_kit_manager_complete_open_session (
03224     ConsoleKitManager *object,
03225     GDBusMethodInvocation *invocation,
03226     const gchar *cookie)
03227 {
03228   g_dbus_method_invocation_return_value (invocation,
03229     g_variant_new ("(s)",
03230                    cookie));
03231 }
03232 
03243 void
03244 console_kit_manager_complete_open_session_with_parameters (
03245     ConsoleKitManager *object,
03246     GDBusMethodInvocation *invocation,
03247     const gchar *cookie)
03248 {
03249   g_dbus_method_invocation_return_value (invocation,
03250     g_variant_new ("(s)",
03251                    cookie));
03252 }
03253 
03264 void
03265 console_kit_manager_complete_close_session (
03266     ConsoleKitManager *object,
03267     GDBusMethodInvocation *invocation,
03268     gboolean result)
03269 {
03270   g_dbus_method_invocation_return_value (invocation,
03271     g_variant_new ("(b)",
03272                    result));
03273 }
03274 
03285 void
03286 console_kit_manager_complete_get_seats (
03287     ConsoleKitManager *object,
03288     GDBusMethodInvocation *invocation,
03289     const gchar *const *seats)
03290 {
03291   g_dbus_method_invocation_return_value (invocation,
03292     g_variant_new ("(^ao)",
03293                    seats));
03294 }
03295 
03306 void
03307 console_kit_manager_complete_get_sessions (
03308     ConsoleKitManager *object,
03309     GDBusMethodInvocation *invocation,
03310     const gchar *const *sessions)
03311 {
03312   g_dbus_method_invocation_return_value (invocation,
03313     g_variant_new ("(^ao)",
03314                    sessions));
03315 }
03316 
03327 void
03328 console_kit_manager_complete_get_session_for_cookie (
03329     ConsoleKitManager *object,
03330     GDBusMethodInvocation *invocation,
03331     const gchar *ssid)
03332 {
03333   g_dbus_method_invocation_return_value (invocation,
03334     g_variant_new ("(o)",
03335                    ssid));
03336 }
03337 
03348 void
03349 console_kit_manager_complete_get_session_for_unix_process (
03350     ConsoleKitManager *object,
03351     GDBusMethodInvocation *invocation,
03352     const gchar *ssid)
03353 {
03354   g_dbus_method_invocation_return_value (invocation,
03355     g_variant_new ("(o)",
03356                    ssid));
03357 }
03358 
03369 void
03370 console_kit_manager_complete_get_current_session (
03371     ConsoleKitManager *object,
03372     GDBusMethodInvocation *invocation,
03373     const gchar *ssid)
03374 {
03375   g_dbus_method_invocation_return_value (invocation,
03376     g_variant_new ("(o)",
03377                    ssid));
03378 }
03379 
03390 void
03391 console_kit_manager_complete_get_sessions_for_unix_user (
03392     ConsoleKitManager *object,
03393     GDBusMethodInvocation *invocation,
03394     const gchar *const *sessions)
03395 {
03396   g_dbus_method_invocation_return_value (invocation,
03397     g_variant_new ("(^ao)",
03398                    sessions));
03399 }
03400 
03411 void
03412 console_kit_manager_complete_get_sessions_for_user (
03413     ConsoleKitManager *object,
03414     GDBusMethodInvocation *invocation,
03415     const gchar *const *sessions)
03416 {
03417   g_dbus_method_invocation_return_value (invocation,
03418     g_variant_new ("(^ao)",
03419                    sessions));
03420 }
03421 
03432 void
03433 console_kit_manager_complete_get_system_idle_hint (
03434     ConsoleKitManager *object,
03435     GDBusMethodInvocation *invocation,
03436     gboolean idle_hint)
03437 {
03438   g_dbus_method_invocation_return_value (invocation,
03439     g_variant_new ("(b)",
03440                    idle_hint));
03441 }
03442 
03453 void
03454 console_kit_manager_complete_get_system_idle_since_hint (
03455     ConsoleKitManager *object,
03456     GDBusMethodInvocation *invocation,
03457     const gchar *iso8601_datetime)
03458 {
03459   g_dbus_method_invocation_return_value (invocation,
03460     g_variant_new ("(s)",
03461                    iso8601_datetime));
03462 }
03463 
03464 /* ------------------------------------------------------------------------ */
03465 
03479 struct _ConsoleKitManagerProxyPrivate
03480 {
03481   GData *qdata;
03482 };
03483 
03484 static void console_kit_manager_proxy_iface_init (ConsoleKitManagerIface *iface);
03485 
03486 G_DEFINE_TYPE_WITH_CODE (ConsoleKitManagerProxy, console_kit_manager_proxy, G_TYPE_DBUS_PROXY,
03487                          G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_MANAGER, console_kit_manager_proxy_iface_init));
03488 
03489 static void
03490 console_kit_manager_proxy_finalize (GObject *object)
03491 {
03492   ConsoleKitManagerProxy *proxy = CONSOLE_KIT_MANAGER_PROXY (object);
03493   g_datalist_clear (&proxy->priv->qdata);
03494   G_OBJECT_CLASS (console_kit_manager_proxy_parent_class)->finalize (object);
03495 }
03496 
03497 static void
03498 console_kit_manager_proxy_get_property (GObject      *object,
03499   guint         prop_id,
03500   GValue       *value,
03501   GParamSpec   *pspec)
03502 {
03503 }
03504 
03505 static void
03506 console_kit_manager_proxy_set_property (GObject      *object,
03507   guint         prop_id,
03508   const GValue *value,
03509   GParamSpec   *pspec)
03510 {
03511 }
03512 
03513 static void
03514 console_kit_manager_proxy_g_signal (GDBusProxy *proxy,
03515   const gchar *sender_name,
03516   const gchar *signal_name,
03517   GVariant *parameters)
03518 {
03519   _ExtendedGDBusSignalInfo *info;
03520   GVariantIter iter;
03521   GVariant *child;
03522   GValue *paramv;
03523   guint num_params;
03524   guint n;
03525   guint signal_id;
03526   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_console_kit_manager_interface_info, signal_name);
03527   if (info == NULL)
03528     return;
03529   num_params = g_variant_n_children (parameters);
03530   paramv = g_new0 (GValue, num_params + 1);
03531   g_value_init (&paramv[0], TYPE_CONSOLE_KIT_MANAGER);
03532   g_value_set_object (&paramv[0], proxy);
03533   g_variant_iter_init (&iter, parameters);
03534   n = 1;
03535   while ((child = g_variant_iter_next_value (&iter)) != NULL)
03536     {
03537       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
03538       if (arg_info->use_gvariant)
03539         {
03540           g_value_init (&paramv[n], G_TYPE_VARIANT);
03541           g_value_set_variant (&paramv[n], child);
03542           n++;
03543         }
03544       else
03545         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
03546       g_variant_unref (child);
03547     }
03548   signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_MANAGER);
03549   g_signal_emitv (paramv, signal_id, 0, NULL);
03550   for (n = 0; n < num_params + 1; n++)
03551     g_value_unset (&paramv[n]);
03552   g_free (paramv);
03553 }
03554 
03555 static void
03556 console_kit_manager_proxy_g_properties_changed (GDBusProxy *_proxy,
03557   GVariant *changed_properties,
03558   const gchar *const *invalidated_properties)
03559 {
03560   ConsoleKitManagerProxy *proxy = CONSOLE_KIT_MANAGER_PROXY (_proxy);
03561   guint n;
03562   const gchar *key;
03563   GVariantIter *iter;
03564   _ExtendedGDBusPropertyInfo *info;
03565   g_variant_get (changed_properties, "a{sv}", &iter);
03566   while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
03567     {
03568       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_console_kit_manager_interface_info, key);
03569       g_datalist_remove_data (&proxy->priv->qdata, key);
03570       if (info != NULL)
03571         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
03572     }
03573   g_variant_iter_free (iter);
03574   for (n = 0; invalidated_properties[n] != NULL; n++)
03575     {
03576       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_console_kit_manager_interface_info, invalidated_properties[n]);
03577       g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
03578       if (info != NULL)
03579         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
03580     }
03581 }
03582 
03583 static void
03584 console_kit_manager_proxy_init (ConsoleKitManagerProxy *proxy)
03585 {
03586   proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_CONSOLE_KIT_MANAGER_PROXY, ConsoleKitManagerProxyPrivate);
03587   g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), console_kit_manager_interface_info ());
03588 }
03589 
03590 static void
03591 console_kit_manager_proxy_class_init (ConsoleKitManagerProxyClass *klass)
03592 {
03593   GObjectClass *gobject_class;
03594   GDBusProxyClass *proxy_class;
03595 
03596   g_type_class_add_private (klass, sizeof (ConsoleKitManagerProxyPrivate));
03597 
03598   gobject_class = G_OBJECT_CLASS (klass);
03599   gobject_class->finalize     = console_kit_manager_proxy_finalize;
03600   gobject_class->get_property = console_kit_manager_proxy_get_property;
03601   gobject_class->set_property = console_kit_manager_proxy_set_property;
03602 
03603   proxy_class = G_DBUS_PROXY_CLASS (klass);
03604   proxy_class->g_signal = console_kit_manager_proxy_g_signal;
03605   proxy_class->g_properties_changed = console_kit_manager_proxy_g_properties_changed;
03606 
03607 }
03608 
03609 static void
03610 console_kit_manager_proxy_iface_init (ConsoleKitManagerIface *iface)
03611 {
03612 }
03613 
03631 void
03632 console_kit_manager_proxy_new (
03633     GDBusConnection     *connection,
03634     GDBusProxyFlags      flags,
03635     const gchar         *name,
03636     const gchar         *object_path,
03637     GCancellable        *cancellable,
03638     GAsyncReadyCallback  callback,
03639     gpointer             user_data)
03640 {
03641   g_async_initable_new_async (TYPE_CONSOLE_KIT_MANAGER_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.ConsoleKit.Manager", NULL);
03642 }
03643 
03653 ConsoleKitManager *
03654 console_kit_manager_proxy_new_finish (
03655     GAsyncResult        *res,
03656     GError             **error)
03657 {
03658   GObject *ret;
03659   GObject *source_object;
03660   source_object = g_async_result_get_source_object (res);
03661   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
03662   g_object_unref (source_object);
03663   if (ret != NULL)
03664     return CONSOLE_KIT_MANAGER (ret);
03665   else
03666     return NULL;
03667 }
03668 
03686 ConsoleKitManager *
03687 console_kit_manager_proxy_new_sync (
03688     GDBusConnection     *connection,
03689     GDBusProxyFlags      flags,
03690     const gchar         *name,
03691     const gchar         *object_path,
03692     GCancellable        *cancellable,
03693     GError             **error)
03694 {
03695   GInitable *ret;
03696   ret = g_initable_new (TYPE_CONSOLE_KIT_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL);
03697   if (ret != NULL)
03698     return CONSOLE_KIT_MANAGER (ret);
03699   else
03700     return NULL;
03701 }
03702 
03703 
03721 void
03722 console_kit_manager_proxy_new_for_bus (
03723     GBusType             bus_type,
03724     GDBusProxyFlags      flags,
03725     const gchar         *name,
03726     const gchar         *object_path,
03727     GCancellable        *cancellable,
03728     GAsyncReadyCallback  callback,
03729     gpointer             user_data)
03730 {
03731   g_async_initable_new_async (TYPE_CONSOLE_KIT_MANAGER_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.ConsoleKit.Manager", NULL);
03732 }
03733 
03743 ConsoleKitManager *
03744 console_kit_manager_proxy_new_for_bus_finish (
03745     GAsyncResult        *res,
03746     GError             **error)
03747 {
03748   GObject *ret;
03749   GObject *source_object;
03750   source_object = g_async_result_get_source_object (res);
03751   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
03752   g_object_unref (source_object);
03753   if (ret != NULL)
03754     return CONSOLE_KIT_MANAGER (ret);
03755   else
03756     return NULL;
03757 }
03758 
03776 ConsoleKitManager *
03777 console_kit_manager_proxy_new_for_bus_sync (
03778     GBusType             bus_type,
03779     GDBusProxyFlags      flags,
03780     const gchar         *name,
03781     const gchar         *object_path,
03782     GCancellable        *cancellable,
03783     GError             **error)
03784 {
03785   GInitable *ret;
03786   ret = g_initable_new (TYPE_CONSOLE_KIT_MANAGER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.ConsoleKit.Manager", NULL);
03787   if (ret != NULL)
03788     return CONSOLE_KIT_MANAGER (ret);
03789   else
03790     return NULL;
03791 }
03792 
03793 
03794 /* ------------------------------------------------------------------------ */
03795 
03809 struct _ConsoleKitManagerSkeletonPrivate
03810 {
03811   GValue *properties;
03812   GList *changed_properties;
03813   GSource *changed_properties_idle_source;
03814   GMainContext *context;
03815   GMutex lock;
03816 };
03817 
03818 static void
03819 _console_kit_manager_skeleton_handle_method_call (
03820   GDBusConnection *connection,
03821   const gchar *sender,
03822   const gchar *object_path,
03823   const gchar *interface_name,
03824   const gchar *method_name,
03825   GVariant *parameters,
03826   GDBusMethodInvocation *invocation,
03827   gpointer user_data)
03828 {
03829   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (user_data);
03830   _ExtendedGDBusMethodInfo *info;
03831   GVariantIter iter;
03832   GVariant *child;
03833   GValue *paramv;
03834   guint num_params;
03835   guint num_extra;
03836   guint n;
03837   guint signal_id;
03838   GValue return_value = G_VALUE_INIT;
03839   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
03840   g_assert (info != NULL);
03841   num_params = g_variant_n_children (parameters);
03842   num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
03843   n = 0;
03844   g_value_init (&paramv[n], TYPE_CONSOLE_KIT_MANAGER);
03845   g_value_set_object (&paramv[n++], skeleton);
03846   g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
03847   g_value_set_object (&paramv[n++], invocation);
03848   if (info->pass_fdlist)
03849     {
03850 #ifdef G_OS_UNIX
03851       g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
03852       g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
03853 #else
03854       g_assert_not_reached ();
03855 #endif
03856     }
03857   g_variant_iter_init (&iter, parameters);
03858   while ((child = g_variant_iter_next_value (&iter)) != NULL)
03859     {
03860       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
03861       if (arg_info->use_gvariant)
03862         {
03863           g_value_init (&paramv[n], G_TYPE_VARIANT);
03864           g_value_set_variant (&paramv[n], child);
03865           n++;
03866         }
03867       else
03868         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
03869       g_variant_unref (child);
03870     }
03871   signal_id = g_signal_lookup (info->signal_name, TYPE_CONSOLE_KIT_MANAGER);
03872   g_value_init (&return_value, G_TYPE_BOOLEAN);
03873   g_signal_emitv (paramv, signal_id, 0, &return_value);
03874   if (!g_value_get_boolean (&return_value))
03875     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);
03876   g_value_unset (&return_value);
03877   for (n = 0; n < num_params + num_extra; n++)
03878     g_value_unset (&paramv[n]);
03879   g_free (paramv);
03880 }
03881 
03882 static GVariant *
03883 _console_kit_manager_skeleton_handle_get_property (
03884   GDBusConnection *connection,
03885   const gchar *sender,
03886   const gchar *object_path,
03887   const gchar *interface_name,
03888   const gchar *property_name,
03889   GError **error,
03890   gpointer user_data)
03891 {
03892   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (user_data);
03893   GValue value = G_VALUE_INIT;
03894   GParamSpec *pspec;
03895   _ExtendedGDBusPropertyInfo *info;
03896   GVariant *ret;
03897   ret = NULL;
03898   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_console_kit_manager_interface_info, property_name);
03899   g_assert (info != NULL);
03900   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
03901   if (pspec == NULL)
03902     {
03903       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
03904     }
03905   else
03906     {
03907       g_value_init (&value, pspec->value_type);
03908       g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
03909       ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
03910       g_value_unset (&value);
03911     }
03912   return ret;
03913 }
03914 
03915 static gboolean
03916 _console_kit_manager_skeleton_handle_set_property (
03917   GDBusConnection *connection,
03918   const gchar *sender,
03919   const gchar *object_path,
03920   const gchar *interface_name,
03921   const gchar *property_name,
03922   GVariant *variant,
03923   GError **error,
03924   gpointer user_data)
03925 {
03926   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (user_data);
03927   GValue value = G_VALUE_INIT;
03928   GParamSpec *pspec;
03929   _ExtendedGDBusPropertyInfo *info;
03930   gboolean ret;
03931   ret = FALSE;
03932   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_console_kit_manager_interface_info, property_name);
03933   g_assert (info != NULL);
03934   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
03935   if (pspec == NULL)
03936     {
03937       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
03938     }
03939   else
03940     {
03941       if (info->use_gvariant)
03942         g_value_set_variant (&value, variant);
03943       else
03944         g_dbus_gvariant_to_gvalue (variant, &value);
03945       g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
03946       g_value_unset (&value);
03947       ret = TRUE;
03948     }
03949   return ret;
03950 }
03951 
03952 static const GDBusInterfaceVTable _console_kit_manager_skeleton_vtable =
03953 {
03954   _console_kit_manager_skeleton_handle_method_call,
03955   _console_kit_manager_skeleton_handle_get_property,
03956   _console_kit_manager_skeleton_handle_set_property
03957 };
03958 
03959 static GDBusInterfaceInfo *
03960 console_kit_manager_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
03961 {
03962   return console_kit_manager_interface_info ();
03963 }
03964 
03965 static GDBusInterfaceVTable *
03966 console_kit_manager_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
03967 {
03968   return (GDBusInterfaceVTable *) &_console_kit_manager_skeleton_vtable;
03969 }
03970 
03971 static GVariant *
03972 console_kit_manager_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
03973 {
03974   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (_skeleton);
03975 
03976   GVariantBuilder builder;
03977   guint n;
03978   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
03979   if (_console_kit_manager_interface_info.parent_struct.properties == NULL)
03980     goto out;
03981   for (n = 0; _console_kit_manager_interface_info.parent_struct.properties[n] != NULL; n++)
03982     {
03983       GDBusPropertyInfo *info = _console_kit_manager_interface_info.parent_struct.properties[n];
03984       if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
03985         {
03986           GVariant *value;
03987           value = _console_kit_manager_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.ConsoleKit.Manager", info->name, NULL, skeleton);
03988           if (value != NULL)
03989             {
03990               g_variant_take_ref (value);
03991               g_variant_builder_add (&builder, "{sv}", info->name, value);
03992               g_variant_unref (value);
03993             }
03994         }
03995     }
03996 out:
03997   return g_variant_builder_end (&builder);
03998 }
03999 
04000 static void
04001 console_kit_manager_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
04002 {
04003 }
04004 
04005 static void
04006 _console_kit_manager_on_signal_seat_added (
04007     ConsoleKitManager *object,
04008     const gchar *arg_sid)
04009 {
04010   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (object);
04011 
04012   GList      *connections, *l;
04013   GVariant   *signal_variant;
04014   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
04015 
04016   signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
04017                    arg_sid));
04018   for (l = connections; l != NULL; l = l->next)
04019     {
04020       GDBusConnection *connection = l->data;
04021       g_dbus_connection_emit_signal (connection,
04022         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Manager", "SeatAdded",
04023         signal_variant, NULL);
04024     }
04025   g_variant_unref (signal_variant);
04026   g_list_free_full (connections, g_object_unref);
04027 }
04028 
04029 static void
04030 _console_kit_manager_on_signal_seat_removed (
04031     ConsoleKitManager *object,
04032     const gchar *arg_sid)
04033 {
04034   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (object);
04035 
04036   GList      *connections, *l;
04037   GVariant   *signal_variant;
04038   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
04039 
04040   signal_variant = g_variant_ref_sink (g_variant_new ("(o)",
04041                    arg_sid));
04042   for (l = connections; l != NULL; l = l->next)
04043     {
04044       GDBusConnection *connection = l->data;
04045       g_dbus_connection_emit_signal (connection,
04046         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Manager", "SeatRemoved",
04047         signal_variant, NULL);
04048     }
04049   g_variant_unref (signal_variant);
04050   g_list_free_full (connections, g_object_unref);
04051 }
04052 
04053 static void
04054 _console_kit_manager_on_signal_system_idle_hint_changed (
04055     ConsoleKitManager *object,
04056     gboolean arg_hint)
04057 {
04058   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (object);
04059 
04060   GList      *connections, *l;
04061   GVariant   *signal_variant;
04062   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
04063 
04064   signal_variant = g_variant_ref_sink (g_variant_new ("(b)",
04065                    arg_hint));
04066   for (l = connections; l != NULL; l = l->next)
04067     {
04068       GDBusConnection *connection = l->data;
04069       g_dbus_connection_emit_signal (connection,
04070         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.freedesktop.ConsoleKit.Manager", "SystemIdleHintChanged",
04071         signal_variant, NULL);
04072     }
04073   g_variant_unref (signal_variant);
04074   g_list_free_full (connections, g_object_unref);
04075 }
04076 
04077 static void console_kit_manager_skeleton_iface_init (ConsoleKitManagerIface *iface);
04078 G_DEFINE_TYPE_WITH_CODE (ConsoleKitManagerSkeleton, console_kit_manager_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
04079                          G_IMPLEMENT_INTERFACE (TYPE_CONSOLE_KIT_MANAGER, console_kit_manager_skeleton_iface_init));
04080 
04081 static void
04082 console_kit_manager_skeleton_finalize (GObject *object)
04083 {
04084   ConsoleKitManagerSkeleton *skeleton = CONSOLE_KIT_MANAGER_SKELETON (object);
04085   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
04086   if (skeleton->priv->changed_properties_idle_source != NULL)
04087     g_source_destroy (skeleton->priv->changed_properties_idle_source);
04088   g_main_context_unref (skeleton->priv->context);
04089   g_mutex_clear (&skeleton->priv->lock);
04090   G_OBJECT_CLASS (console_kit_manager_skeleton_parent_class)->finalize (object);
04091 }
04092 
04093 static void
04094 console_kit_manager_skeleton_init (ConsoleKitManagerSkeleton *skeleton)
04095 {
04096   skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_CONSOLE_KIT_MANAGER_SKELETON, ConsoleKitManagerSkeletonPrivate);
04097   g_mutex_init (&skeleton->priv->lock);
04098   skeleton->priv->context = g_main_context_ref_thread_default ();
04099 }
04100 
04101 static void
04102 console_kit_manager_skeleton_class_init (ConsoleKitManagerSkeletonClass *klass)
04103 {
04104   GObjectClass *gobject_class;
04105   GDBusInterfaceSkeletonClass *skeleton_class;
04106 
04107   g_type_class_add_private (klass, sizeof (ConsoleKitManagerSkeletonPrivate));
04108 
04109   gobject_class = G_OBJECT_CLASS (klass);
04110   gobject_class->finalize = console_kit_manager_skeleton_finalize;
04111 
04112   skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
04113   skeleton_class->get_info = console_kit_manager_skeleton_dbus_interface_get_info;
04114   skeleton_class->get_properties = console_kit_manager_skeleton_dbus_interface_get_properties;
04115   skeleton_class->flush = console_kit_manager_skeleton_dbus_interface_flush;
04116   skeleton_class->get_vtable = console_kit_manager_skeleton_dbus_interface_get_vtable;
04117 }
04118 
04119 static void
04120 console_kit_manager_skeleton_iface_init (ConsoleKitManagerIface *iface)
04121 {
04122   iface->seat_added = _console_kit_manager_on_signal_seat_added;
04123   iface->seat_removed = _console_kit_manager_on_signal_seat_removed;
04124   iface->system_idle_hint_changed = _console_kit_manager_on_signal_system_idle_hint_changed;
04125 }
04126 
04134 ConsoleKitManager *
04135 console_kit_manager_skeleton_new (void)
04136 {
04137   return CONSOLE_KIT_MANAGER (g_object_new (TYPE_CONSOLE_KIT_MANAGER_SKELETON, NULL));
04138 }
04139