summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Jonathan Maw [Fri, 20 Jul 2012 10:14:02 +0000 (11:14 +0100)]
Update NSM-related D-Bus interfaces and codegen
Change all instances of conti to contiautomotive in bus names, object
paths and interfaces.
Change shutdown consumers' interface to
com.contiautomotive.NodeStateManager.LifeCycleConsumer and replace the
Shutdown() method with a LifecycleRequest() method which takes arguments
"Request", "RequestId" and returns "ErrorCode".
In addition, this commit removes the ShutdownConsumerService object and
handles all shutdown consumers directly in the legacy app handler.
Francisco Redondo Marchena [Mon, 23 Jul 2012 10:28:18 +0000 (11:28 +0100)]
Install boot-manager.service to $(libdir) rather than /lib
Installing to /lib causes troubly when building the boot manager as part
of the Yocto-based GENIVI Excalibur baseline.
Jannis Pohlmann [Thu, 19 Jul 2012 15:24:08 +0000 (16:24 +0100)]
Improve use of GError and writing to the LUC
Make use of convenience functions for clearing and propagating GErrors.
Drop g_file_create() because g_file_replace_contents() handles the
on-demand file creation for us.
Jannis Pohlmann [Thu, 19 Jul 2012 14:53:53 +0000 (15:53 +0100)]
Fix/finish implementation of integer-based LUC types
This commit fixes the use of integers as keys for GHashTable. It also
parses the prioritised LUC types into integer values and stores them
in a GArray. The code for computing the start order is updated to also
use integers for the startup groups.
This change also fixes luc_starter_compare_luc_types(), which (a) didn't
work at all and (b) had to be converted to comparing integers, not
strings.
Jannis Pohlmann [Thu, 19 Jul 2012 12:46:11 +0000 (13:46 +0100)]
Use $(sysconfdir)/boot-manager/last-user-context to store the LUC file
$(sysconfdir) is where system-wide configuration files belong.
Jannis Pohlmann [Thu, 19 Jul 2012 12:28:58 +0000 (13:28 +0100)]
Improve the initial construction of the GVariant for the new LUC
The GVariantBuilder is now statically allocated on the stack to avoid
memory allocations at run-time. Using g_variant_builder_end() is used
to obtain the new GVariant rather than allocating a new one from the
contents of the builder separately.
Francisco Redondo Marchena [Mon, 25 Jun 2012 17:15:00 +0000 (18:15 +0100)]
Add a dummy-implementation of the Node State Manager and use it
The Node State Manager (NSM) dummy has all the interfaces relevant
to the Boot Manager, and can be instructed to shut down all its
shutdown consumers when a SIGINT signal is sent.
The Legacy App Handler will connect to the NSM dummy and register
shutdown consumers to it.
Jannis Pohlmann [Thu, 19 Jul 2012 11:01:57 +0000 (12:01 +0100)]
Move service files back to source directory, rename systemd service file
Jannis Pohlmann [Wed, 18 Jul 2012 13:27:49 +0000 (14:27 +0100)]
Apply a few coding style fixes and adjust a few debug messages
Jannis Pohlmann [Wed, 18 Jul 2012 10:08:43 +0000 (11:08 +0100)]
Include org.genivi.BootManager1.conf in EXTRA_DIST
This is needed for "make dist" and "make distcheck" to work. However,
"make distcheck" currently doesn't work, most likely because the tests
cannot be executed automatically without test files being installed to
the system first.
Ben Brewer [Tue, 17 Jul 2012 14:53:04 +0000 (15:53 +0100)]
Merge branch 'franred/drop-rebase' of roadtrain.codethink.co.uk:genivi/boot-manager
Merge into one process, change D-Bus interfaces and write LUC to file
The following changes were made:
- Restructure the D-Bus interfaces:
-- The old boot manager interface is removed, we are no longer
interested in being a remote controller of systemd.
-- The LUC Handler has been rewritten and renamed to
org.genivi.BootManager1.BootManager. It has the following
methods:
--- BeginLUCRegistration() initializes the LUC registration
sequence at shutdown.
--- RegisterWithLUC(a{ias}) registers one or more apps with
different LUC types.
--- FinishLUCRegistration() finishes the LUC registration
sequence and atomically replaces the previous LUC.
-- The legacy application handler has been renamed to
org.genivi.BootManager1.LegacyAppHandler. This interface
is not for external use. It is meant only for the command-
line interface to communicate with the boot manager.
-- The LastUserContext property has been removed.
- The last user context is now stored in a file rather than with
GSettings. This was requested after the Gothenburg F2F, but is
included because it is easier to make the change now than modify
GSettings only to remove it later.
- All services run as part of the same process (i.e. boot-manager).
- All services run on the system bus. Because of this, the boot
manager's command-line interface is handled differently, as the
previous implementation, using GApplication, does not work on the
system bus. The command-line interface now works by making a D-Bus
call to the boot manager service, instead of using GApplication's
remote command-line functionality.
- The LUC Handler tests have been renamed to the boot manager
tests, and are changed in line with the new interface methods.
Jonathan Maw [Mon, 9 Jul 2012 11:53:25 +0000 (12:53 +0100)]
Merge into one process, change D-Bus interfaces and write LUC to file
The following changes were made:
- Restructure the D-Bus interfaces:
-- The old boot manager interface is removed, we are no longer
interested in being a remote controller of systemd.
-- The LUC Handler has been rewritten and renamed to
org.genivi.BootManager1.BootManager. It has the following
methods:
--- BeginLUCRegistration() initializes the LUC registration
sequence at shutdown.
--- RegisterWithLUC(a{ias}) registers one or more apps with
different LUC types.
--- FinishLUCRegistration() finishes the LUC registration
sequence and atomically replaces the previous LUC.
-- The legacy application handler has been renamed to
org.genivi.BootManager1.LegacyAppHandler. This interface
is not for external use. It is meant only for the command-
line interface to communicate with the boot manager.
-- The LastUserContext property has been removed.
- The last user context is now stored in a file rather than with
GSettings. This was requested after the Gothenburg F2F, but is
included because it is easier to make the change now than modify
GSettings only to remove it later.
- All services run as part of the same process (i.e. boot-manager).
- All services run on the system bus. Because of this, the boot
manager's command-line interface is handled differently, as the
previous implementation, using GApplication, does not work on the
system bus. The command-line interface now works by making a D-Bus
call to the boot manager service, instead of using GApplication's
remote command-line functionality.
- The LUC Handler tests have been renamed to the boot manager
tests, and are changed in line with the new interface methods.
Note: The legacy app handler tests have not yet been modified to work
with these changes.
Ben Brewer [Tue, 10 Jul 2012 14:53:05 +0000 (15:53 +0100)]
Make the legacy app handler work on the system bus
This patch in its entirety makes the legacy app handler start on the
system bus, instead of the session bus, along with giving it fully-
functional command-line registration. It will start automatically if a
process tries to call one of its D-Bus methods.
Merge branch 'jonathanmaw/legacy-app-handler-system-bus' of roadtrain:genivi/boot-manager
Ben Brewer [Tue, 10 Jul 2012 14:31:39 +0000 (15:31 +0100)]
Three ExecStartPost systemd unit files
Having some services to test on is important. These three will acquire
a bus name and use the CLI to register themselves with the legacy app
handler.
Merge branch 'jonathanmaw/legacy-app-handler-test' of roadtrain:genivi/boot-manager
Jonathan Maw [Mon, 9 Jul 2012 15:15:07 +0000 (16:15 +0100)]
Rewrite legacy app handler's command-line to use D-Bus
The GApplication object's command-line method does not work when the
application is running on the system bus. The solution is to use D-Bus
calls to communicate with the primary instance instead.
If the executable is called with command-line arguments, instead of
starting a GApplication it calls the Register() and Deregister()
methods instead.
This commit also adds all the necessary changes so that the legacy app
handler can be D-Bus activated on the system bus and started with
systemd.
Jonathan Maw [Fri, 6 Jul 2012 12:51:03 +0000 (13:51 +0100)]
Change legacy app handler to register on the system bus
Makes the legacy app handler connect to the system bus instead of the
session bus.
This commit also changes bus names to consistently use LegacyAppHandler1
instead of LAHandler1.
This commit does not allow communication with the legacy app handler by
command-line. The following commit will provide this.
This commit does not provide a way to start the legacy app handler
through systemd. The following commit also provides this.
Ben Brewer [Mon, 9 Jul 2012 14:51:40 +0000 (15:51 +0100)]
Add shutdown consumers
Significant changes:
- Getters were made to return const strings.
- The object_path property of the legacy app handler was made const.
- DLT log levels changed in some places.
- in la_handler_service_handle_consumer_shutdown_finish, logic has been
changed to not compare the value of "result" unless there were no
errors, because boot_manager_call_stop_finish does not necessarily
always give a valid pointer.
Jonathan Maw [Thu, 28 Jun 2012 14:06:42 +0000 (15:06 +0100)]
Define three systemd service unit files with ExecStartPost set
Files org.genivi.LegacyAppHandler1.test{1,2,3}.service.in will build
into appropriate *.service files.
Each one will run legacy-app-handler with --register as an
ExecStartPost.
Each one is installed to /lib/systemd/system and has an ExecStart
process which is to acquire a Bus Name.
A .conf file has rules to allow processes to own
org.genivi.LegacyAppHandler1.test{1,2,3}, and appears to work as
planned.
Jonathan Maw [Wed, 27 Jun 2012 16:46:51 +0000 (17:46 +0100)]
Create a shutdown consumer object for every --register activation
On receiving a --register command line, or a call to the Register()
method, the legacy app handler will create a shutdown consumer object
(although it will not register it with the NSM yet). When something
(e.g. the NSM) tells the shutdown consumer to shut down, it emits the
signal "shutdown-requested", which the Legacy App Handler listens for.
The Legacy App Handler responds to the "shutdown-requested" signal by
calling the boot manager's Stop() method.
Jannis Pohlmann [Fri, 29 Jun 2012 14:35:05 +0000 (15:35 +0100)]
Release 0.1.0!
Jonathan Maw [Wed, 27 Jun 2012 10:07:47 +0000 (11:07 +0100)]
Define D-Bus interface for Shutdown Consumers
Shutdown Consumers are D-Bus objects that exist for every application
that does not have a Shutdown() method, and are registered with the Node
State Manager (NSM).
When the NSM shuts down, it calls Shutdown() to all Shutdown Consumers
in reverse order to their registration. For legacy applications, a
Shutdown Consumer is created and registered with the NSM.
When the Shutdown Consumer is told to shut down, it shuts down the
legacy application by signalling the Boot Manager.
Jonathan Maw [Thu, 28 Jun 2012 08:54:01 +0000 (09:54 +0100)]
Add convenience library 'libcommon.la'
Reference to individual components of the 'common' directory in
components' respective makefiles are replaced with reference to the
convenience library 'libcommon.la'
Jonathan Maw [Tue, 26 Jun 2012 14:44:00 +0000 (15:44 +0100)]
Add --register command-line option to LegacyAppHandler
When legacy-app-handler is called without arguments, it starts as a
service, and as the primary instance of the LegacyAppHandler
GApplication.
When legacy-app-handler is called with arguments, it is started as a
remote instance of the LegacyAppHandler GApplication, which passes its
command-line arguments to the primary instance.
On receiving command-line arguments from a remote instance, the Primary
instance will parse those arguments, expecting a command like the
following:
legacy-app-handler --register --unit="foo" --timeout=120 \
--shutdown-mode="normal"
Timeout and shutdown-mode are optional, and if omitted will default to
0, and "normal", respectively.
Because interaction with the Node State Manager is not yet implemented,
the Legacy App Handler will print the arguments to DLT, instead of
registering the app as a shutdown consumer.
Jonathan Maw [Wed, 27 Jun 2012 10:22:59 +0000 (11:22 +0100)]
Remove generated file from source tree
org.genivi.LAHandler1.service is generated by
org.genivi.LAHandler1.service.in, so should not be tracked in the source
tree.
Jonathan Maw [Mon, 25 Jun 2012 11:54:34 +0000 (12:54 +0100)]
Implement TargetStartupMonitor class
This class listens to systemd's JobRemoved signal, and should respond if
it recognises one of the following units finishing:
- focussed.target
- unfocussed.target
- lazy.target
With the currently-used version of systemd, the unit name is not given.
At the current state of the project, the Node State Manager is not
available to communicate with.
Jonathan Maw [Fri, 22 Jun 2012 13:56:09 +0000 (14:56 +0100)]
Log failure for the LUCStarter to start applications in DLT
If the LUCStarter fails to start an application, it will log it as a
DLT_LOG_ERROR in DLT, instead of as a g_warning through GLib.
Jonathan Maw [Fri, 22 Jun 2012 12:41:02 +0000 (13:41 +0100)]
Initialize/deinitialize DLT in boot-manager
The BootManager application (BMGR) is registered with the boot manager
context (MGR) in the main loop for the boot-manager programme.
Jonathan Maw [Fri, 22 Jun 2012 12:23:26 +0000 (13:23 +0100)]
Add dependency on DLT to the boot manager
Jonathan Maw [Thu, 21 Jun 2012 14:41:25 +0000 (15:41 +0100)]
Allow SIGINT to cancel BootManagerService jobs
The function boot_manager_service_cancel() allows any part of the boot
manager to cancel every job being started by the BootManagerService.
The SIGINT handler in the BootManagerApplication includes a call to
boot_manager_service_cancel().
Jonathan Maw [Thu, 21 Jun 2012 13:58:41 +0000 (14:58 +0100)]
Make BootManagerService handlers cancellable
All handlers get a cancellable which is associated with its invocation
in a GHashTable in the BootManagerService object.
Jonathan Maw [Wed, 20 Jun 2012 16:08:03 +0000 (17:08 +0100)]
Cancel all LUC app start operations when receiving SIGINT
We add a signal handler for SIGINT which calls the luc_starter_cancel()
method. luc_starter_cancel(), in turn, cancels every D-Bus call to
create a start unit job.
Unfortunately, once a start unit job has been created, cancelling will
not cancel the job to start a unit.
Jonathan Maw [Wed, 20 Jun 2012 15:40:55 +0000 (16:40 +0100)]
Add GCancellable handling to LUCStarter
When systemd is told to start an app, it is passed a GCancellable object
so that the LUCStarter can cancel the start call.
Internally, the LUCStarter has a GHashTable associating each app with
its GCancellable.
Because start_app_finish requires the LUCStarter to start the next group
of apps, the LUCStarter must persist until all start jobs have finished.
For this reason, the start_app method increases the reference count to
the LUCStarter, and the start_app_finish method decreases the reference
count.
Jonathan Maw [Tue, 19 Jun 2012 14:40:57 +0000 (15:40 +0100)]
Add signal handler for List() method
Boot-manager calls the systemd method ListUnits, and replies with only the unit
names.
Jannis Pohlmann [Tue, 19 Jun 2012 14:52:59 +0000 (15:52 +0100)]
Remove accidentally second implementation of --enable-debug
Something must have gone wrong while rebasing a feature branch
against master.
Jannis Pohlmann [Tue, 19 Jun 2012 09:07:00 +0000 (10:07 +0100)]
Make sure to release starter order/groups when destroying LUCStarter
Jannis Pohlmann [Tue, 19 Jun 2012 08:57:30 +0000 (09:57 +0100)]
Implement basic asynchronous LUC startup without error handling
This commit adds support for LUC startup to LUCStarter. It first
creates the parallel startup groups, then sorts their names according
to PRIORITISED_LUC_TYPES and then asynchronously processes group by
group, starting all apps in a group in parallel.
The implementation does not support cancellation nor error handling
at this point.
Jannis Pohlmann [Mon, 18 Jun 2012 10:04:44 +0000 (11:04 +0100)]
Link LUCHandler and LUCStarter. Parse prioritised LUC types
Jannis Pohlmann [Fri, 15 Jun 2012 15:42:00 +0000 (16:42 +0100)]
Add LUCHandler class skeleton and "luc-handler" property in the app
Jannis Pohlmann [Fri, 15 Jun 2012 15:29:09 +0000 (16:29 +0100)]
Add --with-prioritised-luc-types=foo,bar configure option
This option results in a PRIORITISED_LUC_TYPES define in config.h. The
LUCStarter can then parse that to find out in which order to start the
applications in the LUC.
Jonathan Maw [Tue, 19 Jun 2012 11:31:22 +0000 (12:31 +0100)]
Add Isolate() method handler
Isolate() is different from Start() and Stop() in that it does not have
its own method. Instead, it is done by calling StartUnit() with the
special mode "isolate".
Jonathan Maw [Tue, 19 Jun 2012 10:41:56 +0000 (11:41 +0100)]
Add Restart() handler
Restart() functions almost identically to Start() and Stop(), with the
same input and output arguments.
Jonathan Maw [Mon, 18 Jun 2012 10:01:48 +0000 (11:01 +0100)]
Add boot-manager Kill() method
The Kill() method differs from Start() and Stop() in the following ways:
- Systemd does not create jobs for KillUnit() operations, so it doesn't
send a "job-removed" signal.
- The systemd method KillUnit() has different arguments. As well as the
name and the mode, it also takes 'who' and 'signal' number.
The 'who', 'mode' and 'signal' arguments currently use the default
parameters of "all", "control-group" and SIGKILL, respectively.
Jonathan Maw [Mon, 18 Jun 2012 11:07:07 +0000 (12:07 +0100)]
Remove shadow warning from compiling
Removed because shadowing was caused by an automatically-generated file
(luc-handler-dbus.c), as generated with gdbus-codegen.
When using --enable-debug=yes in ./configure, compiling will fail on
warnings.
Jonathan Maw [Mon, 18 Jun 2012 10:37:13 +0000 (11:37 +0100)]
Remove unused variable from boot_manager_application_startup
Jannis Pohlmann [Mon, 18 Jun 2012 09:40:24 +0000 (10:40 +0100)]
Add Jannis Pohlmann to the AUTHORS file
Jannis Pohlmann [Mon, 18 Jun 2012 09:18:54 +0000 (10:18 +0100)]
Apply a small amount of coding style fixes
Jonathan Maw [Fri, 15 Jun 2012 09:57:08 +0000 (10:57 +0100)]
Add skeleton for the legacy-app-handler service application
This is analogue to the boot-manager and luc-handler skeletons and
involves a GApplication subclass (LAHandlerApplication), an (empty)
implementation of the org.genivi.LegacyAppHandler1 D-Bus interface
(LAHandlerService) and an org.genivi.LegacyAppHandler1.service
file to allow D-Bus to activate the service on demand.
Jannis Pohlmann [Fri, 15 Jun 2012 16:09:16 +0000 (17:09 +0100)]
Fix compiler warnings and add --enable-debug=no to make distcheck
Jannis Pohlmann [Fri, 15 Jun 2012 16:06:21 +0000 (17:06 +0100)]
Add --enable-debug={yes,no} configure option
Building with --enable-debug=yes will help catch a lot of programming
mistakes. It enables -Werror -Wall and a lot of other useful compiler
flags.
Jannis Pohlmann [Thu, 14 Jun 2012 09:28:00 +0000 (10:28 +0100)]
Implement org.genivi.BootManager1.Start/Stop
This commit introduces a fully functional implementation of the
org.genivi.BootManager.Start() and org.genivi.BootManager.Stop()
methods.
It drops the BootManagerJob class and the BootManagerJobType enum type
in favor of a more simple BootManagerServiceJob struct typedef used
internally in BootManagerService.
BootManagerService now has two public methods called
boot_manager_service_start() and boot_manager_service_stop() that
call systemd to start/stop a unit. Both methods create
BootManagerServiceJobs and link them to the name of the corresponding
job created by systemd. Both methods also take callback and user data to
allow the result to be reported back to the caller.
The implementations of "handle-start" and "handle-stop" use the above
methods and report the results back to the GDBusMethodInvocation in
a callback.
Most other methods (e.g. Kill() or Isolate()) can be implemented in
pretty much the same way.
NOTE: systemd-manager-dbus.xml was changed to support an older signature
for the JobRemoved() signal. We will have to change this once we develop
using systemd 183 (where JobRemoved() has an additional unit name
argument).
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.