FreeRDP-WebConnect WebSockets gateway  1.0.0.167
 All Classes Namespaces Functions Variables Typedefs Enumerations Friends Pages
Primary.hpp
1 /* vim: set et ts=4 sw=4 cindent:
2  *
3  * FreeRDP-WebConnect,
4  * A gateway for seamless access to your RDP-Sessions in any HTML5-compliant browser.
5  *
6  * Copyright 2012 Fritz Elfert <wsgate@fritz-elfert.de>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 #ifndef _WSGATE_PRIMARY_H_
21 #define _WSGATE_PRIMARY_H_
22 
23 namespace wsgate {
24 
29  class Primary {
30 
31  public:
37 
39  virtual ~Primary();
40 
45  void Register(freerdp *rdp);
46 
47  private:
48  wspp::wshandler *m_wshandler;
49 
50  // Non-copyable
51  Primary(const Primary &);
52  Primary & operator=(const Primary &);
53 
54  void DstBlt(rdpContext* context, DSTBLT_ORDER* dstblt);
55  void PatBlt(rdpContext* context, PATBLT_ORDER* patblt);
56  void ScrBlt(rdpContext* context, SCRBLT_ORDER* scrblt);
57  void OpaqueRect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect);
58  void DrawNineGrid(rdpContext* context, DRAW_NINE_GRID_ORDER* draw_nine_grid);
59  void MultiDstBlt(rdpContext* context, MULTI_DSTBLT_ORDER* multi_dstblt);
60  void MultiPatBlt(rdpContext* context, MULTI_PATBLT_ORDER* multi_patblt);
61  void MultiScrBlt(rdpContext* context, MULTI_SCRBLT_ORDER* multi_scrblt);
62  void MultiOpaqueRect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect);
63  void MultiDrawNineGrid(rdpContext* context, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid);
64  void LineTo(rdpContext* context, LINE_TO_ORDER* line_to);
65  void Polyline(rdpContext* context, POLYLINE_ORDER* polyline);
66  void MemBlt(rdpContext* context, MEMBLT_ORDER* memblt);
67  void Mem3Blt(rdpContext* context, MEM3BLT_ORDER* memblt);
68  void SaveBitmap(rdpContext* context, SAVE_BITMAP_ORDER* save_bitmap);
69  void GlyphIndex(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index);
70  void FastIndex(rdpContext* context, FAST_INDEX_ORDER* fast_index);
71  void FastGlyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph);
72  void PolygonSC(rdpContext* context, POLYGON_SC_ORDER* polygon_sc);
73  void PolygonCB(rdpContext* context, POLYGON_CB_ORDER* polygon_cb);
74  void EllipseSC(rdpContext* context, ELLIPSE_SC_ORDER* ellipse_sc);
75  void EllipseCB(rdpContext* context, ELLIPSE_CB_ORDER* ellipse_cb);
76 
77  // Callbacks from C - Must be static in order t be assigned to C fnPtrs.
78  static void cbDstBlt(rdpContext* context, DSTBLT_ORDER* dstblt);
79  static void cbPatBlt(rdpContext* context, PATBLT_ORDER* patblt);
80  static void cbScrBlt(rdpContext* context, SCRBLT_ORDER* scrblt);
81  static void cbOpaqueRect(rdpContext* context, OPAQUE_RECT_ORDER* opaque_rect);
82  static void cbDrawNineGrid(rdpContext* context, DRAW_NINE_GRID_ORDER* draw_nine_grid);
83  static void cbMultiDstBlt(rdpContext* context, MULTI_DSTBLT_ORDER* multi_dstblt);
84  static void cbMultiPatBlt(rdpContext* context, MULTI_PATBLT_ORDER* multi_patblt);
85  static void cbMultiScrBlt(rdpContext* context, MULTI_SCRBLT_ORDER* multi_scrblt);
86  static void cbMultiOpaqueRect(rdpContext* context, MULTI_OPAQUE_RECT_ORDER* multi_opaque_rect);
87  static void cbMultiDrawNineGrid(rdpContext* context, MULTI_DRAW_NINE_GRID_ORDER* multi_draw_nine_grid);
88  static void cbLineTo(rdpContext* context, LINE_TO_ORDER* line_to);
89  static void cbPolyline(rdpContext* context, POLYLINE_ORDER* polyline);
90  static void cbMemBlt(rdpContext* context, MEMBLT_ORDER* memblt);
91  static void cbMem3Blt(rdpContext* context, MEM3BLT_ORDER* memblt);
92  static void cbSaveBitmap(rdpContext* context, SAVE_BITMAP_ORDER* save_bitmap);
93  static void cbGlyphIndex(rdpContext* context, GLYPH_INDEX_ORDER* glyph_index);
94  static void cbFastIndex(rdpContext* context, FAST_INDEX_ORDER* fast_index);
95  static void cbFastGlyph(rdpContext* context, FAST_GLYPH_ORDER* fast_glyph);
96  static void cbPolygonSC(rdpContext* context, POLYGON_SC_ORDER* polygon_sc);
97  static void cbPolygonCB(rdpContext* context, POLYGON_CB_ORDER* polygon_cb);
98  static void cbEllipseSC(rdpContext* context, ELLIPSE_SC_ORDER* ellipse_sc);
99  static void cbEllipseCB(rdpContext* context, ELLIPSE_CB_ORDER* ellipse_cb);
100 
101  };
102 }
103 
104 #endif