From e2cd73ba5424b9de9760b548b8b58e51f5e38ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Fri, 5 Oct 2012 18:30:14 -0400 Subject: [PATCH] channels: moving device plugins up in the directory structure --- channels/disk/CMakeLists.txt | 21 +++++++++++++++++++ channels/disk/ChannelOptions.cmake | 14 +++++++++++++ .../disk => disk/client}/CMakeLists.txt | 10 ++++----- .../client/disk => disk/client}/dirent.h | 0 .../client/disk => disk/client}/disk_file.c | 0 .../client/disk => disk/client}/disk_file.h | 0 .../client/disk => disk/client}/disk_main.c | 8 +++---- .../client/disk => disk/client}/statvfs.c | 0 .../client/disk => disk/client}/statvfs.h | 0 channels/parallel/CMakeLists.txt | 21 +++++++++++++++++++ channels/parallel/ChannelOptions.cmake | 14 +++++++++++++ .../client}/CMakeLists.txt | 7 ++++--- .../client}/parallel_main.c | 0 channels/printer/CMakeLists.txt | 21 +++++++++++++++++++ channels/printer/ChannelOptions.cmake | 16 ++++++++++++++ .../printer => printer/client}/CMakeLists.txt | 5 +++-- .../printer => printer/client}/printer_cups.c | 0 .../printer => printer/client}/printer_cups.h | 0 .../printer => printer/client}/printer_main.c | 0 .../printer => printer/client}/printer_main.h | 0 .../printer => printer/client}/printer_win.c | 0 .../printer => printer/client}/printer_win.h | 0 channels/rdpdr/client/CMakeLists.txt | 15 ++----------- channels/rdpdr/client/rdpdr_constants.h | 1 + channels/serial/CMakeLists.txt | 21 +++++++++++++++++++ channels/serial/ChannelOptions.cmake | 14 +++++++++++++ .../serial => serial/client}/CMakeLists.txt | 20 ++++++++++-------- .../client}/serial_constants.h | 0 .../serial => serial/client}/serial_main.c | 0 .../serial => serial/client}/serial_tty.c | 0 .../serial => serial/client}/serial_tty.h | 0 channels/smartcard/CMakeLists.txt | 21 +++++++++++++++++++ channels/smartcard/ChannelOptions.cmake | 16 ++++++++++++++ .../client}/CMakeLists.txt | 5 +++-- .../client}/scard_main.c | 0 .../client}/scard_main.h | 0 .../client}/scard_operations.c | 0 winpr/libwinpr/interlocked/interlocked.c | 4 ++-- 38 files changed, 214 insertions(+), 40 deletions(-) create mode 100644 channels/disk/CMakeLists.txt create mode 100644 channels/disk/ChannelOptions.cmake rename channels/{rdpdr/client/disk => disk/client}/CMakeLists.txt (83%) rename channels/{rdpdr/client/disk => disk/client}/dirent.h (100%) rename channels/{rdpdr/client/disk => disk/client}/disk_file.c (100%) rename channels/{rdpdr/client/disk => disk/client}/disk_file.h (100%) rename channels/{rdpdr/client/disk => disk/client}/disk_main.c (99%) rename channels/{rdpdr/client/disk => disk/client}/statvfs.c (100%) rename channels/{rdpdr/client/disk => disk/client}/statvfs.h (100%) create mode 100644 channels/parallel/CMakeLists.txt create mode 100644 channels/parallel/ChannelOptions.cmake rename channels/{rdpdr/client/parallel => parallel/client}/CMakeLists.txt (86%) rename channels/{rdpdr/client/parallel => parallel/client}/parallel_main.c (100%) create mode 100644 channels/printer/CMakeLists.txt create mode 100644 channels/printer/ChannelOptions.cmake rename channels/{rdpdr/client/printer => printer/client}/CMakeLists.txt (94%) rename channels/{rdpdr/client/printer => printer/client}/printer_cups.c (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_cups.h (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_main.c (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_main.h (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_win.c (100%) rename channels/{rdpdr/client/printer => printer/client}/printer_win.h (100%) create mode 100644 channels/serial/CMakeLists.txt create mode 100644 channels/serial/ChannelOptions.cmake rename channels/{rdpdr/client/serial => serial/client}/CMakeLists.txt (64%) rename channels/{rdpdr/client/serial => serial/client}/serial_constants.h (100%) rename channels/{rdpdr/client/serial => serial/client}/serial_main.c (100%) rename channels/{rdpdr/client/serial => serial/client}/serial_tty.c (100%) rename channels/{rdpdr/client/serial => serial/client}/serial_tty.h (100%) create mode 100644 channels/smartcard/CMakeLists.txt create mode 100644 channels/smartcard/ChannelOptions.cmake rename channels/{rdpdr/client/smartcard => smartcard/client}/CMakeLists.txt (93%) rename channels/{rdpdr/client/smartcard => smartcard/client}/scard_main.c (100%) rename channels/{rdpdr/client/smartcard => smartcard/client}/scard_main.h (100%) rename channels/{rdpdr/client/smartcard => smartcard/client}/scard_operations.c (100%) diff --git a/channels/disk/CMakeLists.txt b/channels/disk/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/disk/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/disk/ChannelOptions.cmake b/channels/disk/ChannelOptions.cmake new file mode 100644 index 000000000..08ae24735 --- /dev/null +++ b/channels/disk/ChannelOptions.cmake @@ -0,0 +1,14 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "disk") +set(CHANNEL_LONG_NAME "Disk Redirection Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPEFS]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +endif() + diff --git a/channels/rdpdr/client/disk/CMakeLists.txt b/channels/disk/client/CMakeLists.txt similarity index 83% rename from channels/rdpdr/client/disk/CMakeLists.txt rename to channels/disk/client/CMakeLists.txt index eca9ea0bd..e9f503d0b 100644 --- a/channels/rdpdr/client/disk/CMakeLists.txt +++ b/channels/disk/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,7 +16,7 @@ # limitations under the License. set(MODULE_NAME "disk") -set(MODULE_PREFIX "CHANNEL_DEVICE_DISK") +set(MODULE_PREFIX "CHANNEL_RDPDR_DISK_CLIENT") set(${MODULE_PREFIX}_SRCS disk_file.c @@ -32,7 +30,7 @@ if(WIN32) dirent.h) endif() -include_directories(..) +include_directories(../../rdpdr/client) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") @@ -44,4 +42,6 @@ else() endif() target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS}) + install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/disk/dirent.h b/channels/disk/client/dirent.h similarity index 100% rename from channels/rdpdr/client/disk/dirent.h rename to channels/disk/client/dirent.h diff --git a/channels/rdpdr/client/disk/disk_file.c b/channels/disk/client/disk_file.c similarity index 100% rename from channels/rdpdr/client/disk/disk_file.c rename to channels/disk/client/disk_file.c diff --git a/channels/rdpdr/client/disk/disk_file.h b/channels/disk/client/disk_file.h similarity index 100% rename from channels/rdpdr/client/disk/disk_file.h rename to channels/disk/client/disk_file.h diff --git a/channels/rdpdr/client/disk/disk_main.c b/channels/disk/client/disk_main.c similarity index 99% rename from channels/rdpdr/client/disk/disk_main.c rename to channels/disk/client/disk_main.c index 8e28df4c0..473bfc640 100644 --- a/channels/rdpdr/client/disk/disk_main.c +++ b/channels/disk/client/disk_main.c @@ -120,14 +120,14 @@ static DISK_FILE* disk_get_file_by_id(DISK_DEVICE* disk, uint32 id) static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) { + char* path; + uint32 FileId; DISK_FILE* file; + uint8 Information; uint32 DesiredAccess; uint32 CreateDisposition; uint32 CreateOptions; uint32 PathLength; - char* path; - uint32 FileId; - uint8 Information; stream_read_uint32(irp->input, DesiredAccess); stream_seek(irp->input, 16); /* AllocationSize(8), FileAttributes(4), SharedAccess(4) */ @@ -155,7 +155,7 @@ static void disk_process_irp_create(DISK_DEVICE* disk, IRP* irp) FileId = 0; Information = 0; - /* map errno to windows result*/ + /* map errno to windows result */ irp->IoStatus = disk_map_posix_err(file->err); disk_file_free(file); } diff --git a/channels/rdpdr/client/disk/statvfs.c b/channels/disk/client/statvfs.c similarity index 100% rename from channels/rdpdr/client/disk/statvfs.c rename to channels/disk/client/statvfs.c diff --git a/channels/rdpdr/client/disk/statvfs.h b/channels/disk/client/statvfs.h similarity index 100% rename from channels/rdpdr/client/disk/statvfs.h rename to channels/disk/client/statvfs.h diff --git a/channels/parallel/CMakeLists.txt b/channels/parallel/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/parallel/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/parallel/ChannelOptions.cmake b/channels/parallel/ChannelOptions.cmake new file mode 100644 index 000000000..3f6e7abaf --- /dev/null +++ b/channels/parallel/ChannelOptions.cmake @@ -0,0 +1,14 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "parallel") +set(CHANNEL_LONG_NAME "Parallel Port Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPESP]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +endif() + diff --git a/channels/rdpdr/client/parallel/CMakeLists.txt b/channels/parallel/client/CMakeLists.txt similarity index 86% rename from channels/rdpdr/client/parallel/CMakeLists.txt rename to channels/parallel/client/CMakeLists.txt index 0df901638..8ef794dc2 100644 --- a/channels/rdpdr/client/parallel/CMakeLists.txt +++ b/channels/parallel/client/CMakeLists.txt @@ -16,12 +16,12 @@ # limitations under the License. set(MODULE_NAME "parallel") -set(MODULE_PREFIX "CHANNEL_PARALLEL_CLIENT") +set(MODULE_PREFIX "CHANNEL_RDPDR_PARALLEL_CLIENT") set(${MODULE_PREFIX}_SRCS parallel_main.c) -include_directories(..) +include_directories(../../rdpdr/client) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -33,4 +33,5 @@ else() target_link_libraries(${MODULE_NAME} freerdp-utils winpr-interlocked) endif() -install(TARGETS parallel DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/parallel/parallel_main.c b/channels/parallel/client/parallel_main.c similarity index 100% rename from channels/rdpdr/client/parallel/parallel_main.c rename to channels/parallel/client/parallel_main.c diff --git a/channels/printer/CMakeLists.txt b/channels/printer/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/printer/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/printer/ChannelOptions.cmake b/channels/printer/ChannelOptions.cmake new file mode 100644 index 000000000..16db8e2a2 --- /dev/null +++ b/channels/printer/ChannelOptions.cmake @@ -0,0 +1,16 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "printer") +set(CHANNEL_LONG_NAME "Print Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPEPC]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +elseif(WITH_CUPS) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +endif() + diff --git a/channels/rdpdr/client/printer/CMakeLists.txt b/channels/printer/client/CMakeLists.txt similarity index 94% rename from channels/rdpdr/client/printer/CMakeLists.txt rename to channels/printer/client/CMakeLists.txt index 36c3b59ee..80eaac1c1 100644 --- a/channels/rdpdr/client/printer/CMakeLists.txt +++ b/channels/printer/client/CMakeLists.txt @@ -16,7 +16,7 @@ # limitations under the License. set(MODULE_NAME "printer") -set(MODULE_PREFIX "CHANNEL_PRINTER_CLIENT") +set(MODULE_PREFIX "CHANNEL_RDPDR_PRINTER_CLIENT") set(${MODULE_PREFIX}_SRCS printer_main.c @@ -37,7 +37,7 @@ if(WIN32) printer_win.h) endif() -include_directories(..) +include_directories(../../rdpdr/client) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -54,3 +54,4 @@ if(WITH_CUPS) endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/printer/printer_cups.c b/channels/printer/client/printer_cups.c similarity index 100% rename from channels/rdpdr/client/printer/printer_cups.c rename to channels/printer/client/printer_cups.c diff --git a/channels/rdpdr/client/printer/printer_cups.h b/channels/printer/client/printer_cups.h similarity index 100% rename from channels/rdpdr/client/printer/printer_cups.h rename to channels/printer/client/printer_cups.h diff --git a/channels/rdpdr/client/printer/printer_main.c b/channels/printer/client/printer_main.c similarity index 100% rename from channels/rdpdr/client/printer/printer_main.c rename to channels/printer/client/printer_main.c diff --git a/channels/rdpdr/client/printer/printer_main.h b/channels/printer/client/printer_main.h similarity index 100% rename from channels/rdpdr/client/printer/printer_main.h rename to channels/printer/client/printer_main.h diff --git a/channels/rdpdr/client/printer/printer_win.c b/channels/printer/client/printer_win.c similarity index 100% rename from channels/rdpdr/client/printer/printer_win.c rename to channels/printer/client/printer_win.c diff --git a/channels/rdpdr/client/printer/printer_win.h b/channels/printer/client/printer_win.h similarity index 100% rename from channels/rdpdr/client/printer/printer_win.h rename to channels/printer/client/printer_win.h diff --git a/channels/rdpdr/client/CMakeLists.txt b/channels/rdpdr/client/CMakeLists.txt index f6dcdde22..bbff041b4 100644 --- a/channels/rdpdr/client/CMakeLists.txt +++ b/channels/rdpdr/client/CMakeLists.txt @@ -34,23 +34,12 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(${MODULE_NAME} freerdp) + target_link_libraries(${MODULE_NAME} freerdp winpr) else() - target_link_libraries(${MODULE_NAME} freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils winpr-crt winpr-synch winpr-thread winpr-interlocked) endif() install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client") -add_subdirectory(disk) -add_subdirectory(printer) - -if(NOT WIN32) - add_subdirectory(parallel) - add_subdirectory(serial) -endif() - -if(WITH_PCSC) - add_subdirectory(smartcard) -endif() diff --git a/channels/rdpdr/client/rdpdr_constants.h b/channels/rdpdr/client/rdpdr_constants.h index ceb2f6cfe..a76737bbc 100644 --- a/channels/rdpdr/client/rdpdr_constants.h +++ b/channels/rdpdr/client/rdpdr_constants.h @@ -457,3 +457,4 @@ enum FILE_FS_INFORMATION_CLASS }; #endif /* __RDPDR_CONSTANTS_H */ + diff --git a/channels/serial/CMakeLists.txt b/channels/serial/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/serial/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/serial/ChannelOptions.cmake b/channels/serial/ChannelOptions.cmake new file mode 100644 index 000000000..232f123db --- /dev/null +++ b/channels/serial/ChannelOptions.cmake @@ -0,0 +1,14 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "serial") +set(CHANNEL_LONG_NAME "Serial Port Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPESP]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +endif() + diff --git a/channels/rdpdr/client/serial/CMakeLists.txt b/channels/serial/client/CMakeLists.txt similarity index 64% rename from channels/rdpdr/client/serial/CMakeLists.txt rename to channels/serial/client/CMakeLists.txt index 4b3ac4492..6bfb3b033 100644 --- a/channels/rdpdr/client/serial/CMakeLists.txt +++ b/channels/serial/client/CMakeLists.txt @@ -1,9 +1,7 @@ # FreeRDP: A Remote Desktop Protocol Client # FreeRDP cmake build script # -# Copyright 2011 O.S. Systems Software Ltda. -# Copyright 2011 Otavio Salvador -# Copyright 2011 Marc-Andre Moreau +# Copyright 2012 Marc-Andre Moreau # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,21 +15,25 @@ # See the License for the specific language governing permissions and # limitations under the License. -set(serial_SRCS +set(MODULE_NAME "serial") +set(MODULE_PREFIX "CHANNEL_DEVICE_SERIAL_CLIENT") + +set(${MODULE_PREFIX}_SRCS serial_tty.c serial_tty.h serial_constants.h serial_main.c) -include_directories(..) +include_directories(../../rdpdr/client) -add_library(serial ${serial_SRCS}) +add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) set_target_properties(serial PROPERTIES PREFIX "") if(WITH_MONOLITHIC_BUILD) - target_link_libraries(serial freerdp) + target_link_libraries(${MODULE_NAME} freerdp) else() - target_link_libraries(serial freerdp-utils) + target_link_libraries(${MODULE_NAME} freerdp-utils) endif() -install(TARGETS serial DESTINATION ${FREERDP_PLUGIN_PATH}) +install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/serial/serial_constants.h b/channels/serial/client/serial_constants.h similarity index 100% rename from channels/rdpdr/client/serial/serial_constants.h rename to channels/serial/client/serial_constants.h diff --git a/channels/rdpdr/client/serial/serial_main.c b/channels/serial/client/serial_main.c similarity index 100% rename from channels/rdpdr/client/serial/serial_main.c rename to channels/serial/client/serial_main.c diff --git a/channels/rdpdr/client/serial/serial_tty.c b/channels/serial/client/serial_tty.c similarity index 100% rename from channels/rdpdr/client/serial/serial_tty.c rename to channels/serial/client/serial_tty.c diff --git a/channels/rdpdr/client/serial/serial_tty.h b/channels/serial/client/serial_tty.h similarity index 100% rename from channels/rdpdr/client/serial/serial_tty.h rename to channels/serial/client/serial_tty.h diff --git a/channels/smartcard/CMakeLists.txt b/channels/smartcard/CMakeLists.txt new file mode 100644 index 000000000..676de4e85 --- /dev/null +++ b/channels/smartcard/CMakeLists.txt @@ -0,0 +1,21 @@ +# FreeRDP: A Remote Desktop Protocol Client +# FreeRDP cmake build script +# +# Copyright 2012 Marc-Andre Moreau +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if(WITH_CLIENT_CHANNELS) + add_subdirectory(client) +endif() + diff --git a/channels/smartcard/ChannelOptions.cmake b/channels/smartcard/ChannelOptions.cmake new file mode 100644 index 000000000..e06f9e13e --- /dev/null +++ b/channels/smartcard/ChannelOptions.cmake @@ -0,0 +1,16 @@ + +set(CHANNEL_TYPE "device") +set(CHANNEL_SHORT_NAME "smartcard") +set(CHANNEL_LONG_NAME "Smart Card Virtual Channel Extension") +set(CHANNEL_SPECIFICATIONS "[MS-RDPESC]") + +string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION) + +if(WIN32) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +elseif(WITH_PCSC) + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON) +else() + option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF) +endif() + diff --git a/channels/rdpdr/client/smartcard/CMakeLists.txt b/channels/smartcard/client/CMakeLists.txt similarity index 93% rename from channels/rdpdr/client/smartcard/CMakeLists.txt rename to channels/smartcard/client/CMakeLists.txt index 55b985e5a..3cd2573d4 100644 --- a/channels/rdpdr/client/smartcard/CMakeLists.txt +++ b/channels/smartcard/client/CMakeLists.txt @@ -16,13 +16,13 @@ # limitations under the License. set(MODULE_NAME "smartcard") -set(MODULE_PREFIX "CHANNEL_PRINTER_CLIENT") +set(MODULE_PREFIX "CHANNEL_RDPDR_SMARTCARD_CLIENT") set(${MODULE_PREFIX}_SRCS scard_main.c scard_operations.c) -include_directories(..) +include_directories(../../rdpdr/client) include_directories(${PCSC_INCLUDE_DIRS}) add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) @@ -37,3 +37,4 @@ endif() target_link_libraries(${MODULE_NAME} ${PCSC_LIBRARIES}) install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH}) + diff --git a/channels/rdpdr/client/smartcard/scard_main.c b/channels/smartcard/client/scard_main.c similarity index 100% rename from channels/rdpdr/client/smartcard/scard_main.c rename to channels/smartcard/client/scard_main.c diff --git a/channels/rdpdr/client/smartcard/scard_main.h b/channels/smartcard/client/scard_main.h similarity index 100% rename from channels/rdpdr/client/smartcard/scard_main.h rename to channels/smartcard/client/scard_main.h diff --git a/channels/rdpdr/client/smartcard/scard_operations.c b/channels/smartcard/client/scard_operations.c similarity index 100% rename from channels/rdpdr/client/smartcard/scard_operations.c rename to channels/smartcard/client/scard_operations.c diff --git a/winpr/libwinpr/interlocked/interlocked.c b/winpr/libwinpr/interlocked/interlocked.c index 5f1d96bd7..7dd333711 100644 --- a/winpr/libwinpr/interlocked/interlocked.c +++ b/winpr/libwinpr/interlocked/interlocked.c @@ -286,7 +286,7 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E return previousValue; } -#else /* (_WIN32_WINNT < 0x0600) */ +#else /* (_WIN32 && (_WIN32_WINNT < 0x0502)) */ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG Exchange, LONGLONG Comperand) { @@ -297,5 +297,5 @@ LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination, LONGLONG E #endif } -#endif /* (_WIN32_WINNT < 0x0600) */ +#endif /* (_WIN32 && (_WIN32_WINNT < 0x0502)) */