Browse Source

Remove VpnPlugin.idl

bdbai 4 năm trước cách đây
mục cha
commit
2c32b1c348

+ 1 - 1
Maple.App/MainPage.cpp

@@ -323,7 +323,7 @@ namespace winrt::Maple_App::implementation
             }
             auto ext = std::filesystem::path(std::wstring_view(file.Path())).extension().string();
             std::transform(ext.begin(), ext.end(), ext.begin(), [](const auto ch) {
-                return std::tolower(ch);
+                return static_cast<char>(std::tolower(ch));
                 });
             if (ext != ".json" && ext != ".conf") {
                 continue;

+ 1 - 2
Maple.Task/Maple.Task.vcxproj

@@ -181,11 +181,10 @@
     <None Include="PropertySheet.props" />
   </ItemGroup>
   <ItemGroup>
-    <Midl Include="VpnPlugin.idl" />
     <Midl Include="VpnTask.idl" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
     <Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.210312.4\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.210312.4\build\native\Microsoft.Windows.CppWinRT.targets')" />
   </ImportGroup>
-</Project>
+</Project>

+ 0 - 1
Maple.Task/VpnPlugin.cpp

@@ -1,6 +1,5 @@
 #include "pch.h"
 #include "VpnPlugin.h"
-#include "VpnPlugin.g.cpp"
 #include "winrt/Windows.Storage.h"
 #include "winrt/Windows.Storage.Streams.h"
 

+ 2 - 2
Maple.Task/VpnPlugin.h

@@ -1,16 +1,16 @@
 #pragma once
 #include <queue>
 #include <mutex>
-#include "VpnPlugin.g.h"
 #include "leaf.h"
 #include "CustomBuffer.h"
 #include "winrt/Windows.Networking.Sockets.h"
+#include "winrt/Windows.Networking.Vpn.h"
 
 namespace winrt::Maple_Task::implementation
 {
     static const hstring CONFIG_PATH_SETTING_KEY = L"CONFIG_PATH";
     static const hstring NETIF_SETTING_KEY = L"NETIF";
-    struct VpnPlugin : VpnPluginT<VpnPlugin>
+    struct VpnPlugin : implements<VpnPlugin, Windows::Networking::Vpn::IVpnPlugIn>
     {
         VpnPlugin() = default;
 

+ 0 - 7
Maple.Task/VpnPlugin.idl

@@ -1,7 +0,0 @@
-namespace Maple_Task
-{
-    [default_interface]
-    runtimeclass VpnPlugin : Windows.Networking.Vpn.IVpnPlugIn {
-
-}
-}