locationapi.idl 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. import "oaidl.idl";
  7. import "ocidl.idl";
  8. import "sensorsapi.idl";
  9. cpp_quote("#include <propkeydef.h>")
  10. typedef enum LOCATION_REPORT_STATUS {
  11. REPORT_NOT_SUPPORTED = 0,
  12. REPORT_ERROR = 1,
  13. REPORT_ACCESS_DENIED = 2,
  14. REPORT_INITIALIZING = 3,
  15. REPORT_RUNNING = 4
  16. } LOCATION_REPORT_STATUS;
  17. [
  18. uuid(c8b7f7ee-75d0-4db9-b62d-7a0f369ca456),
  19. object
  20. ]
  21. interface ILocationReport : IUnknown {
  22. HRESULT GetSensorID([out, retval] SENSOR_ID *pSensorID);
  23. HRESULT GetTimestamp([out, retval] SYSTEMTIME *pCreationTime);
  24. HRESULT GetValue([in] REFPROPERTYKEY pKey, [out, retval] PROPVARIANT *pValue);
  25. }
  26. [
  27. uuid(c0b19f70-4adf-445d-87f2-cad8fd711792),
  28. object
  29. ]
  30. interface ICivicAddressReport : ILocationReport {
  31. HRESULT GetAddressLine1([out, retval] BSTR *pbstrAddress1);
  32. HRESULT GetAddressLine2([out, retval] BSTR *pbstrAddress2);
  33. HRESULT GetCity([out, retval] BSTR *pbstrCity);
  34. HRESULT GetStateProvince([out, retval] BSTR *pbstrStateProvince);
  35. HRESULT GetPostalCode([out, retval] BSTR *pbstrPostalCode);
  36. HRESULT GetCountryRegion([out, retval] BSTR *pbstrCountryRegion);
  37. HRESULT GetDetailLevel([out, retval] DWORD *pDetailLevel);
  38. }
  39. [
  40. uuid(7fed806d-0ef8-4f07-80ac-36a0beae3134),
  41. object
  42. ]
  43. interface ILatLongReport : ILocationReport {
  44. HRESULT GetLatitude([out, retval] DOUBLE *pLatitude);
  45. HRESULT GetLongitude([out, retval] DOUBLE *pLongitude);
  46. HRESULT GetErrorRadius([out, retval] DOUBLE *pErrorRadius);
  47. HRESULT GetAltitude([out, retval] DOUBLE *pAltitude);
  48. HRESULT GetAltitudeError([out, retval] DOUBLE *pAltitudeError);
  49. }
  50. [
  51. uuid(a65aF77e-969a-4a2e-8aca-33bb7cbb1235),
  52. object
  53. ]
  54. interface IDefaultLocation : IUnknown {
  55. HRESULT SetReport([in] REFIID reportType, [in] ILocationReport *pLocationReport);
  56. HRESULT GetReport([in] REFIID reportType, [out, retval] ILocationReport **ppLocationReport);
  57. }
  58. [
  59. uuid(cae02bbf-798b-4508-a207-35a7906dc73d),
  60. object
  61. ]
  62. interface ILocationEvents : IUnknown {
  63. HRESULT OnLocationChanged([in] REFIID reportType, [in] ILocationReport *pLocationReport);
  64. HRESULT OnStatusChanged([in] REFIID reportType, [in] LOCATION_REPORT_STATUS newStatus);
  65. }
  66. [
  67. uuid(ab2ece69-56d9-4f28-b525-de1B0ee44237),
  68. object
  69. ]
  70. interface ILocation : IUnknown {
  71. HRESULT RegisterForReport([in] ILocationEvents *pEvents, [in] REFIID reportType, [in] DWORD dwRequestedReportInterval);
  72. HRESULT UnregisterForReport([in] REFIID reportType);
  73. HRESULT GetReport([in] REFIID reportType, [out, retval] ILocationReport **ppLocationReport);
  74. HRESULT GetReportStatus([in] REFIID reportType, [out, retval] LOCATION_REPORT_STATUS *pStatus);
  75. HRESULT GetReportInterval([in] REFIID reportType, [out, retval] DWORD *pMilliseconds);
  76. HRESULT SetReportInterval([in] REFIID reportType, [in] DWORD millisecondsRequested);
  77. HRESULT GetDesiredAccuracy([in] REFIID reportType, [out, retval] LOCATION_DESIRED_ACCURACY *pDesiredAccuracy);
  78. HRESULT SetDesiredAccuracy([in] REFIID reportType, [in] LOCATION_DESIRED_ACCURACY desiredAccuracy);
  79. HRESULT RequestPermissions([in, unique] HWND hParent, [in, size_is(count)] IID pReportTypes[], [in] ULONG count, [in] BOOL fModal);
  80. }
  81. [
  82. uuid(e5B8e079-ee6d-4e33-a438-c87f2e959254)
  83. ]
  84. coclass Location {}