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) Lumiera.org
5  2011, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
34 #ifndef STEAM_PLAY_OUTPUT_DIRECTOR_H
35 #define STEAM_PLAY_OUTPUT_DIRECTOR_H
36 
37 
38 #include "lib/error.hpp"
39 #include "lib/depend.hpp"
40 #include "lib/depend-inject.hpp"
42 #include "common/subsys.hpp"
43 #include "lib/nocopy.hpp"
44 #include "lib/sync.hpp"
45 
46 #include <memory>
47 
48 
49 namespace lumiera {
50  class Play;
51 }
52 namespace steam {
53 namespace play {
54 
55 //using std::string;
56 //using std::vector;
57 //using std::shared_ptr;
58  using std::unique_ptr;
59 
60  class PlayService;
61 
62 
63 
64  /**************************************************/
71  , public lib::Sync<>
72  {
73  using SigTerm = lumiera::Subsys::SigTerm;
75 
76  PlayServiceHandle player_;
78 
79  bool shutdown_initiated_ = false;
80 
81  public:
83 
84  bool connectUp() ;
85  void triggerDisconnect(SigTerm) noexcept;
86 
87  bool isOperational() const;
88 
89  private:
90  OutputDirector() ;
91  ~OutputDirector() ;
93 
94 
95  void bringDown (SigTerm completedSignal);
96  };
97 
98 
99 
100 }} // namespace steam::play
101 #endif
Facility for monitor object based locking.
Definition: sync.hpp:217
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:46
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:289
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:113
Helper to abstract creation and lifecycle of a dependency.
Definition: depend.hpp:134