Initial commit - from Precise source
[freerdp-ubuntu-pcb-backport.git] / libfreerdp-core / update.h
1 /**
2  * FreeRDP: A Remote Desktop Protocol Client
3  * Update Data PDUs
4  *
5  * Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *     http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19
20 #ifndef __UPDATE_H
21 #define __UPDATE_H
22
23 #include "rdp.h"
24 #include "orders.h"
25 #include <freerdp/types.h>
26 #include <freerdp/update.h>
27 #include <freerdp/freerdp.h>
28 #include <freerdp/utils/stream.h>
29
30 #define UPDATE_TYPE_ORDERS              0x0000
31 #define UPDATE_TYPE_BITMAP              0x0001
32 #define UPDATE_TYPE_PALETTE             0x0002
33 #define UPDATE_TYPE_SYNCHRONIZE         0x0003
34
35 #define BITMAP_COMPRESSION              0x0001
36 #define NO_BITMAP_COMPRESSION_HDR       0x0400
37
38 rdpUpdate* update_new(rdpRdp* rdp);
39 void update_free(rdpUpdate* update);
40 void update_free_bitmap(BITMAP_UPDATE* bitmap_update);
41 void update_reset_state(rdpUpdate* update);
42
43 void update_read_bitmap(rdpUpdate* update, STREAM* s, BITMAP_UPDATE* bitmap_update);
44 void update_read_palette(rdpUpdate* update, STREAM* s, PALETTE_UPDATE* palette_update);
45 void update_recv_play_sound(rdpUpdate* update, STREAM* s);
46 void update_recv_pointer(rdpUpdate* update, STREAM* s);
47 void update_recv(rdpUpdate* update, STREAM* s);
48
49 void update_read_pointer_position(STREAM* s, POINTER_POSITION_UPDATE* pointer_position);
50 void update_read_pointer_system(STREAM* s, POINTER_SYSTEM_UPDATE* pointer_system);
51 void update_read_pointer_color(STREAM* s, POINTER_COLOR_UPDATE* pointer_color);
52 void update_read_pointer_new(STREAM* s, POINTER_NEW_UPDATE* pointer_new);
53 void update_read_pointer_cached(STREAM* s, POINTER_CACHED_UPDATE* pointer_cached);
54
55 void update_register_server_callbacks(rdpUpdate* update);
56
57 #endif /* __UPDATE_H */