~sylvain-pineau/checkbox/wrap_exporter

Viewing all changes in revision 2277.

  • Committer: Zygmunt Krynicki
  • Date: 2013-07-16 02:10:12 UTC
  • Revision ID: zygmunt.krynicki@canonical.com-20130716021012-kby1itwvtx4tvsw2
plainbox:service: export a metric ton of stuff over DBus

Please don't land this patch yet

This version has a number of changes:

1) The top-level service object is a wrapper of the highlevel.Service
object. The service object has one actual method, CreateSession() that
obviously creates sessions.

2) The top-level service object implements the ObjectManager interface,
exporting providers and sessions. Currently sessions don't get exported
initially, just when a new one is created with CreateSession().

3) There is a ProviderWrapper that exportes Provider1 instances. The
wrapper implements the ObjectManager interface and exports all of the
JobDefinition objects using JobDefinitionWrapper class. It also exports
WhiteList objects using WhiteListWrapper class.

4) There is a mostly dummy SessionWrapper that exports SessionState object.
The intent is to never expose the fact that SessionState is being
re-factored into SessionStorage, SessionState and SessionManager. The
intent of the DBus wrapper is to export something similar to SessionManager

5) There are wrappers for JobState and JobResult (wrapping either
MemoryJobResult or DiskJobResult) classes. They are automatically
exported when a session is created.

The command line interface was updated to use the new top-level Service
object.

Missing things:

1) Signals from SessionState to reflect changes in SessionWrapper
   (on_new_job_created(), all of the JobState changes (lots!), result
   changes)

2) JobResult is a mutable mess, it's hard to keep track of the things
   exported over DBus right now (especially lacking signals).

3) I think that jobs that weren't started should _not_ have any job
   result associated with it. This would allow us to naturally create
   results when running jobs, not change them. But we still need to
   support changing so maybe that's not such a big deal

4) the Service.RunJob() method needs to be added first

5) Session are not properly opened/closed as I want to get rid of that
   API completely and not have to worry about that.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: