summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Jannis Pohlmann [Thu, 14 Jun 2012 09:26:55 +0000 (10:26 +0100)]
Add stub for implementing BootManager1.Start()
This will soon be filled with life, erm, code.
Jannis Pohlmann [Thu, 14 Jun 2012 09:23:35 +0000 (10:23 +0100)]
Create the watchdog client in the application init method
This way it is always created and systemd's watchdog timestamp is
updated as early as possible and not later in the app's startup method.
Jannis Pohlmann [Thu, 14 Jun 2012 16:12:34 +0000 (17:12 +0100)]
Include test-luc-handler in the tarballs generated by make distcheck
Jonathan Maw [Thu, 14 Jun 2012 16:05:53 +0000 (17:05 +0100)]
Add tests for LUC handler register/deregister
The testing suite makes register/deregister calls to the LUC handler,
and compares the LastUserContext after the request to what is expected.
Jonathan Maw [Thu, 14 Jun 2012 09:29:20 +0000 (10:29 +0100)]
Implement org.genivi.LUCHandler1.Deregister()
This commit implements the "handle-deregister" signal handler of the
LUCHandler interface skeleton. It essentially copies the current last
user context and drops all the apps that are part of the Deregister()
call. It then updates the org.genivi.LUCHandler1:LastUserContext
property.
The deregistration algorithm makes sure that LUC types for which no apps
are registered anymore are dropped from the LUC entirely.
Jonathan Maw [Wed, 13 Jun 2012 14:13:55 +0000 (15:13 +0100)]
Implement org.genivi.LUCHandler1.Register()
This commit implements the "handle-register" signal handler of the
LUCHandler interface skeleton by merging the current LUC and the
newly registered LUC types/apps and updating the
org.genivi.LUCHandler1:LastUserContext property.
It makes sure that the order in which LUC types are added to the final
GVariant as dictionary keys is always the same (alphabetical order).
This makes testing easier as D-Bus and GVariant both preserve the order
of dictionary keys (unlike with a GHashTable).
This commit also introduces common/glib-extensions.{c,h} where we can
dump functions that extend GLib in simple ways. The first helper
function is g_variant_string_array_has_string() which we use to check if
a string is included in a string array GVariant.
Jannis Pohlmann [Wed, 13 Jun 2012 13:09:15 +0000 (14:09 +0100)]
Add XML spec and code generation for org.fd.systemd1.Manager
This will cause the SystemdManagerProxy class to be generated that
we can use to communicate with the systemd manager to start/stop units
etc.
Jannis Pohlmann [Wed, 13 Jun 2012 12:38:46 +0000 (13:38 +0100)]
Fix coding style, parameter alignments and an unused variable
Jannis Pohlmann [Wed, 13 Jun 2012 12:37:06 +0000 (13:37 +0100)]
Add initial classes for the boot manager service implementation
This includes BootManagerApplication, BootManagerService (which at this
point does not implement any of the D-Bus method handlers yet) and the
classes generated by gdbus-codegen from the XML interface specification.
This commit also introduces the .service file for the boot manager.
Jannis Pohlmann [Wed, 13 Jun 2012 10:46:08 +0000 (11:46 +0100)]
Add rudimentary test suite with a LUC Handler test script
For now the LUC Handler test only does the following:
1. reset the LUC to be empty
2. attempt to register one foreground app
In the future we have to add more tests to it.
Jannis Pohlmann [Wed, 13 Jun 2012 11:18:37 +0000 (12:18 +0100)]
Use GApplication to gain bus ownership of org.genivi.LUCHandler1
In order for the service to respond to client requests properly, we
need to own the org.genivi.LUCHandler1 name on the bus. GApplication
transparently handles this for us. This commit adds a new
LUCHandlerApplication class and uses that for managing the daemon's
lifecycle, including bus ownership, main loop and shutdown after a
period of inactivity.
Jannis Pohlmann [Wed, 13 Jun 2012 10:07:40 +0000 (11:07 +0100)]
Update systemd's watchdog timeout in luc-handler using WatchdogClient
WatchdogClient is a new class that takes a timeout and asks systemd to
update its watchdog timeout in regular intervals using sd_notify().
Jonathan Maw [Tue, 12 Jun 2012 17:15:40 +0000 (18:15 +0100)]
Make last-user-context property binding work by using mapping functions
g_settings_bind() cannot automatically convert between GVariant and
GValue if the value type is a dictionary (a{sas} in our case). We
therefore have to implement the mapping ourselves to bind the GSettings
key and the last-user-context D-Bus property together.
Jonathan Maw [Tue, 12 Jun 2012 16:16:51 +0000 (17:16 +0100)]
Bind GSetting key to D-Bus property
Modifications made to luc-handler/luc-handler-service.c
In struct _LUCHandlerService:
- Added GSettings object to store the settings with the handler.
In luc_handler_service_init:
- Initialized the GSettings object.
- Bound the last-user-context of the settings to the last-user-context
of the interface.
In luc_handler_service_finalize:
- Finalize the GSettings object (It is unnecessary to unbind the settings
because they belong to the object they are bound to, and are unbound
when the object is finalized)
Jannis Pohlmann [Tue, 12 Jun 2012 15:10:48 +0000 (16:10 +0100)]
Fix Makefile.am rules for installing the GSettings schema
Jonathan Maw [Tue, 12 Jun 2012 13:16:59 +0000 (14:16 +0100)]
Add GSettings schema for LUC handler
The Last User Context will be stored/accessed using GSettings. This
requires:
- a schema of the data that will be stored.
- a modification to Makefile.am to validate and install the schema.
- modifications to the code to use GSettings.
This commit adds the schema and changes to Makefile.am. The
org.genivi.LUCHandler1.gschema.xml file is generated from
org.genivi.LUCHandler1.gschema.xml.in when ./configure is executed.
This is to allow the schema ID and base path to include the
BOOT_MANAGER_VERSION_API defined in configure.ac, in case we ever
decide to break the API or GSettings key structure.
The default value for the "last-user-context" key is an empty dictionary
for now.
Jonathan Maw [Tue, 12 Jun 2012 13:18:49 +0000 (14:18 +0100)]
Add Jonathan Maw to AUTHORS
Jannis Pohlmann [Tue, 12 Jun 2012 09:11:02 +0000 (10:11 +0100)]
Add LUCHandler1 API docs, rename "Content" property to "LastUserContext"
Jannis Pohlmann [Tue, 12 Jun 2012 08:36:41 +0000 (09:36 +0100)]
Fix args in XML interface spec, add example code to handle Register()
The XML element name for D-Bus method parameters is "arg", not "param".
luc_handler_service_handle_register() now has a "GVariant *apps"
parameter and reads/prints the foreground apps that are passed to it.
This is just example code to demonstrate how this can be done. It
will later be replaced with the real implementation.
Jannis Pohlmann [Mon, 11 Jun 2012 16:32:21 +0000 (17:32 +0100)]
Connect to the "handle-deregister" signal and fix debug messages
Jannis Pohlmann [Mon, 11 Jun 2012 16:27:13 +0000 (17:27 +0100)]
Add skeleton for the org.genivi.LUCHandler1 service implementation
This skeleton has stubs for the implementation of the Register() and
Deregister() methods. It currently uses the session bus to make it
easier to test as a regular user.
The implementation does not use the DLT yet, neither does it register
with systemd's watchdog mechanism. It also does not register with the
NSM as a shutdown consumer yet.
GDBus appears to need a little help to add parameters to the generated
C functions, so we'll probably have to extend the XML interface
definition with a few annotations.
Jannis Pohlmann [Mon, 11 Jun 2012 10:54:06 +0000 (11:54 +0100)]
Add gio-unix-2.0 dependency, add service file for the LUC handler
Jannis Pohlmann [Mon, 11 Jun 2012 10:47:56 +0000 (11:47 +0100)]
Drop intltool, depend on systemd 37 for now
Since the boot manager will run in the background as a service, we'll
probably not need translations. Systemd 183 is not available on all
Linux distributions yet, so in order to get started, we'll build on top
of 37 for now. 37 doesn't have all the features we need but it's good
enough to develop the LUC handler at least.
Francisco Marchena [Wed, 6 Jun 2012 16:26:55 +0000 (17:26 +0100)]
Add AUTHORS and NEWS needed for autoreconf
Francisco Marchena [Wed, 6 Jun 2012 16:18:55 +0000 (17:18 +0100)]
Add luc-handler-dbus.xml and basic main.c
Francisco Marchena [Wed, 6 Jun 2012 16:03:17 +0000 (17:03 +0100)]
Add Makefile.am for main and luc-handler directories
Francisco Marchena [Wed, 6 Jun 2012 15:26:39 +0000 (16:26 +0100)]
Add .gitignore
Francisco Marchena [Wed, 6 Jun 2012 15:24:56 +0000 (16:24 +0100)]
Add initial configure.ac
Jannis Pohlmann [Wed, 6 Jun 2012 16:11:53 +0000 (17:11 +0100)]
Add copyright and license header information to CODING_STYLE
Jannis Pohlmann [Wed, 6 Jun 2012 13:19:09 +0000 (14:19 +0100)]
Add MPL license, coding style and commit message guidelines.
The license is MPL 2.0 as required by GENIVI.
The coding style is adopted from GLib-based projects such as Clutter
but has been extended with best practices from the Xfce community.
The guidelines for git commit messages are taken from the GNOME
community among others and are commonly used in the open source world.