xref: /haiku/src/servers/app/ServerPicture.h (revision 1e36cfc2721ef13a187c6f7354dc9cbc485e89d3)
1 #ifndef __SERVER_PICTURE_H
2 #define __SERVER_PICTURE_H
3 
4 #include <DataIO.h>
5 
6 #include <PictureDataWriter.h>
7 
8 #include <PortLink.h>
9 	// TODO: For some reason, the forward declaration "class BPrivate::PortLink" causes compiling errors
10 
11 
12 class ServerApp;
13 class ViewLayer;
14 class BPrivate::LinkReceiver;
15 class ServerPicture : public PictureDataWriter {
16 public:
17 		int32		Token() { return fToken; }
18 
19 		void		EnterStateChange();
20 		void		ExitStateChange();
21 
22 		void		EnterFontChange();
23 		void		ExitFontChange();
24 
25 		void		SyncState(ViewLayer *view);
26 
27 		void		Play(ViewLayer *view);
28 
29 		off_t		DataLength() const;
30 
31 		status_t	ImportData(BPrivate::LinkReceiver &link);
32 		status_t	ExportData(BPrivate::PortLink &link);
33 
34 private:
35 friend class	ServerApp;
36 
37 		ServerPicture();
38 		ServerPicture(const ServerPicture &);
39 		ServerPicture(const char *fileName, const int32 &offset);
40 		~ServerPicture();
41 
42 		int32		fToken;
43 		BPositionIO	*fData;
44 		// DrawState	*fState;
45 };
46 
47 #endif // __SERVER_PICTURE_H
48