summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
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.