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)
5  2009, 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 
14 
15 
43 
44 namespace lumiera {
45 
46  // emit the vtable here into this translation unit within liblumieracommon.so ...
47  DummyPlayer::~DummyPlayer() { }
49 
50 
53 
54 
55 
56 
57  namespace facade {
58 
59 
60 
61  /* ==================== DummyPlayer ======================================= */
62 
63  using Interface = LUMIERA_INTERFACE_INAME(lumieraorg_DummyPlayer, 0);
64  using Facade = lumiera::DummyPlayer;
65 
66  using IHandle = InstanceHandle<Interface, Facade>;
67 
68 
69  template<>
70  class Proxy<IHandle>
71  : public Binding<IHandle>
72  {
73  //----Proxy-Implementation-of-DummyPlayer--------
75  typedef steam::play::ProcessImpl ProcessImpl;
76 
87  Process start(LumieraDisplaySlot viewerHandle) override
88  {
89  ProcessImplementationLink* pP = static_cast<ProcessImplementationLink*> (_i_.startPlay (viewerHandle));
90 
91  if (!pP)
92  throw lumiera::error::State("failed to start DummyPlayer", lumiera_error());
93 
94  return pP->createHandle();
95  }
96 
97 
98 
99  public:
101  };
102 
103 
105  template
107 
108  } // namespace facade
109 
110 
111  /* === Forwarding function(s) on the Process handle === */
112 
113  void
115  {
116  // access the implementation via smart-Handle
117  impl().doPlay(yes);
118  }
119 
120 
121 } // 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:280
Derived specific exceptions within Lumiera&#39;s exception hierarchy.
Definition: error.hpp:190
Implementation Base for building Facade Proxy implementations.
lumiera_err lumiera_error(void)
Get and clear current error state.
Definition: error-state.c:115
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:93
Lumiera public interface.
Definition: advice.cpp:104
Process start(LumieraDisplaySlot viewerHandle) override
Experimental Interface Steam-Layer (or maybe the vault?): Global access point for starting a dummy pl...