Lumiera  0.pre.03
»edit your freedom«
output-director.hpp
Go to the documentation of this file.
1 /*
2  OUTPUT-DIRECTOR.hpp - handling all the real external output connections
3 
4  Copyright (C)
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
25 #ifndef STEAM_PLAY_OUTPUT_DIRECTOR_H
26 #define STEAM_PLAY_OUTPUT_DIRECTOR_H
27 
28 
29 #include "lib/error.hpp"
30 #include "lib/depend.hpp"
31 #include "lib/depend-inject.hpp"
33 #include "common/subsys.hpp"
34 #include "lib/nocopy.hpp"
35 #include "lib/sync.hpp"
36 
37 #include <memory>
38 
39 
40 namespace lumiera {
41  class Play;
42 }
43 namespace steam {
44 namespace play {
45 
46 //using std::string;
47 //using std::vector;
48 //using std::shared_ptr;
49  using std::unique_ptr;
50 
51  class PlayService;
52 
53 
54 
55  /**************************************************/
62  , public lib::Sync<>
63  {
64  using SigTerm = lumiera::Subsys::SigTerm;
66 
67  PlayServiceHandle player_;
69 
70  bool shutdown_initiated_ = false;
71 
72  public:
74 
75  bool connectUp() ;
76  void triggerDisconnect(SigTerm) noexcept;
77 
78  bool isOperational() const;
79 
80  private:
81  OutputDirector() ;
82  ~OutputDirector() ;
84 
85 
86  void bringDown (SigTerm completedSignal);
87  };
88 
89 
90 
91 }} // namespace steam::play
92 #endif
Facility for monitor object based locking.
Definition: sync.hpp:209
Management of external Output connections.
Configuration handle to expose a service implementation through the Depend<SRV> front-end.
Any copy and copy construction prohibited.
Definition: nocopy.hpp:37
Per type specific configuration of instances created as service dependencies.
Implementation access point: Player subsystem.
Steam-Layer implementation namespace root.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
Object Monitor based synchronisation.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Describing dependencies and lifecycle of the application&#39;s primary parts.
Singleton services and Dependency Injection.
Lumiera error handling (C++ interface).
static lib::Depend< OutputDirector > instance
storage for the single application wide OutputDirector instance
A global service to handle all external output connections.
Lumiera public interface.
Definition: advice.cpp:104
Helper to abstract creation and lifecycle of a dependency.
Definition: depend.hpp:125