forked from FreeRDP/FreeRDP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
winpr: stubbed pipe module, added some test stubs
- Loading branch information
1 parent
3d98273
commit 7891e0a
Showing
33 changed files
with
370 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* WinPR: Windows Portable Runtime | ||
* Pipe Functions | ||
* | ||
* 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 WINPR_PIPE_H | ||
#define WINPR_PIPE_H | ||
|
||
#include <winpr/winpr.h> | ||
#include <winpr/error.h> | ||
#include <winpr/wtypes.h> | ||
|
||
#ifndef _WIN32 | ||
|
||
WINPR_API BOOL CreatePipe(PHANDLE hReadPipe, PHANDLE hWritePipe, LPSECURITY_ATTRIBUTES lpPipeAttributes, DWORD nSize); | ||
|
||
#endif | ||
|
||
#endif /* WINPR_PIPE_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LIBRARY "libwinpr-asn1" | ||
EXPORTS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TestAsn1 | ||
TestAsn1.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
set(MODULE_NAME "TestAsn1") | ||
set(MODULE_PREFIX "TEST_ASN1") | ||
|
||
set(${MODULE_PREFIX}_DRIVER ${MODULE_NAME}.c) | ||
|
||
set(${MODULE_PREFIX}_TESTS | ||
TestAsn1Module.c | ||
TestAsn1Encoder.c | ||
TestAsn1Decoder.c | ||
TestAsn1Encode.c | ||
TestAsn1Decode.c | ||
TestAsn1String.c | ||
TestAsn1Integer.c | ||
TestAsn1Compare.c | ||
TestAsn1BerEnc.c | ||
TestAsn1BerDec.c | ||
TestAsn1DerEnc.c | ||
TestAsn1DerDec.c) | ||
|
||
create_test_sourcelist(${MODULE_PREFIX}_SRCS | ||
${${MODULE_PREFIX}_DRIVER} | ||
${${MODULE_PREFIX}_TESTS}) | ||
|
||
add_executable(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) | ||
|
||
target_link_libraries(${MODULE_NAME} winpr-asn1) | ||
|
||
foreach(test ${${MODULE_PREFIX}_TESTS}) | ||
get_filename_component(TestName ${test} NAME_WE) | ||
add_test(${TestName} ${EXECUTABLE_OUTPUT_PATH}/${MODULE_NAME} ${TestName}) | ||
endforeach() | ||
|
||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Test") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1BerDec(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1BerEnc(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1Compare(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1Decode(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1Decoder(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1DerDec(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1DerEnc(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1Encode(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1Encoder(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1Integer(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1Module(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
#include <stdio.h> | ||
#include <winpr/crt.h> | ||
#include <winpr/asn1.h> | ||
#include <winpr/winpr.h> | ||
|
||
int TestAsn1String(int argc, char* argv[]) | ||
{ | ||
return 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LIBRARY "libwinpr-handle" | ||
EXPORTS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
LIBRARY "libwinpr-interlocked" | ||
EXPORTS | ||
InterlockedCompareExchange64 @1 | ||
InitializeListHead @2 | ||
IsListEmpty @3 | ||
RemoveEntryList @4 | ||
InsertHeadList @5 | ||
RemoveHeadList @6 | ||
InsertTailList @7 | ||
RemoveTailList @8 | ||
AppendTailList @9 | ||
PushEntryList @10 | ||
PopEntryList @11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# WinPR: Windows Portable Runtime | ||
# libwinpr-pipe cmake build script | ||
# | ||
# Copyright 2012 Marc-Andre Moreau <marcandre.moreau@gmail.com> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
set(MODULE_NAME "winpr-pipe") | ||
set(MODULE_PREFIX "WINPR_PIPE") | ||
|
||
set(${MODULE_PREFIX}_SRCS | ||
pipe.c) | ||
|
||
if(MSVC AND (NOT WITH_MONOLITHIC_BUILD)) | ||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def) | ||
endif() | ||
|
||
if(WITH_MONOLITHIC_BUILD) | ||
add_library(${MODULE_NAME} OBJECT ${${MODULE_PREFIX}_SRCS}) | ||
else() | ||
add_library(${MODULE_NAME} ${${MODULE_PREFIX}_SRCS}) | ||
endif() | ||
|
||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib") | ||
|
||
if(WITH_MONOLITHIC_BUILD) | ||
|
||
else() | ||
target_link_libraries(${MODULE_NAME} winpr-crt) | ||
install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
endif() | ||
|
||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR") | ||
|
||
if(BUILD_TESTING) | ||
add_subdirectory(test) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
set(MINWIN_LAYER "1") | ||
set(MINWIN_GROUP "core") | ||
set(MINWIN_MAJOR_VERSION "2") | ||
set(MINWIN_MINOR_VERSION "0") | ||
set(MINWIN_SHORT_NAME "namedpipe") | ||
set(MINWIN_LONG_NAME "Named Pipe Functions") | ||
set(MODULE_LIBRARY_NAME "api-ms-win-${MINWIN_GROUP}-${MINWIN_SHORT_NAME}-l${MINWIN_LAYER}-${MINWIN_MAJOR_VERSION}-${MINWIN_MINOR_VERSION}") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LIBRARY "libwinpr-pipe" | ||
EXPORTS | ||
|
Oops, something went wrong.