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 #ifndef __INC_LOCATIONAPI__ 7 #define __INC_LOCATIONAPI__ 8 9 #include <objbase.h> 10 #include <propkeydef.h> 11 12 #if (_WIN32_WINNT >= 0x0601) 13 14 typedef GUID SENSOR_ID; 15 DEFINE_GUID(IID_ILocationReport,0xC8B7F7EE,0x75D0,0x4DB9,0xB6,0x2D,0x7A,0x0F,0x36,0x9C,0xA4,0x56); 16 DEFINE_GUID(IID_ICivicAddressReport,0xC0B19F70,0x4ADF,0x445D,0x87,0xF2,0xCA,0xD8,0xFD,0x71,0x17,0x92); 17 DEFINE_GUID(IID_IDefaultLocation,0xA65AF77E,0x969A,0x4A2E,0x8A,0xCA,0x33,0xBB,0x7C,0xBB,0x12,0x35); 18 19 typedef enum _LOCATION_DESIRED_ACCURACY { 20 LOCATION_DESIRED_ACCURACY_DEFAULT = 0, 21 LOCATION_DESIRED_ACCURACY_HIGH = 1 22 } LOCATION_DESIRED_ACCURACY; 23 24 #ifndef __ILocationReport_FWD_DEFINED__ 25 #define __ILocationReport_FWD_DEFINED__ 26 typedef struct ILocationReport ILocationReport; 27 #endif 28 29 #ifndef __ICivicAddressReport_FWD_DEFINED__ 30 #define __ICivicAddressReport_FWD_DEFINED__ 31 typedef struct ICivicAddressReport ICivicAddressReport; 32 #endif 33 34 #ifndef __IDefaultLocation_FWD_DEFINED__ 35 #define __IDefaultLocation_FWD_DEFINED__ 36 typedef struct IDefaultLocation IDefaultLocation; 37 #endif 38 39 #undef INTERFACE 40 #define INTERFACE ILocationReport 41 DECLARE_INTERFACE_(ILocationReport,IUnknown) 42 { 43 BEGIN_INTERFACE 44 45 /* IUnknown methods */ 46 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 47 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 48 STDMETHOD_(ULONG, Release)(THIS) PURE; 49 50 /* ILocationReport methods */ 51 STDMETHOD_(HRESULT,GetSensorID)(THIS_ SENSOR_ID *pSensorID) PURE; 52 STDMETHOD_(HRESULT,GetTimestamp)(THIS_ SYSTEMTIME *pCreationTime) PURE; 53 STDMETHOD_(HRESULT,GetValue)(THIS_ REFPROPERTYKEY pKey,PROPVARIANT *pValue) PURE; 54 55 END_INTERFACE 56 }; 57 #ifdef COBJMACROS 58 #define ILocationReport_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 59 #define ILocationReport_AddRef(This) (This)->lpVtbl->AddRef(This) 60 #define ILocationReport_Release(This) (This)->lpVtbl->Release(This) 61 #define ILocationReport_GetSensorID(This,pSensorID) (This)->lpVtbl->GetSensorID(This,pSensorID) 62 #define ILocationReport_GetTimestamp(This,pCreationTime) (This)->lpVtbl->GetTimestamp(This,pCreationTime) 63 #define ILocationReport_GetValue(This,pKey,pValue) (This)->lpVtbl->GetValue(This,pKey,pValue) 64 #endif /*COBJMACROS*/ 65 66 #undef INTERFACE 67 #define INTERFACE ICivicAddressReport 68 DECLARE_INTERFACE_(ICivicAddressReport,ILocationReport) 69 { 70 BEGIN_INTERFACE 71 72 /* IUnknown methods */ 73 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 74 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 75 STDMETHOD_(ULONG, Release)(THIS) PURE; 76 77 /* ILocationReport methods */ 78 STDMETHOD_(HRESULT,GetSensorID)(THIS_ SENSOR_ID *pSensorID) PURE; 79 STDMETHOD_(HRESULT,GetTimestamp)(THIS_ SYSTEMTIME *pCreationTime) PURE; 80 STDMETHOD_(HRESULT,GetValue)(THIS_ REFPROPERTYKEY pKey,PROPVARIANT *pValue) PURE; 81 82 /* ICivicAddressReport methods */ 83 STDMETHOD_(HRESULT,GetAddressLine1)(THIS_ BSTR *pbstrAddress1) PURE; 84 STDMETHOD_(HRESULT,GetAddressLine2)(THIS_ BSTR *pbstrAddress2) PURE; 85 STDMETHOD_(HRESULT,GetCity)(THIS_ BSTR *pbstrCity) PURE; 86 STDMETHOD_(HRESULT,GetStateProvince)(THIS_ BSTR *pbstrStateProvince) PURE; 87 STDMETHOD_(HRESULT,GetPostalCode)(THIS_ BSTR *pbstrPostalCode) PURE; 88 STDMETHOD_(HRESULT,GetCountryRegion)(THIS_ BSTR *pbstrCountryRegion) PURE; 89 STDMETHOD_(HRESULT,GetDetailLevel)(THIS_ DWORD *pDetailLevel) PURE; 90 91 END_INTERFACE 92 }; 93 #ifdef COBJMACROS 94 #define ICivicAddressReport_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 95 #define ICivicAddressReport_AddRef(This) (This)->lpVtbl->AddRef(This) 96 #define ICivicAddressReport_Release(This) (This)->lpVtbl->Release(This) 97 #define ICivicAddressReport_GetSensorID(This,pSensorID) (This)->lpVtbl->GetSensorID(This,pSensorID) 98 #define ICivicAddressReport_GetTimestamp(This,pCreationTime) (This)->lpVtbl->GetTimestamp(This,pCreationTime) 99 #define ICivicAddressReport_GetValue(This,pKey,pValue) (This)->lpVtbl->GetValue(This,pKey,pValue) 100 #define ICivicAddressReport_GetAddressLine1(This,pbstrAddress1) (This)->lpVtbl->GetAddressLine1(This,pbstrAddress1) 101 #define ICivicAddressReport_GetAddressLine2(This,pbstrAddress2) (This)->lpVtbl->GetAddressLine2(This,pbstrAddress2) 102 #define ICivicAddressReport_GetCity(This,pbstrCity) (This)->lpVtbl->GetCity(This,pbstrCity) 103 #define ICivicAddressReport_GetCountryRegion(This,pbstrCountryRegion) (This)->lpVtbl->GetCountryRegion(This,pbstrCountryRegion) 104 #define ICivicAddressReport_GetDetailLevel(This,pDetailLevel) (This)->lpVtbl->GetDetailLevel(This,pDetailLevel) 105 #define ICivicAddressReport_GetPostalCode(This,pbstrPostalCode) (This)->lpVtbl->GetPostalCode(This,pbstrPostalCode) 106 #define ICivicAddressReport_GetStateProvince(This,pbstrStateProvince) (This)->lpVtbl->GetStateProvince(This,pbstrStateProvince) 107 #endif /*COBJMACROS*/ 108 109 #undef INTERFACE 110 #define INTERFACE IDefaultLocation 111 DECLARE_INTERFACE_(IDefaultLocation,IUnknown) 112 { 113 BEGIN_INTERFACE 114 115 /* IUnknown methods */ 116 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 117 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 118 STDMETHOD_(ULONG, Release)(THIS) PURE; 119 120 /* IDefaultLocation methods */ 121 STDMETHOD_(HRESULT,SetReport)(THIS_ REFIID reportType,ILocationReport *pLocationReport) PURE; 122 STDMETHOD_(HRESULT,GetReport)(THIS_ REFIID reportType,ILocationReport **ppLocationReport) PURE; 123 124 END_INTERFACE 125 }; 126 #ifdef COBJMACROS 127 #define IDefaultLocation_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 128 #define IDefaultLocation_AddRef(This) (This)->lpVtbl->AddRef(This) 129 #define IDefaultLocation_Release(This) (This)->lpVtbl->Release(This) 130 #define IDefaultLocation_GetReport(This,reportType,ppLocationReport) (This)->lpVtbl->GetReport(This,reportType,ppLocationReport) 131 #define IDefaultLocation_SetReport(This,reportType,pLocationReport) (This)->lpVtbl->SetReport(This,reportType,pLocationReport) 132 #endif /*COBJMACROS*/ 133 134 #endif /*(_WIN32_WINNT >= 0x0601)*/ 135 #endif /*__INC_LOCATIONAPI__*/ 136