https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c73a46af9c23215240170ac6e127e7c0a776798f

commit c73a46af9c23215240170ac6e127e7c0a776798f
Author:     Amine Khaldi <[email protected]>
AuthorDate: Sun Oct 20 20:01:58 2019 +0100
Commit:     Amine Khaldi <[email protected]>
CommitDate: Sun Oct 20 20:01:58 2019 +0100

    [PSDK][UUID] Import natupnp.idl from Wine Staging 4.18. CORE-16441
---
 sdk/include/psdk/CMakeLists.txt |   1 +
 sdk/include/psdk/natupnp.idl    | 224 ++++++++++++++++++++++++++++++++++++++++
 sdk/lib/uuid/CMakeLists.txt     |   2 +-
 3 files changed, 226 insertions(+), 1 deletion(-)

diff --git a/sdk/include/psdk/CMakeLists.txt b/sdk/include/psdk/CMakeLists.txt
index 7667ff07ae5..4d6b5e6e049 100644
--- a/sdk/include/psdk/CMakeLists.txt
+++ b/sdk/include/psdk/CMakeLists.txt
@@ -79,6 +79,7 @@ list(APPEND SOURCE
     msxml.idl
     msxml2.idl
     msxml6.idl
+    natupnp.idl
     netcon.idl
     netfw.idl
     oaidl.idl
diff --git a/sdk/include/psdk/natupnp.idl b/sdk/include/psdk/natupnp.idl
new file mode 100644
index 00000000000..83b48a3dc60
--- /dev/null
+++ b/sdk/include/psdk/natupnp.idl
@@ -0,0 +1,224 @@
+/*
+ * Copyright 2018 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+import "oaidl.idl";
+import "ocidl.idl";
+
+#if !defined(progid) && !defined(__WIDL__)
+#define threading(model)
+#define progid(str)
+#define vi_progid(str)
+#endif
+
+[
+    object,
+    uuid(6F10711F-729B-41E5-93B8-F21D0F818DF1),
+    dual,
+    pointer_default(unique)
+]
+interface IStaticPortMapping : IDispatch
+{
+    [propget, id(1)]
+    HRESULT ExternalIPAddress ([out, retval] BSTR *value);
+
+    [propget, id(2)]
+    HRESULT ExternalPort([out, retval] long *value);
+
+    [propget, id(3)]
+    HRESULT InternalPort([out, retval] long *value);
+
+    [propget, id(4)]
+    HRESULT Protocol([out, retval] BSTR *value);
+
+    [propget, id(5)]
+    HRESULT InternalClient([out, retval] BSTR *value);
+
+    [propget, id(6)]
+    HRESULT Enabled([out, retval] VARIANT_BOOL *value);
+
+    [propget, id(7)]
+    HRESULT Description([out, retval] BSTR *value);
+
+    [id(8)]
+    HRESULT EditInternalClient ([in] BSTR client);
+
+    [id(9)]
+    HRESULT Enable ([in] VARIANT_BOOL enable);
+
+    [id(10)]
+    HRESULT EditDescription ([in] BSTR description);
+
+    [id(11)]
+    HRESULT EditInternalPort ([in] long port);
+};
+
+[
+    object,
+    uuid(cd1f3e77-66d6-4664-82c7-36dbb641d0f1),
+    dual,
+    pointer_default(unique)
+]
+interface IStaticPortMappingCollection : IDispatch
+{
+    [propget, id(DISPID_NEWENUM), hidden, restricted]
+    HRESULT _NewEnum([out, retval] IUnknown **value);
+
+    [propget, id(DISPID_VALUE)]
+    HRESULT Item([in] long port, [in] BSTR protocol, [out, retval] 
IStaticPortMapping **mapping);
+
+    [propget, id(1)]
+    HRESULT Count([out, retval] long *value);
+
+    [id(2)]
+    HRESULT Remove([in] long port, [in] BSTR protocol);
+
+    [id(3)]
+    HRESULT Add([in] long external, [in] BSTR protocol, [in] long internal, 
[in] BSTR client,
+        [in] VARIANT_BOOL enabled, [in] BSTR description, [out, retval] 
IStaticPortMapping **mapping);
+};
+
+[
+    object,
+    uuid(4FC80282-23B6-4378-9A27-CD8F17C9400C),
+    dual,
+    pointer_default(unique)
+]
+interface IDynamicPortMapping : IDispatch
+{
+    [propget, id(1)]
+    HRESULT ExternalIPAddress ([out, retval] BSTR *value);
+
+    [propget, id(2)]
+    HRESULT RemoteHost ([out, retval] BSTR *value);
+
+    [propget, id(3)]
+    HRESULT ExternalPort([out, retval] long *value);
+
+    [propget, id(4)]
+    HRESULT Protocol([out, retval] BSTR *value);
+
+    [propget, id(5)]
+    HRESULT InternalPort([out, retval] long *value);
+
+    [propget, id(6)]
+    HRESULT InternalClient([out, retval] BSTR *value);
+
+    [propget, id(7)]
+    HRESULT Enabled([out, retval] VARIANT_BOOL *value);
+
+    [propget, id(8)]
+    HRESULT Description([out, retval] BSTR *value);
+
+    [propget, id(9)]
+    HRESULT LeaseDuration([out, retval] long *value);
+
+    [id(10)]
+    HRESULT RenewLease([in] long desired, [out, retval] long *duration);
+
+    [id(11)]
+    HRESULT EditInternalClient ([in] BSTR client);
+
+    [id(12)]
+    HRESULT Enable ([in] VARIANT_BOOL enabled);
+
+    [id(13)]
+    HRESULT EditDescription ([in] BSTR description);
+
+    [id(14)]
+    HRESULT EditInternalPort ([in] long port);
+};
+
+[
+    object,
+    uuid(b60de00f-156e-4e8d-9ec1-3a2342c10899),
+    dual,
+    pointer_default(unique)
+]
+interface IDynamicPortMappingCollection : IDispatch
+{
+    [propget, id(DISPID_NEWENUM), hidden, restricted]
+    HRESULT _NewEnum([out, retval] IUnknown **value);
+
+    [propget, id(DISPID_VALUE)]
+    HRESULT Item([in] BSTR host, [in] long port, [in] BSTR orotocol,
+        [out, retval] IDynamicPortMapping **mapping);
+
+    [propget, id(1)]
+    HRESULT Count([out, retval] long *value);
+
+    [id(2)]
+    HRESULT Remove([in] BSTR host, [in] long port, [in] BSTR protocol);
+
+    [id(3)]
+    HRESULT Add([in] BSTR host, [in] long port, [in] BSTR protocol, [in] long 
internal,
+        [in] BSTR client, [in] VARIANT_BOOL enabled, [in] BSTR Description,
+        [in] long duration, [out, retval] IDynamicPortMapping **mapping);
+};
+
+[
+    object,
+    uuid(624bd588-9060-4109-b0b0-1adbbcac32df),
+    dual,
+    pointer_default(unique)
+]
+interface INATEventManager : IDispatch
+{
+    [id(1), propput]
+    HRESULT ExternalIPAddressCallback ([in] IUnknown *unk);
+
+    [id(2), propput]
+    HRESULT NumberOfEntriesCallback ([in] IUnknown *unk);
+};
+
+[
+    object,
+    uuid(b171c812-cc76-485a-94d8-b6b3a2794e99),
+    dual,
+    pointer_default(unique)
+]
+interface IUPnPNAT : IDispatch
+{
+    [propget, id(1)]
+    HRESULT StaticPortMappingCollection ([out, retval] 
IStaticPortMappingCollection **collection);
+
+    [propget, id(2)]
+    HRESULT DynamicPortMappingCollection ([out, retval] 
IDynamicPortMappingCollection **collection);
+
+    [propget, id(3)]
+    HRESULT NATEventManager ([out, retval] INATEventManager **manager);
+};
+
+[
+    id(2),
+    uuid(1c565858-f302-471e-b409-f180aa4abec6),
+    version(1.0)
+]
+library NATUPNPLib
+{
+    importlib("stdole2.tlb");
+
+    [
+        vi_progid("HNetCfg.NATUPnP"),
+        progid("HNetCfg.NATUPnP.1"),
+        threading(apartment),
+        uuid(ae1e00aa-3fd5-403c-8a27-2bbdc30cd0e1)
+    ]
+    coclass UPnPNAT
+    {
+        [default] interface IUPnPNAT;
+    };
+};
diff --git a/sdk/lib/uuid/CMakeLists.txt b/sdk/lib/uuid/CMakeLists.txt
index 09efcd927f6..d1f1392b256 100644
--- a/sdk/lib/uuid/CMakeLists.txt
+++ b/sdk/lib/uuid/CMakeLists.txt
@@ -75,7 +75,7 @@ list(APPEND IDL_SOURCES
 #    mstime.idl
     msxml.idl
 #    my_msdatsrc.idl
-#    natupnp.idl
+    natupnp.idl
 #    netcfgn.idl
 #    netcfgp.idl
 #    netcfgx.idl

Reply via email to