Merge pull request #776 from FreeRDP/channels
CMake Improvements + Linking Issue Fix
This commit is contained in:
commit
6b754a9667
12
.gitignore
vendored
12
.gitignore
vendored
@ -3,7 +3,7 @@ CMakeFiles/
|
||||
CMakeScripts/
|
||||
CMakeCache.txt
|
||||
config.h
|
||||
install_manifest.txt
|
||||
install_manifest*.txt
|
||||
CTestTestfile.cmake
|
||||
freerdp.pc
|
||||
Makefile
|
||||
@ -12,6 +12,16 @@ cmake_install.cmake
|
||||
CPackConfig.cmake
|
||||
CPackSourceConfig.cmake
|
||||
DartConfiguration.tcl
|
||||
_CPack_Packages
|
||||
|
||||
# Packages
|
||||
*.zip
|
||||
*.exe
|
||||
*.sh
|
||||
*.deb
|
||||
*.rpm
|
||||
*.tar.Z
|
||||
*.tar.gz
|
||||
|
||||
# Eclipse
|
||||
*.project
|
||||
|
@ -66,6 +66,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED EXPORT_ALL_SYMBOLS)
|
||||
set(EXPORT_ALL_SYMBOLS FALSE)
|
||||
endif()
|
||||
|
||||
# Configure MSVC Runtime
|
||||
if(MSVC)
|
||||
include(MSVCRuntime)
|
||||
@ -91,6 +95,20 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(Wno-unused-but-set-variable)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-but-set-variable")
|
||||
endif()
|
||||
CHECK_C_COMPILER_FLAG(-Wno-deprecated-declarations Wno-deprecated-declarations)
|
||||
if(Wno-deprecated-declarations)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
|
||||
endif()
|
||||
if(NOT EXPORT_ALL_SYMBOLS)
|
||||
message(STATUS "GCC default symbol visibility: hidden")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
||||
endif()
|
||||
if(BUILD_TESTING)
|
||||
CHECK_C_COMPILER_FLAG(-Wno-format Wno-format)
|
||||
if(Wno-format)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
|
||||
endif()
|
||||
endif()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
@ -154,7 +172,7 @@ if(ANDROID)
|
||||
set(WITH_X11 OFF)
|
||||
set(WITH_CUPS OFF)
|
||||
set(WITH_ALSA OFF)
|
||||
set(WITH_PULSEAUDIO OFF)
|
||||
set(WITH_PULSE OFF)
|
||||
set(WITH_FFMPEG OFF)
|
||||
set(WITH_GSTREAMER OFF)
|
||||
set(WITH_PCSC OFF)
|
||||
@ -194,10 +212,11 @@ set(FREERDP_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/freerdp")
|
||||
set(FREERDP_KEYMAP_PATH "${FREERDP_DATA_PATH}/keymaps")
|
||||
|
||||
# Path to put plugins
|
||||
|
||||
if(WIN32)
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}")
|
||||
else()
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_FULL_LIBDIR}/freerdp")
|
||||
set(FREERDP_PLUGIN_PATH "${CMAKE_INSTALL_LIBDIR}/freerdp")
|
||||
endif()
|
||||
|
||||
set(FREERDP_CLIENT_PLUGIN_PATH "${FREERDP_PLUGIN_PATH}/client")
|
||||
@ -226,6 +245,11 @@ INCLUDE(CTest)
|
||||
|
||||
if(BUILD_TESTING)
|
||||
enable_testing()
|
||||
if(MSVC)
|
||||
set(TESTING_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
else()
|
||||
set(TESTING_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Testing")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# WinPR
|
||||
@ -276,11 +300,59 @@ if(NOT MSVC)
|
||||
add_subdirectory(keymaps)
|
||||
endif()
|
||||
|
||||
# Source package
|
||||
# Packaging
|
||||
|
||||
set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/\\\\.gitignore;/CMakeCache.txt")
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "xfreerdp")
|
||||
|
||||
if(WITH_SERVER)
|
||||
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} "xfreerdp-server")
|
||||
endif()
|
||||
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "FreeRDP: A Remote Desktop Protocol Implementation")
|
||||
|
||||
set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(CPACK_TOPLEVEL_TAG "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
string(TOLOWER ${CMAKE_PROJECT_NAME} CMAKE_PROJECT_NAME_lower)
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME_lower}-${FREERDP_VERSION_FULL}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME_lower}-${FREERDP_VERSION_FULL}-${CPACK_SYSTEM_NAME}")
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME_lower}-${FREERDP_VERSION_FULL}-${CPACK_SYSTEM_NAME}")
|
||||
|
||||
set(CPACK_PACKAGE_NAME "FreeRDP")
|
||||
set(CPACK_PACKAGE_VENDOR "FreeRDP")
|
||||
set(CPACK_PACKAGE_VERSION ${FREERDP_VERSION_FULL})
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${FREERDP_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${FREERDP_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${FREERDP_VERSION_REVISION})
|
||||
|
||||
set(CPACK_SET_DESTDIR "on")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/tmp")
|
||||
|
||||
set(CPACK_PACKAGE_CONTACT "Marc-Andre Moreau")
|
||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "marcandre.moreau@gmail.com")
|
||||
set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "FreeRDP")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||
|
||||
set(CPACK_NSIS_MODIFY_PATH ON)
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/resources\\\\FreeRDP_Install.bmp")
|
||||
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/resources\\\\FreeRDP_Icon_96px.ico")
|
||||
set(CPACK_NSIS_MUI_UNICON "${CMAKE_SOURCE_DIR}/resource\\\\FreeRDP_Icon_96px.ico")
|
||||
|
||||
if(MSVC)
|
||||
if(MSVC_RUNTIME STREQUAL "dynamic")
|
||||
include(InstallRequiredSystemLibraries)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
cpack_add_component(headers DISPLAY_NAME "Headers")
|
||||
cpack_add_component(libraries DISPLAY_NAME "Libraries")
|
||||
cpack_add_component(clients DISPLAY_NAME "Clients")
|
||||
|
||||
set(CPACK_COMPONENTS_ALL clients libraries headers)
|
||||
|
||||
|
215
build/winpr/libwinpr/asn1/test/TestAsn1.c
Normal file
215
build/winpr/libwinpr/asn1/test/TestAsn1.c
Normal file
@ -0,0 +1,215 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestAsn1Module(int, char*[]);
|
||||
int TestAsn1Encoder(int, char*[]);
|
||||
int TestAsn1Decoder(int, char*[]);
|
||||
int TestAsn1Encode(int, char*[]);
|
||||
int TestAsn1Decode(int, char*[]);
|
||||
int TestAsn1String(int, char*[]);
|
||||
int TestAsn1Integer(int, char*[]);
|
||||
int TestAsn1Compare(int, char*[]);
|
||||
int TestAsn1BerEnc(int, char*[]);
|
||||
int TestAsn1BerDec(int, char*[]);
|
||||
int TestAsn1DerEnc(int, char*[]);
|
||||
int TestAsn1DerDec(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestAsn1Module",
|
||||
TestAsn1Module
|
||||
},
|
||||
{
|
||||
"TestAsn1Encoder",
|
||||
TestAsn1Encoder
|
||||
},
|
||||
{
|
||||
"TestAsn1Decoder",
|
||||
TestAsn1Decoder
|
||||
},
|
||||
{
|
||||
"TestAsn1Encode",
|
||||
TestAsn1Encode
|
||||
},
|
||||
{
|
||||
"TestAsn1Decode",
|
||||
TestAsn1Decode
|
||||
},
|
||||
{
|
||||
"TestAsn1String",
|
||||
TestAsn1String
|
||||
},
|
||||
{
|
||||
"TestAsn1Integer",
|
||||
TestAsn1Integer
|
||||
},
|
||||
{
|
||||
"TestAsn1Compare",
|
||||
TestAsn1Compare
|
||||
},
|
||||
{
|
||||
"TestAsn1BerEnc",
|
||||
TestAsn1BerEnc
|
||||
},
|
||||
{
|
||||
"TestAsn1BerDec",
|
||||
TestAsn1BerDec
|
||||
},
|
||||
{
|
||||
"TestAsn1DerEnc",
|
||||
TestAsn1DerEnc
|
||||
},
|
||||
{
|
||||
"TestAsn1DerDec",
|
||||
TestAsn1DerDec
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
160
build/winpr/libwinpr/crt/test/TestCrt.c
Normal file
160
build/winpr/libwinpr/crt/test/TestCrt.c
Normal file
@ -0,0 +1,160 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestAlignment(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestAlignment",
|
||||
TestAlignment
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
190
build/winpr/libwinpr/file/test/TestFile.c
Normal file
190
build/winpr/libwinpr/file/test/TestFile.c
Normal file
@ -0,0 +1,190 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestFileCreateFile(int, char*[]);
|
||||
int TestFileDeleteFile(int, char*[]);
|
||||
int TestFileReadFile(int, char*[]);
|
||||
int TestFileWriteFile(int, char*[]);
|
||||
int TestFileFindFirstFile(int, char*[]);
|
||||
int TestFileFindFirstFileEx(int, char*[]);
|
||||
int TestFileFindNextFile(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestFileCreateFile",
|
||||
TestFileCreateFile
|
||||
},
|
||||
{
|
||||
"TestFileDeleteFile",
|
||||
TestFileDeleteFile
|
||||
},
|
||||
{
|
||||
"TestFileReadFile",
|
||||
TestFileReadFile
|
||||
},
|
||||
{
|
||||
"TestFileWriteFile",
|
||||
TestFileWriteFile
|
||||
},
|
||||
{
|
||||
"TestFileFindFirstFile",
|
||||
TestFileFindFirstFile
|
||||
},
|
||||
{
|
||||
"TestFileFindFirstFileEx",
|
||||
TestFileFindFirstFileEx
|
||||
},
|
||||
{
|
||||
"TestFileFindNextFile",
|
||||
TestFileFindNextFile
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
170
build/winpr/libwinpr/interlocked/test/TestInterlocked.c
Normal file
170
build/winpr/libwinpr/interlocked/test/TestInterlocked.c
Normal file
@ -0,0 +1,170 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestInterlockedAccess(int, char*[]);
|
||||
int TestInterlockedSList(int, char*[]);
|
||||
int TestInterlockedDList(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestInterlockedAccess",
|
||||
TestInterlockedAccess
|
||||
},
|
||||
{
|
||||
"TestInterlockedSList",
|
||||
TestInterlockedSList
|
||||
},
|
||||
{
|
||||
"TestInterlockedDList",
|
||||
TestInterlockedDList
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
160
build/winpr/libwinpr/io/test/TestIo.c
Normal file
160
build/winpr/libwinpr/io/test/TestIo.c
Normal file
@ -0,0 +1,160 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestIoGetOverlappedResult(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestIoGetOverlappedResult",
|
||||
TestIoGetOverlappedResult
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
185
build/winpr/libwinpr/library/test/TestLibrary.c
Normal file
185
build/winpr/libwinpr/library/test/TestLibrary.c
Normal file
@ -0,0 +1,185 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestLibraryAddDllDirectory(int, char*[]);
|
||||
int TestLibraryRemoveDllDirectory(int, char*[]);
|
||||
int TestLibrarySetDefaultDllDirectories(int, char*[]);
|
||||
int TestLibraryLoadLibrary(int, char*[]);
|
||||
int TestLibraryFreeLibrary(int, char*[]);
|
||||
int TestLibraryGetProcAddress(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestLibraryAddDllDirectory",
|
||||
TestLibraryAddDllDirectory
|
||||
},
|
||||
{
|
||||
"TestLibraryRemoveDllDirectory",
|
||||
TestLibraryRemoveDllDirectory
|
||||
},
|
||||
{
|
||||
"TestLibrarySetDefaultDllDirectories",
|
||||
TestLibrarySetDefaultDllDirectories
|
||||
},
|
||||
{
|
||||
"TestLibraryLoadLibrary",
|
||||
TestLibraryLoadLibrary
|
||||
},
|
||||
{
|
||||
"TestLibraryFreeLibrary",
|
||||
TestLibraryFreeLibrary
|
||||
},
|
||||
{
|
||||
"TestLibraryGetProcAddress",
|
||||
TestLibraryGetProcAddress
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
265
build/winpr/libwinpr/path/test/TestPath.c
Normal file
265
build/winpr/libwinpr/path/test/TestPath.c
Normal file
@ -0,0 +1,265 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestPathCchAddBackslash(int, char*[]);
|
||||
int TestPathCchRemoveBackslash(int, char*[]);
|
||||
int TestPathCchAddBackslashEx(int, char*[]);
|
||||
int TestPathCchRemoveBackslashEx(int, char*[]);
|
||||
int TestPathCchAddExtension(int, char*[]);
|
||||
int TestPathCchAppend(int, char*[]);
|
||||
int TestPathCchAppendEx(int, char*[]);
|
||||
int TestPathCchCanonicalize(int, char*[]);
|
||||
int TestPathCchCanonicalizeEx(int, char*[]);
|
||||
int TestPathAllocCanonicalize(int, char*[]);
|
||||
int TestPathCchCombine(int, char*[]);
|
||||
int TestPathCchCombineEx(int, char*[]);
|
||||
int TestPathAllocCombine(int, char*[]);
|
||||
int TestPathCchFindExtension(int, char*[]);
|
||||
int TestPathCchRenameExtension(int, char*[]);
|
||||
int TestPathCchRemoveExtension(int, char*[]);
|
||||
int TestPathCchIsRoot(int, char*[]);
|
||||
int TestPathIsUNCEx(int, char*[]);
|
||||
int TestPathCchSkipRoot(int, char*[]);
|
||||
int TestPathCchStripToRoot(int, char*[]);
|
||||
int TestPathCchStripPrefix(int, char*[]);
|
||||
int TestPathCchRemoveFileSpec(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestPathCchAddBackslash",
|
||||
TestPathCchAddBackslash
|
||||
},
|
||||
{
|
||||
"TestPathCchRemoveBackslash",
|
||||
TestPathCchRemoveBackslash
|
||||
},
|
||||
{
|
||||
"TestPathCchAddBackslashEx",
|
||||
TestPathCchAddBackslashEx
|
||||
},
|
||||
{
|
||||
"TestPathCchRemoveBackslashEx",
|
||||
TestPathCchRemoveBackslashEx
|
||||
},
|
||||
{
|
||||
"TestPathCchAddExtension",
|
||||
TestPathCchAddExtension
|
||||
},
|
||||
{
|
||||
"TestPathCchAppend",
|
||||
TestPathCchAppend
|
||||
},
|
||||
{
|
||||
"TestPathCchAppendEx",
|
||||
TestPathCchAppendEx
|
||||
},
|
||||
{
|
||||
"TestPathCchCanonicalize",
|
||||
TestPathCchCanonicalize
|
||||
},
|
||||
{
|
||||
"TestPathCchCanonicalizeEx",
|
||||
TestPathCchCanonicalizeEx
|
||||
},
|
||||
{
|
||||
"TestPathAllocCanonicalize",
|
||||
TestPathAllocCanonicalize
|
||||
},
|
||||
{
|
||||
"TestPathCchCombine",
|
||||
TestPathCchCombine
|
||||
},
|
||||
{
|
||||
"TestPathCchCombineEx",
|
||||
TestPathCchCombineEx
|
||||
},
|
||||
{
|
||||
"TestPathAllocCombine",
|
||||
TestPathAllocCombine
|
||||
},
|
||||
{
|
||||
"TestPathCchFindExtension",
|
||||
TestPathCchFindExtension
|
||||
},
|
||||
{
|
||||
"TestPathCchRenameExtension",
|
||||
TestPathCchRenameExtension
|
||||
},
|
||||
{
|
||||
"TestPathCchRemoveExtension",
|
||||
TestPathCchRemoveExtension
|
||||
},
|
||||
{
|
||||
"TestPathCchIsRoot",
|
||||
TestPathCchIsRoot
|
||||
},
|
||||
{
|
||||
"TestPathIsUNCEx",
|
||||
TestPathIsUNCEx
|
||||
},
|
||||
{
|
||||
"TestPathCchSkipRoot",
|
||||
TestPathCchSkipRoot
|
||||
},
|
||||
{
|
||||
"TestPathCchStripToRoot",
|
||||
TestPathCchStripToRoot
|
||||
},
|
||||
{
|
||||
"TestPathCchStripPrefix",
|
||||
TestPathCchStripPrefix
|
||||
},
|
||||
{
|
||||
"TestPathCchRemoveFileSpec",
|
||||
TestPathCchRemoveFileSpec
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
160
build/winpr/libwinpr/pipe/test/TestPipe.c
Normal file
160
build/winpr/libwinpr/pipe/test/TestPipe.c
Normal file
@ -0,0 +1,160 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestPipeCreatePipe(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestPipeCreatePipe",
|
||||
TestPipeCreatePipe
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
175
build/winpr/libwinpr/sspi/test/TestSspi.c
Normal file
175
build/winpr/libwinpr/sspi/test/TestSspi.c
Normal file
@ -0,0 +1,175 @@
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* Forward declare test functions. */
|
||||
int TestQuerySecurityPackageInfo(int, char*[]);
|
||||
int TestEnumerateSecurityPackages(int, char*[]);
|
||||
int TestInitializeSecurityContext(int, char*[]);
|
||||
int TestAcquireCredentialsHandle(int, char*[]);
|
||||
|
||||
|
||||
/* Create map. */
|
||||
|
||||
typedef int (*MainFuncPointer)(int , char*[]);
|
||||
typedef struct
|
||||
{
|
||||
const char* name;
|
||||
MainFuncPointer func;
|
||||
} functionMapEntry;
|
||||
|
||||
functionMapEntry cmakeGeneratedFunctionMapEntries[] = {
|
||||
{
|
||||
"TestQuerySecurityPackageInfo",
|
||||
TestQuerySecurityPackageInfo
|
||||
},
|
||||
{
|
||||
"TestEnumerateSecurityPackages",
|
||||
TestEnumerateSecurityPackages
|
||||
},
|
||||
{
|
||||
"TestInitializeSecurityContext",
|
||||
TestInitializeSecurityContext
|
||||
},
|
||||
{
|
||||
"TestAcquireCredentialsHandle",
|
||||
TestAcquireCredentialsHandle
|
||||
},
|
||||
|
||||
{0,0}
|
||||
};
|
||||
|
||||
/* Allocate and create a lowercased copy of string
|
||||
(note that it has to be free'd manually) */
|
||||
|
||||
char* lowercase(const char *string)
|
||||
{
|
||||
char *new_string, *p;
|
||||
|
||||
#ifdef __cplusplus
|
||||
new_string = static_cast<char *>(malloc(sizeof(char) *
|
||||
static_cast<size_t>(strlen(string) + 1)));
|
||||
#else
|
||||
new_string = (char *)(malloc(sizeof(char) * (size_t)(strlen(string) + 1)));
|
||||
#endif
|
||||
|
||||
if (!new_string)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
strcpy(new_string, string);
|
||||
p = new_string;
|
||||
while (*p != 0)
|
||||
{
|
||||
#ifdef __cplusplus
|
||||
*p = static_cast<char>(tolower(*p));
|
||||
#else
|
||||
*p = (char)(tolower(*p));
|
||||
#endif
|
||||
|
||||
++p;
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
int main(int ac, char *av[])
|
||||
{
|
||||
int i, NumTests, testNum, partial_match;
|
||||
char *arg, *test_name;
|
||||
int count;
|
||||
int testToRun = -1;
|
||||
|
||||
|
||||
|
||||
for(count =0; cmakeGeneratedFunctionMapEntries[count].name != 0; count++)
|
||||
{
|
||||
}
|
||||
NumTests = count;
|
||||
/* If no test name was given */
|
||||
/* process command line with user function. */
|
||||
if (ac < 2)
|
||||
{
|
||||
/* Ask for a test. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("To run a test, enter the test number: ");
|
||||
fflush(stdout);
|
||||
testNum = 0;
|
||||
if( scanf("%d", &testNum) != 1 )
|
||||
{
|
||||
printf("Couldn't parse that input as a number\n");
|
||||
return -1;
|
||||
}
|
||||
if (testNum >= NumTests)
|
||||
{
|
||||
printf("%3d is an invalid test number.\n", testNum);
|
||||
return -1;
|
||||
}
|
||||
testToRun = testNum;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
partial_match = 0;
|
||||
arg = 0;
|
||||
/* If partial match is requested. */
|
||||
if(testToRun == -1 && ac > 1)
|
||||
{
|
||||
partial_match = (strcmp(av[1], "-R") == 0) ? 1 : 0;
|
||||
}
|
||||
if (partial_match && ac < 3)
|
||||
{
|
||||
printf("-R needs an additional parameter.\n");
|
||||
return -1;
|
||||
}
|
||||
if(testToRun == -1)
|
||||
{
|
||||
arg = lowercase(av[1 + partial_match]);
|
||||
}
|
||||
for (i =0; i < NumTests && testToRun == -1; ++i)
|
||||
{
|
||||
test_name = lowercase(cmakeGeneratedFunctionMapEntries[i].name);
|
||||
if (partial_match && strstr(test_name, arg) != NULL)
|
||||
{
|
||||
testToRun = i;
|
||||
ac -=2;
|
||||
av += 2;
|
||||
}
|
||||
else if (!partial_match && strcmp(test_name, arg) == 0)
|
||||
{
|
||||
testToRun = i;
|
||||
ac--;
|
||||
av++;
|
||||
}
|
||||
free(test_name);
|
||||
}
|
||||
if(arg)
|
||||
{
|
||||
free(arg);
|
||||
}
|
||||
if(testToRun != -1)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = (*cmakeGeneratedFunctionMapEntries[testToRun].func)(ac, av);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* Nothing was run, display the test names. */
|
||||
printf("Available tests:\n");
|
||||
for (i =0; i < NumTests; ++i)
|
||||
{
|
||||
printf("%3d. %s\n", i, cmakeGeneratedFunctionMapEntries[i].name);
|
||||
}
|
||||
printf("Failed: %s is an invalid test name.\n", av[1]);
|
||||
|
||||
return -1;
|
||||
}
|
@ -17,6 +17,68 @@
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
include(CMakeParseArguments)
|
||||
|
||||
macro(define_channel_options)
|
||||
set(PREFIX "CHANNEL")
|
||||
|
||||
cmake_parse_arguments(${PREFIX}
|
||||
""
|
||||
"NAME;TYPE;DESCRIPTION;SPECIFICATIONS;DEFAULT"
|
||||
""
|
||||
${ARGN})
|
||||
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" CHANNEL_OPTION)
|
||||
set(CHANNEL_OPTION_DOC "Build ${CHANNEL_NAME} ${CHANNEL_TYPE} channel")
|
||||
option(${CHANNEL_OPTION} "${CHANNEL_OPTION_DOC}" ${CHANNEL_DEFAULT})
|
||||
|
||||
endmacro(define_channel_options)
|
||||
|
||||
macro(define_channel_client_options _channel_client_default)
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" CHANNEL_CLIENT_OPTION)
|
||||
set(CHANNEL_CLIENT_OPTION_DOC "Build ${CHANNEL_NAME} ${CHANNEL_TYPE} channel client")
|
||||
option(${CHANNEL_CLIENT_OPTION} "${CHANNEL_CLIENT_OPTION_DOC}" ${_channel_client_default})
|
||||
endmacro(define_channel_client_options)
|
||||
|
||||
macro(define_channel _channel_name)
|
||||
set(CHANNEL_NAME ${_channel_name})
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
endmacro(define_channel)
|
||||
|
||||
macro(define_channel_client _channel_name)
|
||||
set(CHANNEL_NAME ${_channel_name})
|
||||
set(MODULE_NAME "${CHANNEL_NAME}-client")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
endmacro(define_channel_client)
|
||||
|
||||
macro(define_channel_server _channel_name)
|
||||
set(CHANNEL_NAME ${_channel_name})
|
||||
set(MODULE_NAME "${CHANNEL_NAME}-server")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_SERVER" MODULE_PREFIX)
|
||||
endmacro(define_channel_server)
|
||||
|
||||
macro(define_channel_client_subsystem _channel_name _subsystem _type)
|
||||
set(CHANNEL_NAME ${_channel_name})
|
||||
set(CHANNEL_SUBSYSTEM ${_subsystem})
|
||||
string(LENGTH "${_type}" _type_length)
|
||||
if(_type_length GREATER 0)
|
||||
set(SUBSYSTEM_TYPE ${_type})
|
||||
set(MODULE_NAME "${CHANNEL_NAME}-client-${CHANNEL_SUBSYSTEM}-${SUBSYSTEM_TYPE}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT_${CHANNEL_SUBSYSTEM}-${SUBSYSTEM_TYPE}" MODULE_PREFIX)
|
||||
else()
|
||||
set(MODULE_NAME "${CHANNEL_NAME}-client-${CHANNEL_SUBSYSTEM}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT_${CHANNEL_SUBSYSTEM}" MODULE_PREFIX)
|
||||
endif()
|
||||
endmacro(define_channel_client_subsystem)
|
||||
|
||||
macro(define_channel_server_subsystem _channel_name _subsystem _type)
|
||||
set(CHANNEL_NAME ${_channel_name})
|
||||
set(CHANNEL_SUBSYSTEM ${_subsystem})
|
||||
set(MODULE_NAME "${CHANNEL_NAME}-server-${CHANNEL_SUBSYSTEM}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_server_${CHANNEL_SUBSYSTEM}" MODULE_PREFIX)
|
||||
endmacro(define_channel_server_subsystem)
|
||||
|
||||
macro(add_channel_client _channel_prefix _channel_name)
|
||||
add_subdirectory(client)
|
||||
if(${_channel_prefix}_CLIENT_STATIC)
|
||||
@ -84,7 +146,7 @@ foreach(FILEPATH ${FILEPATHS})
|
||||
set(CHANNEL_OPTION)
|
||||
include(${FILEPATH})
|
||||
if(${CHANNEL_OPTION})
|
||||
message(STATUS "Adding ${CHANNEL_TYPE} channel \"${CHANNEL_SHORT_NAME}\": ${CHANNEL_LONG_NAME}")
|
||||
message(STATUS "Adding ${CHANNEL_TYPE} channel \"${CHANNEL_NAME}\": ${CHANNEL_DESCRIPTION}")
|
||||
add_subdirectory(${DIR})
|
||||
endif()
|
||||
endif()
|
||||
@ -92,9 +154,12 @@ endforeach(FILEPATH)
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_subdirectory(client)
|
||||
set(FREERDP_CHANNELS_CLIENT_SRCS ${FREERDP_CHANNELS_CLIENT_SRCS} PARENT_SCOPE)
|
||||
set(FREERDP_CHANNELS_CLIENT_LIBS ${FREERDP_CHANNELS_CLIENT_LIBS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(WITH_SERVER_CHANNELS)
|
||||
add_subdirectory(server)
|
||||
set(FREERDP_CHANNELS_SERVER_SRCS ${FREERDP_CHANNELS_SERVER_SRCS} PARENT_SCOPE)
|
||||
set(FREERDP_CHANNELS_SERVER_LIBS ${FREERDP_CHANNELS_SERVER_LIBS} PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "audin")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("audin")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,10 +1,8 @@
|
||||
|
||||
set(CHANNEL_TYPE "dynamic")
|
||||
set(CHANNEL_SHORT_NAME "audin")
|
||||
set(CHANNEL_LONG_NAME "Audio Input Redirection Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPEAI]")
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
define_channel_options(NAME "audin" TYPE "dynamic"
|
||||
DESCRIPTION "Audio Input Redirection Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEAI]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "audin")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("audin")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
audin_main.c
|
||||
@ -40,12 +38,12 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
if(WITH_ALSA)
|
||||
add_subdirectory(alsa)
|
||||
endif()
|
||||
|
||||
if(WITH_PULSEAUDIO)
|
||||
if(WITH_PULSE)
|
||||
add_subdirectory(pulse)
|
||||
endif()
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# 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(AUDIN_ALSA_SRCS
|
||||
define_channel_client_subsystem("audin" "alsa" "")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
audin_alsa.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${ALSA_INCLUDE_DIRS})
|
||||
|
||||
add_library(audin_alsa ${AUDIN_ALSA_SRCS})
|
||||
set_target_properties(audin_alsa PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(audin_alsa freerdp)
|
||||
else()
|
||||
target_link_libraries(audin_alsa freerdp-utils)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(audin_alsa ${ALSA_LIBRARIES})
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
install(TARGETS audin_alsa DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# 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,23 +15,25 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(AUDIN_PULSE_SRCS
|
||||
audin_pulse.c
|
||||
)
|
||||
define_channel_client_subsystem("audin" "pulse" "")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
audin_pulse.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${PULSEAUDIO_INCLUDE_DIR})
|
||||
include_directories(${PULSE_INCLUDE_DIR})
|
||||
|
||||
add_library(audin_pulse ${AUDIN_PULSE_SRCS})
|
||||
set_target_properties(audin_pulse PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(audin_pulse freerdp)
|
||||
else()
|
||||
target_link_libraries(audin_pulse freerdp-utils)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(audin_pulse ${PULSEAUDIO_LIBRARY})
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
install(TARGETS audin_pulse DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "audin")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}-server")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_SERVER" MODULE_PREFIX)
|
||||
define_channel_server("audin")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
audin.c)
|
||||
@ -31,4 +29,4 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL}/Server")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server")
|
||||
|
@ -31,12 +31,13 @@ foreach(STATIC_ENTRY ${CHANNEL_STATIC_CLIENT_ENTRIES})
|
||||
|
||||
if(${${STATIC_MODULE}_CLIENT_ENTRY} STREQUAL ${STATIC_ENTRY})
|
||||
set(STATIC_MODULE_NAME ${${STATIC_MODULE}_CLIENT_NAME})
|
||||
set(STATIC_MODULE_CHANNEL ${${STATIC_MODULE}_CLIENT_CHANNEL})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${STATIC_MODULE_NAME})
|
||||
|
||||
set(ENTRY_POINT_NAME "${${STATIC_MODULE}_CLIENT_NAME}_${${STATIC_MODULE}_CLIENT_ENTRY}")
|
||||
set(ENTRY_POINT_NAME "${STATIC_MODULE_CHANNEL}_${${STATIC_MODULE}_CLIENT_ENTRY}")
|
||||
set(ENTRY_POINT_IMPORT "extern void ${ENTRY_POINT_NAME}();")
|
||||
set(${STATIC_ENTRY}_IMPORTS "${${STATIC_ENTRY}_IMPORTS}\n${ENTRY_POINT_IMPORT}")
|
||||
set(${STATIC_ENTRY}_TABLE "${${STATIC_ENTRY}_TABLE}\n\t{ \"${STATIC_MODULE_NAME}\", ${ENTRY_POINT_NAME} },")
|
||||
set(${STATIC_ENTRY}_TABLE "${${STATIC_ENTRY}_TABLE}\n\t{ \"${STATIC_MODULE_CHANNEL}\", ${ENTRY_POINT_NAME} },")
|
||||
endif()
|
||||
|
||||
endforeach()
|
||||
@ -60,12 +61,8 @@ set(CLIENT_STATIC_ENTRY_TABLES_LIST "${CLIENT_STATIC_ENTRY_TABLES_LIST}\n\t{ \"\
|
||||
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tables.c.in ${CMAKE_CURRENT_SOURCE_DIR}/tables.c)
|
||||
|
||||
add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
@ -74,8 +71,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MODULE winpr
|
||||
MODULES winpr-crt winpr-synch winpr-interlocked)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Client")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} PARENT_SCOPE)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "cliprdr")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("cliprdr")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,10 +1,8 @@
|
||||
|
||||
set(CHANNEL_TYPE "static")
|
||||
set(CHANNEL_SHORT_NAME "cliprdr")
|
||||
set(CHANNEL_LONG_NAME "Clipboard Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPECLIP]")
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
define_channel_options(NAME "cliprdr" TYPE "static"
|
||||
DESCRIPTION "Clipboard Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPECLIP]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "cliprdr")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("cliprdr")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
cliprdr_constants.h
|
||||
@ -44,4 +42,4 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "disk")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("disk")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,15 +1,12 @@
|
||||
|
||||
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)
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
if(ANDROID)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
|
||||
else()
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
define_channel_options(NAME "disk" TYPE "device"
|
||||
DESCRIPTION "Disk Redirection Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEFS]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "disk")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("disk")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
disk_file.c
|
||||
@ -51,6 +49,6 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "drdynvc")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("drdynvc")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,9 +1,8 @@
|
||||
|
||||
set(CHANNEL_TYPE "static")
|
||||
set(CHANNEL_SHORT_NAME "drdynvc")
|
||||
set(CHANNEL_LONG_NAME "Dynamic Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPEDYC]")
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
define_channel_options(NAME "drdynvc" TYPE "static"
|
||||
DESCRIPTION "Dynamic Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEDYC]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "drdynvc")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("drdynvc")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
drdynvc_main.c
|
||||
@ -40,5 +38,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MODULE winpr
|
||||
MODULES winpr-synch)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "parallel")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("parallel")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,14 +1,12 @@
|
||||
|
||||
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)
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
if(WIN32)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
|
||||
else()
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
define_channel_options(NAME "parallel" TYPE "device"
|
||||
DESCRIPTION "Parallel Port Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPESP]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "parallel")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("parallel")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
parallel_main.c)
|
||||
@ -42,4 +40,4 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "printer")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("printer")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,16 +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)
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
if(WIN32)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT ON)
|
||||
elseif(WITH_CUPS)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT ON)
|
||||
else()
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
|
||||
set(OPTION_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
define_channel_options(NAME "printer" TYPE "device"
|
||||
DESCRIPTION "Print Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEPC]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "printer")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("printer")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
printer_main.c
|
||||
@ -62,4 +60,4 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "rail")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("rail")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,9 +1,8 @@
|
||||
|
||||
set(CHANNEL_TYPE "static")
|
||||
set(CHANNEL_SHORT_NAME "rail")
|
||||
set(CHANNEL_LONG_NAME "Remote Programs Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPERP]")
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
define_channel_options(NAME "rail" TYPE "static"
|
||||
DESCRIPTION "Remote Programs Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPERP]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# FreeRDP cmake build script
|
||||
#
|
||||
# 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.
|
||||
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "rail")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("rail")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rail_main.c
|
||||
@ -36,5 +34,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "rdpdr")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("rdpdr")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,10 +1,8 @@
|
||||
|
||||
set(CHANNEL_TYPE "static")
|
||||
set(CHANNEL_SHORT_NAME "rdpdr")
|
||||
set(CHANNEL_LONG_NAME "Device Redirection Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPEFS] [MS-RDPEPC] [MS-RDPESC] [MS-RDPESP]")
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
define_channel_options(NAME "rdpdr" TYPE "static"
|
||||
DESCRIPTION "Device Redirection Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEFS] [MS-RDPEPC] [MS-RDPESC] [MS-RDPESP]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "rdpdr")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("rdpdr")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
irp.c
|
||||
@ -45,4 +43,4 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "rdpsnd")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("rdpsnd")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,10 +1,8 @@
|
||||
|
||||
set(CHANNEL_TYPE "static")
|
||||
set(CHANNEL_SHORT_NAME "rdpsnd")
|
||||
set(CHANNEL_LONG_NAME "Audio Output Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPEA]")
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
define_channel_options(NAME "rdpsnd" TYPE "static"
|
||||
DESCRIPTION "Audio Output Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEA]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "rdpsnd")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("rdpsnd")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rdpsnd_main.c
|
||||
@ -34,17 +32,17 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
if(WITH_ALSA)
|
||||
add_subdirectory(alsa)
|
||||
endif()
|
||||
|
||||
if(WITH_PULSEAUDIO)
|
||||
if(WITH_PULSE)
|
||||
add_subdirectory(pulse)
|
||||
endif()
|
||||
|
||||
if(WITH_MACAUDIO)
|
||||
add_subdirectory(MacAudio)
|
||||
add_subdirectory(mac)
|
||||
endif()
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# 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(RDPSND_ALSA_SRCS
|
||||
define_channel_client_subsystem("rdpsnd" "alsa" "")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rdpsnd_alsa.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${ALSA_INCLUDE_DIRS})
|
||||
|
||||
add_library(rdpsnd_alsa ${RDPSND_ALSA_SRCS})
|
||||
set_target_properties(rdpsnd_alsa PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(rdpsnd_alsa freerdp winpr)
|
||||
else()
|
||||
target_link_libraries(rdpsnd_alsa freerdp-utils winpr-crt)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(rdpsnd_alsa ${ALSA_LIBRARIES})
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES})
|
||||
|
||||
install(TARGETS rdpsnd_alsa DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -16,23 +16,27 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(RDPSND_MACAUDIO_SRCS
|
||||
rdpsnd_audio_q.c)
|
||||
define_channel_client_subsystem("rdpsnd" "mac" "")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rdpsnd_mac.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${MACAUDIO_INCLUDE_DIRS})
|
||||
|
||||
add_library(rdpsnd_macaudio ${RDPSND_MACAUDIO_SRCS})
|
||||
set_target_properties(rdpsnd_macaudio PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(rdpsnd_macaudio freerdp)
|
||||
else()
|
||||
target_link_libraries(rdpsnd_macaudio freerdp-utils)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(rdpsnd_macaudio ${MAC_AUDIOTOOLBOX_LIBRARY_PATH})
|
||||
target_link_libraries(rdpsnd_macaudio ${MAC_COREFOUNDATION_LIBRARY_PATH})
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${MAC_AUDIOTOOLBOX_LIBRARY_PATH})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${MAC_COREFOUNDATION_LIBRARY_PATH})
|
||||
|
||||
install(TARGETS rdpsnd_macaudio DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# 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(RDPSND_PULSE_SRCS
|
||||
define_channel_client_subsystem("rdpsnd" "pulse" "")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rdpsnd_pulse.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${PULSEAUDIO_INCLUDE_DIR})
|
||||
include_directories(${PULSE_INCLUDE_DIR})
|
||||
|
||||
add_library(rdpsnd_pulse ${RDPSND_PULSE_SRCS})
|
||||
set_target_properties(rdpsnd_pulse PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(rdpsnd_pulse freerdp)
|
||||
else()
|
||||
target_link_libraries(rdpsnd_pulse freerdp-utils)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(rdpsnd_pulse ${PULSEAUDIO_LIBRARY})
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
install(TARGETS rdpsnd_pulse DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "rdpsnd")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}-server")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_SERVER" MODULE_PREFIX)
|
||||
define_channel_server("rdpsnd")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
rdpsnd.c)
|
||||
@ -33,4 +31,4 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL}/Server")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server")
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "sample")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("sample")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,15 +1,12 @@
|
||||
|
||||
set(CHANNEL_TYPE "static")
|
||||
set(CHANNEL_SHORT_NAME "sample")
|
||||
set(CHANNEL_LONG_NAME "Sample Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "")
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
set(OPTION_DEFAULT OFF)
|
||||
|
||||
if(WITH_SAMPLE)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
else()
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
|
||||
set(OPTION_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
define_channel_options(NAME "sample" TYPE "static"
|
||||
DESCRIPTION "Sample Virtual Channel Extension"
|
||||
SPECIFICATIONS ""
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,15 +15,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "sample")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("sample")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
skel_main.c
|
||||
skel_main.h)
|
||||
sample_main.c
|
||||
sample_main.h)
|
||||
|
||||
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DVCPluginEntry")
|
||||
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "VirtualChannelEntry")
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
@ -36,5 +34,4 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Audio Output Virtual Channel
|
||||
* Sample Virtual Channel
|
||||
*
|
||||
* Copyright 2009-2012 Jay Sorg
|
||||
* Copyright 2010-2012 Vic Lee
|
||||
@ -30,15 +30,17 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <freerdp/constants.h>
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/constants.h>
|
||||
#include <freerdp/utils/memory.h>
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/list.h>
|
||||
#include <freerdp/utils/load_plugin.h>
|
||||
#include <freerdp/utils/svc_plugin.h>
|
||||
|
||||
#include "skel_main.h"
|
||||
#include "sample_main.h"
|
||||
|
||||
struct sample_plugin
|
||||
{
|
||||
@ -50,20 +52,20 @@ struct sample_plugin
|
||||
|
||||
static void sample_process_interval(rdpSvcPlugin* plugin)
|
||||
{
|
||||
printf("skel_process_interval:\n");
|
||||
printf("sample_process_interval:\n");
|
||||
}
|
||||
|
||||
static void sample_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
|
||||
{
|
||||
skelPlugin* skel = (skelPlugin*)plugin;
|
||||
STREAM* data_out;
|
||||
int bytes;
|
||||
STREAM* data_out;
|
||||
samplePlugin* sample = (samplePlugin*) plugin;
|
||||
|
||||
printf("skel_process_receive:\n");
|
||||
printf("sample_process_receive:\n");
|
||||
|
||||
if (skel == NULL)
|
||||
if (sample == NULL)
|
||||
{
|
||||
printf("skel_process_receive: skel is nil\n");
|
||||
printf("sample_process_receive: sample is nil\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -71,7 +73,7 @@ static void sample_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
|
||||
/* here we just send the same data back */
|
||||
|
||||
bytes = stream_get_size(data_in);
|
||||
printf("skel_process_receive: got bytes %d\n", bytes);
|
||||
printf("sample_process_receive: got bytes %d\n", bytes);
|
||||
if (bytes > 0)
|
||||
{
|
||||
data_out = stream_new(bytes);
|
||||
@ -80,7 +82,7 @@ static void sample_process_receive(rdpSvcPlugin* plugin, STREAM* data_in)
|
||||
we do not free it */
|
||||
|
||||
bytes = stream_get_length(data_in);
|
||||
printf("skel_process_receive: sending bytes %d\n", bytes);
|
||||
printf("sample_process_receive: sending bytes %d\n", bytes);
|
||||
|
||||
svc_plugin_send(plugin, data_out);
|
||||
}
|
||||
@ -118,11 +120,11 @@ static void sample_process_event(rdpSvcPlugin* plugin, RDP_EVENT* event)
|
||||
|
||||
static void sample_process_terminate(rdpSvcPlugin* plugin)
|
||||
{
|
||||
skelPlugin* skel = (skelPlugin*)plugin;
|
||||
samplePlugin* sample = (samplePlugin*)plugin;
|
||||
|
||||
printf("sample_process_terminate:\n");
|
||||
|
||||
if (skel == NULL)
|
||||
if (sample == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* Audio Output Virtual Channel
|
||||
* Sample Virtual Channel
|
||||
*
|
||||
* Copyright 2012 Jay Sorg
|
||||
* Copyright 2010-2012 Vic Lee
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "serial")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("serial")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,14 +1,12 @@
|
||||
|
||||
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)
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
if(WIN32)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
|
||||
else()
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
define_channel_options(NAME "serial" TYPE "device"
|
||||
DESCRIPTION "Serial Port Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPESP]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "serial")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("serial")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
serial_tty.c
|
||||
@ -27,7 +25,7 @@ set(${MODULE_PREFIX}_SRCS
|
||||
|
||||
add_channel_client_library(${MODULE_PREFIX} ${MODULE_NAME} ${CHANNEL_NAME} TRUE "DeviceServiceEntry")
|
||||
|
||||
set_target_properties(serial PROPERTIES PREFIX "")
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
@ -40,4 +38,5 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
|
@ -34,7 +34,7 @@ add_library(${MODULE_NAME} STATIC ${${MODULE_PREFIX}_SRCS})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD} INTERNAL
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
@ -43,7 +43,5 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MODULE winpr
|
||||
MODULES winpr-crt winpr-synch winpr-interlocked)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/Server")
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} PARENT_SCOPE)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
|
||||
|
@ -18,6 +18,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -30,6 +34,27 @@
|
||||
|
||||
#include "channels.h"
|
||||
|
||||
/**
|
||||
* this is a workaround to force importing symbols
|
||||
* will need to fix that later on cleanly
|
||||
*/
|
||||
|
||||
#include <freerdp/server/audin.h>
|
||||
#include <freerdp/server/rdpsnd.h>
|
||||
|
||||
void freerdp_channels_dummy()
|
||||
{
|
||||
audin_server_context_new(NULL);
|
||||
audin_server_context_free(NULL);
|
||||
|
||||
rdpsnd_server_context_new(NULL);
|
||||
rdpsnd_server_context_free(NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* end of ugly symbols import workaround
|
||||
*/
|
||||
|
||||
#define CREATE_REQUEST_PDU 0x01
|
||||
#define DATA_FIRST_PDU 0x02
|
||||
#define DATA_PDU 0x03
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "smartcard")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel("smartcard")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,16 +1,12 @@
|
||||
|
||||
set(CHANNEL_TYPE "device")
|
||||
set(CHANNEL_SHORT_NAME "smartcard")
|
||||
set(CHANNEL_LONG_NAME "Smart Card Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPESC]")
|
||||
set(OPTION_DEFAULT OFF)
|
||||
|
||||
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)
|
||||
if(WITH_PCSC)
|
||||
set(OPTION_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
define_channel_options(NAME "smartcard" TYPE "device"
|
||||
DESCRIPTION "Smart Card Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPESC]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -15,8 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(MODULE_NAME "smartcard")
|
||||
set(MODULE_PREFIX "CHANNEL_RDPDR_SMARTCARD_CLIENT")
|
||||
define_channel_client("smartcard")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
scard_main.c
|
||||
@ -46,4 +45,4 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "tsmf")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("tsmf")
|
||||
|
||||
if(WITH_CLIENT_CHANNELS)
|
||||
add_channel_client(${MODULE_PREFIX} ${CHANNEL_NAME})
|
||||
|
@ -1,15 +1,12 @@
|
||||
|
||||
set(CHANNEL_TYPE "dynamic")
|
||||
set(CHANNEL_SHORT_NAME "tsmf")
|
||||
set(CHANNEL_LONG_NAME "Video Redirection Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPEV]")
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
set(OPTION_DEFAULT ON)
|
||||
|
||||
if(WIN32)
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
|
||||
else()
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" ON)
|
||||
set(OPTION_DEFAULT OFF)
|
||||
endif()
|
||||
|
||||
define_channel_options(NAME "tsmf" TYPE "dynamic"
|
||||
DESCRIPTION "Video Redirection Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEV]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -16,9 +16,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "tsmf")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("tsmf")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
tsmf_audio.c
|
||||
@ -53,7 +51,7 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
||||
if(WITH_FFMPEG)
|
||||
add_subdirectory(ffmpeg)
|
||||
@ -69,6 +67,6 @@ if(WITH_ALSA)
|
||||
add_subdirectory(alsa)
|
||||
endif()
|
||||
|
||||
if(WITH_PULSEAUDIO)
|
||||
if(WITH_PULSE)
|
||||
add_subdirectory(pulse)
|
||||
endif()
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# 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,23 +15,27 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(TSMF_ALSA_SRCS
|
||||
tsmf_alsa.c
|
||||
)
|
||||
define_channel_client_subsystem("tsmf" "alsa" "audio")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
tsmf_alsa.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${ALSA_INCLUDE_DIRS})
|
||||
|
||||
add_library(tsmf_alsa ${TSMF_ALSA_SRCS})
|
||||
set_target_properties(tsmf_alsa PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(tsmf_alsa freerdp)
|
||||
else()
|
||||
target_link_libraries(tsmf_alsa freerdp-utils)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(tsmf_alsa ${ALSA_LIBRARIES})
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${ALSA_LIBRARIES})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
||||
install(TARGETS tsmf_alsa DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# 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,30 +15,25 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(TSMF_FFMPEG_SRCS
|
||||
tsmf_ffmpeg.c
|
||||
)
|
||||
define_channel_client_subsystem("tsmf" "ffmpeg" "video")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
tsmf_ffmpeg.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${FFMPEG_INCLUDE_DIRS})
|
||||
|
||||
add_library(tsmf_ffmpeg ${TSMF_FFMPEG_SRCS})
|
||||
set_target_properties(tsmf_ffmpeg PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
CHECK_C_COMPILER_FLAG(-Wno-deprecated-declarations Wno-deprecated-declarations)
|
||||
if(Wno-deprecated-declarations)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations")
|
||||
endif()
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(tsmf_ffmpeg freerdp)
|
||||
else()
|
||||
target_link_libraries(tsmf_ffmpeg freerdp-utils)
|
||||
endif()
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${FFMPEG_LIBRARIES})
|
||||
|
||||
target_link_libraries(tsmf_ffmpeg ${FFMPEG_LIBRARIES})
|
||||
|
||||
install(TARGETS tsmf_ffmpeg DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -1,5 +1,5 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# FreeRDP cmake build script for gstreamer plugin
|
||||
# FreeRDP cmake build script for gstreamer subsystem
|
||||
#
|
||||
# (C) Copyright 2012 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
@ -15,25 +15,29 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
define_channel_client_subsystem("tsmf" "gstreamer" "video")
|
||||
|
||||
|
||||
set(TSMF_GSTREAMER_SRCS
|
||||
tsmf_gstreamer.c
|
||||
)
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
tsmf_gstreamer.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${GSTREAMER_INCLUDE_DIRS})
|
||||
|
||||
add_library(tsmf_gstreamer ${TSMF_GSTREAMER_SRCS})
|
||||
set_target_properties(tsmf_gstreamer PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(tsmf_gstreamer freerdp)
|
||||
else()
|
||||
target_link_libraries(tsmf_gstreamer freerdp-utils)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
target_link_libraries(tsmf_gstreamer ${GSTREAMER_LIBRARIES} gstapp-0.10 gstinterfaces-0.10 Xrandr X11 Xext)
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
install(TARGETS tsmf_gstreamer DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
|
||||
${GSTREAMER_LIBRARIES}
|
||||
gstapp-0.10
|
||||
gstinterfaces-0.10
|
||||
Xrandr X11 Xext)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -1,9 +1,7 @@
|
||||
# FreeRDP: A Remote Desktop Protocol Implementation
|
||||
# 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,20 +15,25 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(TSMF_PULSE_SRCS
|
||||
define_channel_client_subsystem("tsmf" "pulse" "audio")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
tsmf_pulse.c)
|
||||
|
||||
include_directories(..)
|
||||
include_directories(${PULSEAUDIO_INCLUDE_DIR})
|
||||
include_directories(${PULSE_INCLUDE_DIR})
|
||||
|
||||
add_library(tsmf_pulse ${TSMF_PULSE_SRCS})
|
||||
set_target_properties(tsmf_pulse PROPERTIES PREFIX "")
|
||||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
target_link_libraries(tsmf_pulse ${PULSEAUDIO_LIBRARY} freerdp)
|
||||
else()
|
||||
target_link_libraries(tsmf_pulse ${PULSEAUDIO_LIBRARY} freerdp-utils)
|
||||
endif()
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
|
||||
install(TARGETS tsmf_pulse DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${PULSE_LIBRARY})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
|
@ -15,9 +15,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "urbdrc")
|
||||
set(MODULE_NAME ${CHANNEL_NAME})
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}" MODULE_PREFIX)
|
||||
define_channel("urbdrc")
|
||||
|
||||
add_subdirectory(libusb)
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
|
||||
set(CHANNEL_TYPE "dynamic")
|
||||
set(CHANNEL_SHORT_NAME "urbdrc")
|
||||
set(CHANNEL_LONG_NAME "USB Devices Virtual Channel Extension")
|
||||
set(CHANNEL_SPECIFICATIONS "[MS-RDPEUSB]")
|
||||
|
||||
string(TOUPPER "WITH_${CHANNEL_SHORT_NAME}" CHANNEL_OPTION)
|
||||
|
||||
option(${CHANNEL_OPTION} "Build ${CHANNEL_SHORT_NAME}" OFF)
|
||||
set(OPTION_DEFAULT OFF)
|
||||
|
||||
define_channel_options(NAME "urbdrc" TYPE "dynamic"
|
||||
DESCRIPTION "USB Devices Virtual Channel Extension"
|
||||
SPECIFICATIONS "[MS-RDPEUSB]"
|
||||
DEFAULT ${OPTION_DEFAULT})
|
||||
|
||||
|
@ -16,9 +16,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(CHANNEL_NAME "urbdrc")
|
||||
set(MODULE_NAME "${CHANNEL_NAME}")
|
||||
string(TOUPPER "CHANNEL_${CHANNEL_NAME}_CLIENT" MODULE_PREFIX)
|
||||
define_channel_client("urbdrc")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
searchman.c
|
||||
@ -53,4 +51,4 @@ if(NOT STATIC_CHANNELS)
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${FREERDP_PLUGIN_PATH})
|
||||
endif()
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${MODULE_NAME}/Client")
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Client")
|
||||
|
@ -1,104 +1,56 @@
|
||||
|
||||
cmake_minimum_required (VERSION 2.8)
|
||||
project (MacFreeRDP)
|
||||
set(CMAKE_COLOR_MAKEFILE ON)
|
||||
project(MacFreeRDP)
|
||||
|
||||
include(CheckIncludeFiles)
|
||||
include(CheckLibraryExists)
|
||||
include(CheckStructHasMember)
|
||||
include(FindPkgConfig)
|
||||
include(TestBigEndian)
|
||||
set(MODULE_NAME "MacFreeRDP")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_MAC")
|
||||
|
||||
include(AutoVersioning)
|
||||
include(ConfigOptions)
|
||||
include(FindOptionalPackage)
|
||||
include(CheckCCompilerFlag)
|
||||
include(GNUInstallDirsWrapper)
|
||||
find_required_package(OpenSSL)
|
||||
|
||||
# Default to debug build type
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
endif()
|
||||
|
||||
# Default to build shared libs
|
||||
if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
# Compiler-specific flags
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
|
||||
endif()
|
||||
if(WITH_SSE2_TARGET)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Libraries that we have a hard dependency on
|
||||
if(NOT DEFINED OPENSSL_INCLUDE_DIR OR NOT DEFINED OPENSSL_LIBRARIES)
|
||||
find_required_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
# Mac OS X
|
||||
if(APPLE)
|
||||
# Set the include files for FreeRDP to the relative path
|
||||
set(FREERDP_INCLUDE_PATH ${CMAKE_SOURCE_DIR}/../../include/)
|
||||
set(FRAMEWORK_HEADERS_PATH /System/Library/Frameworks/Cocoa.framework/Versions/A/Headers/)
|
||||
include_directories (${FREERDP_INCLUDE_PATH} ${FRAMEWORK_HEADERS_PATH} /System/Library/Frameworks)
|
||||
set(FRAMEWORK_HEADERS_PATH /System/Library/Frameworks/Cocoa.framework/Versions/A/Headers/)
|
||||
include_directories(${FRAMEWORK_HEADERS_PATH} /System/Library/Frameworks)
|
||||
|
||||
# set(CMAKE_OSX_SYSROOT MacOSX10.7.sdk) # uncomment to specify SDK version
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mmacosx-version-min=10.4")
|
||||
set(GUI_TYPE MACOSX_BUNDLE)
|
||||
# set(CMAKE_OSX_SYSROOT MacOSX10.7.sdk) # uncomment to specify SDK version
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mmacosx-version-min=10.4")
|
||||
set(GUI_TYPE MACOSX_BUNDLE)
|
||||
|
||||
# Import libraries
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
message("+ Using foundation library ${FOUNDATION_LIBRARY}")
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
message("+ Using cocoa library ${COCOA_LIBRARY}")
|
||||
find_library(APPKIT_LIBRARY AppKit)
|
||||
message("+ Using appkit library ${APPKIT_LIBRARY}")
|
||||
# Import libraries
|
||||
find_library(FOUNDATION_LIBRARY Foundation)
|
||||
message("+ Using foundation library ${FOUNDATION_LIBRARY}")
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
message("+ Using cocoa library ${COCOA_LIBRARY}")
|
||||
find_library(APPKIT_LIBRARY AppKit)
|
||||
message("+ Using appkit library ${APPKIT_LIBRARY}")
|
||||
|
||||
message(" Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
# Set the OS X Bundle specific CMake variables which will be used to populate the plist for
|
||||
# the application bundle
|
||||
set(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
||||
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP.Mac")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME} Version 1.0.1")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME})
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.0.1)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.0.1)
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2012. All Rights Reserved.")
|
||||
message(" Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
# Set the OS X Bundle specific CMake variables which will be used to populate the plist for
|
||||
# the application bundle
|
||||
set(MACOSX_BUNDLE_INFO_STRING "MacFreeRDP")
|
||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER "com.freerdp.mac")
|
||||
set(MACOSX_BUNDLE_BUNDLE_IDENTIFIER "FreeRDP.Mac")
|
||||
set(MACOSX_BUNDLE_LONG_VERSION_STRING "MacFreeRDP Version 1.0.1")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME "MacFreeRDP")
|
||||
set(MACOSX_BUNDLE_SHORT_VERSION_STRING 1.0.1)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION 1.0.1)
|
||||
set(MACOSX_BUNDLE_COPYRIGHT "Copyright 2012. All Rights Reserved.")
|
||||
|
||||
# Specific plist and NOT standard CMake variables
|
||||
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
|
||||
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
|
||||
# Specific plist and NOT standard CMake variables
|
||||
set(MACOSX_BUNDLE_NSMAIN_NIB_FILE "MainMenu")
|
||||
set(MACOSX_BUNDLE_NSPRINCIPAL_CLASS "NSApplication")
|
||||
|
||||
mark_as_advanced(COCOA_LIBRARY
|
||||
FOUNDATION_LIBRARY
|
||||
APPKIT_LIBRARY)
|
||||
set(EXTRA_LIBS ${COCOA_LIBRARY} ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY})
|
||||
set(APP_TYPE MACOSX_BUNDLE)
|
||||
endif()
|
||||
mark_as_advanced(COCOA_LIBRARY FOUNDATION_LIBRARY APPKIT_LIBRARY)
|
||||
set(EXTRA_LIBS ${COCOA_LIBRARY} ${FOUNDATION_LIBRARY} ${APPKIT_LIBRARY})
|
||||
set(APP_TYPE MACOSX_BUNDLE)
|
||||
|
||||
# OS X Interface Builder files
|
||||
file (GLOB MacFreeRDP_XIBS
|
||||
*.xib
|
||||
)
|
||||
file(GLOB MacFreeRDP_XIBS *.xib)
|
||||
|
||||
# Headers
|
||||
file (GLOB MacFreeRDP_Headers
|
||||
*.h
|
||||
)
|
||||
file(GLOB MacFreeRDP_Headers *.h)
|
||||
|
||||
# Source
|
||||
file (GLOB MacFreeRDP_Source
|
||||
*.m
|
||||
)
|
||||
file(GLOB MacFreeRDP_Source *.m)
|
||||
|
||||
add_executable(MacFreeRDP
|
||||
add_executable(MacFreeRDP
|
||||
${APP_TYPE}
|
||||
${MacFreeRDP_Headers}
|
||||
${MacFreeRDP_Source}
|
||||
@ -129,17 +81,16 @@ set_target_properties(MacFreeRDP PROPERTIES XCODE_ATTRIBUTE_ARCHS "$(NATIVE_ARCH
|
||||
# Set the info plist to the custom instance
|
||||
set_target_properties(MacFreeRDP PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_optional_package(MacAudio)
|
||||
endif()
|
||||
find_optional_package(MacAudio)
|
||||
|
||||
target_link_libraries(MacFreeRDP
|
||||
${EXTRA_LIBS}
|
||||
freerdp-core
|
||||
freerdp-cache
|
||||
freerdp-gdi
|
||||
freerdp-utils
|
||||
freerdp-codec
|
||||
freerdp-rail)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${EXTRA_LIBS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-core freerdp-cache freerdp-gdi freerdp-codec freerdp-rail freerdp-utils)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
set_property(TARGET MacFreeRDP PROPERTY FOLDER "Client/Mac")
|
||||
|
@ -1021,7 +1021,6 @@ BOOL mac_pre_connect(freerdp *inst)
|
||||
int i;
|
||||
|
||||
inst->settings->offscreen_bitmap_cache = FALSE;
|
||||
inst->settings->glyph_cache = TRUE;
|
||||
inst->settings->glyphSupportLevel = GLYPH_SUPPORT_FULL;
|
||||
inst->settings->order_support[NEG_GLYPH_INDEX_INDEX] = TRUE;
|
||||
inst->settings->order_support[NEG_FAST_GLYPH_INDEX] = FALSE;
|
||||
|
@ -25,6 +25,8 @@ add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} ${CMAKE_DL_LIBS})
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
|
@ -44,6 +44,7 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MODULES freerdp-core freerdp-gdi freerdp-codec freerdp-utils)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clients)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Windows")
|
||||
|
@ -119,7 +119,7 @@ LRESULT CALLBACK wf_ll_kbd_proc(int nCode, WPARAM wParam, LPARAM lParam)
|
||||
return CallNextHookEx(NULL, nCode, wParam, lParam);
|
||||
}
|
||||
|
||||
static int xf_event_process_WM_MOUSEWHEEL(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
static int wf_event_process_WM_MOUSEWHEEL(wfInfo* wfi, HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int delta;
|
||||
int flags;
|
||||
@ -127,7 +127,8 @@ static int xf_event_process_WM_MOUSEWHEEL(wfInfo* wfi, HWND hWnd, UINT Msg, WPAR
|
||||
|
||||
DefWindowProc(hWnd, Msg, wParam, lParam);
|
||||
input = wfi->instance->input;
|
||||
delta = ((signed short)HIWORD(wParam)); /* GET_WHEEL_DELTA_WPARAM(wParam); */
|
||||
delta = ((signed short) HIWORD(wParam)); /* GET_WHEEL_DELTA_WPARAM(wParam); */
|
||||
|
||||
if (delta > 0)
|
||||
{
|
||||
flags = PTR_FLAGS_WHEEL | 0x0078;
|
||||
@ -136,7 +137,9 @@ static int xf_event_process_WM_MOUSEWHEEL(wfInfo* wfi, HWND hWnd, UINT Msg, WPAR
|
||||
{
|
||||
flags = PTR_FLAGS_WHEEL | PTR_FLAGS_WHEEL_NEGATIVE | 0x0088;
|
||||
}
|
||||
|
||||
input->MouseEvent(input, flags, 0, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -196,7 +199,7 @@ LRESULT CALLBACK wf_event_proc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
|
||||
break;
|
||||
|
||||
case WM_MOUSEWHEEL:
|
||||
xf_event_process_WM_MOUSEWHEEL(wfi, hWnd, Msg, wParam, lParam, FALSE);
|
||||
wf_event_process_WM_MOUSEWHEEL(wfi, hWnd, Msg, wParam, lParam);
|
||||
break;
|
||||
|
||||
case WM_SETCURSOR:
|
||||
|
@ -16,7 +16,7 @@
|
||||
# limitations under the License.
|
||||
|
||||
set(MODULE_NAME "xfreerdp")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_WINDOWS")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT_X11")
|
||||
|
||||
include(FindXmlto)
|
||||
include_directories(${X11_INCLUDE_DIRS})
|
||||
@ -101,7 +101,7 @@ set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS MONOLITHIC ${MONOLITHI
|
||||
MODULES freerdp-core freerdp-gdi freerdp-locale freerdp-rail freerdp-utils)
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/X11")
|
||||
|
||||
|
@ -19,7 +19,13 @@ set(MODULE_NAME "freerdp-client")
|
||||
set(MODULE_PREFIX "FREERDP_CLIENT")
|
||||
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
client.c)
|
||||
client.c
|
||||
file.c)
|
||||
|
||||
set(FREERDP_CHANNELS_CLIENT_PATH "../../channels/client")
|
||||
foreach(FREERDP_CHANNELS_CLIENT_SRC ${FREERDP_CHANNELS_CLIENT_SRCS})
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} "${FREERDP_CHANNELS_CLIENT_PATH}/${FREERDP_CHANNELS_CLIENT_SRC}")
|
||||
endforeach()
|
||||
|
||||
if(MSVC)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
@ -29,10 +35,12 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-client)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
|
||||
${FREERDP_CHANNELS_CLIENT_LIBS})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Client/Common")
|
||||
|
||||
|
32
client/common/file.c
Normal file
32
client/common/file.c
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* .rdp file
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <freerdp/client/file.h>
|
||||
|
||||
/**
|
||||
* Remote Desktop Plus - Overview of .rdp file settings:
|
||||
* http://www.donkz.nl/files/rdpsettings.html
|
||||
*
|
||||
* RDP Settings for Remote Desktop Services in Windows Server 2008 R2:
|
||||
* http://technet.microsoft.com/en-us/library/ff393699/
|
||||
*/
|
@ -1,13 +1,18 @@
|
||||
|
||||
include(FindPkgConfig)
|
||||
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PCSC libpcsclite)
|
||||
endif()
|
||||
|
||||
find_path(PCSC_INCLUDE_DIR pcsclite.h PATHS ${PCSC_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES PCSC )
|
||||
find_library(PCSC_LIBRARY pcsclite PATHS ${PCSC_LIBRARY_DIRS})
|
||||
find_path(PCSC_INCLUDE_DIR pcsclite.h
|
||||
PATHS ${PCSC_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES PCSC)
|
||||
|
||||
find_library(PCSC_LIBRARY pcsclite
|
||||
PATHS ${PCSC_LIBRARY_DIRS})
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC DEFAULT_MSG PCSC_INCLUDE_DIR PCSC_LIBRARY)
|
||||
|
||||
mark_as_advanced(PCSC_INCLUDE_DIR PCSC_LIBRARY)
|
||||
|
||||
|
@ -1,12 +1,14 @@
|
||||
|
||||
include(FindPkgConfig)
|
||||
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PULSEAUDIO libpulse)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PULSE libpulse)
|
||||
endif()
|
||||
|
||||
find_path(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h PATHS ${PULSEAUDIO_INCLUDE_DIRS} PATH_SUFFIXES pulse )
|
||||
find_library(PULSEAUDIO_LIBRARY pulse PATHS ${PULSEAUDIO_LIBRARY_DIRS})
|
||||
find_path(PULSE_INCLUDE_DIR pulse/pulseaudio.h PATHS ${PULSE_INCLUDE_DIRS} PATH_SUFFIXES pulse )
|
||||
find_library(PULSE_LIBRARY pulse PATHS ${PULSE_LIBRARY_DIRS})
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PulseAudio DEFAULT_MSG PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PulseAudio DEFAULT_MSG PULSE_INCLUDE_DIR PULSE_LIBRARY)
|
||||
|
||||
mark_as_advanced(PULSE_INCLUDE_DIR PULSE_LIBRARY)
|
||||
|
||||
mark_as_advanced(PULSEAUDIO_INCLUDE_DIR PULSEAUDIO_LIBRARY)
|
||||
|
@ -8,6 +8,6 @@ Description: A free remote desktop protocol client
|
||||
URL: http://www.freerdp.com/
|
||||
Version: @FREERDP_VERSION_FULL@
|
||||
Requires:
|
||||
Libs: -L${libdir} -lfreerdp-cache -lfreerdp-channels -lfreerdp-codec -lfreerdp-core -lfreerdp-crypto -lfreerdp-gdi -lfreerdp-locale -lfreerdp-rail -lfreerdp-utils -lwinpr-sspi -lwinpr-rpc
|
||||
Libs: -L${libdir} -lfreerdp-cache -lfreerdp-codec -lfreerdp-core -lfreerdp-crypto -lfreerdp-gdi -lfreerdp-locale -lfreerdp-rail -lfreerdp-utils -lwinpr-sspi -lwinpr-rpc
|
||||
Cflags: -I${includedir}
|
||||
|
||||
|
@ -96,8 +96,8 @@ cmake \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
|
||||
-DWITH_CUPS:BOOL=ON \
|
||||
-DWITH_PCSC:BOOL=ON \
|
||||
-DWITH_PULSEAUDIO:BOOL=ON \
|
||||
-DWITH_MACAUDIO:BOOL=ON \
|
||||
-DWITH_PULSE:BOOL=ON \
|
||||
-DWITH_MACAUDIO:BOOL=ON \
|
||||
-DWITH_X11:BOOL=ON \
|
||||
-DWITH_XCURSOR:BOOL=ON \
|
||||
-DWITH_XEXT:BOOL=ON \
|
||||
|
@ -18,17 +18,15 @@
|
||||
# limitations under the License.
|
||||
|
||||
file(GLOB FREERDP_HEADERS "freerdp/*.h")
|
||||
install(FILES ${FREERDP_HEADERS} DESTINATION include/freerdp)
|
||||
|
||||
install(DIRECTORY freerdp/cache DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/codec DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/crypto DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/gdi DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/locale DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/rail DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/utils DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/client DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/server DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/channels DESTINATION include/freerdp FILES_MATCHING PATTERN "*.h")
|
||||
|
||||
install(FILES ${FREERDP_HEADERS} DESTINATION include/freerdp COMPONENT headers)
|
||||
|
||||
install(DIRECTORY freerdp/cache DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/codec DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/crypto DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/gdi DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/locale DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/rail DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/utils DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/client DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/server DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
install(DIRECTORY freerdp/channels DESTINATION include/freerdp COMPONENT headers FILES_MATCHING PATTERN "*.h")
|
||||
|
@ -21,6 +21,7 @@
|
||||
#define FREERDP_CHANNELS_CLIENT
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/channels/channels.h>
|
||||
|
||||
FREERDP_API void* freerdp_channels_client_find_static_entry(const char* name, const char* identifier);
|
||||
FREERDP_API void* freerdp_channels_client_find_dynamic_entry(const char* name, const char* identifier);
|
||||
|
134
include/freerdp/client/file.h
Normal file
134
include/freerdp/client/file.h
Normal file
@ -0,0 +1,134 @@
|
||||
/**
|
||||
* FreeRDP: A Remote Desktop Protocol Implementation
|
||||
* .rdp file
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef FREERDP_CLIENT_RDP_FILE
|
||||
#define FREERDP_CLIENT_RDP_FILE
|
||||
|
||||
#include <freerdp/freerdp.h>
|
||||
|
||||
struct rdp_file
|
||||
{
|
||||
DWORD UseMultiMon; /* use multimon */
|
||||
DWORD ScreenModeId; /* screen mode id */
|
||||
DWORD SpanMonitors; /* span monitors */
|
||||
DWORD SmartSizing; /* smartsizing */
|
||||
DWORD EnableSuperSpan; /* enablesuperpan */
|
||||
DWORD SuperSpanAccelerationFactor; /* superpanaccelerationfactor */
|
||||
|
||||
DWORD DesktopWidth; /* desktopwidth */
|
||||
DWORD DesktopHeight; /* desktopheight */
|
||||
DWORD DesktopSizeId; /* desktop size id */
|
||||
DWORD SessionBpp; /* session bpp */
|
||||
|
||||
DWORD Compression; /* compression */
|
||||
DWORD KeyboardHook; /* keyboardhook */
|
||||
DWORD DisableCtrlAltDel; /* disable ctrl+alt+del */
|
||||
|
||||
DWORD AudioMode; /* audiomode */
|
||||
DWORD AudioQualityMode; /* audioqualitymode */
|
||||
DWORD AudioCaptureMode; /* audiocapturemode */
|
||||
DWORD VideoPlaybackMode; /* videoplaybackmode */
|
||||
|
||||
DWORD ConnectionType; /* connection type */
|
||||
|
||||
DWORD NetworkAutoDetect; /* networkautodetect */
|
||||
DWORD BandwidthAutoDetect; /* bandwidthautodetect */
|
||||
|
||||
DWORD PinConnectionBar; /* pinconnectionbar */
|
||||
DWORD DisplayConnectionBar; /* displayconnectionbar */
|
||||
|
||||
DWORD WorkspaceId; /* workspaceid */
|
||||
DWORD EnableWorkspaceReconnect; /* enableworkspacereconnect */
|
||||
|
||||
DWORD DisableWallpaper; /* disable wallpaper */
|
||||
DWORD AllowFontSmoothing; /* allow font smoothing */
|
||||
DWORD AllowDesktopComposition; /* allow desktop composition */
|
||||
DWORD DisableFullWindowDrag; /* disable full window drag */
|
||||
DWORD DisableMenuAnims; /* disable menu anims */
|
||||
DWORD DisableThemes; /* disable themes */
|
||||
DWORD DisableCursorSetting; /* disable cursor setting */
|
||||
|
||||
DWORD BitmapCacheSize; /* bitmapcachesize */
|
||||
DWORD BitmapCachePersistEnable; /* bitmapcachepersistenable */
|
||||
|
||||
LPSTR Username; /* username */
|
||||
LPSTR Domain; /* domain */
|
||||
PBYTE Password51; /* password 51 */
|
||||
|
||||
LPTSTR FullAddress; /* full address */
|
||||
LPTSTR AlternateFullAddress; /* alternate full address */
|
||||
DWORD ServerPort; /* server port */
|
||||
|
||||
DWORD RedirectDrives; /* redirectdrives */
|
||||
DWORD RedirectPrinters; /* redirectprinters */
|
||||
DWORD RedirectComPorts; /* redirectcomports */
|
||||
DWORD RedirectSmartCards; /* redirectsmartcards */
|
||||
DWORD RedirectClipboard; /* redirectclipboard */
|
||||
DWORD RedirectPosDevices; /* redirectposdevices */
|
||||
DWORD RedirectDirectX; /* redirectdirectx */
|
||||
DWORD DisablePrinterRedirection; /* disableprinterredirection */
|
||||
DWORD DisableClipboardRedirection; /* disableclipboardredirection */
|
||||
LPSTR UsbDevicesToRedirect; /* usbdevicestoredirect */
|
||||
|
||||
DWORD ConnectToConsole; /* connect to console */
|
||||
DWORD AdministrativeSession; /* administrative session */
|
||||
DWORD AutoReconnectionEnabled; /* autoreconnection enabled */
|
||||
DWORD AutoReconnectMaxRetries; /* autoreconnect max retries */
|
||||
|
||||
DWORD PublicMode; /* public mode */
|
||||
DWORD AuthenticationLevel; /* authentication level */
|
||||
DWORD PromptCredentialOnce; /* promptcredentialonce */
|
||||
DWORD PromptForCredentials; /* prompt for credentials */
|
||||
DWORD PromptForCredentialsOnce; /* promptcredentialonce */
|
||||
DWORD NegotiateSecurityLayer; /* negotiate security layer */
|
||||
DWORD EnableCredSSPSupport; /* enablecredsspsupport */
|
||||
LPSTR LoadBalanceInfo; /* LoadBalanceInfo */
|
||||
|
||||
DWORD RemoteApplicationMode; /* remoteapplicationmode */
|
||||
LPSTR RemoteApplicationName; /* remoteapplicationname */
|
||||
LPSTR RemoteApplicationIcon; /* remoteapplicationicon */
|
||||
LPSTR RemoteApplicationProgram; /* remoteapplicationprogram */
|
||||
LPSTR RemoteApplicationFile; /* remoteapplicationfile */
|
||||
LPSTR RemoteApplicationCmdLine; /* remoteapplicationcmdline */
|
||||
DWORD RemoteApplicationExpandCmdLine; /* remoteapplicationexpandcmdline */
|
||||
DWORD RemoteApplicationExpandWorkingDir; /* remoteapplicationexpandworkingdir */
|
||||
DWORD DisableConnectionSharing; /* disableconnectionsharing */
|
||||
DWORD DisableRemoteAppCapsCheck; /* disableremoteappcapscheck */
|
||||
|
||||
LPSTR AlternateShell; /* alternate shell */
|
||||
LPSTR ShellWorkingDirectory; /* shell working directory */
|
||||
|
||||
LPSTR GatewayHostname; /* gatewayhostname */
|
||||
LPSTR GatewayUsageMethod; /* gatewayusagemethod */
|
||||
LPSTR GatewayProfileUsageMethod; /* gatewayprofileusagemethod */
|
||||
LPSTR GatewayCredentialsSource; /* gatewaycredentialssource */
|
||||
|
||||
DWORD UseRedirectionServerName; /* use redirection server name */
|
||||
|
||||
DWORD RdgIsKdcProxy; /* rdgiskdcproxy */
|
||||
DWORD KdcProxyName; /* kdcproxyname */
|
||||
|
||||
LPSTR DrivesToRedirect; /* drivestoredirect */
|
||||
LPSTR DevicesToRedirect; /* devicestoredirect */
|
||||
LPSTR WinPosStr; /* winposstr */
|
||||
};
|
||||
|
||||
typedef struct rdp_file rdpFile;
|
||||
|
||||
#endif /* FREERDP_CLIENT_RDP_FILE */
|
@ -17,12 +17,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef __JPEG_H
|
||||
#define __JPEG_H
|
||||
#ifndef FREERDP_CODEC_JPEG_H
|
||||
#define FREERDP_CODEC_JPEG_H
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
|
||||
BOOL
|
||||
jpeg_decompress(BYTE* input, BYTE* output, int width, int height, int size, int bpp);
|
||||
FREERDP_API BOOL jpeg_decompress(BYTE* input, BYTE* output, int width, int height, int size, int bpp);
|
||||
|
||||
#endif /* __BITMAP_H */
|
||||
#endif /* FREERDP_CODEC_JPEG_H */
|
||||
|
@ -37,7 +37,6 @@ foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES})
|
||||
endforeach()
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
|
||||
foreach(${MODULE_PREFIX}_SUBMODULE ${${MODULE_PREFIX}_SUBMODULES})
|
||||
set(${MODULE_PREFIX}_OBJECTS ${${MODULE_PREFIX}_OBJECTS} "$<TARGET_OBJECTS:${MODULE_NAME}-${${MODULE_PREFIX}_SUBMODULE}>")
|
||||
endforeach()
|
||||
@ -48,7 +47,12 @@ if(MONOLITHIC_BUILD)
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
install(TARGETS ${MODULE_NAME}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT libraries)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "FreeRDP/libfreerdp")
|
||||
endif()
|
||||
|
@ -23,8 +23,11 @@
|
||||
|
||||
#include <freerdp/utils/stream.h>
|
||||
#include <freerdp/utils/memory.h>
|
||||
|
||||
#include <freerdp/codec/color.h>
|
||||
|
||||
#include <freerdp/codec/jpeg.h>
|
||||
|
||||
#ifdef WITH_JPEG
|
||||
|
||||
#define XMD_H
|
||||
@ -122,8 +125,7 @@ do_decompress(char* comp_data, int comp_data_bytes,
|
||||
}
|
||||
|
||||
/* jpeg decompress */
|
||||
BOOL
|
||||
jpeg_decompress(BYTE * input, BYTE * output, int width, int height, int size, int bpp)
|
||||
BOOL jpeg_decompress(BYTE* input, BYTE* output, int width, int height, int size, int bpp)
|
||||
{
|
||||
int lwidth;
|
||||
int lheight;
|
||||
@ -149,8 +151,7 @@ jpeg_decompress(BYTE * input, BYTE * output, int width, int height, int size, in
|
||||
|
||||
#else
|
||||
|
||||
BOOL
|
||||
jpeg_decompress(BYTE * input, BYTE * output, int width, int height, int size, int bpp)
|
||||
BOOL jpeg_decompress(BYTE* input, BYTE* output, int width, int height, int size, int bpp)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
BIN
resources/FreeRDP_Icon_96px.ico
Normal file
BIN
resources/FreeRDP_Icon_96px.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
BIN
resources/FreeRDP_Install.bmp
Normal file
BIN
resources/FreeRDP_Install.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
@ -44,4 +44,3 @@ target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Sample")
|
||||
|
||||
|
@ -92,7 +92,7 @@ BOOL wf_settings_read_string_ascii(HKEY key, LPTSTR subkey, LPTSTR name, char**
|
||||
strA[length] = '\0';
|
||||
free(strX);
|
||||
#else
|
||||
strA = (char*) str;
|
||||
strA = (char*) strX;
|
||||
#endif
|
||||
*value = strA;
|
||||
return TRUE;
|
||||
|
@ -21,6 +21,11 @@ set(MODULE_PREFIX "FREERDP_SERVER")
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
server.c)
|
||||
|
||||
set(FREERDP_CHANNELS_SERVER_PATH "../../channels/server")
|
||||
foreach(FREERDP_CHANNELS_SERVER_SRC ${FREERDP_CHANNELS_SERVER_SRCS})
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} "${FREERDP_CHANNELS_SERVER_PATH}/${FREERDP_CHANNELS_SERVER_SRC}")
|
||||
endforeach()
|
||||
|
||||
if(MSVC)
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
endif()
|
||||
@ -29,9 +34,12 @@ add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS})
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION} PREFIX "lib")
|
||||
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-channels-server)
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS}
|
||||
${FREERDP_CHANNELS_SERVER_LIBS})
|
||||
|
||||
target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
|
||||
|
||||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Server/Common")
|
||||
|
@ -21,4 +21,3 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -16,4 +16,4 @@
|
||||
# limitations under the License.
|
||||
|
||||
file(GLOB WINPR_HEADERS "winpr/*.h")
|
||||
install(FILES ${WINPR_HEADERS} DESTINATION include/winpr)
|
||||
install(FILES ${WINPR_HEADERS} DESTINATION include/winpr COMPONENT headers)
|
||||
|
@ -27,6 +27,15 @@
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
#ifndef MAX_PATH
|
||||
#define MAX_PATH 260
|
||||
#endif
|
||||
|
||||
#define INVALID_HANDLE_VALUE ((HANDLE) (LONG_PTR) - 1)
|
||||
#define INVALID_FILE_SIZE ((DWORD) 0xFFFFFFFF)
|
||||
#define INVALID_SET_FILE_POINTER ((DWORD) - 1)
|
||||
#define INVALID_FILE_ATTRIBUTES ((DWORD) - 1)
|
||||
|
||||
#define FILE_READ_DATA 0x0001
|
||||
#define FILE_LIST_DIRECTORY 0x0001
|
||||
#define FILE_WRITE_DATA 0x0002
|
||||
@ -121,14 +130,69 @@
|
||||
#define OPEN_ALWAYS 4
|
||||
#define TRUNCATE_EXISTING 5
|
||||
|
||||
#define FIND_FIRST_EX_CASE_SENSITIVE 0x1
|
||||
#define FIND_FIRST_EX_LARGE_FETCH 0x2
|
||||
|
||||
typedef union _FILE_SEGMENT_ELEMENT
|
||||
{
|
||||
PVOID64 Buffer;
|
||||
ULONGLONG Alignment;
|
||||
} FILE_SEGMENT_ELEMENT, *PFILE_SEGMENT_ELEMENT;
|
||||
|
||||
typedef struct _WIN32_FIND_DATAA
|
||||
{
|
||||
DWORD dwFileAttributes;
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftLastAccessTime;
|
||||
FILETIME ftLastWriteTime;
|
||||
DWORD nFileSizeHigh;
|
||||
DWORD nFileSizeLow;
|
||||
DWORD dwReserved0;
|
||||
DWORD dwReserved1;
|
||||
CHAR cFileName[MAX_PATH];
|
||||
CHAR cAlternateFileName[14];
|
||||
} WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
|
||||
|
||||
typedef struct _WIN32_FIND_DATAW
|
||||
{
|
||||
DWORD dwFileAttributes;
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftLastAccessTime;
|
||||
FILETIME ftLastWriteTime;
|
||||
DWORD nFileSizeHigh;
|
||||
DWORD nFileSizeLow;
|
||||
DWORD dwReserved0;
|
||||
DWORD dwReserved1;
|
||||
WCHAR cFileName[MAX_PATH];
|
||||
WCHAR cAlternateFileName[14];
|
||||
} WIN32_FIND_DATAW, *PWIN32_FIND_DATAW, *LPWIN32_FIND_DATAW;
|
||||
|
||||
typedef enum _FINDEX_INFO_LEVELS
|
||||
{
|
||||
FindExInfoStandard,
|
||||
FindExInfoMaxInfoLevel
|
||||
} FINDEX_INFO_LEVELS;
|
||||
|
||||
typedef enum _FINDEX_SEARCH_OPS
|
||||
{
|
||||
FindExSearchNameMatch,
|
||||
FindExSearchLimitToDirectories,
|
||||
FindExSearchLimitToDevices,
|
||||
FindExSearchMaxSearchOp
|
||||
} FINDEX_SEARCH_OPS;
|
||||
|
||||
typedef VOID (*LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD dwErrorCode, DWORD dwNumberOfBytesTransfered, LPOVERLAPPED lpOverlapped);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define WIN32_FIND_DATA WIN32_FIND_DATAW
|
||||
#define PWIN32_FIND_DATA PWIN32_FIND_DATAW
|
||||
#define LPWIN32_FIND_DATA LPWIN32_FIND_DATAW
|
||||
#else
|
||||
#define WIN32_FIND_DATA WIN32_FIND_DATAA
|
||||
#define PWIN32_FIND_DATA PWIN32_FIND_DATAA
|
||||
#define LPWIN32_FIND_DATA LPWIN32_FIND_DATAA
|
||||
#endif
|
||||
|
||||
WINPR_API HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
|
||||
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile);
|
||||
|
||||
@ -179,12 +243,31 @@ WINPR_API BOOL UnlockFile(HANDLE hFile, DWORD dwFileOffsetLow, DWORD dwFileOffse
|
||||
WINPR_API BOOL UnlockFileEx(HANDLE hFile, DWORD dwReserved, DWORD nNumberOfBytesToUnlockLow,
|
||||
DWORD nNumberOfBytesToUnlockHigh, LPOVERLAPPED lpOverlapped);
|
||||
|
||||
WINPR_API HANDLE FindFirstFileA(LPCSTR lpFileName, LPWIN32_FIND_DATAA lpFindFileData);
|
||||
WINPR_API HANDLE FindFirstFileW(LPCWSTR lpFileName, LPWIN32_FIND_DATAW lpFindFileData);
|
||||
|
||||
WINPR_API HANDLE FindFirstFileExA(LPCSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData,
|
||||
FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
|
||||
WINPR_API HANDLE FindFirstFileExW(LPCWSTR lpFileName, FINDEX_INFO_LEVELS fInfoLevelId, LPVOID lpFindFileData,
|
||||
FINDEX_SEARCH_OPS fSearchOp, LPVOID lpSearchFilter, DWORD dwAdditionalFlags);
|
||||
|
||||
WINPR_API BOOL FindNextFileA(HANDLE hFindFile, LPWIN32_FIND_DATAA lpFindFileData);
|
||||
WINPR_API BOOL FindNextFileW(HANDLE hFindFile, LPWIN32_FIND_DATAW lpFindFileData);
|
||||
|
||||
WINPR_API BOOL FindClose(HANDLE hFindFile);
|
||||
|
||||
#ifdef UNICODE
|
||||
#define CreateFile CreateFileW
|
||||
#define DeleteFile DeleteFileW
|
||||
#define CreateFile CreateFileW
|
||||
#define DeleteFile DeleteFileW
|
||||
#define FindFirstFile FindFirstFileW
|
||||
#define FindFirstFileEx FindFirstFileExW
|
||||
#define FindNextFile FindNextFileW
|
||||
#else
|
||||
#define CreateFile CreateFileA
|
||||
#define DeleteFile DeleteFileA
|
||||
#define CreateFile CreateFileA
|
||||
#define DeleteFile DeleteFileA
|
||||
#define FindFirstFile FindFirstFileA
|
||||
#define FindFirstFileEx FindFirstFileExA
|
||||
#define FindNextFile FindNextFileA
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -150,21 +150,21 @@ WINPR_API LONGLONG InterlockedCompareExchange64(LONGLONG volatile *Destination,
|
||||
|
||||
/* Doubly-Linked List */
|
||||
|
||||
VOID InitializeListHead(PLIST_ENTRY ListHead);
|
||||
WINPR_API VOID InitializeListHead(PLIST_ENTRY ListHead);
|
||||
|
||||
BOOL IsListEmpty(const LIST_ENTRY* ListHead);
|
||||
WINPR_API BOOL IsListEmpty(const LIST_ENTRY* ListHead);
|
||||
|
||||
BOOL RemoveEntryList(PLIST_ENTRY Entry);
|
||||
WINPR_API BOOL RemoveEntryList(PLIST_ENTRY Entry);
|
||||
|
||||
VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry);
|
||||
PLIST_ENTRY RemoveHeadList(PLIST_ENTRY ListHead);
|
||||
WINPR_API VOID InsertHeadList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry);
|
||||
WINPR_API PLIST_ENTRY RemoveHeadList(PLIST_ENTRY ListHead);
|
||||
|
||||
VOID InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry);
|
||||
PLIST_ENTRY RemoveTailList(PLIST_ENTRY ListHead);
|
||||
VOID AppendTailList(PLIST_ENTRY ListHead, PLIST_ENTRY ListToAppend);
|
||||
WINPR_API VOID InsertTailList(PLIST_ENTRY ListHead, PLIST_ENTRY Entry);
|
||||
WINPR_API PLIST_ENTRY RemoveTailList(PLIST_ENTRY ListHead);
|
||||
WINPR_API VOID AppendTailList(PLIST_ENTRY ListHead, PLIST_ENTRY ListToAppend);
|
||||
|
||||
VOID PushEntryList(PSINGLE_LIST_ENTRY ListHead, PSINGLE_LIST_ENTRY Entry);
|
||||
PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead);
|
||||
WINPR_API VOID PushEntryList(PSINGLE_LIST_ENTRY ListHead, PSINGLE_LIST_ENTRY Entry);
|
||||
WINPR_API PSINGLE_LIST_ENTRY PopEntryList(PSINGLE_LIST_ENTRY ListHead);
|
||||
|
||||
#endif /* WINPR_INTERLOCKED_H */
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <winpr/file.h>
|
||||
#include <winpr/winpr.h>
|
||||
#include <winpr/error.h>
|
||||
#include <winpr/handle.h>
|
||||
#include <winpr/wtypes.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
|
@ -905,8 +905,8 @@ typedef PSecurityFunctionTableW (SEC_ENTRY * INIT_SECURITY_INTERFACE_W)(void);
|
||||
WINPR_API SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(ULONG* pcPackages, PSecPkgInfoA* ppPackageInfo);
|
||||
WINPR_API SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesW(ULONG* pcPackages, PSecPkgInfoW* ppPackageInfo);
|
||||
|
||||
PSecurityFunctionTableA SEC_ENTRY InitSecurityInterfaceA(void);
|
||||
PSecurityFunctionTableW SEC_ENTRY InitSecurityInterfaceW(void);
|
||||
WINPR_API PSecurityFunctionTableA SEC_ENTRY InitSecurityInterfaceA(void);
|
||||
WINPR_API PSecurityFunctionTableW SEC_ENTRY InitSecurityInterfaceW(void);
|
||||
|
||||
WINPR_API SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoA(SEC_CHAR* pszPackageName, PSecPkgInfoA* ppPackageInfo);
|
||||
WINPR_API SECURITY_STATUS SEC_ENTRY QuerySecurityPackageInfoW(SEC_WCHAR* pszPackageName, PSecPkgInfoW* ppPackageInfo);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user