~unity8-desktop-session-team/noachian/trunk

« back to all changes in this revision

Viewing changes to noachiand/controller.h

  • Committer: Stephen M. Webb
  • Date: 2014-08-21 20:24:00 UTC
  • Revision ID: stephen.webb@canonical.com-20140821202400-mkjdydr9bixvod1e
added crude Container classes and tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef NOACHIAND_CONTROLLER_H
22
22
#define NOACHIAND_CONTROLLER_H 1
23
23
 
 
24
#include <memory>
24
25
#include <string>
25
26
#include <vector>
26
27
 
27
28
 
28
29
namespace Noachiand
29
30
{
 
31
class Configuration;
 
32
class TrustedSessionFactory;
 
33
class ContainerFactory;
30
34
 
31
35
/**
32
 
 * A pure virtual interface for objects controlling the Noachian applications.
 
36
 * A master controller for aggregating the various components of the Noachian
 
37
 * service.
33
38
 */
34
39
class Controller
35
40
{
36
41
public:
37
 
  virtual ~Controller() = 0;
 
42
  Controller(Configuration*         configuration,
 
43
             TrustedSessionFactory* trusted_session_factory,
 
44
             ContainerFactory*      container_factory);
 
45
  ~Controller() ;
38
46
 
39
47
  /**
40
48
   * Starts an application.
46
54
   *
47
55
   * @throws std::runtime_error on failre to start the application.
48
56
   */
49
 
  virtual void
 
57
  void
50
58
  start_application(std::string const&              application_path,
51
59
                    std::vector<std::string> const& argv,
52
 
                    uint32_t*                       id) = 0;
 
60
                    uint32_t*                       id);
 
61
 
 
62
private:
 
63
  struct Impl;
 
64
  std::unique_ptr<Impl> impl_;
53
65
};
54
66
 
55
67
} // namespace Noachiand