Ginga  0.13.6
 All Classes Namespaces Functions Variables
IFormatterMultiDevice.h
1 /******************************************************************************
2 Este arquivo eh parte da implementacao do ambiente declarativo do middleware
3 Ginga (Ginga-NCL).
4 
5 Direitos Autorais Reservados (c) 1989-2007 PUC-Rio/Laboratorio TeleMidia
6 
7 Este programa eh software livre; voce pode redistribui-lo e/ou modificah-lo sob
8 os termos da Licenca Publica Geral GNU versao 2 conforme publicada pela Free
9 Software Foundation.
10 
11 Este programa eh distribuido na expectativa de que seja util, porem, SEM
12 NENHUMA GARANTIA; nem mesmo a garantia implicita de COMERCIABILIDADE OU
13 ADEQUACAO A UMA FINALIDADE ESPECIFICA. Consulte a Licenca Publica Geral do
14 GNU versao 2 para mais detalhes.
15 
16 Voce deve ter recebido uma copia da Licenca Publica Geral do GNU versao 2 junto
17 com este programa; se nao, escreva para a Free Software Foundation, Inc., no
18 endereco 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
19 
20 Para maiores informacoes:
21 ncl @ telemidia.puc-rio.br
22 http://www.ncl.org.br
23 http://www.ginga.org.br
24 http://www.telemidia.puc-rio.br
25 ******************************************************************************
26 This file is part of the declarative environment of middleware Ginga (Ginga-NCL)
27 
28 Copyright: 1989-2007 PUC-RIO/LABORATORIO TELEMIDIA, All Rights Reserved.
29 
30 This program is free software; you can redistribute it and/or modify it under
31 the terms of the GNU General Public License version 2 as published by
32 the Free Software Foundation.
33 
34 This program is distributed in the hope that it will be useful, but WITHOUT ANY
35 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
36 PARTICULAR PURPOSE. See the GNU General Public License version 2 for more
37 details.
38 
39 You should have received a copy of the GNU General Public License version 2
40 along with this program; if not, write to the Free Software
41 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
42 
43 For further information contact:
44 ncl @ telemidia.puc-rio.br
45 http://www.ncl.org.br
46 http://www.ginga.org.br
47 http://www.telemidia.puc-rio.br
48 *******************************************************************************/
49 
50 #ifndef _IFormatterMultiDevice_H_
51 #define _IFormatterMultiDevice_H_
52 
53 #include "ncl/layout/IDeviceLayout.h"
54 using namespace ::br::pucrio::telemidia::ncl::layout;
55 
56 #include "player/IPlayer.h"
57 #include "player/IPlayerListener.h"
58 using namespace ::br::pucrio::telemidia::ginga::core::player;
59 
60 #include "gingancl/adaptation/context/IPresentationContext.h"
61 using namespace ::br::pucrio::telemidia::ginga::ncl::adaptation::context;
62 
63 #include "gingancl/focus/IFormatterFocusManager.h"
64 using namespace ::br::pucrio::telemidia::ginga::ncl::focus;
65 
66 #include <string>
67 using namespace std;
68 
69 namespace br {
70 namespace pucrio {
71 namespace telemidia {
72 namespace ginga {
73 namespace ncl {
74 namespace multidevice {
75  class IFormatterMultiDevice : public IPlayerListener {
76  public:
77  virtual ~IFormatterMultiDevice(){};
78 
79  virtual void printGingaWindows()=0;
80  virtual void listenPlayer(IPlayer* player)=0;
81  virtual void stopListenPlayer(IPlayer* player)=0;
82 
83  virtual void setPresentationContex(
84  IPresentationContext* presContext)=0;
85 
86  virtual void setFocusManager(
87  IFormatterFocusManager* focusManager)=0;
88 
89  virtual void setParent(IFormatterMultiDevice* parent)=0;
90  virtual void setBackgroundImage(string uri)=0;
91  virtual void* getMainLayout()=0;
92  virtual void* getFormatterLayout(int devClass)=0;
93  virtual string getScreenShot()=0;
94  virtual string serializeScreen(int devClass, IWindow* mapWindow)=0;
95 
96  protected:
97  virtual bool newDeviceConnected(int newDevClass, int w, int h)=0;
98  virtual void connectedToBaseDevice(unsigned int domainAddr)=0;
99 
100  virtual bool receiveRemoteEvent(
101  int remoteDevClass,
102  int eventType,
103  string eventContent)=0;
104 
105  virtual bool receiveRemoteContent(
106  int remoteDevClass,
107  char *stream, int streamSize)=0;
108 
109  virtual bool receiveRemoteContent(
110  int remoteDevClass,
111  string contentUri)=0;
112 
113  public:
114  virtual void addActiveUris(string baseUri, vector<string>* uris)=0;
115  virtual void updatePassiveDevices()=0;
116 
117  protected:
118  virtual void updateStatus(
119  short code,
120  string parameter,
121  short type,
122  string value)=0;
123  };
124 }
125 }
126 }
127 }
128 }
129 }
130 
131 typedef ::br::pucrio::telemidia::ginga::ncl::multidevice::
132  IFormatterMultiDevice* FormatterMultiDeviceCreator(
133  GingaScreenID screenId,
134  IDeviceLayout* deviceLayout,
135  int devClass,
136  string playerId,
137  int x,
138  int y,
139  int w,
140  int h,
141  bool deviceSearch, int srvPort);
142 
143 typedef void FormatterMultiDeviceDescroyer(
144  ::br::pucrio::telemidia::ginga::ncl::multidevice::
145  IFormatterMultiDevice* fmd);
146 
147 #endif /* _IFormatterMultiDevice_H_ */