Lumiera  0.pre.03
»edit your freedom«
dummy-player-interface-proxy.cpp
Go to the documentation of this file.
1 /*
2  DummyPlayer(Proxy) - access point and service implementing a dummy test player
3 
4  Copyright (C) Lumiera.org
5  2009, 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 
23 
24 
52 
53 namespace lumiera {
54 
55  // emit the vtable here into this translation unit within liblumieracommon.so ...
56  DummyPlayer::~DummyPlayer() { }
58 
59 
62 
63 
64 
65 
66  namespace facade {
67 
68 
69 
70  /* ==================== DummyPlayer ======================================= */
71 
72  using Interface = LUMIERA_INTERFACE_INAME(lumieraorg_DummyPlayer, 0);
73  using Facade = lumiera::DummyPlayer;
74 
75  using IHandle = InstanceHandle<Interface, Facade>;
76 
77 
78  template<>
79  class Proxy<IHandle>
80  : public Binding<IHandle>
81  {
82  //----Proxy-Implementation-of-DummyPlayer--------
84  typedef steam::play::ProcessImpl ProcessImpl;
85 
96  Process start(LumieraDisplaySlot viewerHandle) override
97  {
98  ProcessImplementationLink* pP = static_cast<ProcessImplementationLink*> (_i_.startPlay (viewerHandle));
99 
100  if (!pP)
101  throw lumiera::error::State("failed to start DummyPlayer", lumiera_error());
102 
103  return pP->createHandle();
104  }
105 
106 
107 
108  public:
110  };
111 
112 
114  template
116 
117  } // namespace facade
118 
119 
120  /* === Forwarding function(s) on the Process handle === */
121 
122  void
124  {
125  // access the implementation via smart-Handle
126  impl().doPlay(yes);
127  }
128 
129 
130 } // namespace lumiera
Playback process, front-end to be used by client code.
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:289
Derived specific exceptions within Lumiera&#39;s exception hierarchy.
Definition: error.hpp:196
Implementation Base for building Facade Proxy implementations.
lumiera_err lumiera_error(void)
Get and clear current error state.
Definition: error-state.c:124
Actual implementation of a single (dummy) playback process.
Implementation of C++ binding proxies on top of the (plain-C based) interface system.
Handle tracking the registration of an interface, deregistering it on deletion.
static lib::Depend< DummyPlayer > facade
get an implementation instance of this service
#define LUMIERA_INTERFACE_INAME(name, version)
Construct a type identifier for an interface.
Definition: interface.h:102
Lumiera public interface.
Definition: advice.cpp:113
Process start(LumieraDisplaySlot viewerHandle) override
Experimental Interface Steam-Layer (or maybe the vault?): Global access point for starting a dummy pl...