├── README.md ├── docs └── FreeRDP.vsd ├── resources ├── FreeRDP.ico ├── FreeRDP-fav.ico ├── FreeRDP_OSX.icns ├── neutrino-labs.xcf ├── FreeRDP_Logo_Icon.ai ├── FreeRDP_Icon_256px.png ├── README.txt └── conv_to_ewm_prop.py ├── server ├── X11 │ ├── rfx_test.pcap │ ├── server.crt │ ├── xf_encode.h │ ├── xf_input.h │ └── xf_peer.h ├── test │ ├── rfx_test.pcap │ ├── server.crt │ └── CMakeLists.txt └── CMakeLists.txt ├── libfreerdp-utils ├── git_ref.sh ├── blob.c ├── string.c └── hexdump.c ├── keymaps ├── ibm ├── empty ├── sgi_vndr │ └── iris ├── CMakeLists.txt └── aliases ├── cmake ├── FindPCSC.cmake ├── FindPulseAudio.cmake ├── GNUInstallDirsWrapper.cmake ├── FindXrandr.cmake ├── FindXmlto.cmake └── FindFFmpeg.cmake ├── freerdp.pc.in ├── libfreerdp-core ├── peer.h ├── listener.h ├── peer.c ├── channel.h ├── pointer.h ├── tpkt.h ├── window.h ├── surface.h └── mppc.h ├── cunit ├── test_list.h ├── test_stream.h ├── test_channels.h ├── test_bitmap.h ├── test_drdynvc.h ├── test_cliprdr.h ├── test_pcap.h ├── test_rail.h ├── test_mppc.h ├── test_mcs.h ├── test_per.h ├── test_ber.h ├── test_utils.h ├── test_license.h ├── test_color.h ├── test_librfx.h ├── test_gcc.h ├── test_freerdp.h └── test_libgdi.h ├── channels ├── rdpdr │ ├── printer │ │ ├── printer_cups.h │ │ └── CMakeLists.txt │ ├── irp.h │ ├── rdpdr_capabilities.h │ ├── devman.h │ ├── parallel │ │ └── CMakeLists.txt │ ├── disk │ │ └── CMakeLists.txt │ ├── serial │ │ └── CMakeLists.txt │ ├── rdpdr_main.h │ ├── smartcard │ │ ├── CMakeLists.txt │ │ └── scard_main.h │ └── CMakeLists.txt ├── tcutils │ └── CMakeLists.txt ├── drdynvc │ ├── tsmf │ │ ├── tsmf_codec.h │ │ ├── tsmf_main.h │ │ ├── alsa │ │ │ └── CMakeLists.txt │ │ ├── pulse │ │ │ └── CMakeLists.txt │ │ ├── tsmf_types.h │ │ ├── ffmpeg │ │ │ └── CMakeLists.txt │ │ └── CMakeLists.txt │ ├── drdynvc_main.h │ ├── drdynvc_types.h │ ├── CMakeLists.txt │ ├── audin │ │ ├── alsa │ │ │ └── CMakeLists.txt │ │ ├── pulse │ │ │ └── CMakeLists.txt │ │ └── CMakeLists.txt │ └── dvcman.h ├── xrdpvr │ ├── CMakeLists.txt │ ├── alsa │ │ └── CMakeLists.txt │ ├── xrdpvr_main.h │ └── xrdpvr_player.h ├── rdpdbg │ └── CMakeLists.txt ├── rail │ └── CMakeLists.txt ├── CMakeLists.txt ├── cliprdr │ ├── CMakeLists.txt │ └── cliprdr_format.h └── rdpsnd │ ├── CMakeLists.txt │ ├── alsa │ └── CMakeLists.txt │ └── pulse │ └── CMakeLists.txt ├── client ├── X11 │ ├── xf_graphics.h │ ├── xf_gdi.h │ ├── xf_tsmf.h │ ├── xf_event.h │ ├── xf_rail.h │ ├── xf_monitor.h │ ├── xf_keyboard.h │ └── xf_cliprdr.h ├── DirectFB │ ├── df_graphics.h │ ├── df_event.h │ └── CMakeLists.txt ├── test │ └── CMakeLists.txt ├── Windows │ ├── wf_gdi.h │ ├── wf_graphics.h │ ├── wf_event.h │ └── CMakeLists.txt └── CMakeLists.txt ├── include ├── freerdp │ ├── utils │ │ ├── print.h │ │ ├── bitmap.h │ │ ├── hexdump.h │ │ ├── passphrase.h │ │ ├── event.h │ │ ├── sleep.h │ │ ├── blob.h │ │ ├── mutex.h │ │ ├── semaphore.h │ │ ├── signal.h │ │ ├── string.h │ │ ├── rect.h │ │ ├── wait_obj.h │ │ ├── load_plugin.h │ │ ├── dsp.h │ │ ├── debug.h │ │ ├── list.h │ │ ├── stopwatch.h │ │ ├── memory.h │ │ ├── rail.h │ │ ├── file.h │ │ ├── args.h │ │ └── unicode.h │ ├── codec │ │ ├── jpeg.h │ │ └── bitmap.h │ ├── gdi │ │ ├── palette.h │ │ ├── pen.h │ │ ├── clipping.h │ │ ├── brush.h │ │ ├── dc.h │ │ ├── drawing.h │ │ ├── line.h │ │ ├── 8bpp.h │ │ ├── 16bpp.h │ │ ├── 32bpp.h │ │ └── shape.h │ ├── kbd │ │ └── kbd.h │ └── cache │ │ └── cache.h └── CMakeLists.txt ├── libfreerdp-codec ├── rfx_dwt.h ├── rfx_sse2.h ├── rfx_differential.h ├── rfx_quantization.h ├── rfx_rlgr.h ├── rfx_neon.h ├── rfx_decode.h ├── rfx_encode.h ├── rfx_pool.h └── rfx_differential.c ├── .gitignore ├── libfreerdp-gdi ├── gdi.h ├── graphics.h └── CMakeLists.txt ├── libfreerdp-kbd ├── libkbd.h ├── x_layout_id_table.h └── layouts_xkb.h ├── libfreerdp-rail ├── librail.h └── CMakeLists.txt ├── libfreerdp-channels ├── libchannels.h └── CMakeLists.txt ├── README ├── libfreerdp-cache └── CMakeLists.txt └── config.h.in /README.md: -------------------------------------------------------------------------------- 1 | NeutrinoRDP 2 | =========== 3 | 4 | This is a fork of FreeRDP 1.0.1 -------------------------------------------------------------------------------- /docs/FreeRDP.vsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/docs/FreeRDP.vsd -------------------------------------------------------------------------------- /resources/FreeRDP.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/resources/FreeRDP.ico -------------------------------------------------------------------------------- /server/X11/rfx_test.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/server/X11/rfx_test.pcap -------------------------------------------------------------------------------- /resources/FreeRDP-fav.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/resources/FreeRDP-fav.ico -------------------------------------------------------------------------------- /resources/FreeRDP_OSX.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/resources/FreeRDP_OSX.icns -------------------------------------------------------------------------------- /server/test/rfx_test.pcap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/server/test/rfx_test.pcap -------------------------------------------------------------------------------- /resources/neutrino-labs.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/resources/neutrino-labs.xcf -------------------------------------------------------------------------------- /resources/FreeRDP_Logo_Icon.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/resources/FreeRDP_Logo_Icon.ai -------------------------------------------------------------------------------- /resources/FreeRDP_Icon_256px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neutrinolabs/NeutrinoRDP/HEAD/resources/FreeRDP_Icon_256px.png -------------------------------------------------------------------------------- /libfreerdp-utils/git_ref.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "#define GIT_REF \"`git show-ref refs/heads/master | cut -d " " -f 1 | cut -c 31-40`\"" > git_ref.h 3 | -------------------------------------------------------------------------------- /keymaps/ibm: -------------------------------------------------------------------------------- 1 | # This file was generated with xkb.pl (Wed Aug 11 09:09:10 2010) 2 | # and is based on the X Keyboard Configuration Database version 1.9 3 | # Please use xkb.pl to re-export newer versions of XKB 4 | 5 | 6 | -------------------------------------------------------------------------------- /keymaps/empty: -------------------------------------------------------------------------------- 1 | # This file was generated with xkb.pl (Wed Aug 11 09:09:10 2010) 2 | # and is based on the X Keyboard Configuration Database version 1.9 3 | # Please use xkb.pl to re-export newer versions of XKB 4 | 5 | 6 | keyboard "empty" 7 | { 8 | }; 9 | 10 | keyboard "empty" 11 | { 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /keymaps/sgi_vndr/iris: -------------------------------------------------------------------------------- 1 | # This file was generated with xkb.pl (Wed Aug 11 09:09:10 2010) 2 | # and is based on the X Keyboard Configuration Database version 1.9 3 | # Please use xkb.pl to re-export newer versions of XKB 4 | 5 | 6 | keyboard "iris" 7 | : extends "sgi_vndr/indigo(pc101)" 8 | { 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /keymaps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | install(FILES aliases amiga ataritt empty evdev fujitsu hp ibm macintosh macosx sony sun xfree86 xfree98 xkb.pl DESTINATION share/freerdp/keymaps) 2 | install(DIRECTORY digital_vndr DESTINATION share/freerdp/keymaps FILES_MATCHING PATTERN "*") 3 | install(DIRECTORY sgi_vndr DESTINATION share/freerdp/keymaps FILES_MATCHING PATTERN "*") 4 | -------------------------------------------------------------------------------- /keymaps/aliases: -------------------------------------------------------------------------------- 1 | # This file was generated with xkb.pl (Wed Aug 11 09:09:10 2010) 2 | # and is based on the X Keyboard Configuration Database version 1.9 3 | # Please use xkb.pl to re-export newer versions of XKB 4 | 5 | 6 | keyboard "qwerty" 7 | { 8 | }; 9 | 10 | keyboard "azerty" 11 | { 12 | }; 13 | 14 | keyboard "qwertz" 15 | { 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /resources/README.txt: -------------------------------------------------------------------------------- 1 | 2 | To create an image that is displayed as the NeutrinoRDP icon: 3 | 4 | 1) The image must be 256x256 pixels 5 | 2) Preferably have a transparent background 6 | 3) Must be PNG format 7 | 4) Filename must be FreeRDP_Icon_256px.png 8 | 5) run the following command 9 | 10 | python ./conv_to_ewm_prop.py FreeRDP_Icon_256px.png FreeRDP_Icon_256px.h 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /cmake/FindPCSC.cmake: -------------------------------------------------------------------------------- 1 | include(FindPkgConfig) 2 | 3 | if (PKG_CONFIG_FOUND) 4 | pkg_check_modules(PCSC libpcsclite) 5 | endif() 6 | 7 | find_path(PCSC_INCLUDE_DIR pcsclite.h PATHS ${PCSC_INCLUDE_DIRS} 8 | PATH_SUFFIXES PCSC ) 9 | find_library(PCSC_LIBRARY pcsclite PATHS ${PCSC_LIBRARY_DIRS}) 10 | 11 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC DEFAULT_MSG PCSC_INCLUDE_DIR PCSC_LIBRARY) 12 | 13 | mark_as_advanced(PCSC_INCLUDE_DIR PCSC_LIBRARY) 14 | -------------------------------------------------------------------------------- /cmake/FindPulseAudio.cmake: -------------------------------------------------------------------------------- 1 | include(FindPkgConfig) 2 | 3 | if (PKG_CONFIG_FOUND) 4 | pkg_check_modules(PULSEAUDIO libpulse) 5 | endif() 6 | 7 | find_path(PULSEAUDIO_INCLUDE_DIR pulseaudio.h PATHS ${PULSEAUDIO_INCLUDE_DIRS} PATH_SUFFIXES pulse ) 8 | find_library(PULSEAUDIO_LIBRARY pulse PATHS ${PULSEAUDIO_LIBRARY_DIRS}) 9 | 10 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(PulseAudio DEFAULT_MSG PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY) 11 | 12 | mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY) 13 | -------------------------------------------------------------------------------- /freerdp.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=@CMAKE_INSTALL_PREFIX@ 3 | libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ 4 | includedir=@CMAKE_INSTALL_PREFIX@/include 5 | 6 | Name: FreeRDP 7 | Description: A free remote desktop protocol client 8 | URL: http://www.freerdp.com/ 9 | Version: @FREERDP_VERSION_FULL@ 10 | Requires: 11 | Libs: -L${libdir} -lfreerdp-core -lfreerdp-codec -lfreerdp-gdi -lfreerdp-kbd -lfreerdp-rail -lfreerdp-channels -lfreerdp-utils 12 | Cflags: -I${includedir} 13 | 14 | -------------------------------------------------------------------------------- /cmake/GNUInstallDirsWrapper.cmake: -------------------------------------------------------------------------------- 1 | # GNUInstallDirs is a relatively new cmake module, so wrap it to avoid errors 2 | include(GNUInstallDirs OPTIONAL RESULT_VARIABLE GID_PATH) 3 | if(GID_PATH STREQUAL "NOTFOUND") 4 | if(NOT DEFINED CMAKE_INSTALL_BINDIR) 5 | set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)") 6 | endif() 7 | 8 | if(NOT DEFINED CMAKE_INSTALL_LIBDIR) 9 | set(CMAKE_INSTALL_LIBDIR "lib${LIB_SUFFIX}" CACHE PATH "object code libraries (lib)") 10 | endif() 11 | 12 | mark_as_advanced(CMAKE_INSTALL_BINDIR CMAKE_INSTALL_LIBDIR) 13 | endif() 14 | -------------------------------------------------------------------------------- /cmake/FindXrandr.cmake: -------------------------------------------------------------------------------- 1 | 2 | find_path(XRANDR_INCLUDE_DIR NAMES X11/extensions/Xrandr.h 3 | PATH_SUFFIXES X11/extensions 4 | DOC "The Xrandr include directory" 5 | ) 6 | 7 | find_library(XRANDR_LIBRARY NAMES Xrandr 8 | DOC "The Xrandr library" 9 | ) 10 | 11 | include(FindPackageHandleStandardArgs) 12 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xrandr DEFAULT_MSG XRANDR_LIBRARY XRANDR_INCLUDE_DIR) 13 | 14 | if(XRANDR_FOUND) 15 | set( XRANDR_LIBRARIES ${XRANDR_LIBRARY} ) 16 | set( XRANDR_INCLUDE_DIRS ${XRANDR_INCLUDE_DIR} ) 17 | endif() 18 | 19 | mark_as_advanced(XRANDR_INCLUDE_DIR XRANDR_LIBRARY) 20 | 21 | -------------------------------------------------------------------------------- /libfreerdp-core/peer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RDP Server Peer 4 | * 5 | * Copyright 2011 Vic Lee 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 __PEER 21 | #define __PEER 22 | 23 | #include "rdp.h" 24 | #include 25 | 26 | #endif /* __PEER */ 27 | 28 | -------------------------------------------------------------------------------- /cunit/test_list.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * List Unit Tests 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "test_freerdp.h" 21 | 22 | int init_list_suite(void); 23 | int clean_list_suite(void); 24 | int add_list_suite(void); 25 | 26 | void test_list(void); 27 | -------------------------------------------------------------------------------- /cunit/test_stream.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Stream Unit Tests 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "test_freerdp.h" 21 | 22 | int init_stream_suite(void); 23 | int clean_stream_suite(void); 24 | int add_stream_suite(void); 25 | 26 | void test_stream(void); 27 | -------------------------------------------------------------------------------- /cunit/test_channels.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Channel Manager Unit Tests 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "test_freerdp.h" 21 | 22 | int init_chanman_suite(void); 23 | int clean_chanman_suite(void); 24 | int add_chanman_suite(void); 25 | 26 | void test_chanman(void); 27 | -------------------------------------------------------------------------------- /cunit/test_bitmap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Bitmap Unit Tests 4 | * 5 | * Copyright 2011 Jay Sorg 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 | #include "test_freerdp.h" 21 | 22 | int init_bitmap_suite(void); 23 | int clean_bitmap_suite(void); 24 | int add_bitmap_suite(void); 25 | 26 | void test_bitmap(void); 27 | -------------------------------------------------------------------------------- /cunit/test_drdynvc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Dynamic Virtual Channel Unit Tests 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "test_freerdp.h" 21 | 22 | int init_drdynvc_suite(void); 23 | int clean_drdynvc_suite(void); 24 | int add_drdynvc_suite(void); 25 | 26 | void test_drdynvc(void); 27 | -------------------------------------------------------------------------------- /cunit/test_cliprdr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Clipboard Virtual Channel Unit Tests 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "test_freerdp.h" 21 | 22 | int init_cliprdr_suite(void); 23 | int clean_cliprdr_suite(void); 24 | int add_cliprdr_suite(void); 25 | 26 | void test_cliprdr(void); 27 | -------------------------------------------------------------------------------- /cunit/test_pcap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * pcap File Format Unit Tests 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_pcap_suite(void); 23 | int clean_pcap_suite(void); 24 | int add_pcap_suite(void); 25 | 26 | void test_pcap(void); 27 | -------------------------------------------------------------------------------- /channels/rdpdr/printer/printer_cups.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Print Virtual Channel - CUPS driver 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __PRINTER_CUPS_H 21 | #define __PRINTER_CUPS_H 22 | 23 | #include "printer_main.h" 24 | 25 | rdpPrinterDriver* printer_cups_get_driver(void); 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /cunit/test_rail.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRDP: A Remote Desktop Protocol client. 3 | RAIL(TS RemoteApp) Virtual Channel Unit Tests 4 | 5 | Copyright 2011 Roman Barabanov 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 | #include "test_freerdp.h" 21 | 22 | int init_rail_suite(void); 23 | int clean_rail_suite(void); 24 | int add_rail_suite(void); 25 | 26 | void test_rail_plugin(void); 27 | -------------------------------------------------------------------------------- /client/X11/xf_graphics.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Graphical Objects 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_GRAPHICS_H 21 | #define __XF_GRAPHICS_H 22 | 23 | #include "xfreerdp.h" 24 | 25 | void xf_register_graphics(rdpGraphics* graphics); 26 | 27 | #endif /* __XF_GRAPHICS_H */ 28 | -------------------------------------------------------------------------------- /cunit/test_mppc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Microsoft Point to Point compression (MPPC) Unit Tests 4 | * 5 | * Copyright 2011 Laxmikant Rashinkar 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 | #include "test_freerdp.h" 21 | 22 | int init_mppc_suite(void); 23 | int clean_mppc_suite(void); 24 | int add_mppc_suite(void); 25 | 26 | void test_mppc(void); 27 | -------------------------------------------------------------------------------- /include/freerdp/utils/print.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Print Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __PRINT_UTILS_H 21 | #define __PRINT_UTILS_H 22 | 23 | #include 24 | 25 | #ifdef _WIN32 26 | #define snprintf sprintf_s 27 | #endif 28 | 29 | #endif /* __PRINT_UTILS_H */ 30 | -------------------------------------------------------------------------------- /client/DirectFB/df_graphics.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * DirectFB Graphical Objects 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __DF_GRAPHICS_H 21 | #define __DF_GRAPHICS_H 22 | 23 | #include "dfreerdp.h" 24 | 25 | void df_register_graphics(rdpGraphics* graphics); 26 | 27 | #endif /* __DF_GRAPHICS_H */ 28 | -------------------------------------------------------------------------------- /client/X11/xf_gdi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 GDI 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_GDI_H 21 | #define __XF_GDI_H 22 | 23 | #include 24 | 25 | #include "xfreerdp.h" 26 | 27 | void xf_gdi_register_update_callbacks(rdpUpdate* update); 28 | 29 | #endif /* __XF_GDI_H */ 30 | -------------------------------------------------------------------------------- /channels/rdpdr/irp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * File System Virtual Channel 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 6 | * Copyright 2010-2011 Vic Lee 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 | 21 | #ifndef __IRP_H 22 | #define __IRP_H 23 | 24 | #include "rdpdr_types.h" 25 | 26 | IRP* irp_new(DEVMAN* devman, STREAM* data_in); 27 | 28 | #endif /* __IRP_H */ 29 | -------------------------------------------------------------------------------- /include/freerdp/codec/jpeg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Compressed Bitmap 4 | * 5 | * Copyright 2012-2013 Jay Sorg 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 __JPEG_H 21 | #define __JPEG_H 22 | 23 | #include 24 | 25 | boolean 26 | jpeg_decompress(uint8* input, uint8* output, int width, int height, int size, int bpp); 27 | 28 | #endif /* __BITMAP_H */ 29 | -------------------------------------------------------------------------------- /cunit/test_mcs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * T.125 Multipoint Communication Service (MCS) Protocol Unit Tests 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_mcs_suite(void); 23 | int clean_mcs_suite(void); 24 | int add_mcs_suite(void); 25 | 26 | void test_mcs_write_connect_initial(void); 27 | -------------------------------------------------------------------------------- /channels/tcutils/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set(TCUTILS_SRCS 17 | tcutils_main.c) 18 | 19 | include_directories(../drdynvc) 20 | 21 | add_library(tcutils ${TCUTILS_SRCS}) 22 | set_target_properties(tcutils PROPERTIES PREFIX "") 23 | 24 | target_link_libraries(tcutils freerdp-utils) 25 | 26 | install(TARGETS tcutils DESTINATION ${FREERDP_PLUGIN_PATH}) 27 | 28 | -------------------------------------------------------------------------------- /client/DirectFB/df_event.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * DirectFB Event Handling 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __DF_EVENT_H 21 | #define __DF_EVENT_H 22 | 23 | #include "dfreerdp.h" 24 | 25 | void df_keyboard_init(); 26 | tbool df_event_process(freerdp* instance, DFBEvent* event); 27 | 28 | #endif /* __DF_EVENT_H */ 29 | -------------------------------------------------------------------------------- /cunit/test_per.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Packed Encoding Rules (PER) Unit Tests 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_per_suite(void); 23 | int clean_per_suite(void); 24 | int add_per_suite(void); 25 | 26 | void test_per_write_length(void); 27 | void test_per_write_object_identifier(void); 28 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_dwt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - DWT 4 | * 5 | * Copyright 2011 Vic Lee 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 __RFX_DWT_H 21 | #define __RFX_DWT_H 22 | 23 | #include 24 | 25 | void rfx_dwt_2d_decode(sint16* buffer, sint16* dwt_buffer); 26 | void rfx_dwt_2d_encode(sint16* buffer, sint16* dwt_buffer); 27 | 28 | #endif /* __RFX_DWT_H */ 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # CMake 2 | CMakeFiles/ 3 | CMakeScripts/ 4 | CMakeCache.txt 5 | config.h 6 | install_manifest.txt 7 | CTestTestfile.cmake 8 | freerdp.pc 9 | Makefile 10 | Testing 11 | cmake_install.cmake 12 | CPackConfig.cmake 13 | CPackSourceConfig.cmake 14 | DartConfiguration.tcl 15 | 16 | # Eclipse 17 | *.project 18 | *.cproject 19 | *.settings 20 | 21 | # Documentation 22 | docs/api 23 | client/X11/xfreerdp.1 24 | 25 | # Mac OS X 26 | .DS_Store 27 | *.xcodeproj/ 28 | 29 | # Windows 30 | *.vcxproj 31 | *.vcxproj.* 32 | *.vcproj 33 | *.vcproj.* 34 | *.sdf 35 | *.sln 36 | *.suo 37 | *.ncb 38 | *.opensdf 39 | ipch 40 | Debug 41 | RelWithDebInfo 42 | 43 | # Binaries 44 | *.a 45 | *.so 46 | *.so.* 47 | *.dylib 48 | cunit/test_freerdp 49 | client/X11/xfreerdp 50 | client/Mac/xcode 51 | client/Sample/sfreerdp 52 | client/DirectFB/dfreerdp 53 | server/Sample/sfreerdp-server 54 | server/X11/xfreerdp-server 55 | xcode 56 | 57 | # Other 58 | *~ 59 | *.dir 60 | Release 61 | Win32 62 | 63 | default.log 64 | *Amplifier XE* 65 | *Inspector XE* 66 | -------------------------------------------------------------------------------- /client/X11/xf_tsmf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Video Redirection 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __XF_TSMF_H 21 | #define __XF_TSMF_H 22 | 23 | #include "xfreerdp.h" 24 | 25 | void xf_tsmf_init(xfInfo* xfi, long xv_port); 26 | void xf_tsmf_uninit(xfInfo* xfi); 27 | void xf_process_tsmf_event(xfInfo* xfi, RDP_EVENT* event); 28 | 29 | #endif /* __XF_TSMF_H */ 30 | -------------------------------------------------------------------------------- /channels/drdynvc/tsmf/tsmf_codec.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Video Redirection Virtual Channel - Codec 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __TSMF_CODEC 21 | #define __TSMF_CODEC 22 | 23 | #include "tsmf_types.h" 24 | 25 | boolean tsmf_codec_parse_media_type(TS_AM_MEDIA_TYPE* mediatype, STREAM* s); 26 | boolean tsmf_codec_check_media_type(STREAM* s); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /include/freerdp/utils/bitmap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Bitmap File Format Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __UTILS_BITMAP_H 21 | #define __UTILS_BITMAP_H 22 | 23 | #include 24 | 25 | FREERDP_API void freerdp_bitmap_write(char* filename, void* data, int width, int height, int bpp); 26 | 27 | #endif /* __UTILS_BITMAP_H */ 28 | -------------------------------------------------------------------------------- /include/freerdp/utils/hexdump.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Hex Dump Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __UTILS_HEXDUMP_H 21 | #define __UTILS_HEXDUMP_H 22 | 23 | #include 24 | 25 | #define FREERDP_HEXDUMP_LINE_LENGTH 16 26 | 27 | FREERDP_API void freerdp_hexdump(uint8* data, int length); 28 | 29 | #endif /* __UTILS_HEXDUMP_H */ 30 | -------------------------------------------------------------------------------- /libfreerdp-gdi/gdi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Library 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_CORE_H 21 | #define __GDI_CORE_H 22 | 23 | #include "graphics.h" 24 | 25 | gdiBitmap* gdi_bitmap_new_ex(rdpGdi* gdi, int width, int height, int bpp, uint8* data); 26 | void gdi_bitmap_free_ex(gdiBitmap* gdi_bmp); 27 | 28 | #endif /* __GDI_CORE_H */ 29 | -------------------------------------------------------------------------------- /include/freerdp/utils/passphrase.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Passphrase Handling Utils 4 | * 5 | * Copyright 2011 Shea Levy 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 __UTILS_PASSPHRASE_H 21 | #define __UTILS_PASSPHRASE_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API char* freerdp_passphrase_read(const char* prompt, char* buf, size_t bufsiz); 27 | 28 | #endif /* __UTILS_PASSPHRASE_H */ 29 | -------------------------------------------------------------------------------- /cunit/test_ber.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Basic Encoding Rules (BER) Unit Tests 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_ber_suite(void); 23 | int clean_ber_suite(void); 24 | int add_ber_suite(void); 25 | 26 | void test_ber_write_length(void); 27 | void test_ber_write_universal_tag(void); 28 | void test_ber_write_application_tag(void); 29 | -------------------------------------------------------------------------------- /libfreerdp-core/listener.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RDP Server Listener 4 | * 5 | * Copyright 2011 Vic Lee 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 __LISTENER_H 21 | #define __LISTENER_H 22 | 23 | typedef struct rdp_listener rdpListener; 24 | 25 | #include "rdp.h" 26 | #include 27 | 28 | struct rdp_listener 29 | { 30 | freerdp_listener* instance; 31 | 32 | int sockfds[5]; 33 | int num_sockfds; 34 | }; 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_sse2.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - SSE2 Optimizations 4 | * 5 | * Copyright 2011 Stephen Erisman 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 __RFX_SSE2_H 21 | #define __RFX_SSE2_H 22 | 23 | #include 24 | 25 | void rfx_init_sse2(RFX_CONTEXT* context); 26 | 27 | #ifndef RFX_INIT_SIMD 28 | #define RFX_INIT_SIMD(_rfx_context) rfx_init_sse2(_rfx_context) 29 | #endif 30 | 31 | #endif /* __RFX_SSE2_H */ 32 | -------------------------------------------------------------------------------- /libfreerdp-core/peer.c: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RDP Server Peer 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "peer.h" 21 | 22 | void freerdp_peer_context_new(freerdp_peer* client) 23 | { 24 | } 25 | 26 | void freerdp_peer_context_free(freerdp_peer* client) 27 | { 28 | } 29 | 30 | freerdp_peer* freerdp_peer_new(int sockfd) 31 | { 32 | return 0; 33 | } 34 | 35 | void freerdp_peer_free(freerdp_peer* client) 36 | { 37 | } 38 | 39 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_differential.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - Differential Encoding 4 | * 5 | * Copyright 2011 Vic Lee 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 __RFX_DIFFERENTIAL_H 21 | #define __RFX_DIFFERENTIAL_H 22 | 23 | #include 24 | 25 | void rfx_differential_decode(sint16* buffer, int buffer_size); 26 | void rfx_differential_encode(sint16* buffer, int buffer_size); 27 | 28 | #endif /* __RFX_DIFFERENTIAL_H */ 29 | -------------------------------------------------------------------------------- /channels/drdynvc/tsmf/tsmf_main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Video Redirection Virtual Channel 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __TSMF_MAIN_H 21 | #define __TSMF_MAIN_H 22 | 23 | void tsmf_playback_ack(IWTSVirtualChannelCallback* pChannelCallback, 24 | uint32 message_id, uint64 duration, uint32 data_size); 25 | boolean tsmf_push_event(IWTSVirtualChannelCallback* pChannelCallback, 26 | RDP_EVENT* event); 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /include/freerdp/gdi/palette.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Palette Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_PALETTE_H 21 | #define __GDI_PALETTE_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API HGDI_PALETTE gdi_CreatePalette(HGDI_PALETTE palette); 27 | FREERDP_API HGDI_PALETTE gdi_GetSystemPalette(); 28 | 29 | #endif /* __GDI_PALETTE_H */ 30 | -------------------------------------------------------------------------------- /libfreerdp-core/channel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Virtual Channels 4 | * 5 | * Copyright 2011 Vic Lee 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 __CHANNEL_H 21 | #define __CHANNEL_H 22 | 23 | tbool freerdp_channel_send(rdpRdp* rdp, uint16 channel_id, uint8* data, int size); 24 | void freerdp_channel_process(freerdp* instance, STREAM* s, uint16 channel_id); 25 | void freerdp_channel_peer_process(freerdp_peer* client, STREAM* s, uint16 channel_id); 26 | 27 | #endif /* __CHANNEL_H */ 28 | -------------------------------------------------------------------------------- /server/X11/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICyzCCAbOgAwIBAgIJANbqtAWwlQZuMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV 3 | BAMTB0ZyZWVSRFAwHhcNMDkxMDI5MDA0MTQ5WhcNMDkxMTI4MDA0MTQ5WjASMRAw 4 | DgYDVQQDEwdGcmVlUkRQMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA 5 | q7mxFgRbS2FYJZX7BzpNd4T/n4nEVDBY6YaObLjGpaB1TptzXTcmfDrDslTGwcEY 6 | hTFAC4ZvY6yOURExqbph4LSgvkoa6J722RjVPfshGa4mlh2SXvTiaV26VPPxddGb 7 | o6fbs2u029lbtBlpIVbhx5RN9vstNkll26oSZ6wfEdBNHQJLd2SU4ItWHj8zjz1f 8 | eGxjgChHihUlwcBYKDJsKFkzHZmLrMgB37KsGlXi/WV+eEsjgvz4yP7I3TL8+GsN 9 | MjV8fRGVEKTbKSmgunO67d5u+IaqUQb0Ad1ha1jzDQ+a6hdymrulJSIhoOVfKkwi 10 | ptTe43FgwxVRIygJP9HjHQIDAQABoyQwIjATBgNVHSUEDDAKBggrBgEFBQcDATAL 11 | BgNVHQ8EBAMCBDAwDQYJKoZIhvcNAQEFBQADggEBAIOdEDhOX2kbl02znltd9hCr 12 | nV4kRPKm979RKwBNkrEuwYSlcsjAHg5MZ5itH3wFOUo2s5pjt7/vMOAg+6rOBbIa 13 | nqr22/gKBtOmuaJLG1yjxDC2vfez7f3B26pKgxa/krM8oxiFdT9n8QbdxdkN7/D9 14 | 3RLU/aCfgrMzXxRus7eq3kR00jnSs6ggnAfE1E9gric3vFgr1wCzdcriRXmXDfUb 15 | hRq+4VG+ZWk16TwCofV5GVU39XWCv5HNO2swAdjkNXgI5e3tQbV3wWLZLqqYzBco 16 | iWulAXtoCGmE81+u1Ms7hLLzpXitLZSGPu1r+sDdkKPLCmOvkAaljDQ4nBz7fIA= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /server/test/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICyzCCAbOgAwIBAgIJANbqtAWwlQZuMA0GCSqGSIb3DQEBBQUAMBIxEDAOBgNV 3 | BAMTB0ZyZWVSRFAwHhcNMDkxMDI5MDA0MTQ5WhcNMDkxMTI4MDA0MTQ5WjASMRAw 4 | DgYDVQQDEwdGcmVlUkRQMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA 5 | q7mxFgRbS2FYJZX7BzpNd4T/n4nEVDBY6YaObLjGpaB1TptzXTcmfDrDslTGwcEY 6 | hTFAC4ZvY6yOURExqbph4LSgvkoa6J722RjVPfshGa4mlh2SXvTiaV26VPPxddGb 7 | o6fbs2u029lbtBlpIVbhx5RN9vstNkll26oSZ6wfEdBNHQJLd2SU4ItWHj8zjz1f 8 | eGxjgChHihUlwcBYKDJsKFkzHZmLrMgB37KsGlXi/WV+eEsjgvz4yP7I3TL8+GsN 9 | MjV8fRGVEKTbKSmgunO67d5u+IaqUQb0Ad1ha1jzDQ+a6hdymrulJSIhoOVfKkwi 10 | ptTe43FgwxVRIygJP9HjHQIDAQABoyQwIjATBgNVHSUEDDAKBggrBgEFBQcDATAL 11 | BgNVHQ8EBAMCBDAwDQYJKoZIhvcNAQEFBQADggEBAIOdEDhOX2kbl02znltd9hCr 12 | nV4kRPKm979RKwBNkrEuwYSlcsjAHg5MZ5itH3wFOUo2s5pjt7/vMOAg+6rOBbIa 13 | nqr22/gKBtOmuaJLG1yjxDC2vfez7f3B26pKgxa/krM8oxiFdT9n8QbdxdkN7/D9 14 | 3RLU/aCfgrMzXxRus7eq3kR00jnSs6ggnAfE1E9gric3vFgr1wCzdcriRXmXDfUb 15 | hRq+4VG+ZWk16TwCofV5GVU39XWCv5HNO2swAdjkNXgI5e3tQbV3wWLZLqqYzBco 16 | iWulAXtoCGmE81+u1Ms7hLLzpXitLZSGPu1r+sDdkKPLCmOvkAaljDQ4nBz7fIA= 17 | -----END CERTIFICATE----- 18 | -------------------------------------------------------------------------------- /include/freerdp/utils/event.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Events 4 | * 5 | * Copyright 2011 Vic Lee 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 __EVENT_UTILS_H 21 | #define __EVENT_UTILS_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API RDP_EVENT* freerdp_event_new(uint16 event_class, uint16 event_type, 27 | RDP_EVENT_CALLBACK on_event_free_callback, void* user_data); 28 | FREERDP_API void freerdp_event_free(RDP_EVENT* event); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /cunit/test_utils.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Utils Unit Tests 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "test_freerdp.h" 21 | 22 | int init_utils_suite(void); 23 | int clean_utils_suite(void); 24 | int add_utils_suite(void); 25 | 26 | void test_mutex(void); 27 | void test_semaphore(void); 28 | void test_load_plugin(void); 29 | void test_wait_obj(void); 30 | void test_args(void); 31 | void test_passphrase_read(void); 32 | void test_handle_signals(void); 33 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_quantization.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - Quantization 4 | * 5 | * Copyright 2011 Vic Lee 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 __RFX_QUANTIZATION_H 21 | #define __RFX_QUANTIZATION_H 22 | 23 | #include 24 | 25 | void rfx_quantization_decode(sint16* buffer, const uint32* quantization_values); 26 | void rfx_quantization_encode(sint16* buffer, const uint32* quantization_values); 27 | 28 | #endif /* __RFX_QUANTIZATION_H */ 29 | -------------------------------------------------------------------------------- /server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP Servers 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | # Servers 21 | 22 | if(NOT WIN32) 23 | 24 | # Build Test Server 25 | add_subdirectory(test) 26 | 27 | # Build X11 Server 28 | find_suggested_package(X11) 29 | if(WITH_X11) 30 | add_subdirectory(X11) 31 | endif() 32 | 33 | endif() 34 | -------------------------------------------------------------------------------- /channels/drdynvc/drdynvc_main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Dynamic Virtual Channel 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __DRDYNVC_MAIN_H 21 | #define __DRDYNVC_MAIN_H 22 | 23 | #include 24 | 25 | typedef struct drdynvc_plugin drdynvcPlugin; 26 | 27 | int drdynvc_write_data(drdynvcPlugin* plugin, uint32 ChannelId, uint8* data, uint32 data_size); 28 | int drdynvc_push_event(drdynvcPlugin* plugin, RDP_EVENT* event); 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /client/X11/xf_event.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Event Handling 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_EVENT_H 21 | #define __XF_EVENT_H 22 | 23 | #include "xf_keyboard.h" 24 | 25 | #include "xfreerdp.h" 26 | 27 | boolean xf_event_process(freerdp* instance, XEvent* event); 28 | void xf_event_SendClientEvent(xfInfo *xfi, xfWindow* window, Atom atom, unsigned int numArgs, ...); 29 | 30 | #endif /* __XF_EVENT_H */ 31 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_rlgr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - RLGR 4 | * 5 | * Copyright 2011 Vic Lee 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 __RFX_RLGR_H 21 | #define __RFX_RLGR_H 22 | 23 | #include 24 | 25 | int rfx_rlgr_decode(RLGR_MODE mode, const uint8* data, int data_size, sint16* buffer, int buffer_size); 26 | int rfx_rlgr_encode(RLGR_MODE mode, const sint16* data, int data_size, uint8* buffer, int buffer_size); 27 | 28 | #endif /* __RFX_RLGR_H */ 29 | -------------------------------------------------------------------------------- /cunit/test_license.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Licensing Unit Tests 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_license_suite(void); 23 | int clean_license_suite(void); 24 | int add_license_suite(void); 25 | 26 | void test_license(void); 27 | void test_license_generate_keys(void); 28 | void test_license_encrypt_premaster_secret(void); 29 | void test_license_decrypt_platform_challenge(void); 30 | -------------------------------------------------------------------------------- /include/freerdp/utils/sleep.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Sleep Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __SLEEP_UTILS_H 21 | #define __SLEEP_UTILS_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API void freerdp_sleep(uint32 seconds); 27 | FREERDP_API void freerdp_usleep(uint32 useconds); 28 | FREERDP_API unsigned int freerdp_get_mstime(void); 29 | 30 | #endif /* __SLEEP_UTILS_H */ 31 | -------------------------------------------------------------------------------- /libfreerdp-core/pointer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * NeutrinoRDP: A Remote Desktop Protocol Client 3 | * pointer 4 | * 5 | * Copyright 2013 Jay Sorg 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 __POINTER1_H 21 | #define __POINTER1_H 22 | 23 | #include "rdp.h" 24 | #include "orders.h" 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | rdpPointerUpdate* pointer_new(void); 31 | void pointer_free(rdpPointerUpdate* self); 32 | 33 | #endif /* __POINTER1_H */ 34 | -------------------------------------------------------------------------------- /libfreerdp-kbd/libkbd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * XKB-based Keyboard Mapping to Microsoft Keyboard System 4 | * 5 | * Copyright 2009 Marc-Andre Moreau 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 __LIBKBD_H 21 | #define __LIBKBD_H 22 | 23 | #include 24 | 25 | #ifdef WITH_DEBUG_KBD 26 | #define DEBUG_KBD(fmt, ...) DEBUG_CLASS(KBD, fmt, ## __VA_ARGS__) 27 | #else 28 | #define DEBUG_KBD(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 29 | #endif 30 | 31 | #endif /* __LIBKBD_H */ 32 | -------------------------------------------------------------------------------- /libfreerdp-rail/librail.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Remote Applications Integrated Locally (RAIL) 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __LIBRAIL_H 21 | #define __LIBRAIL_H 22 | 23 | #include 24 | 25 | #ifdef WITH_DEBUG_RAIL 26 | #define DEBUG_RAIL(fmt, ...) DEBUG_CLASS(RAIL, fmt, ## __VA_ARGS__) 27 | #else 28 | #define DEBUG_RAIL(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 29 | #endif 30 | 31 | #endif /* __LIBRAIL_H */ 32 | -------------------------------------------------------------------------------- /channels/rdpdr/rdpdr_capabilities.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * File System Virtual Channel 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 6 | * Copyright 2010-2011 Vic Lee 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 | 21 | #ifndef __RDPDR_CAPABILITIES_H 22 | #define __RDPDR_CAPABILITIES_H 23 | 24 | #include "rdpdr_main.h" 25 | 26 | void rdpdr_process_capability_request(rdpdrPlugin* rdpdr, STREAM* data_in); 27 | void rdpdr_send_capability_response(rdpdrPlugin* rdpdr); 28 | 29 | #endif /* __RDPDR_CAPABILITIES_H */ 30 | -------------------------------------------------------------------------------- /channels/xrdpvr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set(XRDPVR_SRCS 17 | xrdpvr_audio.c 18 | xrdpvr_main.c 19 | xrdpvr_player.c) 20 | 21 | include_directories(../drdynvc) 22 | 23 | add_library(xrdpvr ${XRDPVR_SRCS}) 24 | set_target_properties(xrdpvr PROPERTIES PREFIX "") 25 | 26 | target_link_libraries(xrdpvr freerdp-utils ${FFMPEG_LIBRARIES} -lavformat) 27 | 28 | install(TARGETS xrdpvr DESTINATION ${FREERDP_PLUGIN_PATH}) 29 | 30 | if(WITH_ALSA) 31 | add_subdirectory(alsa) 32 | endif() 33 | 34 | -------------------------------------------------------------------------------- /channels/rdpdbg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(RDPDBG_SRCS 21 | rdpdbg_main.c 22 | ) 23 | 24 | add_library(rdpdbg ${RDPDBG_SRCS}) 25 | set_target_properties(rdpdbg PROPERTIES PREFIX "") 26 | 27 | target_link_libraries(rdpdbg freerdp-utils) 28 | 29 | install(TARGETS rdpdbg DESTINATION ${FREERDP_PLUGIN_PATH}) 30 | -------------------------------------------------------------------------------- /cunit/test_color.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Color Conversion Unit Tests 4 | * 5 | * Copyright 2010 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_color_suite(void); 23 | int clean_color_suite(void); 24 | int add_color_suite(void); 25 | 26 | void test_color_GetRGB32(void); 27 | void test_color_GetBGR32(void); 28 | void test_color_GetRGB_565(void); 29 | void test_color_GetRGB16(void); 30 | void test_color_GetBGR_565(void); 31 | void test_color_GetBGR16(void); 32 | -------------------------------------------------------------------------------- /libfreerdp-core/tpkt.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Transport Packets (TPKTs) 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __TPKT_H 21 | #define __TPKT_H 22 | 23 | #include "tpdu.h" 24 | #include "transport.h" 25 | 26 | #include 27 | 28 | #define TPKT_HEADER_LENGTH 4 29 | 30 | boolean tpkt_verify_header(STREAM* s); 31 | uint16 tpkt_read_header(STREAM* s); 32 | void tpkt_write_header(STREAM* s, uint16 length); 33 | 34 | #endif /* __TPKT_H */ 35 | -------------------------------------------------------------------------------- /channels/rdpdr/devman.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * File System Virtual Channel 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 6 | * Copyright 2010-2011 Vic Lee 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 | 21 | #ifndef __DEVMAN_H 22 | #define __DEVMAN_H 23 | 24 | DEVMAN* devman_new(rdpSvcPlugin* plugin); 25 | void devman_free(DEVMAN* devman); 26 | tbool devman_load_device_service(DEVMAN* devman, RDP_PLUGIN_DATA* plugin_data); 27 | DEVICE* devman_get_device_by_id(DEVMAN* devman, uint32 id); 28 | 29 | #endif /* __DEVMAN_H */ 30 | -------------------------------------------------------------------------------- /include/freerdp/utils/blob.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * BLOB Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __BLOB_UTILS_H 21 | #define __BLOB_UTILS_H 22 | 23 | #include 24 | 25 | struct rdp_blob 26 | { 27 | void* data; 28 | int length; 29 | }; 30 | typedef struct rdp_blob rdpBlob; 31 | 32 | FREERDP_API void freerdp_blob_alloc(rdpBlob* blob, int length); 33 | FREERDP_API void freerdp_blob_free(rdpBlob* blob); 34 | 35 | #endif /* __BLOB_UTILS_H */ 36 | -------------------------------------------------------------------------------- /libfreerdp-channels/libchannels.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Virtual Channel Manager 4 | * 5 | * Copyright 2009-2011 Jay Sorg 6 | * Copyright 2010-2011 Vic Lee 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 | 21 | #ifndef __LIBCHANNELS_H 22 | #define __LIBCHANNELS_H 23 | 24 | #include 25 | 26 | #ifdef WITH_DEBUG_CHANNELS 27 | #define DEBUG_CHANNELS(fmt, ...) DEBUG_CLASS(CHANNELS, fmt, ## __VA_ARGS__) 28 | #else 29 | #define DEBUG_CHANNELS(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 30 | #endif 31 | 32 | #endif /* __LIBCHANNELS_H */ 33 | -------------------------------------------------------------------------------- /channels/drdynvc/drdynvc_types.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Dynamic Virtual Channel 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __DRDYNVC_TYPES_H 21 | #define __DRDYNVC_TYPES_H 22 | 23 | #include "config.h" 24 | #include 25 | #include 26 | #include 27 | 28 | #ifdef WITH_DEBUG_DVC 29 | #define DEBUG_DVC(fmt, ...) DEBUG_CLASS(DVC, fmt, ## __VA_ARGS__) 30 | #else 31 | #define DEBUG_DVC(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /include/freerdp/utils/mutex.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Mutex Utils 4 | * 5 | * Copyright 2011 Vic Lee 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 __MUTEX_UTILS_H 21 | #define __MUTEX_UTILS_H 22 | 23 | #include 24 | 25 | typedef void* freerdp_mutex; 26 | 27 | FREERDP_API freerdp_mutex freerdp_mutex_new(void); 28 | FREERDP_API void freerdp_mutex_free(freerdp_mutex mutex); 29 | FREERDP_API void freerdp_mutex_lock(freerdp_mutex mutex); 30 | FREERDP_API void freerdp_mutex_unlock(freerdp_mutex mutex); 31 | 32 | #endif /* __MUTEX_UTILS_H */ 33 | -------------------------------------------------------------------------------- /client/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP Test UI cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | add_executable(freerdp-test 21 | freerdp.c) 22 | 23 | target_link_libraries(freerdp-test freerdp-core) 24 | target_link_libraries(freerdp-test freerdp-gdi) 25 | target_link_libraries(freerdp-test freerdp-utils) 26 | target_link_libraries(freerdp-test freerdp-channels ${CMAKE_DL_LIBS}) 27 | -------------------------------------------------------------------------------- /cunit/test_librfx.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * RemoteFX Codec Library Unit Tests 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include "test_freerdp.h" 21 | 22 | int init_librfx_suite(void); 23 | int clean_librfx_suite(void); 24 | int add_librfx_suite(void); 25 | 26 | void test_bitstream(void); 27 | void test_bitstream_enc(void); 28 | void test_rlgr(void); 29 | void test_differential(void); 30 | void test_quantization(void); 31 | void test_dwt(void); 32 | void test_decode(void); 33 | void test_encode(void); 34 | void test_message(void); 35 | -------------------------------------------------------------------------------- /server/test/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP Test Server cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | add_executable(tfreerdp-server 21 | tfreerdp.c) 22 | 23 | target_link_libraries(tfreerdp-server freerdp-core) 24 | target_link_libraries(tfreerdp-server freerdp-utils) 25 | target_link_libraries(tfreerdp-server freerdp-codec) 26 | target_link_libraries(tfreerdp-server freerdp-channels) 27 | -------------------------------------------------------------------------------- /channels/rail/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(RAIL_SRCS 21 | rail_main.c 22 | rail_main.h 23 | rail_orders.c 24 | rail_orders.h) 25 | 26 | add_library(rail ${RAIL_SRCS}) 27 | set_target_properties(rail PROPERTIES PREFIX "") 28 | 29 | target_link_libraries(rail freerdp-utils) 30 | 31 | install(TARGETS rail DESTINATION ${FREERDP_PLUGIN_PATH}) 32 | 33 | -------------------------------------------------------------------------------- /server/X11/xf_encode.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 RemoteFX Encoder 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_ENCODE_H 21 | #define __XF_ENCODE_H 22 | 23 | #include 24 | #include "xfreerdp.h" 25 | 26 | #include "xf_peer.h" 27 | 28 | XImage* xf_snapshot(xfPeerContext* xfp, int x, int y, int width, int height); 29 | void xf_xdamage_subtract_region(xfPeerContext* xfp, int x, int y, int width, int height); 30 | void* xf_monitor_updates(void* param); 31 | 32 | #endif /* __XF_ENCODE_H */ 33 | -------------------------------------------------------------------------------- /channels/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | add_subdirectory(cliprdr) 21 | add_subdirectory(drdynvc) 22 | add_subdirectory(rdpdbg) 23 | add_subdirectory(rdpdr) 24 | add_subdirectory(rail) 25 | add_subdirectory(rdpsnd) 26 | 27 | if(WITH_XRDPVR) 28 | add_subdirectory(xrdpvr) 29 | endif() 30 | 31 | if(WITH_TCUTILS) 32 | add_subdirectory(tcutils) 33 | endif() 34 | 35 | -------------------------------------------------------------------------------- /libfreerdp-kbd/x_layout_id_table.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * XKB-based Keyboard Mapping to Microsoft Keyboard System 4 | * 5 | * Copyright 2009 Marc-Andre Moreau 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 | /* Hardcoded mapping from xkb layout names and variants to RDP layout ids */ 21 | 22 | #ifndef __LAYOUTS_X_H 23 | #define __LAYOUTS_X_H 24 | 25 | unsigned int find_keyboard_layout_in_xorg_rules(char* layout, char* variant); 26 | 27 | #if defined(sun) 28 | unsigned int detect_keyboard_type_and_layout_sunos(char* xkbfile, int length); 29 | #endif 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /channels/rdpdr/parallel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(PARALLEL_SRCS 21 | parallel_main.c 22 | ) 23 | 24 | include_directories(..) 25 | 26 | add_library(parallel ${PARALLEL_SRCS}) 27 | set_target_properties(parallel PROPERTIES PREFIX "") 28 | 29 | target_link_libraries(parallel freerdp-utils) 30 | 31 | install(TARGETS parallel DESTINATION ${FREERDP_PLUGIN_PATH}) 32 | -------------------------------------------------------------------------------- /cunit/test_gcc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * T.124 Generic Conference Control (GCC) Unit Tests 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_gcc_suite(void); 23 | int clean_gcc_suite(void); 24 | int add_gcc_suite(void); 25 | 26 | void test_gcc_write_conference_create_request(void); 27 | void test_gcc_write_client_core_data(void); 28 | void test_gcc_write_client_security_data(void); 29 | void test_gcc_write_client_cluster_data(void); 30 | void test_gcc_write_client_network_data(void); 31 | -------------------------------------------------------------------------------- /include/freerdp/utils/semaphore.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Semaphore Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __SEMAPHORE_UTILS_H 21 | #define __SEMAPHORE_UTILS_H 22 | 23 | #include 24 | 25 | typedef void* freerdp_sem; 26 | 27 | FREERDP_API freerdp_sem freerdp_sem_new(int iv); 28 | FREERDP_API void freerdp_sem_free(freerdp_sem sem); 29 | FREERDP_API void freerdp_sem_signal(freerdp_sem sem); 30 | FREERDP_API void freerdp_sem_wait(freerdp_sem sem); 31 | 32 | #endif /* __SEMAPHORE_UTILS_H */ 33 | -------------------------------------------------------------------------------- /channels/rdpdr/disk/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(DISK_SRCS 21 | disk_file.c 22 | disk_file.h 23 | disk_main.c 24 | ) 25 | 26 | include_directories(..) 27 | 28 | add_library(disk ${DISK_SRCS}) 29 | set_target_properties(disk PROPERTIES PREFIX "") 30 | 31 | target_link_libraries(disk freerdp-utils) 32 | 33 | install(TARGETS disk DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | -------------------------------------------------------------------------------- /include/freerdp/gdi/pen.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Pen Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_PEN_H 21 | #define __GDI_PEN_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API HGDI_PEN gdi_CreatePen(int fnPenStyle, int nWidth, int crColor); 27 | FREERDP_API uint8 gdi_GetPenColor_8bpp(HGDI_PEN pen); 28 | FREERDP_API uint16 gdi_GetPenColor_16bpp(HGDI_PEN pen); 29 | FREERDP_API uint32 gdi_GetPenColor_32bpp(HGDI_PEN pen); 30 | 31 | #endif /* __GDI_PEN_H */ 32 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_neon.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRDP: A Remote Desktop Protocol client. 3 | RemoteFX Codec Library - NEON Optimizations 4 | 5 | Copyright 2011 Martin Fleisz 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 __RFX_NEON_H 21 | #define __RFX_NEON_H 22 | 23 | #include 24 | 25 | #if defined(__ARM_NEON__) 26 | 27 | void rfx_init_neon(RFX_CONTEXT * context); 28 | 29 | #ifndef RFX_INIT_SIMD 30 | #if defined(WITH_NEON) 31 | #define RFX_INIT_SIMD(_rfx_context) rfx_init_neon(_rfx_context) 32 | #endif 33 | #endif 34 | 35 | #endif // __ARM_NEON__ 36 | 37 | #endif /* __RFX_NEON_H */ 38 | 39 | -------------------------------------------------------------------------------- /include/freerdp/utils/signal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Signal handling 4 | * 5 | * Copyright 2011 Shea Levy 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 __UTILS_SIGNAL_H 21 | #define __UTILS_SIGNAL_H 22 | 23 | #include 24 | #ifndef _WIN32 25 | #include 26 | #include 27 | 28 | extern volatile sig_atomic_t terminal_needs_reset; 29 | extern int terminal_fildes; 30 | extern struct termios orig_flags; 31 | extern struct termios new_flags; 32 | #endif 33 | 34 | FREERDP_API int freerdp_handle_signals(void); 35 | 36 | #endif /* __UTILS_SIGNAL_H */ 37 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_decode.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - Decode 4 | * 5 | * Copyright 2011 Vic Lee 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 __RFX_DECODE_H 21 | #define __RFX_DECODE_H 22 | 23 | #include 24 | 25 | void rfx_decode_ycbcr_to_rgb(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf); 26 | 27 | void rfx_decode_rgb(RFX_CONTEXT* context, STREAM* data_in, 28 | int y_size, const uint32 * y_quants, 29 | int cb_size, const uint32 * cb_quants, 30 | int cr_size, const uint32 * cr_quants, uint8* rgb_buffer); 31 | 32 | #endif /* __RFX_DECODE_H */ 33 | 34 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_encode.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - Encode 4 | * 5 | * Copyright 2011 Vic Lee 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 __RFX_ENCODE_H 21 | #define __RFX_ENCODE_H 22 | 23 | #include 24 | 25 | void rfx_encode_rgb_to_ycbcr(sint16* y_r_buf, sint16* cb_g_buf, sint16* cr_b_buf); 26 | 27 | void rfx_encode_rgb(RFX_CONTEXT* context, const uint8* rgb_data, int width, int height, int rowstride, 28 | const uint32* y_quants, const uint32* cb_quants, const uint32* cr_quants, 29 | STREAM* data_out, int* y_size, int* cb_size, int* cr_size); 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /channels/cliprdr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(CLIPRDR_SRCS 21 | cliprdr_constants.h 22 | cliprdr_format.c 23 | cliprdr_format.h 24 | cliprdr_main.c 25 | cliprdr_main.h 26 | ) 27 | 28 | add_library(cliprdr ${CLIPRDR_SRCS}) 29 | set_target_properties(cliprdr PROPERTIES PREFIX "") 30 | 31 | target_link_libraries(cliprdr freerdp-utils) 32 | 33 | install(TARGETS cliprdr DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | -------------------------------------------------------------------------------- /channels/rdpdr/serial/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(serial_SRCS 21 | serial_tty.c 22 | serial_tty.h 23 | serial_constants.h 24 | serial_main.c 25 | ) 26 | 27 | include_directories(..) 28 | 29 | add_library(serial ${serial_SRCS}) 30 | set_target_properties(serial PROPERTIES PREFIX "") 31 | 32 | target_link_libraries(serial freerdp-utils) 33 | 34 | install(TARGETS serial DESTINATION ${FREERDP_PLUGIN_PATH}) 35 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | FreeRDP: A Remote Desktop Protocol Implementation 2 | ================================================= 3 | 4 | FreeRDP is a free implementation of the Remote Desktop Protocol (RDP), released under the Apache license. 5 | Enjoy the freedom of using your software wherever you want, the way you want it, in a world where 6 | interoperability can finally liberate your computing experience. 7 | 8 | Resources 9 | --------- 10 | 11 | Website: http://www.freerdp.com/ 12 | Wiki: https://github.com/FreeRDP/FreeRDP/wiki 13 | Sources: https://github.com/FreeRDP/FreeRDP/ 14 | API doc: http://www.freerdp.com/api/ 15 | 16 | IRC channel: #freerdp @ irc.freenode.net 17 | Mailing list: https://lists.sourceforge.net/lists/listinfo/freerdp-devel 18 | 19 | Microsoft Open Specifications 20 | ----------------------------- 21 | 22 | Information regarding the Microsoft Open Specifications can be found at: 23 | http://www.microsoft.com/openspecifications/ 24 | 25 | A list of reference documentation is maintained here: 26 | https://github.com/FreeRDP/FreeRDP/wiki/Reference-Documentation 27 | 28 | Compilation 29 | ----------- 30 | 31 | Instructions on how to get started compiling FreeRDP can be found on the wiki: 32 | https://github.com/FreeRDP/FreeRDP/wiki/Compilation 33 | 34 | 35 | -------------------------------------------------------------------------------- /channels/rdpdr/rdpdr_main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * File System Virtual Channel 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 6 | * Copyright 2010-2011 Vic Lee 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 | 21 | #ifndef __RDPDR_MAIN_H 22 | #define __RDPDR_MAIN_H 23 | 24 | #include 25 | 26 | #include "rdpdr_types.h" 27 | 28 | typedef struct rdpdr_plugin rdpdrPlugin; 29 | struct rdpdr_plugin 30 | { 31 | rdpSvcPlugin plugin; 32 | 33 | DEVMAN* devman; 34 | 35 | uint16 versionMajor; 36 | uint16 versionMinor; 37 | uint16 clientID; 38 | char computerName[256]; 39 | }; 40 | 41 | #endif /* __RDPDR_MAIN_H */ 42 | -------------------------------------------------------------------------------- /include/freerdp/gdi/clipping.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Clipping Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_CLIPPING_H 21 | #define __GDI_CLIPPING_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API int gdi_SetClipRgn(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight); 27 | FREERDP_API HGDI_RGN gdi_GetClipRgn(HGDI_DC hdc); 28 | FREERDP_API int gdi_SetNullClipRgn(HGDI_DC hdc); 29 | FREERDP_API int gdi_ClipCoords(HGDI_DC hdc, int *x, int *y, int *w, int *h, int *srcx, int *srcy); 30 | 31 | #endif /* __GDI_CLIPPING_H */ 32 | -------------------------------------------------------------------------------- /libfreerdp-core/window.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Windowing Alternate Secondary Orders 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 6 | * Copyright 2011 Roman Barabanov 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 | 21 | #ifndef __WINDOW_H 22 | #define __WINDOW_H 23 | 24 | #include "update.h" 25 | 26 | #include 27 | 28 | void update_recv_altsec_window_order(rdpUpdate* update, STREAM* s); 29 | 30 | #ifdef WITH_DEBUG_WND 31 | #define DEBUG_WND(fmt, ...) DEBUG_CLASS(WND, fmt, ## __VA_ARGS__) 32 | #else 33 | #define DEBUG_WND(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 34 | #endif 35 | 36 | #endif /* __WINDOW_H */ 37 | -------------------------------------------------------------------------------- /channels/drdynvc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(DRDYNVC_SRCS 21 | drdynvc_main.c 22 | drdynvc_main.h 23 | drdynvc_types.h 24 | dvcman.c 25 | dvcman.h 26 | ) 27 | 28 | add_library(drdynvc ${DRDYNVC_SRCS}) 29 | set_target_properties(drdynvc PROPERTIES PREFIX "") 30 | 31 | target_link_libraries(drdynvc freerdp-utils) 32 | 33 | install(TARGETS drdynvc DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | 35 | add_subdirectory(tsmf) 36 | add_subdirectory(audin) 37 | 38 | -------------------------------------------------------------------------------- /client/Windows/wf_gdi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Windows GDI 4 | * 5 | * Copyright 2009-2011 Jay Sorg 6 | * Copyright 2010-2011 Vic Lee 7 | * Copyright 2010-2011 Marc-Andre Moreau 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #ifndef __WF_GDI_H 23 | #define __WF_GDI_H 24 | 25 | #include "wfreerdp.h" 26 | 27 | void wf_invalidate_region(wfInfo* wfi, int x, int y, int width, int height); 28 | wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data); 29 | void wf_image_free(wfBitmap* image); 30 | void wf_toggle_fullscreen(wfInfo* wfi); 31 | 32 | void wf_gdi_register_update_callbacks(rdpUpdate* update); 33 | 34 | #endif /* __WF_GDI_H */ 35 | -------------------------------------------------------------------------------- /channels/rdpdr/smartcard/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(SCARD_SRCS 21 | scard_main.c 22 | scard_operations.c 23 | ) 24 | 25 | include_directories(..) 26 | include_directories(${PCSC_INCLUDE_DIRS}) 27 | 28 | add_library(scard ${SCARD_SRCS}) 29 | set_target_properties(scard PROPERTIES PREFIX "") 30 | 31 | target_link_libraries(scard freerdp-utils) 32 | target_link_libraries(scard ${PCSC_LIBRARIES}) 33 | 34 | install(TARGETS scard DESTINATION ${FREERDP_PLUGIN_PATH}) 35 | -------------------------------------------------------------------------------- /client/Windows/wf_graphics.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Windows Graphical Objects 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __WF_GRAPHICS_H 21 | #define __WF_GRAPHICS_H 22 | 23 | #include "wfreerdp.h" 24 | 25 | HBITMAP wf_create_dib(wfInfo* wfi, int width, int height, int bpp, uint8* data, uint8** pdata); 26 | wfBitmap* wf_image_new(wfInfo* wfi, int width, int height, int bpp, uint8* data); 27 | wfBitmap* wf_bitmap_new(wfInfo* wfi, int width, int height, int bpp, uint8* data); 28 | void wf_image_free(wfBitmap* image); 29 | 30 | void wf_register_graphics(rdpGraphics* graphics); 31 | 32 | #endif /* WF_GRAPHICS */ 33 | -------------------------------------------------------------------------------- /include/freerdp/gdi/brush.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Brush Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_BRUSH_H 21 | #define __GDI_BRUSH_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API HGDI_BRUSH gdi_CreateSolidBrush(GDI_COLOR crColor); 27 | FREERDP_API HGDI_BRUSH gdi_CreatePatternBrush(HGDI_BITMAP hbmp); 28 | FREERDP_API int gdi_PatBlt(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, int rop); 29 | 30 | typedef int (*p_PatBlt)(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, int rop); 31 | 32 | #endif /* __GDI_BRUSH_H */ 33 | -------------------------------------------------------------------------------- /channels/rdpsnd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(RDPSND_SRCS 21 | rdpsnd_main.c 22 | rdpsnd_main.h 23 | ) 24 | 25 | add_library(rdpsnd ${RDPSND_SRCS}) 26 | set_target_properties(rdpsnd PROPERTIES PREFIX "") 27 | 28 | target_link_libraries(rdpsnd freerdp-utils) 29 | 30 | install(TARGETS rdpsnd DESTINATION ${FREERDP_PLUGIN_PATH}) 31 | 32 | if(WITH_ALSA) 33 | add_subdirectory(alsa) 34 | endif() 35 | 36 | if(WITH_PULSEAUDIO) 37 | add_subdirectory(pulse) 38 | endif() 39 | 40 | -------------------------------------------------------------------------------- /include/freerdp/gdi/dc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Device Context Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_DC_H 21 | #define __GDI_DC_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API HGDI_DC gdi_GetDC(); 27 | FREERDP_API HGDI_DC gdi_CreateDC(HCLRCONV clrconv, int bpp); 28 | FREERDP_API HGDI_DC gdi_CreateCompatibleDC(HGDI_DC hdc); 29 | FREERDP_API HGDIOBJECT gdi_SelectObject(HGDI_DC hdc, HGDIOBJECT hgdiobject); 30 | FREERDP_API int gdi_DeleteObject(HGDIOBJECT hgdiobject); 31 | FREERDP_API int gdi_DeleteDC(HGDI_DC hdc); 32 | 33 | #endif /* __GDI_DC_H */ 34 | -------------------------------------------------------------------------------- /libfreerdp-rail/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # libfreerdp-rail cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(FREERDP_RAIL_SRCS 21 | window_list.c 22 | window.c 23 | icon.c 24 | rail.c 25 | librail.h) 26 | 27 | add_library(freerdp-rail ${FREERDP_RAIL_SRCS}) 28 | 29 | set_target_properties(freerdp-rail PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") 30 | 31 | target_link_libraries(freerdp-rail freerdp-utils) 32 | 33 | install(TARGETS freerdp-rail DESTINATION ${CMAKE_INSTALL_LIBDIR}) 34 | -------------------------------------------------------------------------------- /channels/drdynvc/tsmf/alsa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(TSMF_ALSA_SRCS 21 | tsmf_alsa.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${ALSA_INCLUDE_DIRS}) 26 | 27 | add_library(tsmf_alsa ${TSMF_ALSA_SRCS}) 28 | set_target_properties(tsmf_alsa PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(tsmf_alsa freerdp-utils) 31 | target_link_libraries(tsmf_alsa ${ALSA_LIBRARIES}) 32 | 33 | install(TARGETS tsmf_alsa DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | 35 | -------------------------------------------------------------------------------- /channels/drdynvc/audin/alsa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(AUDIN_ALSA_SRCS 21 | audin_alsa.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${ALSA_INCLUDE_DIRS}) 26 | 27 | add_library(audin_alsa ${AUDIN_ALSA_SRCS}) 28 | set_target_properties(audin_alsa PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(audin_alsa freerdp-utils) 31 | target_link_libraries(audin_alsa ${ALSA_LIBRARIES}) 32 | 33 | install(TARGETS audin_alsa DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | -------------------------------------------------------------------------------- /channels/rdpsnd/alsa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(RDPSND_ALSA_SRCS 21 | rdpsnd_alsa.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${ALSA_INCLUDE_DIRS}) 26 | 27 | add_library(rdpsnd_alsa ${RDPSND_ALSA_SRCS}) 28 | set_target_properties(rdpsnd_alsa PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(rdpsnd_alsa freerdp-utils) 31 | target_link_libraries(rdpsnd_alsa ${ALSA_LIBRARIES}) 32 | 33 | install(TARGETS rdpsnd_alsa DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | -------------------------------------------------------------------------------- /channels/drdynvc/tsmf/pulse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(TSMF_PULSE_SRCS 21 | tsmf_pulse.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${PULSE_INCLUDE_DIRS}) 26 | 27 | add_library(tsmf_pulse ${TSMF_PULSE_SRCS}) 28 | set_target_properties(tsmf_pulse PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(tsmf_pulse freerdp-utils) 31 | target_link_libraries(tsmf_pulse ${PULSE_LIBRARIES}) 32 | 33 | install(TARGETS tsmf_pulse DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | 35 | -------------------------------------------------------------------------------- /channels/xrdpvr/alsa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(XRDPVR_ALSA_SRCS 21 | xrdpvr_alsa.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${ALSA_INCLUDE_DIRS}) 26 | 27 | add_library(xrdpvr_alsa ${XRDPVR_ALSA_SRCS}) 28 | set_target_properties(xrdpvr_alsa PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(xrdpvr_alsa freerdp-utils) 31 | target_link_libraries(xrdpvr_alsa ${ALSA_LIBRARIES}) 32 | 33 | install(TARGETS xrdpvr_alsa DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | 35 | -------------------------------------------------------------------------------- /client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP Client User Interfaces 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | # User Interfaces 21 | 22 | if(NOT WIN32) 23 | # Build Test Client 24 | add_subdirectory(test) 25 | 26 | # Build X11 Client 27 | find_suggested_package(X11) 28 | if(WITH_X11) 29 | add_subdirectory(X11) 30 | endif() 31 | 32 | # Build DirectFB Client 33 | find_optional_package(DirectFB) 34 | if(WITH_DIRECTFB) 35 | add_subdirectory(DirectFB) 36 | endif() 37 | else() 38 | # Build Windows Client 39 | add_subdirectory(Windows) 40 | endif() 41 | -------------------------------------------------------------------------------- /channels/drdynvc/audin/pulse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(AUDIN_PULSE_SRCS 21 | audin_pulse.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${PULSE_INCLUDE_DIRS}) 26 | 27 | add_library(audin_pulse ${AUDIN_PULSE_SRCS}) 28 | set_target_properties(audin_pulse PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(audin_pulse freerdp-utils) 31 | target_link_libraries(audin_pulse ${PULSE_LIBRARIES}) 32 | 33 | install(TARGETS audin_pulse DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | 35 | -------------------------------------------------------------------------------- /channels/drdynvc/tsmf/tsmf_types.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Video Redirection Virtual Channel - Types 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __TSMF_TYPES_H 21 | #define __TSMF_TYPES_H 22 | 23 | #include 24 | 25 | typedef struct _TS_AM_MEDIA_TYPE 26 | { 27 | int MajorType; 28 | int SubType; 29 | int FormatType; 30 | 31 | uint32 Width; 32 | uint32 Height; 33 | uint32 BitRate; 34 | struct 35 | { 36 | uint32 Numerator; 37 | uint32 Denominator; 38 | } SamplesPerSecond; 39 | uint32 Channels; 40 | uint32 BitsPerSample; 41 | uint32 BlockAlign; 42 | const uint8* ExtraData; 43 | uint32 ExtraDataSize; 44 | } TS_AM_MEDIA_TYPE; 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /channels/rdpsnd/pulse/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(RDPSND_PULSE_SRCS 21 | rdpsnd_pulse.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${PULSE_INCLUDE_DIRS}) 26 | 27 | add_library(rdpsnd_pulse ${RDPSND_PULSE_SRCS}) 28 | set_target_properties(rdpsnd_pulse PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(rdpsnd_pulse freerdp-utils) 31 | target_link_libraries(rdpsnd_pulse ${PULSE_LIBRARIES} pulse) 32 | 33 | install(TARGETS rdpsnd_pulse DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | -------------------------------------------------------------------------------- /libfreerdp-channels/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # libfreerdp-chanman cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(FREERDP_CHANNELS_SRCS 21 | libchannels.c 22 | libchannels.h 23 | wtsvc.c 24 | wtsvc.h) 25 | 26 | add_library(freerdp-channels ${FREERDP_CHANNELS_SRCS}) 27 | 28 | set_target_properties(freerdp-channels PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") 29 | target_link_libraries(freerdp-channels freerdp-utils) 30 | 31 | install(TARGETS freerdp-channels DESTINATION ${CMAKE_INSTALL_LIBDIR}) 32 | 33 | -------------------------------------------------------------------------------- /channels/drdynvc/tsmf/ffmpeg/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(TSMF_FFMPEG_SRCS 21 | tsmf_ffmpeg.c 22 | ) 23 | 24 | include_directories(..) 25 | include_directories(${FFMPEG_INCLUDE_DIRS}) 26 | 27 | add_library(tsmf_ffmpeg ${TSMF_FFMPEG_SRCS}) 28 | set_target_properties(tsmf_ffmpeg PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(tsmf_ffmpeg freerdp-utils) 31 | target_link_libraries(tsmf_ffmpeg ${FFMPEG_LIBRARIES}) 32 | 33 | install(TARGETS tsmf_ffmpeg DESTINATION ${FREERDP_PLUGIN_PATH}) 34 | 35 | -------------------------------------------------------------------------------- /client/Windows/wf_event.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Event Handling 4 | * 5 | * Copyright 2009-2011 Jay Sorg 6 | * Copyright 2010-2011 Vic Lee 7 | * Copyright 2010-2011 Marc-Andre Moreau 8 | * 9 | * Licensed under the Apache License, Version 2.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * You may obtain a copy of the License at 12 | * 13 | * http://www.apache.org/licenses/LICENSE-2.0 14 | * 15 | * Unless required by applicable law or agreed to in writing, software 16 | * distributed under the License is distributed on an "AS IS" BASIS, 17 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 | * See the License for the specific language governing permissions and 19 | * limitations under the License. 20 | */ 21 | 22 | #ifndef __WF_EVENT_H 23 | #define __WF_EVENT_H 24 | 25 | #include "wfreerdp.h" 26 | 27 | LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam); 28 | LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); 29 | 30 | #ifdef WITH_DEBUG_KBD 31 | #define DEBUG_KBD(fmt, ...) DEBUG_CLASS(KBD, fmt, ## __VA_ARGS__) 32 | #else 33 | #define DEBUG_KBD(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 34 | #endif 35 | 36 | #endif /* __WF_EVENT_H */ 37 | -------------------------------------------------------------------------------- /include/freerdp/utils/string.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * String Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __STRING_UTILS_H 21 | #define __STRING_UTILS_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | struct rdp_string 29 | { 30 | char* ascii; 31 | char* unicode; 32 | uint32 length; 33 | }; 34 | typedef struct rdp_string rdpString; 35 | 36 | FREERDP_API void freerdp_string_read_length32(STREAM* s, rdpString* string, UNICONV* uniconv); 37 | FREERDP_API void freerdp_string_free(rdpString* string); 38 | 39 | #endif /* __STRING_UTILS_H */ 40 | -------------------------------------------------------------------------------- /channels/drdynvc/audin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(AUDIN_SRCS 21 | audin_main.c 22 | audin_main.h 23 | ) 24 | 25 | include_directories(..) 26 | 27 | add_library(audin ${AUDIN_SRCS}) 28 | set_target_properties(audin PROPERTIES PREFIX "") 29 | 30 | target_link_libraries(audin freerdp-utils) 31 | 32 | install(TARGETS audin DESTINATION ${FREERDP_PLUGIN_PATH}) 33 | 34 | if(WITH_ALSA) 35 | add_subdirectory(alsa) 36 | endif() 37 | 38 | if(WITH_PULSEAUDIO) 39 | add_subdirectory(pulse) 40 | endif() 41 | 42 | -------------------------------------------------------------------------------- /include/freerdp/utils/rect.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Rectangle Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __RECT_UTILS_H 21 | #define __RECT_UTILS_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | FREERDP_API void freerdp_read_rectangle_16(STREAM* s, RECTANGLE_16* rectangle_16); 28 | FREERDP_API void freerdp_write_rectangle_16(STREAM* s, RECTANGLE_16* rectangle_16); 29 | 30 | FREERDP_API RECTANGLE_16* freerdp_rectangle_16_new(uint16 left, uint16 top, uint16 right, uint16 bottom); 31 | FREERDP_API void freerdp_rectangle_16_free(RECTANGLE_16* rectangle_16); 32 | 33 | #endif /* __RECT_UTILS_H */ 34 | -------------------------------------------------------------------------------- /libfreerdp-utils/blob.c: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * BLOB Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include 21 | 22 | #include 23 | 24 | /** 25 | * Allocate memory for data blob. 26 | * @param blob blob structure 27 | * @param length memory length 28 | */ 29 | 30 | void freerdp_blob_alloc(rdpBlob* blob, int length) 31 | { 32 | blob->data = xmalloc(length); 33 | blob->length = length; 34 | } 35 | 36 | /** 37 | * Free memory allocated for data blob. 38 | * @param blob 39 | */ 40 | 41 | void freerdp_blob_free(rdpBlob* blob) 42 | { 43 | if (blob->data) 44 | xfree(blob->data); 45 | 46 | blob->length = 0; 47 | } 48 | -------------------------------------------------------------------------------- /cmake/FindXmlto.cmake: -------------------------------------------------------------------------------- 1 | # - Find xmlto 2 | # Find the xmlto docbook xslt frontend 3 | # 4 | # This module defines the following variables: 5 | # XMLTO_FOUND - true if xmlto was found 6 | # XMLTO_EXECUTABLE - Path to xmlto, if xmlto was found 7 | # 8 | 9 | #============================================================================= 10 | # Copyright 2011 Nils Andresen 11 | # 12 | # Licensed under the Apache License, Version 2.0 (the "License"); 13 | # you may not use this file except in compliance with the License. 14 | # You may obtain a copy of the License at 15 | # 16 | # http://www.apache.org/licenses/LICENSE-2.0 17 | # 18 | # Unless required by applicable law or agreed to in writing, software 19 | # distributed under the License is distributed on an "AS IS" BASIS, 20 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | # See the License for the specific language governing permissions and 22 | # limitations under the License. 23 | #============================================================================= 24 | set(XMLTO_FOUND false) 25 | 26 | find_program(XMLTO_EXECUTABLE 27 | NAMES xmlto 28 | DOC "docbook xslt frontend") 29 | 30 | if(XMLTO_EXECUTABLE) 31 | set(XMLTO_FOUND true) 32 | message(STATUS "Found XMLTO: ${XMLTO_EXECUTABLE}") 33 | endif() 34 | 35 | mark_as_advanced(XMLTO_EXECUTABLE) 36 | -------------------------------------------------------------------------------- /include/freerdp/codec/bitmap.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Compressed Bitmap 4 | * 5 | * Copyright 2011-2013 Jay Sorg 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 __BITMAP_H 21 | #define __BITMAP_H 22 | 23 | #include 24 | 25 | struct bitmap_extra 26 | { 27 | uint8* temp; 28 | int flags; 29 | int pad0; 30 | int pad1; 31 | int pad2; 32 | }; 33 | 34 | typedef struct bitmap_extra bitmapExtra; 35 | 36 | FREERDP_API tbool bitmap_decompress(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp); 37 | FREERDP_API tbool bitmap_decompress_ex(uint8* srcData, uint8* dstData, int width, int height, int size, int srcBpp, int dstBpp, bitmapExtra* be); 38 | 39 | #endif /* __BITMAP_H */ 40 | -------------------------------------------------------------------------------- /client/Windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP Windows cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | add_executable(wfreerdp WIN32 21 | wf_gdi.c 22 | wf_gdi.h 23 | wf_event.c 24 | wf_event.h 25 | wf_graphics.c 26 | wf_graphics.h 27 | wfreerdp.c 28 | wfreerdp.h) 29 | 30 | target_link_libraries(wfreerdp freerdp-core) 31 | target_link_libraries(wfreerdp freerdp-gdi) 32 | target_link_libraries(wfreerdp freerdp-utils) 33 | target_link_libraries(wfreerdp freerdp-codec) 34 | target_link_libraries(wfreerdp freerdp-channels) 35 | 36 | install(TARGETS wfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR}) 37 | -------------------------------------------------------------------------------- /cmake/FindFFmpeg.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find FFmpeg 2 | # Using Pkg-config if available for path 3 | # 4 | # FFMPEG_FOUND - all required ffmpeg components found on system 5 | # FFMPEG_INCLUDE_DIRS - combined include directories 6 | # FFMPEG_LIBRARIES - combined libraries to link 7 | 8 | include(FindPkgConfig) 9 | 10 | if (PKG_CONFIG_FOUND) 11 | pkg_check_modules(AVCODEC libavcodec) 12 | pkg_check_modules(AVUTIL libavutil) 13 | endif ( PKG_CONFIG_FOUND ) 14 | 15 | # avcodec 16 | find_path(AVCODEC_INCLUDE_DIR avcodec.h PATHS ${AVCODEC_INCLUDE_DIRS} 17 | PATH_SUFFIXES libavcodec ) 18 | find_library(AVCODEC_LIBRARY avcodec PATHS ${AVCODEC_LIBRARY_DIRS}) 19 | 20 | # avutil 21 | find_path(AVUTIL_INCLUDE_DIR avutil.h PATHS ${AVUTIL_INCLUDE_DIRS} 22 | PATH_SUFFIXES libavutil ) 23 | find_library(AVUTIL_LIBRARY avutil PATHS ${AVUTIL_LIBRARY_DIRS}) 24 | 25 | if(AVCODEC_INCLUDE_DIR AND AVCODEC_LIBRARY) 26 | set(AVCODEC_FOUND TRUE) 27 | endif() 28 | 29 | if(AVUTIL_INCLUDE_DIR AND AVUTIL_LIBRARY) 30 | set(AVUTIL_FOUND TRUE) 31 | endif() 32 | 33 | 34 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFmpeg DEFAULT_MSG AVUTIL_FOUND AVCODEC_FOUND) 35 | 36 | if(FFMPEG_FOUND) 37 | set(FFMPEG_INCLUDE_DIRS ${AVCODEC_INCLUDE_DIR} ${AVUTIL_INCLUDE_DIR}) 38 | set(FFMPEG_LIBRARIES ${AVCODEC_LIBRARY} ${AVUTIL_LIBRARY}) 39 | endif() 40 | 41 | mark_as_advanced(FFMPEG_INCLUDE_DIRS FFMPEG_LIBRARYS) 42 | -------------------------------------------------------------------------------- /include/freerdp/gdi/drawing.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Drawing Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_DRAWING_H 21 | #define __GDI_DRAWING_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API int gdi_GetROP2(HGDI_DC hdc); 27 | FREERDP_API int gdi_SetROP2(HGDI_DC hdc, int fnDrawMode); 28 | FREERDP_API GDI_COLOR gdi_GetBkColor(HGDI_DC hdc); 29 | FREERDP_API GDI_COLOR gdi_SetBkColor(HGDI_DC hdc, GDI_COLOR crColor); 30 | FREERDP_API int gdi_GetBkMode(HGDI_DC hdc); 31 | FREERDP_API int gdi_SetBkMode(HGDI_DC hdc, int iBkMode); 32 | FREERDP_API GDI_COLOR gdi_SetTextColor(HGDI_DC hdc, GDI_COLOR crColor); 33 | 34 | #endif /* __GDI_DRAWING_H */ 35 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_pool.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - Memory Pool 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __RFX_POOL_H 21 | #define __RFX_POOL_H 22 | 23 | #include 24 | 25 | struct _RFX_POOL 26 | { 27 | int size; 28 | int count; 29 | RFX_TILE** tiles; 30 | }; 31 | typedef struct _RFX_POOL RFX_POOL; 32 | 33 | RFX_POOL* rfx_pool_new(); 34 | void rfx_pool_free(RFX_POOL* pool); 35 | void rfx_pool_put_tile(RFX_POOL* pool, RFX_TILE* tile); 36 | RFX_TILE* rfx_pool_get_tile(RFX_POOL* pool); 37 | void rfx_pool_put_tiles(RFX_POOL* pool, RFX_TILE** tiles, int count); 38 | RFX_TILE** rfx_pool_get_tiles(RFX_POOL* pool, int count); 39 | 40 | #endif /* __RFX_POOL_H */ 41 | -------------------------------------------------------------------------------- /server/X11/xf_input.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Server Input 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_INPUT_H 21 | #define __XF_INPUT_H 22 | 23 | #include 24 | 25 | #include "xfreerdp.h" 26 | 27 | void xf_input_synchronize_event(rdpInput* input, uint32 flags); 28 | void xf_input_keyboard_event(rdpInput* input, uint16 flags, uint16 code); 29 | void xf_input_unicode_keyboard_event(rdpInput* input, uint16 flags, uint16 code); 30 | void xf_input_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); 31 | void xf_input_extended_mouse_event(rdpInput* input, uint16 flags, uint16 x, uint16 y); 32 | void xf_input_register_callbacks(rdpInput* input); 33 | 34 | #endif /* __XF_INPUT_H */ 35 | -------------------------------------------------------------------------------- /libfreerdp-cache/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # libfreerdp-cache cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(FREERDP_CACHE_SRCS 21 | brush.c 22 | pointer.c 23 | bitmap.c 24 | offscreen.c 25 | palette.c 26 | glyph.c 27 | cache.c) 28 | 29 | add_library(freerdp-cache ${FREERDP_CACHE_SRCS}) 30 | 31 | set_target_properties(freerdp-cache PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") 32 | 33 | target_link_libraries(freerdp-cache freerdp-core) 34 | target_link_libraries(freerdp-cache freerdp-utils) 35 | 36 | install(TARGETS freerdp-cache DESTINATION ${CMAKE_INSTALL_LIBDIR}) 37 | -------------------------------------------------------------------------------- /include/freerdp/utils/wait_obj.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Virtual Channel Manager 4 | * 5 | * Copyright 2009-2011 Jay Sorg 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 __WAIT_OBJ_UTILS 21 | #define __WAIT_OBJ_UTILS 22 | 23 | #include 24 | 25 | FREERDP_API struct wait_obj* wait_obj_new(void); 26 | FREERDP_API struct wait_obj* wait_obj_new_with_fd(void* fd); 27 | FREERDP_API void wait_obj_free(struct wait_obj* obj); 28 | FREERDP_API int wait_obj_is_set(struct wait_obj* obj); 29 | FREERDP_API void wait_obj_set(struct wait_obj* obj); 30 | FREERDP_API void wait_obj_clear(struct wait_obj* obj); 31 | FREERDP_API int wait_obj_select(struct wait_obj** listobj, int numobj, int timeout); 32 | FREERDP_API void wait_obj_get_fds(struct wait_obj* obj, void** fds, int* count); 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /libfreerdp-utils/string.c: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * String Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include 21 | 22 | #include 23 | 24 | void freerdp_string_read_length32(STREAM* s, rdpString* string, UNICONV* uniconv) 25 | { 26 | stream_read_uint32(s, string->length); 27 | string->unicode = (char*) xmalloc(string->length); 28 | stream_read(s, string->unicode, string->length); 29 | string->ascii = freerdp_uniconv_in(uniconv, (uint8*) string->unicode, string->length); 30 | } 31 | 32 | void freerdp_string_free(rdpString* string) 33 | { 34 | if (string->unicode != NULL) 35 | xfree(string->unicode); 36 | 37 | if (string->ascii != NULL) 38 | xfree(string->ascii); 39 | } 40 | -------------------------------------------------------------------------------- /libfreerdp-codec/rfx_differential.c: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * RemoteFX Codec Library - Differential Encoding 4 | * 5 | * Copyright 2011 Vic Lee 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 | #include 21 | #include 22 | #include 23 | #include "rfx_differential.h" 24 | 25 | void rfx_differential_decode(sint16* buffer, int buffer_size) 26 | { 27 | sint16* src; 28 | sint16* dst; 29 | 30 | for (src = buffer, dst = buffer + 1; buffer_size > 1; src++, dst++, buffer_size--) 31 | { 32 | *dst += *src; 33 | } 34 | } 35 | 36 | void rfx_differential_encode(sint16* buffer, int buffer_size) 37 | { 38 | sint16 n1, n2; 39 | sint16* dst; 40 | 41 | for (n1 = *buffer, dst = buffer + 1; buffer_size > 1; dst++, buffer_size--) 42 | { 43 | n2 = *dst; 44 | *dst -= n1; 45 | n1 = n2; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /libfreerdp-gdi/graphics.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Graphical Objects 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __GDI_GRAPHICS_H 21 | #define __GDI_GRAPHICS_H 22 | 23 | #include 24 | #include 25 | 26 | HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, int width, int height, int bpp, uint8* data); 27 | 28 | void gdi_Bitmap_New(rdpContext* context, rdpBitmap* bitmap); 29 | void gdi_Bitmap_Free(rdpContext* context, rdpBitmap* bitmap); 30 | void gdi_Bitmap_Decompress(rdpContext* context, rdpBitmap* bitmap, 31 | uint8* data, int width, int height, int bpp, int length, 32 | boolean compressed, int codec_id); 33 | void gdi_register_graphics(rdpGraphics* graphics); 34 | 35 | #endif /* __GDI_GRAPHICS_H */ 36 | -------------------------------------------------------------------------------- /include/freerdp/gdi/line.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Line Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_LINE_H 21 | #define __GDI_LINE_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API int gdi_LineTo(HGDI_DC hdc, int nXEnd, int nYEnd); 27 | FREERDP_API int gdi_PolylineTo(HGDI_DC hdc, GDI_POINT *lppt, int cCount); 28 | FREERDP_API int gdi_Polyline(HGDI_DC hdc, GDI_POINT *lppt, int cPoints); 29 | FREERDP_API int gdi_PolyPolyline(HGDI_DC hdc, GDI_POINT *lppt, int *lpdwPolyPoints, int cCount); 30 | FREERDP_API int gdi_MoveToEx(HGDI_DC hdc, int X, int Y, HGDI_POINT lpPoint); 31 | 32 | typedef int (*p_LineTo)(HGDI_DC hdc, int nXEnd, int nYEnd); 33 | 34 | #endif /* __GDI_LINE_H */ 35 | -------------------------------------------------------------------------------- /include/freerdp/utils/load_plugin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Plugin Loading Utils 4 | * 5 | * Copyright 2011 Vic Lee 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 __LOAD_PLUGIN_UTILS_H 21 | #define __LOAD_PLUGIN_UTILS_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API void* freerdp_open_library(const char* file); 27 | FREERDP_API void* freerdp_get_library_symbol(void* library, const char* name); 28 | FREERDP_API boolean freerdp_close_library(void* library); 29 | FREERDP_API void* freerdp_load_library_symbol(const char* file, const char* name); 30 | FREERDP_API void* freerdp_load_plugin(const char* name, const char* entry_name); 31 | FREERDP_API void* freerdp_load_channel_plugin(rdpSettings* settings, const char* name, const char* entry_name); 32 | 33 | #endif /* __LOAD_PLUGIN_UTILS_H */ 34 | -------------------------------------------------------------------------------- /client/DirectFB/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP DirectFB Client 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | include_directories(${DIRECTFB_INCLUDE_DIRS}) 21 | 22 | add_executable(dfreerdp 23 | df_event.c 24 | df_event.h 25 | df_graphics.c 26 | df_graphics.c 27 | dfreerdp.c 28 | dfreerdp.h) 29 | 30 | target_link_libraries(dfreerdp freerdp-core) 31 | target_link_libraries(dfreerdp freerdp-gdi) 32 | target_link_libraries(dfreerdp freerdp-kbd) 33 | target_link_libraries(dfreerdp freerdp-channels) 34 | target_link_libraries(dfreerdp freerdp-utils) 35 | target_link_libraries(dfreerdp ${DIRECTFB_LIBRARIES}) 36 | 37 | install(TARGETS dfreerdp DESTINATION ${CMAKE_INSTALL_BINDIR}) 38 | -------------------------------------------------------------------------------- /client/X11/xf_rail.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 RAIL 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_RAIL_H 21 | #define __XF_RAIL_H 22 | 23 | #include "xfreerdp.h" 24 | 25 | void xf_rail_paint(xfInfo* xfi, rdpRail* rail, sint32 uleft, sint32 utop, uint32 uright, uint32 ubottom); 26 | void xf_rail_register_callbacks(xfInfo* xfi, rdpRail* rail); 27 | void xf_rail_send_client_system_command(xfInfo* xfi, uint32 windowId, uint16 command); 28 | void xf_rail_send_activate(xfInfo* xfi, Window xwindow, boolean enabled); 29 | void xf_process_rail_event(xfInfo* xfi, rdpChannels* chanman, RDP_EVENT* event); 30 | void xf_rail_adjust_position(xfInfo* xfi, rdpWindow *window); 31 | void xf_rail_end_local_move(xfInfo* xfi, rdpWindow *window); 32 | 33 | #endif /* __XF_RAIL_H */ 34 | -------------------------------------------------------------------------------- /include/freerdp/gdi/8bpp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI 8bpp Internal Buffer Routines 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 | #include 21 | #include 22 | #include 23 | 24 | typedef int (*pLineTo_8bpp)(HGDI_DC hdc, int nXEnd, int nYEnd); 25 | 26 | FREERDP_API uint8 gdi_get_color_8bpp(HGDI_DC hdc, GDI_COLOR color); 27 | 28 | FREERDP_API int FillRect_8bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); 29 | FREERDP_API int BitBlt_8bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); 30 | FREERDP_API int PatBlt_8bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, int rop); 31 | FREERDP_API int LineTo_8bpp(HGDI_DC hdc, int nXEnd, int nYEnd); 32 | -------------------------------------------------------------------------------- /include/freerdp/gdi/16bpp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI 16bpp Internal Buffer Routines 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 | #include 21 | #include 22 | #include 23 | 24 | typedef int (*pLineTo_16bpp)(HGDI_DC hdc, int nXEnd, int nYEnd); 25 | 26 | FREERDP_API uint16 gdi_get_color_16bpp(HGDI_DC hdc, GDI_COLOR color); 27 | 28 | FREERDP_API int FillRect_16bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); 29 | FREERDP_API int BitBlt_16bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); 30 | FREERDP_API int PatBlt_16bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, int rop); 31 | FREERDP_API int LineTo_16bpp(HGDI_DC hdc, int nXEnd, int nYEnd); 32 | -------------------------------------------------------------------------------- /include/freerdp/gdi/32bpp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI 32bpp Internal Buffer Routines 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 | #include 21 | #include 22 | #include 23 | 24 | typedef int (*pLineTo_32bpp)(HGDI_DC hdc, int nXEnd, int nYEnd); 25 | 26 | FREERDP_API uint32 gdi_get_color_32bpp(HGDI_DC hdc, GDI_COLOR color); 27 | 28 | FREERDP_API int FillRect_32bpp(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); 29 | FREERDP_API int BitBlt_32bpp(HGDI_DC hdcDest, int nXDest, int nYDest, int nWidth, int nHeight, HGDI_DC hdcSrc, int nXSrc, int nYSrc, int rop); 30 | FREERDP_API int PatBlt_32bpp(HGDI_DC hdc, int nXLeft, int nYLeft, int nWidth, int nHeight, int rop); 31 | FREERDP_API int LineTo_32bpp(HGDI_DC hdc, int nXEnd, int nYEnd); 32 | -------------------------------------------------------------------------------- /include/freerdp/utils/dsp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Digital Sound Processing 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __DSP_UTILS_H 21 | #define __DSP_UTILS_H 22 | 23 | #include 24 | 25 | struct _ADPCM 26 | { 27 | sint16 last_sample[2]; 28 | sint16 last_step[2]; 29 | }; 30 | typedef struct _ADPCM ADPCM; 31 | 32 | FREERDP_API uint8* dsp_resample(uint8* src, int bytes_per_sample, 33 | uint32 schan, uint32 srate, int sframes, 34 | uint32 rchan, uint32 rrate, int * prframes); 35 | 36 | FREERDP_API uint8* dsp_decode_ima_adpcm(ADPCM* adpcm, 37 | uint8* src, int size, int channels, int block_size, int* out_size); 38 | FREERDP_API uint8* dsp_encode_ima_adpcm(ADPCM* adpcm, 39 | uint8* src, int size, int channels, int block_size, int* out_size); 40 | 41 | #endif /* __DSP_UTILS_H */ 42 | 43 | -------------------------------------------------------------------------------- /libfreerdp-kbd/layouts_xkb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * XKB-based Keyboard Mapping to Microsoft Keyboard System 4 | * 5 | * Copyright 2009 Marc-Andre Moreau 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 __LAYOUTS_XKB_H 21 | #define __LAYOUTS_XKB_H 22 | 23 | typedef unsigned char KeycodeToVkcode[256]; 24 | 25 | typedef struct 26 | { 27 | unsigned char extended; 28 | unsigned char keycode; 29 | char* keyname; 30 | } RdpKeycodeRec, RdpScancodes[256]; 31 | 32 | #ifdef WITH_XKBFILE 33 | 34 | int init_xkb(void *dpy); 35 | unsigned int detect_keyboard_layout_from_xkb(void *dpy); 36 | int init_keycodes_from_xkb(void* dpy, RdpScancodes x_keycode_to_rdp_scancode, uint8 rdp_scancode_to_x_keycode[256][2]); 37 | 38 | #else 39 | 40 | void load_keyboard_map(KeycodeToVkcode keycodeToVkcode, char *xkbfile); 41 | 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /include/freerdp/utils/debug.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Debug Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __UTILS_DEBUG_H 21 | #define __UTILS_DEBUG_H 22 | 23 | #include "config.h" 24 | 25 | #include 26 | 27 | #define DEBUG_NULL(fmt, ...) do { } while (0) 28 | #define DEBUG_PRINT(_dbg_str, fmt, ...) printf(_dbg_str fmt "\n" , __FUNCTION__, __LINE__, ## __VA_ARGS__) 29 | #define DEBUG_CLASS(_dbg_class, fmt, ...) DEBUG_PRINT("DBG_" #_dbg_class " %s (%d): ", fmt, ## __VA_ARGS__) 30 | #define DEBUG_WARN(fmt, ...) DEBUG_PRINT("Warning %s (%d): ", fmt, ## __VA_ARGS__) 31 | 32 | #ifdef WITH_DEBUG 33 | #define DEBUG(fmt, ...) DEBUG_PRINT("DBG %s (%d): ", fmt, ## __VA_ARGS__) 34 | #else 35 | #define DEBUG(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 36 | #endif 37 | 38 | #endif /* __UTILS_DEBUG_H */ 39 | -------------------------------------------------------------------------------- /client/X11/xf_monitor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Monitor Handling 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_MONITOR_H 21 | #define __XF_MONITOR_H 22 | 23 | #include 24 | #include 25 | 26 | struct _MONITOR_INFO 27 | { 28 | RECTANGLE_16 area; 29 | RECTANGLE_16 workarea; 30 | boolean primary; 31 | }; 32 | typedef struct _MONITOR_INFO MONITOR_INFO; 33 | 34 | struct _VIRTUAL_SCREEN 35 | { 36 | int is_inited; /* TRUE when this struct is correctly setup */ 37 | int nmonitors; 38 | RECTANGLE_16 area; 39 | RECTANGLE_16 workarea; 40 | MONITOR_INFO* monitors; 41 | }; 42 | typedef struct _VIRTUAL_SCREEN VIRTUAL_SCREEN; 43 | 44 | #include "xfreerdp.h" 45 | 46 | boolean xf_detect_monitors(xfInfo* xfi, rdpSettings* settings); 47 | 48 | #endif /* __XF_MONITOR_H */ 49 | -------------------------------------------------------------------------------- /channels/rdpdr/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(RDPDR_SRCS 21 | rdpdr_constants.h 22 | rdpdr_types.h 23 | rdpdr_capabilities.c 24 | rdpdr_capabilities.h 25 | devman.c 26 | devman.h 27 | irp.c 28 | irp.h 29 | rdpdr_main.c 30 | rdpdr_main.h 31 | ) 32 | 33 | add_library(rdpdr ${RDPDR_SRCS}) 34 | set_target_properties(rdpdr PROPERTIES PREFIX "") 35 | 36 | target_link_libraries(rdpdr freerdp-utils) 37 | 38 | install(TARGETS rdpdr DESTINATION ${FREERDP_PLUGIN_PATH}) 39 | 40 | add_subdirectory(disk) 41 | add_subdirectory(printer) 42 | add_subdirectory(parallel) 43 | add_subdirectory(serial) 44 | 45 | if(WITH_PCSC) 46 | add_subdirectory(smartcard) 47 | endif() 48 | -------------------------------------------------------------------------------- /include/freerdp/gdi/shape.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Shape Functions 4 | * 5 | * Copyright 2010-2011 Marc-Andre Moreau 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 __GDI_SHAPE_H 21 | #define __GDI_SHAPE_H 22 | 23 | #include 24 | #include 25 | 26 | FREERDP_API int gdi_Ellipse(HGDI_DC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); 27 | FREERDP_API int gdi_FillRect(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); 28 | FREERDP_API int gdi_Polygon(HGDI_DC hdc, GDI_POINT *lpPoints, int nCount); 29 | FREERDP_API int gdi_PolyPolygon(HGDI_DC hdc, GDI_POINT *lpPoints, int *lpPolyCounts, int nCount); 30 | FREERDP_API int gdi_Rectangle(HGDI_DC hdc, int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); 31 | 32 | typedef int (*p_FillRect)(HGDI_DC hdc, HGDI_RECT rect, HGDI_BRUSH hbr); 33 | 34 | #endif /* __GDI_SHAPE_H */ 35 | -------------------------------------------------------------------------------- /channels/rdpdr/printer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(PRINTER_SRCS 21 | printer_main.c 22 | printer_main.h 23 | ) 24 | 25 | if(WITH_CUPS) 26 | set(PRINTER_SRCS 27 | ${PRINTER_SRCS} 28 | printer_cups.c 29 | printer_cups.h 30 | ) 31 | include_directories(${CUPS_INCLUDE_DIR}) 32 | add_definitions(-DWITH_CUPS) 33 | endif() 34 | 35 | include_directories(..) 36 | 37 | add_library(printer ${PRINTER_SRCS}) 38 | set_target_properties(printer PROPERTIES PREFIX "") 39 | 40 | target_link_libraries(printer freerdp-utils) 41 | 42 | if(WITH_CUPS) 43 | target_link_libraries(printer ${CUPS_LIBRARIES}) 44 | endif() 45 | 46 | install(TARGETS printer DESTINATION ${FREERDP_PLUGIN_PATH}) 47 | -------------------------------------------------------------------------------- /channels/xrdpvr/xrdpvr_main.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Xrdp video redirection channel 4 | * 5 | * Copyright 2012 Laxmikant Rashinkar 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 __XRDPVR_MAIN_H 21 | #define __XRDPVR_MAIN_H 22 | 23 | typedef struct xrdpvr_plugin xrdpvrPlugin; 24 | 25 | #define CMD_SET_VIDEO_FORMAT 1 26 | #define CMD_SET_AUDIO_FORMAT 2 27 | #define CMD_SEND_VIDEO_DATA 3 28 | #define CMD_SEND_AUDIO_DATA 4 29 | #define CMD_CREATE_META_DATA_FILE 5 30 | #define CMD_CLOSE_META_DATA_FILE 6 31 | #define CMD_WRITE_META_DATA 7 32 | #define CMD_DEINIT_XRDPVR 8 33 | #define CMD_SET_GEOMETRY 9 34 | #define CMD_SET_VOLUME 10 35 | #define CMD_INIT_XRDPVR 11 36 | 37 | /* TODO need to support Windows paths */ 38 | #define META_DATA_FILEAME "/tmp/xrdpvr_metadata.dat" 39 | 40 | #endif /* __XRDPVR_MAIN_H */ 41 | -------------------------------------------------------------------------------- /libfreerdp-core/surface.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Surface Commands 4 | * 5 | * Copyright 2011 Vic Lee 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 __SURFACE 21 | #define __SURFACE 22 | 23 | #include "rdp.h" 24 | #include 25 | 26 | #define SURFCMD_SURFACE_BITS_HEADER_LENGTH 22 27 | #define SURFCMD_FRAME_MARKER_LENGTH 8 28 | 29 | enum SURFCMD_CMDTYPE 30 | { 31 | CMDTYPE_SET_SURFACE_BITS = 0x0001, 32 | CMDTYPE_FRAME_MARKER = 0x0004, 33 | CMDTYPE_STREAM_SURFACE_BITS = 0x0006 34 | }; 35 | 36 | enum SURFCMD_FRAMEACTION 37 | { 38 | SURFACECMD_FRAMEACTION_BEGIN = 0x0000, 39 | SURFACECMD_FRAMEACTION_END = 0x0001 40 | }; 41 | 42 | boolean update_recv_surfcmds(rdpUpdate* update, uint32 size, STREAM* s); 43 | 44 | void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd); 45 | void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId); 46 | 47 | #endif /* __SURFACE */ 48 | 49 | -------------------------------------------------------------------------------- /channels/rdpdr/smartcard/scard_main.h: -------------------------------------------------------------------------------- 1 | /* 2 | FreeRDP: A Remote Desktop Protocol client. 3 | Redirected Smart Card Device Service 4 | 5 | Copyright 2011 O.S. Systems Software Ltda. 6 | Copyright 2011 Eduardo Fiss Beloni 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 | 21 | #ifndef __SCARD_MAIN_H 22 | #define __SCARD_MAIN_H 23 | 24 | #include 25 | 26 | #include "devman.h" 27 | #include "rdpdr_types.h" 28 | #include 29 | 30 | struct _SCARD_DEVICE 31 | { 32 | DEVICE device; 33 | 34 | char * name; 35 | char * path; 36 | 37 | LIST* irp_list; 38 | 39 | freerdp_thread* thread; 40 | }; 41 | typedef struct _SCARD_DEVICE SCARD_DEVICE; 42 | 43 | #ifdef WITH_DEBUG_SCARD 44 | #define DEBUG_SCARD(fmt, ...) DEBUG_CLASS(SCARD, fmt, ## __VA_ARGS__) 45 | #else 46 | #define DEBUG_SCARD(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 47 | #endif 48 | 49 | boolean scard_async_op(IRP*); 50 | void scard_device_control(SCARD_DEVICE*, IRP*); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /client/X11/xf_keyboard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Keyboard Handling 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_KEYBOARD_H 21 | #define __XF_KEYBOARD_H 22 | 23 | #include 24 | #include 25 | 26 | #include "xfreerdp.h" 27 | 28 | void xf_kbd_init(xfInfo* xfi); 29 | void xf_kbd_set_keypress(xfInfo* xfi, uint8 keycode, KeySym keysym); 30 | void xf_kbd_unset_keypress(xfInfo* xfi, uint8 keycode); 31 | boolean xf_kbd_key_pressed(xfInfo* xfi, KeySym keysym); 32 | void xf_kbd_send_key(xfInfo* xfi, boolean down, uint8 keycode); 33 | int xf_kbd_read_keyboard_state(xfInfo* xfi); 34 | boolean xf_kbd_get_key_state(xfInfo* xfi, int state, int keysym); 35 | int xf_kbd_get_toggle_keys_state(xfInfo* xfi); 36 | void xf_kbd_focus_in(xfInfo* xfi); 37 | boolean xf_kbd_handle_special_keys(xfInfo* xfi, KeySym keysym); 38 | 39 | #endif /* __XF_KEYBOARD_H */ 40 | -------------------------------------------------------------------------------- /libfreerdp-gdi/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # libfreerdp-gdi cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(FREERDP_GDI_SRCS 21 | 8bpp.c 22 | 16bpp.c 23 | 32bpp.c 24 | bitmap.c 25 | brush.c 26 | clipping.c 27 | dc.c 28 | drawing.c 29 | line.c 30 | palette.c 31 | pen.c 32 | region.c 33 | shape.c 34 | graphics.c 35 | graphics.h 36 | gdi.c 37 | gdi.h) 38 | 39 | add_library(freerdp-gdi ${FREERDP_GDI_SRCS}) 40 | 41 | target_link_libraries(freerdp-gdi freerdp-core) 42 | target_link_libraries(freerdp-gdi freerdp-cache) 43 | target_link_libraries(freerdp-gdi freerdp-codec) 44 | 45 | set_target_properties(freerdp-gdi PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib") 46 | 47 | install(TARGETS freerdp-gdi DESTINATION ${CMAKE_INSTALL_LIBDIR}) 48 | -------------------------------------------------------------------------------- /libfreerdp-utils/hexdump.c: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Hex Dump Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 | #include 21 | #include 22 | 23 | #include 24 | 25 | #include 26 | 27 | void freerdp_hexdump(uint8* data, int length) 28 | { 29 | uint8* p = data; 30 | int i, line, offset = 0; 31 | 32 | while (offset < length) 33 | { 34 | printf("%04x ", offset); 35 | 36 | line = length - offset; 37 | 38 | if (line > FREERDP_HEXDUMP_LINE_LENGTH) 39 | line = FREERDP_HEXDUMP_LINE_LENGTH; 40 | 41 | for (i = 0; i < line; i++) 42 | printf("%02x ", p[i]); 43 | 44 | for (; i < FREERDP_HEXDUMP_LINE_LENGTH; i++) 45 | printf(" "); 46 | 47 | for (i = 0; i < line; i++) 48 | printf("%c", (p[i] >= 0x20 && p[i] < 0x7F) ? p[i] : '.'); 49 | 50 | printf("\n"); 51 | 52 | offset += line; 53 | p += line; 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /channels/drdynvc/dvcman.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Dynamic Virtual Channel Manager 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __DVCMAN_H 21 | #define __DVCMAN_H 22 | 23 | #include 24 | #include "drdynvc_main.h" 25 | 26 | IWTSVirtualChannelManager* dvcman_new(drdynvcPlugin* plugin); 27 | int dvcman_load_plugin(IWTSVirtualChannelManager* pChannelMgr, RDP_PLUGIN_DATA* data); 28 | void dvcman_free(IWTSVirtualChannelManager* pChannelMgr); 29 | int dvcman_init(IWTSVirtualChannelManager* pChannelMgr); 30 | int dvcman_create_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, const char* ChannelName); 31 | int dvcman_close_channel(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId); 32 | int dvcman_receive_channel_data_first(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint32 length); 33 | int dvcman_receive_channel_data(IWTSVirtualChannelManager* pChannelMgr, uint32 ChannelId, uint8* data, uint32 data_size); 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /server/X11/xf_peer.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Peer 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __XF_PEER_H 21 | #define __XF_PEER_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | typedef struct xf_peer_context xfPeerContext; 32 | 33 | #include "xfreerdp.h" 34 | 35 | struct xf_peer_context 36 | { 37 | rdpContext _p; 38 | 39 | int fps; 40 | STREAM* s; 41 | HGDI_DC hdc; 42 | xfInfo* info; 43 | int activations; 44 | pthread_t thread; 45 | boolean activated; 46 | pthread_mutex_t mutex; 47 | RFX_CONTEXT* rfx_context; 48 | xfEventQueue* event_queue; 49 | pthread_t frame_rate_thread; 50 | }; 51 | 52 | void xf_peer_accepted(freerdp_listener* instance, freerdp_peer* client); 53 | 54 | #endif /* __XF_PEER_H */ 55 | -------------------------------------------------------------------------------- /client/X11/xf_cliprdr.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * X11 Clipboard Redirection 4 | * 5 | * Copyright 2010-2011 Vic Lee 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 __XF_CLIPRDR_H 21 | #define __XF_CLIPRDR_H 22 | 23 | #include "xfreerdp.h" 24 | 25 | void xf_cliprdr_init(xfInfo* xfi, rdpChannels* chanman); 26 | void xf_cliprdr_uninit(xfInfo* xfi); 27 | void xf_process_cliprdr_event(xfInfo* xfi, RDP_EVENT* event); 28 | boolean xf_cliprdr_process_selection_notify(xfInfo* xfi, XEvent* xevent); 29 | boolean xf_cliprdr_process_selection_request(xfInfo* xfi, XEvent* xevent); 30 | boolean xf_cliprdr_process_selection_clear(xfInfo* xfi, XEvent* xevent); 31 | boolean xf_cliprdr_process_property_notify(xfInfo* xfi, XEvent* xevent); 32 | void xf_cliprdr_check_owner(xfInfo* xfi); 33 | 34 | #ifdef WITH_DEBUG_X11_CLIPRDR 35 | #define DEBUG_X11_CLIPRDR(fmt, ...) DEBUG_CLASS(X11_CLIPRDR, fmt, ## __VA_ARGS__) 36 | #else 37 | #define DEBUG_X11_CLIPRDR(fmt, ...) DEBUG_NULL(fmt, ## __VA_ARGS__) 38 | #endif 39 | 40 | #endif /* __XF_CLIPRDR_H */ 41 | -------------------------------------------------------------------------------- /channels/drdynvc/tsmf/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # FreeRDP cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | set(TSMF_SRCS 21 | tsmf_audio.c 22 | tsmf_audio.h 23 | tsmf_codec.c 24 | tsmf_codec.h 25 | tsmf_constants.h 26 | tsmf_decoder.c 27 | tsmf_decoder.h 28 | tsmf_ifman.c 29 | tsmf_ifman.h 30 | tsmf_main.c 31 | tsmf_main.h 32 | tsmf_media.c 33 | tsmf_media.h 34 | tsmf_types.h 35 | ) 36 | 37 | include_directories(..) 38 | 39 | add_library(tsmf ${TSMF_SRCS}) 40 | set_target_properties(tsmf PROPERTIES PREFIX "") 41 | 42 | target_link_libraries(tsmf freerdp-utils) 43 | 44 | install(TARGETS tsmf DESTINATION ${FREERDP_PLUGIN_PATH}) 45 | 46 | if(WITH_FFMPEG) 47 | add_subdirectory(ffmpeg) 48 | endif() 49 | 50 | if(WITH_ALSA) 51 | add_subdirectory(alsa) 52 | endif() 53 | 54 | if(WITH_PULSEAUDIO) 55 | add_subdirectory(pulse) 56 | endif() 57 | 58 | -------------------------------------------------------------------------------- /channels/xrdpvr/xrdpvr_player.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Xrdp video redirection channel 4 | * 5 | * Copyright 2012 Laxmikant Rashinkar 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 __XRDPVR_PLAYER_H 21 | #define __XRDPVR_PLAYER_H 22 | 23 | #include 24 | 25 | extern int g_meta_data_fd; 26 | 27 | void *init_player(void *plugin, char *filename); 28 | void deinit_player(void *psi); 29 | int process_video(void *vp, uint8 *data, int data_len); 30 | int process_audio(void *vp, uint8 *data, int data_len); 31 | uint8 *get_decoded_audio_data(void *vp, uint32 *size); 32 | void get_audio_config(void *vp, int *samp_per_sec, int *num_channels, int *bits_per_samp); 33 | void set_audio_config(void* vp, char* extradata, int extradata_size, int sample_rate, int bit_rate, int channels, int block_align); 34 | void set_video_config(void *vp); 35 | void set_geometry(void *g_psi, int xpos, int ypos, int width, int height); 36 | void set_volume(void *g_psi, int volume); 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /libfreerdp-core/mppc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Implements Microsoft Point to Point Compression (MPPC) protocol 4 | * 5 | * Copyright 2011 Laxmikant Rashinkar 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 __MPPC_H 21 | #define __MPPC_H 22 | 23 | #include 24 | 25 | #define RDP6_HISTORY_BUF_SIZE 65536 26 | #define RDP6_OFFSET_CACHE_SIZE 4 27 | 28 | struct rdp_mppc 29 | { 30 | uint8 *history_buf; 31 | uint16 *offset_cache; 32 | uint8 *history_buf_end; 33 | uint8 *history_ptr; 34 | }; 35 | 36 | // forward declarations 37 | int decompress_rdp(rdpRdp *, uint8 *, int, int, uint32 *, uint32 *); 38 | int decompress_rdp_4(rdpRdp *, uint8 *, int, int, uint32 *, uint32 *); 39 | int decompress_rdp_5(rdpRdp *, uint8 *, int, int, uint32 *, uint32 *); 40 | int decompress_rdp_6(rdpRdp *, uint8 *, int, int, uint32 *, uint32 *); 41 | int decompress_rdp_61(rdpRdp *, uint8 *, int, int, uint32 *, uint32 *); 42 | struct rdp_mppc *mppc_new(rdpRdp *rdp); 43 | void mppc_free(rdpRdp *rdp); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /include/freerdp/utils/list.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Double-linked List Utils 4 | * 5 | * Copyright 2011 Vic Lee 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 __LIST_UTILS_H 21 | #define __LIST_UTILS_H 22 | 23 | #include 24 | #include 25 | 26 | typedef struct _LIST_ITEM LIST_ITEM; 27 | struct _LIST_ITEM 28 | { 29 | void* data; 30 | LIST_ITEM* prev; 31 | LIST_ITEM* next; 32 | }; 33 | 34 | typedef struct _LIST LIST; 35 | struct _LIST 36 | { 37 | int count; 38 | LIST_ITEM* head; 39 | LIST_ITEM* tail; 40 | }; 41 | 42 | FREERDP_API LIST* list_new(void); 43 | FREERDP_API void list_free(LIST* list); 44 | FREERDP_API void list_enqueue(LIST* list, void* data); 45 | FREERDP_API void* list_dequeue(LIST* list); 46 | FREERDP_API void* list_peek(LIST* list); 47 | FREERDP_API void* list_next(LIST* list, void* data); 48 | #define list_add(_l, _d) list_enqueue(_l, _d) 49 | FREERDP_API void* list_remove(LIST* list, void* data); 50 | FREERDP_API int list_size(LIST* list); 51 | 52 | #endif /* __LIST_UTILS_H */ 53 | -------------------------------------------------------------------------------- /include/freerdp/utils/stopwatch.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Stopwatch Utils 4 | * 5 | * Copyright 2011 Stephen Erisman 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 __UTILS_STOPWATCH_H 21 | #define __UTILS_STOPWATCH_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | struct _STOPWATCH 29 | { 30 | clock_t start; 31 | clock_t end; 32 | double elapsed; 33 | clock_t count; 34 | }; 35 | typedef struct _STOPWATCH STOPWATCH; 36 | 37 | FREERDP_API STOPWATCH* stopwatch_create(); 38 | FREERDP_API void stopwatch_free(STOPWATCH* stopwatch); 39 | 40 | FREERDP_API void stopwatch_start(STOPWATCH* stopwatch); 41 | FREERDP_API void stopwatch_stop(STOPWATCH* stopwatch); 42 | FREERDP_API void stopwatch_reset(STOPWATCH* stopwatch); 43 | 44 | FREERDP_API double stopwatch_get_elapsed_time_in_seconds(STOPWATCH* stopwatch); 45 | FREERDP_API void stopwatch_get_elapsed_time_in_useconds(STOPWATCH* stopwatch, uint32* sec, uint32* usec); 46 | 47 | #endif /* __UTILS_STOPWATCH_H */ 48 | -------------------------------------------------------------------------------- /include/freerdp/kbd/kbd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * XKB-based keyboard mapping 4 | * 5 | * Copyright 2009 Marc-Andre Moreau 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 __FREERDP_KBD_H 21 | #define __FREERDP_KBD_H 22 | 23 | #include 24 | #include 25 | 26 | #define RDP_KEYBOARD_LAYOUT_TYPE_STANDARD 1 27 | #define RDP_KEYBOARD_LAYOUT_TYPE_VARIANT 2 28 | #define RDP_KEYBOARD_LAYOUT_TYPE_IME 4 29 | 30 | typedef struct rdp_keyboard_layout 31 | { 32 | uint32 code; 33 | char name[50]; 34 | } rdpKeyboardLayout; 35 | 36 | FREERDP_API rdpKeyboardLayout* freerdp_kbd_get_layouts(int types); 37 | FREERDP_API uint32 freerdp_kbd_init(void *dpy, uint32 keyboard_layout_id); 38 | FREERDP_API uint8 freerdp_kbd_get_scancode_by_keycode(uint8 keycode, boolean* extended); 39 | FREERDP_API uint8 freerdp_kbd_get_keycode_by_scancode(uint8 scancode, boolean extended); 40 | FREERDP_API uint8 freerdp_kbd_get_scancode_by_virtualkey(int vkcode, boolean* extended); 41 | 42 | #endif /* __FREERDP_KBD_H */ 43 | -------------------------------------------------------------------------------- /include/freerdp/utils/memory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Memory Utils 4 | * 5 | * Copyright 2009-2013 Jay Sorg 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 __MEMORY_UTILS_H 21 | #define __MEMORY_UTILS_H 22 | 23 | #include 24 | #include 25 | 26 | struct shm_info_t 27 | { 28 | int shmid; 29 | int bytes; 30 | void* ptr; 31 | }; 32 | 33 | FREERDP_API void* xmalloc(size_t size); 34 | FREERDP_API void* xzalloc(size_t size); 35 | FREERDP_API void* xrealloc(void* ptr, size_t size); 36 | FREERDP_API void* xrealloc_check(void* ptr, size_t size); 37 | FREERDP_API void xfree(void* ptr); 38 | FREERDP_API char* xstrdup(const char* str); 39 | 40 | FREERDP_API struct shm_info_t* create_shm_info(size_t size); 41 | FREERDP_API void delete_shm_info(struct shm_info_t* shm_info); 42 | 43 | #define xnew(_type) (_type*)xzalloc(sizeof(_type)) 44 | #define xnew0(_type, _count) (_type*)calloc(_count, sizeof(_type)) 45 | #define xrenew(_type, _ptr, _count) (_type*)xrealloc_check(_ptr, sizeof(_type) * (_count)) 46 | 47 | #endif /* __MEMORY_UTILS_H */ 48 | -------------------------------------------------------------------------------- /cunit/test_freerdp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * FreeRDP Unit Tests 4 | * 5 | * Copyright 2010 Marc-Andre Moreau 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 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #define add_test_suite(name) \ 29 | CU_pSuite pSuite; \ 30 | pSuite = CU_add_suite(#name, init_##name##_suite, clean_##name##_suite); \ 31 | if (pSuite == NULL) { \ 32 | CU_cleanup_registry(); return CU_get_error(); \ 33 | } 34 | 35 | #define add_test_function(name) \ 36 | if (CU_add_test(pSuite, #name, test_##name) == NULL) { \ 37 | CU_cleanup_registry(); return CU_get_error(); \ 38 | } 39 | 40 | void dump_data(unsigned char * p, int len, int width, char* name); 41 | void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line); 42 | 43 | #define ASSERT_STREAM(_s, _data, _length) assert_stream(_s, _data, _length, __FUNCTION__, __LINE__) 44 | -------------------------------------------------------------------------------- /include/freerdp/cache/cache.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * RDP Caches 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __CACHE_H 21 | #define __CACHE_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | 35 | struct rdp_cache 36 | { 37 | rdpGlyphCache* glyph; /* 0 */ 38 | rdpBrushCache* brush; /* 1 */ 39 | rdpPointerCache* pointer; /* 2 */ 40 | rdpBitmapCache* bitmap; /* 3 */ 41 | rdpOffscreenCache* offscreen; /* 4 */ 42 | rdpPaletteCache* palette; /* 5 */ 43 | 44 | /* internal */ 45 | 46 | rdpSettings* settings; 47 | }; 48 | 49 | FREERDP_API rdpCache* cache_new(rdpSettings* settings); 50 | FREERDP_API void cache_free(rdpCache* cache); 51 | 52 | #endif /* __CACHE_H */ 53 | -------------------------------------------------------------------------------- /channels/cliprdr/cliprdr_format.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Clipboard Virtual Channel 4 | * 5 | * Copyright 2009-2011 Jay Sorg 6 | * Copyright 2010-2011 Vic Lee 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 | 21 | #ifndef __CLIPRDR_FORMAT_H 22 | #define __CLIPRDR_FORMAT_H 23 | 24 | void cliprdr_process_format_list_event(cliprdrPlugin* cliprdr, RDP_CB_FORMAT_LIST_EVENT* cb_event); 25 | void cliprdr_process_format_list(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); 26 | void cliprdr_process_format_list_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); 27 | 28 | void cliprdr_process_format_data_request(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); 29 | void cliprdr_process_format_data_response_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_RESPONSE_EVENT* cb_event); 30 | 31 | void cliprdr_process_format_data_request_event(cliprdrPlugin* cliprdr, RDP_CB_DATA_REQUEST_EVENT* cb_event); 32 | void cliprdr_process_format_data_response(cliprdrPlugin* cliprdr, STREAM* s, uint32 dataLen, uint16 msgFlags); 33 | 34 | #endif /* __CLIPRDR_FORMAT_H */ 35 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_H 2 | #define __CONFIG_H 3 | 4 | #define FREERDP_VERSION "${FREERDP_VERSION}" 5 | #define FREERDP_VERSION_FULL "${FREERDP_VERSION_FULL}" 6 | #define FREERDP_VERSION_MAJOR ${FREERDP_VERSION_MAJOR} 7 | #define FREERDP_VERSION_MINOR ${FREERDP_VERSION_MINOR} 8 | #define FREERDP_VERSION_REVISION ${FREERDP_VERSION_REVISION} 9 | 10 | /* Include files */ 11 | #cmakedefine HAVE_SYS_PARAM_H 12 | #cmakedefine HAVE_SYS_SOCKET_H 13 | #cmakedefine HAVE_NETDB_H 14 | #cmakedefine HAVE_FCNTL_H 15 | #cmakedefine HAVE_UNISTD_H 16 | #cmakedefine HAVE_LIMITS_H 17 | #cmakedefine HAVE_STDINT_H 18 | #cmakedefine HAVE_STDBOOL_H 19 | #cmakedefine HAVE_INTTYPES_H 20 | 21 | /* Endian */ 22 | #cmakedefine B_ENDIAN 23 | 24 | /* Options */ 25 | #cmakedefine WITH_DEBUG_TRANSPORT 26 | #cmakedefine WITH_DEBUG_CHANNELS 27 | #cmakedefine WITH_DEBUG_SVC 28 | #cmakedefine WITH_DEBUG_DVC 29 | #cmakedefine WITH_DEBUG_KBD 30 | #cmakedefine WITH_DEBUG_NLA 31 | #cmakedefine WITH_DEBUG_NEGO 32 | #cmakedefine WITH_DEBUG_CERTIFICATE 33 | #cmakedefine WITH_DEBUG_LICENSE 34 | #cmakedefine WITH_DEBUG_GDI 35 | #cmakedefine WITH_DEBUG_ASSERT 36 | #cmakedefine WITH_DEBUG_RFX 37 | #cmakedefine WITH_PROFILER 38 | #cmakedefine WITH_SSE2 39 | #cmakedefine WITH_SSE2_TARGET 40 | #cmakedefine WITH_JPEG 41 | #cmakedefine WITH_TJPEG 42 | #cmakedefine WITH_H264 43 | #cmakedefine WITH_NEON 44 | #cmakedefine WITH_DEBUG_X11 45 | #cmakedefine WITH_DEBUG_X11_CLIPRDR 46 | #cmakedefine WITH_DEBUG_X11_LOCAL_MOVESIZE 47 | #cmakedefine WITH_DEBUG_RAIL 48 | #cmakedefine WITH_DEBUG_XV 49 | #cmakedefine WITH_DEBUG_SCARD 50 | #cmakedefine WITH_DEBUG_ORDERS 51 | #cmakedefine WITH_DEBUG_REDIR 52 | #cmakedefine WITH_DEBUG_CLIPRDR 53 | #cmakedefine WITH_DEBUG_WND 54 | #endif 55 | -------------------------------------------------------------------------------- /include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # FreeRDP: A Remote Desktop Protocol Client 2 | # include headers cmake build script 3 | # 4 | # Copyright 2011 O.S. Systems Software Ltda. 5 | # Copyright 2011 Otavio Salvador 6 | # Copyright 2011 Marc-Andre Moreau 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 | file(GLOB HEADERS "freerdp/*.h") 21 | install_files(/include/freerdp FILES ${HEADERS}) 22 | 23 | install(DIRECTORY freerdp/utils DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 24 | install(DIRECTORY freerdp/channels DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 25 | install(DIRECTORY freerdp/cache DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 26 | install(DIRECTORY freerdp/gdi DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 27 | install(DIRECTORY freerdp/kbd DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 28 | install(DIRECTORY freerdp/rail DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 29 | install(DIRECTORY freerdp/codec DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 30 | install(DIRECTORY freerdp/plugins DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h") 31 | -------------------------------------------------------------------------------- /resources/conv_to_ewm_prop.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # Copyright 2011 Anthony Tong 4 | 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | """ 18 | tool to preconvert an icon file to a x11 property as expected 19 | by ewm hints spec: 20 | width, length, [argb pixels] 21 | """ 22 | 23 | import PIL 24 | import PIL.Image 25 | 26 | import os 27 | import sys 28 | 29 | def usage(): 30 | print "convert_to_ewm_prop " 31 | return 1 32 | 33 | def main(argv): 34 | if len(argv) != 3: 35 | return usage() 36 | 37 | im = PIL.Image.open(argv[1]) 38 | fp = open(argv[2], 'w') 39 | 40 | var_name = os.path.basename(argv[2]) 41 | if var_name.endswith('.h'): 42 | var_name = var_name[:-2] 43 | 44 | fp.write("static unsigned long %s_prop [] = {\n" % var_name) 45 | fp.write(" %d, %d\n" % im.size) 46 | 47 | i = 0 48 | for pixel in im.getdata(): 49 | r,g,b,a = pixel 50 | pixel = b 51 | pixel |= g << 8 52 | pixel |= r << 16 53 | pixel |= a << 24 54 | fp.write(" , %du" % pixel) 55 | 56 | i += 1 57 | if i % 8 == 0: 58 | fp.write("\n") 59 | 60 | fp.write("};\n") 61 | 62 | if __name__ == '__main__': 63 | sys.exit(main(sys.argv)) 64 | 65 | -------------------------------------------------------------------------------- /include/freerdp/utils/rail.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Remote Applications Integrated Locally (RAIL) Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __RAIL_UTILS_H 21 | #define __RAIL_UTILS_H 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #define RAIL_ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) 29 | 30 | FREERDP_API void rail_unicode_string_alloc(UNICODE_STRING* unicode_string, uint16 cbString); 31 | FREERDP_API void rail_unicode_string_free(UNICODE_STRING* unicode_string); 32 | FREERDP_API void rail_read_unicode_string(STREAM* s, UNICODE_STRING* unicode_string); 33 | FREERDP_API void rail_write_unicode_string(STREAM* s, UNICODE_STRING* unicode_string); 34 | FREERDP_API void rail_write_unicode_string_value(STREAM* s, UNICODE_STRING* unicode_string); 35 | FREERDP_API void* rail_clone_order(uint32 event_type, void* order); 36 | FREERDP_API void rail_free_cloned_order(uint32 event_type, void* order); 37 | 38 | #endif /* __RAIL_UTILS_H */ 39 | -------------------------------------------------------------------------------- /cunit/test_libgdi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * GDI Unit Tests 4 | * 5 | * Copyright 2010 Marc-Andre Moreau 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 | #include "test_freerdp.h" 21 | 22 | int init_libgdi_suite(void); 23 | int clean_libgdi_suite(void); 24 | int add_libgdi_suite(void); 25 | 26 | void test_gdi_GetDC(void); 27 | void test_gdi_CreateCompatibleDC(void); 28 | void test_gdi_CreateBitmap(void); 29 | void test_gdi_CreateCompatibleBitmap(void); 30 | void test_gdi_CreatePen(void); 31 | void test_gdi_CreateSolidBrush(void); 32 | void test_gdi_CreatePatternBrush(void); 33 | void test_gdi_CreateRectRgn(void); 34 | void test_gdi_CreateRect(void); 35 | void test_gdi_GetPixel(void); 36 | void test_gdi_SetPixel(void); 37 | void test_gdi_SetROP2(void); 38 | void test_gdi_MoveToEx(void); 39 | void test_gdi_LineTo(void); 40 | void test_gdi_Ellipse(void); 41 | void test_gdi_PtInRect(void); 42 | void test_gdi_FillRect(void); 43 | void test_gdi_BitBlt_32bpp(void); 44 | void test_gdi_BitBlt_16bpp(void); 45 | void test_gdi_BitBlt_8bpp(void); 46 | void test_gdi_ClipCoords(void); 47 | void test_gdi_InvalidateRegion(void); 48 | -------------------------------------------------------------------------------- /include/freerdp/utils/file.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * File Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __FILE_UTILS_H 21 | #define __FILE_UTILS_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | FREERDP_API void freerdp_mkdir(char* path); 28 | FREERDP_API boolean freerdp_check_file_exists(char* file); 29 | FREERDP_API char* freerdp_get_home_path(rdpSettings* settings); 30 | FREERDP_API char* freerdp_get_config_path(rdpSettings* settings); 31 | FREERDP_API char* freerdp_get_current_path(rdpSettings* settings); 32 | FREERDP_API char* freerdp_construct_path(char* base_path, char* relative_path); 33 | FREERDP_API char* freerdp_append_shared_library_suffix(char* file_path); 34 | FREERDP_API char* freerdp_get_parent_path(char* base_path, int depth); 35 | FREERDP_API boolean freerdp_path_contains_separator(char* path); 36 | FREERDP_API boolean freerdp_detect_development_mode(rdpSettings* settings); 37 | FREERDP_API void freerdp_detect_paths(rdpSettings* settings); 38 | 39 | #endif /* __FILE_UTILS_H */ 40 | -------------------------------------------------------------------------------- /include/freerdp/utils/args.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol client. 3 | * Arguments Parsing 4 | * 5 | * Copyright 2011 Vic Lee 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 __ARGS_UTILS_H 21 | #define __ARGS_UTILS_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | 28 | typedef enum _FREERDP_ARGS_PARSE_RESULT 29 | { 30 | FREERDP_ARGS_PARSE_FAILURE = -1, 31 | FREERDP_ARGS_PARSE_HELP = -2, 32 | FREERDP_ARGS_PARSE_VERSION = -3, 33 | } FREERDP_ARGS_PARSE_RESULT; 34 | 35 | 36 | /* Returns 1 if succeed, otherwise returns zero */ 37 | typedef int (*ProcessPluginArgs) (rdpSettings* settings, const char* name, 38 | RDP_PLUGIN_DATA* plugin_data, void* user_data); 39 | 40 | /* Returns number of arguments processed (1 or 2), otherwise returns zero */ 41 | typedef int (*ProcessUIArgs) (rdpSettings* settings, const char* opt, 42 | const char* val, void* user_data); 43 | 44 | FREERDP_API int freerdp_parse_args(rdpSettings* settings, int argc, char** argv, 45 | ProcessPluginArgs plugin_callback, void* plugin_user_data, 46 | ProcessUIArgs ui_callback, void* ui_user_data); 47 | 48 | #endif /* __ARGS_UTILS_H */ 49 | -------------------------------------------------------------------------------- /include/freerdp/utils/unicode.h: -------------------------------------------------------------------------------- 1 | /** 2 | * FreeRDP: A Remote Desktop Protocol Client 3 | * Unicode Utils 4 | * 5 | * Copyright 2011 Marc-Andre Moreau 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 __UNICODE_UTILS_H 21 | #define __UNICODE_UTILS_H 22 | 23 | #include 24 | #include 25 | #include 26 | 27 | #define DEFAULT_CODEPAGE "UTF-8" 28 | #define WINDOWS_CODEPAGE "UTF-16LE" 29 | 30 | #ifdef HAVE_ICONV 31 | #include 32 | #endif 33 | 34 | #ifndef ICONV_CONST 35 | #define ICONV_CONST "" 36 | #endif 37 | 38 | struct _UNICONV 39 | { 40 | int iconv; 41 | #ifdef HAVE_ICONV 42 | iconv_t* in_iconv_h; 43 | iconv_t* out_iconv_h; 44 | #endif 45 | }; 46 | typedef struct _UNICONV UNICONV; 47 | 48 | FREERDP_API UNICONV* freerdp_uniconv_new(); 49 | FREERDP_API void freerdp_uniconv_free(UNICONV *uniconv); 50 | FREERDP_API char* freerdp_uniconv_in(UNICONV *uniconv, unsigned char* pin, size_t in_len); 51 | FREERDP_API char* freerdp_uniconv_out(UNICONV *uniconv, const char *str, size_t *pout_len); 52 | FREERDP_API void freerdp_uniconv_uppercase(UNICONV *uniconv, char *wstr, int length); 53 | 54 | #endif /* __UNICODE_UTILS_H */ 55 | --------------------------------------------------------------------------------