2 * Copyright 2018 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #if
!defined
(progid
) && !defined
(__WIDL__
)
22 #define threading
(model
)
24 #define vi_progid
(str
)
29 uuid(6F10711F
-729B
-41E5
-93B8
-F21D0F818DF1
),
31 pointer_default(unique)
33 interface IStaticPortMapping
: IDispatch
36 HRESULT ExternalIPAddress
([out, retval] BSTR *value
);
39 HRESULT ExternalPort
([out, retval] long *value
);
42 HRESULT InternalPort
([out, retval] long *value
);
45 HRESULT Protocol
([out, retval] BSTR *value
);
48 HRESULT InternalClient
([out, retval] BSTR *value
);
51 HRESULT Enabled
([out, retval] VARIANT_BOOL *value
);
54 HRESULT Description
([out, retval] BSTR *value
);
57 HRESULT EditInternalClient
([in] BSTR client
);
60 HRESULT Enable
([in] VARIANT_BOOL enable
);
63 HRESULT EditDescription
([in] BSTR description
);
66 HRESULT EditInternalPort
([in] long port
);
71 uuid(cd1f3e77
-66d6
-4664-82c7
-36dbb641d0f1
),
73 pointer_default(unique)
75 interface IStaticPortMappingCollection
: IDispatch
77 [propget, id(DISPID_NEWENUM
), hidden, restricted]
78 HRESULT _NewEnum
([out, retval] IUnknown
**value
);
80 [propget, id(DISPID_VALUE
)]
81 HRESULT Item
([in] long port
, [in] BSTR protocol
, [out, retval] IStaticPortMapping
**mapping
);
84 HRESULT Count
([out, retval] long *value
);
87 HRESULT Remove
([in] long port
, [in] BSTR protocol
);
90 HRESULT Add
([in] long external
, [in] BSTR protocol
, [in] long internal
, [in] BSTR client
,
91 [in] VARIANT_BOOL enabled
, [in] BSTR description
, [out, retval] IStaticPortMapping
**mapping
);
96 uuid(4FC80282
-23B6
-4378-9A27
-CD8F17C9400C
),
98 pointer_default(unique)
100 interface IDynamicPortMapping
: IDispatch
103 HRESULT ExternalIPAddress
([out, retval] BSTR *value
);
106 HRESULT RemoteHost
([out, retval] BSTR *value
);
109 HRESULT ExternalPort
([out, retval] long *value
);
112 HRESULT Protocol
([out, retval] BSTR *value
);
115 HRESULT InternalPort
([out, retval] long *value
);
118 HRESULT InternalClient
([out, retval] BSTR *value
);
121 HRESULT Enabled
([out, retval] VARIANT_BOOL *value
);
124 HRESULT Description
([out, retval] BSTR *value
);
127 HRESULT LeaseDuration
([out, retval] long *value
);
130 HRESULT RenewLease
([in] long desired
, [out, retval] long *duration
);
133 HRESULT EditInternalClient
([in] BSTR client
);
136 HRESULT Enable
([in] VARIANT_BOOL enabled
);
139 HRESULT EditDescription
([in] BSTR description
);
142 HRESULT EditInternalPort
([in] long port
);
147 uuid(b60de00f
-156e-4e8d
-9ec1
-3a2342c10899
),
149 pointer_default(unique)
151 interface IDynamicPortMappingCollection
: IDispatch
153 [propget, id(DISPID_NEWENUM
), hidden, restricted]
154 HRESULT _NewEnum
([out, retval] IUnknown
**value
);
156 [propget, id(DISPID_VALUE
)]
157 HRESULT Item
([in] BSTR host
, [in] long port
, [in] BSTR orotocol
,
158 [out, retval] IDynamicPortMapping
**mapping
);
161 HRESULT Count
([out, retval] long *value
);
164 HRESULT Remove
([in] BSTR host
, [in] long port
, [in] BSTR protocol
);
167 HRESULT Add
([in] BSTR host
, [in] long port
, [in] BSTR protocol
, [in] long internal
,
168 [in] BSTR client
, [in] VARIANT_BOOL enabled
, [in] BSTR Description
,
169 [in] long duration
, [out, retval] IDynamicPortMapping
**mapping
);
174 uuid(624bd588
-9060-4109-b0b0
-1adbbcac32df
),
176 pointer_default(unique)
178 interface INATEventManager
: IDispatch
181 HRESULT ExternalIPAddressCallback
([in] IUnknown
*unk
);
184 HRESULT NumberOfEntriesCallback
([in] IUnknown
*unk
);
189 uuid(b171c812
-cc76
-485a
-94d8
-b6b3a2794e99
),
191 pointer_default(unique)
193 interface IUPnPNAT
: IDispatch
196 HRESULT StaticPortMappingCollection
([out, retval] IStaticPortMappingCollection
**collection
);
199 HRESULT DynamicPortMappingCollection
([out, retval] IDynamicPortMappingCollection
**collection
);
202 HRESULT NATEventManager
([out, retval] INATEventManager
**manager
);
207 uuid(1c565858
-f302
-471e
-b409
-f180aa4abec6
),
212 importlib
("stdole2.tlb");
215 vi_progid
("HNetCfg.NATUPnP"),
216 progid
("HNetCfg.NATUPnP.1"),
217 threading
(apartment
),
218 uuid(ae1e00aa
-3fd5
-403c
-8a27
-2bbdc30cd0e1
)
222 [default] interface IUPnPNAT
;