Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
a6ae0d02
Commit
a6ae0d02
authored
Jan 26, 2016
by
Ghislain MARY
Browse files
Use correct namespaces and winmd name when building for Windows 10.
parent
b0ea18f8
Changes
3
Hide whitespace changes
Inline
Side-by-side
tester/CMakeLists.txt
View file @
a6ae0d02
...
...
@@ -89,6 +89,8 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
target_compile_options
(
linphone_tester_runtime PRIVATE
"/wd4996"
)
target_link_libraries
(
linphone_tester_runtime linphone_tester_static
)
set_target_properties
(
linphone_tester_runtime PROPERTIES VS_WINRT_COMPONENT TRUE
)
set_target_properties
(
linphone_tester_runtime PROPERTIES LIBRARY_OUTPUT_NAME
"BelledonneCommunications.Linphone.Tester"
)
set_target_properties
(
linphone_tester_runtime PROPERTIES LINK_FLAGS
"/WINMDFILE:BelledonneCommunications.Linphone.Tester.winmd"
)
install
(
TARGETS linphone_tester_runtime
RUNTIME DESTINATION bin
...
...
@@ -96,7 +98,13 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
ARCHIVE DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
CMAKE_BUILD_TYPE
}
/linphone_tester_runtime.winmd"
DESTINATION bin
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/BelledonneCommunications.Linphone.Tester.winmd"
DESTINATION lib
)
if
(
CMAKE_BUILD_TYPE STREQUAL
"Debug"
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/Debug/BelledonneCommunications.Linphone.Tester.pdb
DESTINATION lib
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
endif
()
else
()
add_executable
(
liblinphone_tester
${
SOURCE_FILES
}
)
set_target_properties
(
liblinphone_tester PROPERTIES LINKER_LANGUAGE CXX
)
...
...
tester/liblinphone_tester_windows.cpp
View file @
a6ae0d02
...
...
@@ -2,7 +2,7 @@
#include "liblinphone_tester_windows.h"
using
namespace
l
inphone
_t
ester
_runtime
;
using
namespace
BelledonneCommunications
::
L
inphone
::
T
ester
;
using
namespace
Platform
;
using
namespace
Windows
::
Foundation
;
using
namespace
Windows
::
Storage
;
...
...
@@ -14,7 +14,7 @@ using namespace Windows::System::Threading;
static
OutputTraceListener
^
sTraceListener
;
LibLinphoneTester
^
LibLinphon
eTester
::
_instance
=
ref
new
LibLinphon
eTester
();
NativeTester
^
Nativ
eTester
::
_instance
=
ref
new
Nativ
eTester
();
static
void
nativeOutputTraceHandler
(
int
lev
,
const
char
*
fmt
,
va_list
args
)
{
...
...
@@ -45,27 +45,27 @@ static void nativeOutputTraceHandler(int lev, const char *fmt, va_list args)
}
}
static
void
libLinphoneNativeOutputTraceHandler
(
OrtpLogLevel
lev
,
const
char
*
fmt
,
va_list
args
)
static
void
libLinphoneNativeOutputTraceHandler
(
const
char
*
domain
,
OrtpLogLevel
lev
,
const
char
*
fmt
,
va_list
args
)
{
nativeOutputTraceHandler
((
int
)
lev
,
fmt
,
args
);
}
LibLinphoneTester
::
LibLinphon
eTester
()
NativeTester
::
Nativ
eTester
()
{
}
LibLinphoneTester
::~
LibLinphon
eTester
()
NativeTester
::~
Nativ
eTester
()
{
liblinphone_tester_uninit
();
}
void
LibLinphon
eTester
::
setOutputTraceListener
(
OutputTraceListener
^
traceListener
)
void
Nativ
eTester
::
setOutputTraceListener
(
OutputTraceListener
^
traceListener
)
{
sTraceListener
=
traceListener
;
}
void
LibLinphon
eTester
::
initialize
(
StorageFolder
^
writableDirectory
,
Platform
::
Boolean
ui
)
void
Nativ
eTester
::
initialize
(
StorageFolder
^
writableDirectory
,
Platform
::
Boolean
ui
)
{
if
(
ui
)
{
liblinphone_tester_init
(
nativeOutputTraceHandler
);
...
...
@@ -91,7 +91,7 @@ void LibLinphoneTester::initialize(StorageFolder^ writableDirectory, Platform::B
}
}
bool
LibLinphon
eTester
::
run
(
Platform
::
String
^
suiteName
,
Platform
::
String
^
caseName
,
Platform
::
Boolean
verbose
)
bool
Nativ
eTester
::
run
(
Platform
::
String
^
suiteName
,
Platform
::
String
^
caseName
,
Platform
::
Boolean
verbose
)
{
std
::
wstring
all
(
L"ALL"
);
std
::
wstring
wssuitename
=
suiteName
->
Data
();
...
...
@@ -111,7 +111,7 @@ bool LibLinphoneTester::run(Platform::String^ suiteName, Platform::String^ caseN
return
bc_tester_run_tests
(
wssuitename
==
all
?
0
:
csuitename
,
wscasename
==
all
?
0
:
ccasename
)
!=
0
;
}
void
LibLinphon
eTester
::
runAllToXml
()
void
Nativ
eTester
::
runAllToXml
()
{
auto
workItem
=
ref
new
WorkItemHandler
([
this
](
IAsyncAction
^
workItem
)
{
bc_tester_start
(
NULL
);
...
...
@@ -120,12 +120,12 @@ void LibLinphoneTester::runAllToXml()
_asyncAction
=
ThreadPool
::
RunAsync
(
workItem
);
}
unsigned
int
LibLinphon
eTester
::
nbTestSuites
()
unsigned
int
Nativ
eTester
::
nbTestSuites
()
{
return
bc_tester_nb_suites
();
}
unsigned
int
LibLinphon
eTester
::
nbTests
(
Platform
::
String
^
suiteName
)
unsigned
int
Nativ
eTester
::
nbTests
(
Platform
::
String
^
suiteName
)
{
std
::
wstring
suitename
=
suiteName
->
Data
();
char
cname
[
MAX_SUITE_NAME_SIZE
]
=
{
0
};
...
...
@@ -133,7 +133,7 @@ unsigned int LibLinphoneTester::nbTests(Platform::String^ suiteName)
return
bc_tester_nb_tests
(
cname
);
}
Platform
::
String
^
LibLinphon
eTester
::
testSuiteName
(
int
index
)
Platform
::
String
^
Nativ
eTester
::
testSuiteName
(
int
index
)
{
const
char
*
cname
=
bc_tester_suite_name
(
index
);
wchar_t
wcname
[
MAX_SUITE_NAME_SIZE
];
...
...
@@ -141,7 +141,7 @@ Platform::String^ LibLinphoneTester::testSuiteName(int index)
return
ref
new
String
(
wcname
);
}
Platform
::
String
^
LibLinphon
eTester
::
testName
(
Platform
::
String
^
suiteName
,
int
testIndex
)
Platform
::
String
^
Nativ
eTester
::
testName
(
Platform
::
String
^
suiteName
,
int
testIndex
)
{
std
::
wstring
suitename
=
suiteName
->
Data
();
char
csuitename
[
MAX_SUITE_NAME_SIZE
]
=
{
0
};
...
...
tester/liblinphone_tester_windows.h
View file @
a6ae0d02
...
...
@@ -3,39 +3,45 @@
#include "linphonecore.h"
#include "liblinphone_tester.h"
namespace
linphone_tester_runtime
namespace
BelledonneCommunications
{
public
interface
class
OutputTr
aceLi
ste
ne
r
namesp
ace
Li
npho
ne
{
public:
void
outputTrace
(
Platform
::
String
^
lev
,
Platform
::
String
^
msg
);
};
namespace
Tester
{
public
interface
class
OutputTraceListener
{
public:
void
outputTrace
(
Platform
::
String
^
lev
,
Platform
::
String
^
msg
);
};
public
ref
class
LibLinphon
eTester
sealed
{
public:
void
setOutputTraceListener
(
OutputTraceListener
^
traceListener
);
unsigned
int
nbTestSuites
();
unsigned
int
nbTests
(
Platform
::
String
^
suiteName
);
Platform
::
String
^
testSuiteName
(
int
index
);
Platform
::
String
^
testName
(
Platform
::
String
^
suiteName
,
int
testIndex
);
void
initialize
(
Windows
::
Storage
::
StorageFolder
^
writableDirectory
,
Platform
::
Boolean
ui
);
bool
run
(
Platform
::
String
^
suiteName
,
Platform
::
String
^
caseName
,
Platform
::
Boolean
verbose
);
void
runAllToXml
();
public
ref
class
Nativ
eTester
sealed
{
public:
void
setOutputTraceListener
(
OutputTraceListener
^
traceListener
);
unsigned
int
nbTestSuites
();
unsigned
int
nbTests
(
Platform
::
String
^
suiteName
);
Platform
::
String
^
testSuiteName
(
int
index
);
Platform
::
String
^
testName
(
Platform
::
String
^
suiteName
,
int
testIndex
);
void
initialize
(
Windows
::
Storage
::
StorageFolder
^
writableDirectory
,
Platform
::
Boolean
ui
);
bool
run
(
Platform
::
String
^
suiteName
,
Platform
::
String
^
caseName
,
Platform
::
Boolean
verbose
);
void
runAllToXml
();
static
property
LibLinphon
eTester
^
Instance
{
LibLinphon
eTester
^
get
()
{
return
_instance
;
}
}
property
Windows
::
Foundation
::
IAsyncAction
^
AsyncAction
{
Windows
::
Foundation
::
IAsyncAction
^
get
()
{
return
_asyncAction
;
}
}
private:
LibLinphon
eTester
();
~
LibLinphon
eTester
();
static
property
Nativ
eTester
^
Instance
{
Nativ
eTester
^
get
()
{
return
_instance
;
}
}
property
Windows
::
Foundation
::
IAsyncAction
^
AsyncAction
{
Windows
::
Foundation
::
IAsyncAction
^
get
()
{
return
_asyncAction
;
}
}
private:
Nativ
eTester
();
~
Nativ
eTester
();
static
LibLinphoneTester
^
_instance
;
Windows
::
Foundation
::
IAsyncAction
^
_asyncAction
;
};
static
NativeTester
^
_instance
;
Windows
::
Foundation
::
IAsyncAction
^
_asyncAction
;
};
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment