Skip to content
This repository was archived by the owner on Mar 22, 2022. It is now read-only.

Commit 89fc337

Browse files
committed
Move interop API to private, expose public C++ API
Remove the `api.h` file from the public API and rename to `interop_api.h` to avoid any confusion. This is an internal API for interop with C#, that should not be used directly. Expose an actual C++ API by moving the headers of the C++ classes to the `include/` folder.
1 parent 8bcd3e4 commit 89fc337

19 files changed

Lines changed: 46 additions & 41 deletions

libs/Microsoft.MixedReality.WebRTC.Native/src/audio_frame_observer.h renamed to libs/Microsoft.MixedReality.WebRTC.Native/include/audio_frame_observer.h

File renamed without changes.

libs/Microsoft.MixedReality.WebRTC.Native/src/callback.h renamed to libs/Microsoft.MixedReality.WebRTC.Native/include/callback.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#pragma once
66

7-
#include "api.h"
7+
#include "export.h"
88

99
namespace Microsoft::MixedReality::WebRTC {
1010

libs/Microsoft.MixedReality.WebRTC.Native/src/data_channel.h renamed to libs/Microsoft.MixedReality.WebRTC.Native/include/data_channel.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#include "data_channel.h"
1313
#include "str.h"
1414

15+
// Internal
16+
#include "interop/interop_api.h"
17+
1518
namespace Microsoft::MixedReality::WebRTC {
1619

1720
class PeerConnection;

libs/Microsoft.MixedReality.WebRTC.Native/src/peer_connection.h renamed to libs/Microsoft.MixedReality.WebRTC.Native/include/peer_connection.h

File renamed without changes.

libs/Microsoft.MixedReality.WebRTC.Native/src/sdp_utils.h renamed to libs/Microsoft.MixedReality.WebRTC.Native/include/sdp_utils.h

File renamed without changes.

libs/Microsoft.MixedReality.WebRTC.Native/src/video_frame_observer.h renamed to libs/Microsoft.MixedReality.WebRTC.Native/include/video_frame_observer.h

File renamed without changes.

libs/Microsoft.MixedReality.WebRTC.Native/src/api.cpp renamed to libs/Microsoft.MixedReality.WebRTC.Native/src/interop/interop_api.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// line, to prevent clang-format from reordering it with other headers.
77
#include "pch.h"
88

9-
#include "api.h"
9+
#include "interop/interop_api.h"
1010
#include "data_channel.h"
1111
#include "peer_connection.h"
1212
#include "sdp_utils.h"

libs/Microsoft.MixedReality.WebRTC.Native/include/api.h renamed to libs/Microsoft.MixedReality.WebRTC.Native/src/interop/interop_api.h

File renamed without changes.

libs/Microsoft.MixedReality.WebRTC.Native/src/peer_connection.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
// line, to prevent clang-format from reordering it with other headers.
77
#include "pch.h"
88

9-
#include "api.h"
109
#include "audio_frame_observer.h"
1110
#include "data_channel.h"
1211
#include "peer_connection.h"
1312
#include "video_frame_observer.h"
1413

14+
// Internal
15+
#include "interop/interop_api.h"
16+
1517
#include <functional>
1618

1719
namespace {

libs/Microsoft.MixedReality.WebRTC.Native/src/uwp/Microsoft.MixedReality.WebRTC.Native.UWP.vcxproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
<CompileAsWinRT>false</CompileAsWinRT>
102102
<WarningLevel>Level4</WarningLevel>
103103
<TreatWarningAsError>true</TreatWarningAsError>
104-
<AdditionalIncludeDirectories>..\..\include;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc;$(WebRTCCoreRepoPath)webrtc\xplatform;$(WebRTCCoreRepoPath)webrtc\xplatform\chromium;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows\wrapper;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows\wrapper\generated\cppwinrt;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows\wrapper\override\cppwinrt;$(WebRTCCoreRepoPath)webrtc\xplatform\chromium\third_party\abseil-cpp;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\third_party\idl;$(WebRTCCoreRepoPath)webrtc\xplatform\zsLib;$(WebRTCCoreRepoPath)webrtc\xplatform\zsLib-eventing;$(WebRTCCoreRepoPath)webrtc\xplatform\libyuv\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
104+
<AdditionalIncludeDirectories>..\..\include;..\;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc;$(WebRTCCoreRepoPath)webrtc\xplatform;$(WebRTCCoreRepoPath)webrtc\xplatform\chromium;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows\wrapper;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows\wrapper\generated\cppwinrt;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\sdk\windows\wrapper\override\cppwinrt;$(WebRTCCoreRepoPath)webrtc\xplatform\chromium\third_party\abseil-cpp;$(WebRTCCoreRepoPath)webrtc\xplatform\webrtc\third_party\idl;$(WebRTCCoreRepoPath)webrtc\xplatform\zsLib;$(WebRTCCoreRepoPath)webrtc\xplatform\zsLib-eventing;$(WebRTCCoreRepoPath)webrtc\xplatform\libyuv\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
105105
<ConformanceMode>false</ConformanceMode>
106106
<LanguageStandard>stdcpp17</LanguageStandard>
107107
<ExceptionHandling>SyncCThrow</ExceptionHandling>
@@ -117,20 +117,20 @@
117117
</Link>
118118
</ItemDefinitionGroup>
119119
<ItemGroup>
120-
<ClInclude Include="../../include/api.h" />
121-
<ClInclude Include="../audio_frame_observer.h" />
122-
<ClInclude Include="../callback.h" />
123-
<ClInclude Include="../data_channel.h" />
120+
<ClInclude Include="../interop/interop_api.h" />
121+
<ClInclude Include="../../include/audio_frame_observer.h" />
122+
<ClInclude Include="../../include/callback.h" />
123+
<ClInclude Include="../../include/data_channel.h" />
124124
<ClInclude Include="../pch.h" />
125-
<ClInclude Include="../peer_connection.h" />
125+
<ClInclude Include="../../include/peer_connection.h" />
126126
<ClInclude Include="../targetver.h" />
127-
<ClInclude Include="../video_frame_observer.h" />
128-
<ClInclude Include="../sdp_utils.h" />
127+
<ClInclude Include="../../include/video_frame_observer.h" />
128+
<ClInclude Include="../../include/sdp_utils.h" />
129129
<ClInclude Include="../../include/export.h" />
130130
<ClInclude Include="../../include/str.h" />
131131
</ItemGroup>
132132
<ItemGroup>
133-
<ClCompile Include="../api.cpp" />
133+
<ClCompile Include="../interop/interop_api.cpp" />
134134
<ClCompile Include="../audio_frame_observer.cpp" />
135135
<ClCompile Include="../data_channel.cpp" />
136136
<ClCompile Include="../pch.cpp">

0 commit comments

Comments
 (0)