blob: d2c13df9aa58c62d1c4819d79b193828da2d0506 [file] [log] [blame]
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +00001/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
2 *
3 * This is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This software is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this software; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16 * USA.
17 */
18#ifndef __RFB_SMSGWRITERV3_H__
19#define __RFB_SMSGWRITERV3_H__
20
21#include <rfb/SMsgWriter.h>
22
23namespace rdr { class MemOutStream; }
24
25namespace rfb {
26 class SMsgWriterV3 : public SMsgWriter {
27 public:
28 SMsgWriterV3(ConnParams* cp, rdr::OutStream* os);
29 virtual ~SMsgWriterV3();
30
31 virtual void writeServerInit();
32 virtual void startMsg(int type);
33 virtual void endMsg();
34 virtual bool writeSetDesktopSize();
Peter Åstrandc39e0782009-01-15 12:21:42 +000035 virtual bool writeSetDesktopName();
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +000036 virtual void cursorChange(WriteSetCursorCallback* cb);
37 virtual void writeSetCursor(int width, int height, const Point& hotspot,
38 void* data, void* mask);
39 virtual void writeSetXCursor(int width, int height, int hotspotX,
40 int hotspotY, void* data, void* mask);
41 virtual void writeFramebufferUpdateStart(int nRects);
42 virtual void writeFramebufferUpdateStart();
43 virtual void writeFramebufferUpdateEnd();
44 virtual bool needFakeUpdate();
45 virtual void startRect(const Rect& r, unsigned int encoding);
46 virtual void endRect();
47
48 private:
49 rdr::MemOutStream* updateOS;
50 rdr::OutStream* realOS;
51 int nRectsInUpdate;
52 int nRectsInHeader;
53 WriteSetCursorCallback* wsccb;
54 bool needSetDesktopSize;
Peter Åstrandc39e0782009-01-15 12:21:42 +000055 bool needSetDesktopName;
Constantin Kaplinskya2adc8d2006-05-25 05:01:55 +000056 bool needLastRect;
57 };
58}
59#endif