adhoc.idl 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. /**
  2. * This file is part of the mingw-w64 runtime package.
  3. * No warranty is given; refer to the file DISCLAIMER within this package.
  4. */
  5. #ifndef DO_NO_IMPORTS
  6. import "oaidl.idl";
  7. import "unknwn.idl";
  8. import "wtypes.idl";
  9. #endif
  10. cpp_quote("#include <winapifamily.h>")
  11. cpp_quote("")
  12. cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
  13. interface IDot11AdHocManager;
  14. interface IDot11AdHocManagerNotificationSink;
  15. interface IDot11AdHocNetwork;
  16. interface IDot11AdHocNetworkNotificationSink;
  17. interface IDot11AdHocInterface;
  18. interface IDot11AdHocInterfaceNotificationSink;
  19. interface IDot11AdHocSecuritySettings;
  20. interface IEnumDot11AdHocInterfaces;
  21. interface IEnumDot11AdHocNetworks;
  22. interface IEnumDot11AdHocSecuritySettings;
  23. typedef [v1_enum] enum tagDOT11_ADHOC_CIPHER_ALGORITHM {
  24. DOT11_ADHOC_CIPHER_ALGO_INVALID = -1,
  25. DOT11_ADHOC_CIPHER_ALGO_NONE = 0x00,
  26. DOT11_ADHOC_CIPHER_ALGO_CCMP = 0x04,
  27. DOT11_ADHOC_CIPHER_ALGO_WEP = 0x101,
  28. } DOT11_ADHOC_CIPHER_ALGORITHM;
  29. typedef [v1_enum] enum tagDOT11_ADHOC_AUTH_ALGORITHM {
  30. DOT11_ADHOC_AUTH_ALGO_INVALID = -1,
  31. DOT11_ADHOC_AUTH_ALGO_80211_OPEN = 1,
  32. DOT11_ADHOC_AUTH_ALGO_RSNA_PSK = 7
  33. } DOT11_ADHOC_AUTH_ALGORITHM;
  34. typedef [v1_enum] enum tagDOT11_ADHOC_NETWORK_CONNECTION_STATUS {
  35. DOT11_ADHOC_NETWORK_CONNECTION_STATUS_INVALID = 0,
  36. DOT11_ADHOC_NETWORK_CONNECTION_STATUS_DISCONNECTED = 11,
  37. DOT11_ADHOC_NETWORK_CONNECTION_STATUS_CONNECTING = 12,
  38. DOT11_ADHOC_NETWORK_CONNECTION_STATUS_CONNECTED = 13,
  39. DOT11_ADHOC_NETWORK_CONNECTION_STATUS_FORMED = 14
  40. } DOT11_ADHOC_NETWORK_CONNECTION_STATUS;
  41. typedef [v1_enum] enum tagDOT11_ADHOC_CONNECT_FAIL_REASON {
  42. DOT11_ADHOC_CONNECT_FAIL_DOMAIN_MISMATCH = 0,
  43. DOT11_ADHOC_CONNECT_FAIL_PASSPHRASE_MISMATCH = 1,
  44. DOT11_ADHOC_CONNECT_FAIL_OTHER = 2
  45. } DOT11_ADHOC_CONNECT_FAIL_REASON;
  46. cpp_quote("EXTERN_C const CLSID CLSID_AdHocManager;")
  47. [object, local, uuid (8f10cc26-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  48. interface IDot11AdHocManager : IUnknown {
  49. HRESULT CreateNetwork ([in, string] LPCWSTR Name,[in, string] LPCWSTR Password,[in] LONG GeographicalId,[in] IDot11AdHocInterface *pInterface,[in] IDot11AdHocSecuritySettings *pSecurity,[in] GUID *pContextGuid,[out] IDot11AdHocNetwork **pIAdHoc);
  50. HRESULT CommitCreatedNetwork ([in] IDot11AdHocNetwork *pIAdHoc,[in] BOOLEAN fSaveProfile,[in] BOOLEAN fMakeSavedProfileUserSpecific);
  51. HRESULT GetIEnumDot11AdHocNetworks ([in] GUID *pContextGuid,[out] IEnumDot11AdHocNetworks **ppEnum);
  52. HRESULT GetIEnumDot11AdHocInterfaces ([out] IEnumDot11AdHocInterfaces **ppEnum);
  53. HRESULT GetNetwork ([in] GUID *NetworkSignature,[out] IDot11AdHocNetwork **pNetwork);
  54. };
  55. [object, local, uuid (8f10cc27-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  56. interface IDot11AdHocManagerNotificationSink : IUnknown {
  57. HRESULT OnNetworkAdd ([in] IDot11AdHocNetwork *pIAdHocNetwork);
  58. HRESULT OnNetworkRemove ([in] GUID *Signature);
  59. HRESULT OnInterfaceAdd ([in] IDot11AdHocInterface *pIAdHocInterface);
  60. HRESULT OnInterfaceRemove ([in] GUID *Signature);
  61. }
  62. [object, local, uuid (8f10cc28-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  63. interface IEnumDot11AdHocNetworks : IUnknown {
  64. HRESULT Next ([in] ULONG cElt,[out, size_is (cElt), length_is (*pcEltFetched)]IDot11AdHocNetwork **rgElt,[out] ULONG *pcEltFetched);
  65. HRESULT Skip ([in] ULONG cElt);
  66. HRESULT Reset ();
  67. HRESULT Clone ([out] IEnumDot11AdHocNetworks **ppEnum);
  68. };
  69. [object, local, uuid (8f10cc29-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  70. interface IDot11AdHocNetwork : IUnknown {
  71. HRESULT GetStatus ([in, out] DOT11_ADHOC_NETWORK_CONNECTION_STATUS *eStatus);
  72. HRESULT GetSSID ([out, string] LPWSTR *ppszwSSID);
  73. HRESULT HasProfile ([in, out] BOOLEAN *pf11d);
  74. HRESULT GetProfileName ([out, string] LPWSTR *ppszwProfileName);
  75. HRESULT DeleteProfile ();
  76. HRESULT GetSignalQuality ([out] ULONG *puStrengthValue,[out] ULONG *puStrengthMax);
  77. HRESULT GetSecuritySetting ([out] IDot11AdHocSecuritySettings **pAdHocSecuritySetting);
  78. HRESULT GetContextGuid ([in, out] GUID *pContextGuid);
  79. HRESULT GetSignature ([in, out] GUID *pSignature);
  80. HRESULT GetInterface ([out] IDot11AdHocInterface **pAdHocInterface);
  81. HRESULT Connect ([in, string] LPCWSTR Passphrase,[in] LONG GeographicalId,[in] BOOLEAN fSaveProfile,[in] BOOLEAN fMakeSavedProfileUserSpecific);
  82. HRESULT Disconnect ();
  83. };
  84. [object, local, uuid (8f10cc2a-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  85. interface IDot11AdHocNetworkNotificationSink : IUnknown {
  86. HRESULT OnStatusChange (DOT11_ADHOC_NETWORK_CONNECTION_STATUS eStatus);
  87. HRESULT OnConnectFail (DOT11_ADHOC_CONNECT_FAIL_REASON eFailReason);
  88. }
  89. [object, local, uuid (8f10cc2b-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  90. interface IDot11AdHocInterface : IUnknown {
  91. HRESULT GetDeviceSignature ([in, out] GUID *pSignature);
  92. HRESULT GetFriendlyName ([out, string] LPWSTR *ppszName);
  93. HRESULT IsDot11d ([in, out] BOOLEAN *pf11d);
  94. HRESULT IsAdHocCapable ([in, out] BOOLEAN *pfAdHocCapable);
  95. HRESULT IsRadioOn ([in, out] BOOLEAN *pfIsRadioOn);
  96. HRESULT GetActiveNetwork ([out] IDot11AdHocNetwork **ppNetwork);
  97. HRESULT GetIEnumSecuritySettings ([out] IEnumDot11AdHocSecuritySettings **ppEnum);
  98. HRESULT GetIEnumDot11AdHocNetworks ([in] GUID *pFilterGuid,[out] IEnumDot11AdHocNetworks **ppEnum);
  99. HRESULT GetStatus ([in, out] DOT11_ADHOC_NETWORK_CONNECTION_STATUS *pState);
  100. }
  101. [object, local, uuid (8f10cc2c-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  102. interface IEnumDot11AdHocInterfaces : IUnknown {
  103. HRESULT Next ([in] ULONG cElt,[out, size_is (cElt), length_is (*pcEltFetched)]IDot11AdHocInterface **rgElt,[out] ULONG *pcEltFetched);
  104. HRESULT Skip ([in] ULONG cElt);
  105. HRESULT Reset ();
  106. HRESULT Clone ([out] IEnumDot11AdHocInterfaces **ppEnum);
  107. }
  108. [object, local, uuid (8f10cc2d-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  109. interface IEnumDot11AdHocSecuritySettings : IUnknown {
  110. HRESULT Next ([in] ULONG cElt,[out, size_is (cElt), length_is (*pcEltFetched)]IDot11AdHocSecuritySettings **rgElt,[out] ULONG *pcEltFetched);
  111. HRESULT Skip ([in] ULONG cElt);
  112. HRESULT Reset ();
  113. HRESULT Clone ([out] IEnumDot11AdHocSecuritySettings **ppEnum);
  114. }
  115. [object, local, uuid (8f10cc2e-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  116. interface IDot11AdHocSecuritySettings : IUnknown {
  117. HRESULT GetDot11AuthAlgorithm ([in, out] DOT11_ADHOC_AUTH_ALGORITHM *pAuth);
  118. HRESULT GetDot11CipherAlgorithm ([in, out] DOT11_ADHOC_CIPHER_ALGORITHM *pCipher);
  119. }
  120. [object, local, uuid (8f10cc2f-cf0d-42a0-acbe-e2de7007384d), pointer_default (unique)]
  121. interface IDot11AdHocInterfaceNotificationSink : IUnknown {
  122. HRESULT OnConnectionStatusChange (DOT11_ADHOC_NETWORK_CONNECTION_STATUS eStatus);
  123. }
  124. [uuid (45357166-ff38-4302-8f5c-df5b703a6e3d), version (1.0)]
  125. library ADHOCLib {
  126. importlib ("stdole2.tlb");
  127. [uuid (dd06a84f-83bd-4d01-8ab9-2389fea0869e)]
  128. coclass Dot11AdHocManager {
  129. [default] interface IDot11AdHocManager;
  130. };
  131. };
  132. cpp_quote("#endif")