channels: moving device plugins up in the directory structure

This commit is contained in:
Marc-André Moreau 2012-10-05 18:30:14 -04:00
parent cb69657b81
commit e2cd73ba54
38 changed files with 214 additions and 40 deletions

View File

@ -0,0 +1,21 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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()

View File

@ -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()

View File

@ -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 <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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})

View File

@ -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);
}

View File

@ -0,0 +1,21 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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()

View File

@ -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()

View File

@ -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})

View File

@ -0,0 +1,21 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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()

View File

@ -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()

View File

@ -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})

View File

@ -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()

View File

@ -457,3 +457,4 @@ enum FILE_FS_INFORMATION_CLASS
};
#endif /* __RDPDR_CONSTANTS_H */

View File

@ -0,0 +1,21 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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()

View File

@ -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()

View File

@ -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 <otavio@ossystems.com.br>
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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})

View File

@ -0,0 +1,21 @@
# FreeRDP: A Remote Desktop Protocol Client
# FreeRDP cmake build script
#
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com>
#
# 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()

View File

@ -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()

View File

@ -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})

View File

@ -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)) */