aboutsummaryrefslogtreecommitdiffstats
path: root/src/interfaces/logind/logind.c
Commit message (Collapse)AuthorAgeFilesLines
* add polkit auth object, compile it in makefile, add header to interfaceskremlin2014-08-161-0/+2
| | | | | src/polkit-auth.c and its header are seperately built objects, linked to interfaces, which expose a single, safe auth checking function
* include polkit.h in all interfaces, edit makefile accordinglykremlin2014-08-161-0/+1
|
* minor, retab \t's to four spaceskremlin2014-08-061-18/+18
|
* minor, s/g_print/g_printfkremlin2014-08-051-1/+1
|
* (8) [final] modify main() to call correct clean sequencekremlin2014-08-051-1/+7
| | | | | | | main() now sets the signal handlers (via function from previous commit) before establishing the GMainLoop as well as invoke the proper clean()'s after unref'ing the loop. at this point all four interfaces are at the same place structurally. builds all cases.
* (7) add set_signal_handlers() to bind functions during initkremlin2014-08-051-0/+8
| | | | | | | this function calls attached the ones from the previous commit to the GLib runtime properly. since we are working solely in the default context (in terms on the GMainLoop) we are guaranteed the attached functions will only run once.
* (6) add handler for unix termination signalskremlin2014-08-051-0/+9
| | | | | | | | it prints a message and calls foo_mem_clean(), swiftly and safely bringing the runtime down before letting the calling thread it was ready to exit. note, this is handled through GLib which guarantees it is only fired once, rather than unwrapped signals that can occur wildly.
* (5) fix foo_mem_clean() functions to avoid race cond.kremlin2014-08-051-2/+8
| | | | | | | | | | mem_clean functions previously free()'d our pointer array without first checking that the name/interface had properly been unexported from dbus. checking first better guarantees all operations implicating that date have ceased, and that it is safe to go ahead and stop the GMainLoop before immediately returning. this causes the code just after the main_loop_begin() call to start functioning, in our case the actual free() calls (which are now *absolutley* safe to call)
* (4) move on_name_acquired functionality to on_bus_acquiredkremlin2014-08-051-14/+23
| | | | | | | | | work that was previously done in foo_on_name_acquired(), such as attaching the interface to the name, is now done in foo_on_bus_acquired(), as GIO docs suggest. this fixed a bug with logind failing to export, the name_acquired function executed executed too late to export a big interface like logind. fix some minor error msg/consistency stuff in hostnamed, merge across pals. builds
* (3) add needed GLib headers, move loop and bus descr out of main into globalkremlin2014-07-291-3/+6
| | | | | | minor variable placement changes. added gboolean dbus_interface_exported, which due to the guarantees of the name_lost, bus_acquired, and name_acquired is a reliable source of whether not it is reasonable to try and unexport it
* (2) move on_name_lost() callback to appropriate commend-bounded regionkremlin2014-07-291-9/+9
| | | | minor, builds
* (1) add <interface>.h and #include it in corresponding .ckremlin2014-07-291-0/+1
| | | | nessecary for compiler unambiguity. minor, builds
* minor, clarify what "misc functions" are in commentskremlin2014-07-291-1/+1
|
* minor, clarify "dbus signal" vs. "unix signal" in commentskremlin2014-07-291-2/+2
|
* include glib-unix.h in interface fileskremlin2014-07-291-0/+1
| | | | | it's a good idea to use glib signal handling, most use cases will be running gnome
* copy and regex localed, timedated, and logind from hostnamedkremlin2014-07-221-0/+118
| | | | | they now start up and display the proper methods/functions on the system bus, albeit with no functionality
* remove includes in non-gen'd interf files, they're linked properly nowkremlin2014-07-151-0/+4
| | | | | | | no need to include foo-gen.c as its functionality exists inside linked object built by makefile in future commit. additionally, make all non-generated interface files executable with a dummy main() that runs foo_init() after setting everything up properly with a g_main_loop
* add license ISC license blurbskremlin2014-06-221-0/+16