1 | /*
|
---|
2 | * Copyright (C) 2009 Damjan Jovanovic
|
---|
3 | *
|
---|
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.
|
---|
8 | *
|
---|
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.
|
---|
13 | *
|
---|
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
|
---|
17 | */
|
---|
18 |
|
---|
19 | /*
|
---|
20 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
21 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
22 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
23 | * a choice of LGPL license versions is made available with the language indicating
|
---|
24 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
25 | * of the LGPL is applied is otherwise unspecified.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef __WINE_STI_H
|
---|
29 | #define __WINE_STI_H
|
---|
30 |
|
---|
31 | #include <objbase.h>
|
---|
32 | /* #include <stireg.h> */
|
---|
33 | /* #include <stierr.h> */
|
---|
34 |
|
---|
35 | #include <pshpack8.h>
|
---|
36 |
|
---|
37 | #ifdef __cplusplus
|
---|
38 | extern "C" {
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | DEFINE_GUID(CLSID_Sti, 0xB323F8E0, 0x2E68, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C);
|
---|
42 |
|
---|
43 | DEFINE_GUID(IID_IStillImageW, 0x641BD880, 0x2DC8, 0x11D0, 0x90, 0xEA, 0x00, 0xAA, 0x00, 0x60, 0xF8, 0x6C);
|
---|
44 |
|
---|
45 | DEFINE_GUID(IID_IStillImageA, 0xA7B1F740, 0x1D7F, 0x11D1, 0xAC, 0xA9, 0x00, 0xA0, 0x24, 0x38, 0xAD, 0x48);
|
---|
46 |
|
---|
47 | #define STI_VERSION_REAL 0x00000002
|
---|
48 | #define STI_VERSION_FLAG_UNICODE 0x01000000
|
---|
49 |
|
---|
50 | #ifndef WINE_NO_UNICODE_MACROS
|
---|
51 | # ifdef UNICODE
|
---|
52 | # define STI_VERSION (STI_VERSION_REAL | STI_VERSION_FLAG_UNICODE)
|
---|
53 | # else
|
---|
54 | # define STI_VERSION (STI_VERSION_REAL)
|
---|
55 | # endif
|
---|
56 | #endif
|
---|
57 |
|
---|
58 | typedef struct IStillImageA *PSTIA;
|
---|
59 | typedef struct IStillImageW *PSTIW;
|
---|
60 | DECL_WINELIB_TYPE_AW(PSTI)
|
---|
61 | typedef struct IStillImageA *LPSTILLIMAGEA;
|
---|
62 | typedef struct IStillImageW *LPSTILLIMAGEW;
|
---|
63 | DECL_WINELIB_TYPE_AW(LPSTILLIMAGE)
|
---|
64 | typedef struct IStiDeviceA *PSTIDEVICEA;
|
---|
65 | typedef struct IStiDeviceW *PSTIDEVICEW;
|
---|
66 | DECL_WINELIB_TYPE_AW(PSTIDEVICE)
|
---|
67 |
|
---|
68 | HRESULT WINAPI StiCreateInstanceA(HINSTANCE hinst, DWORD dwVer, PSTIA *ppSti, LPUNKNOWN pUnkOuter);
|
---|
69 | HRESULT WINAPI StiCreateInstanceW(HINSTANCE hinst, DWORD dwVer, PSTIW *ppSti, LPUNKNOWN pUnkOuter);
|
---|
70 | #define StiCreateInstance WINELIB_NAME_AW(StiCreateInstance)
|
---|
71 |
|
---|
72 | typedef DWORD STI_DEVICE_TYPE;
|
---|
73 | typedef enum _STI_DEVICE_MJ_TYPE
|
---|
74 | {
|
---|
75 | StiDeviceTypeDefault = 0,
|
---|
76 | StiDeviceTypeScanner = 1,
|
---|
77 | StiDeviceTypeDigitalCamera = 2,
|
---|
78 | StiDeviceTypeStreamingVideo = 3
|
---|
79 | } STI_DEVICE_MJ_TYPE;
|
---|
80 |
|
---|
81 | #define GET_STIDEVICE_TYPE(dwDevType) HIWORD(dwDevType)
|
---|
82 | #define GET_STIDEVICE_SUBTYPE(dwDevType) LOWORD(dwDevType)
|
---|
83 |
|
---|
84 | typedef struct _STI_DEV_CAPS {
|
---|
85 | DWORD dwGeneric;
|
---|
86 | } STI_DEV_CAPS, *PSTI_DEV_CAPS;
|
---|
87 |
|
---|
88 | #define STI_MAX_INTERNAL_NAME_LENGTH 128
|
---|
89 |
|
---|
90 | typedef struct _STI_DEVICE_INFORMATIONW {
|
---|
91 | DWORD dwSize;
|
---|
92 | STI_DEVICE_TYPE DeviceType;
|
---|
93 | WCHAR szDeviceInternalName[STI_MAX_INTERNAL_NAME_LENGTH];
|
---|
94 | STI_DEV_CAPS DeviceCapabilities;
|
---|
95 | DWORD dwHardwareConfiguration;
|
---|
96 | LPWSTR pszVendorDescription;
|
---|
97 | LPWSTR pszDeviceDescription;
|
---|
98 | LPWSTR pszPortName;
|
---|
99 | LPWSTR pszPropProvider;
|
---|
100 | LPWSTR pszLocalName;
|
---|
101 | } STI_DEVICE_INFORMATIONW, *PSTI_DEVICE_INFORMATIONW;
|
---|
102 |
|
---|
103 | typedef STI_DEVICE_INFORMATIONW STI_DEVICE_INFORMATION;
|
---|
104 | typedef PSTI_DEVICE_INFORMATIONW PSTI_DEVICE_INFORMATION;
|
---|
105 |
|
---|
106 | #define MAX_NOTIFICATION_DATA 64
|
---|
107 |
|
---|
108 | typedef struct _STINOTIFY {
|
---|
109 | DWORD dwSize;
|
---|
110 | GUID guidNotificationCode;
|
---|
111 | BYTE abNotificationData[MAX_NOTIFICATION_DATA];
|
---|
112 | } STINOTIFY,*LPSTINOTIFY;
|
---|
113 |
|
---|
114 | #define INTERFACE IStillImageW
|
---|
115 | DECLARE_INTERFACE_(IStillImageW, IUnknown)
|
---|
116 | {
|
---|
117 | /*** IUnknown methods ***/
|
---|
118 | STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
|
---|
119 | STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
---|
120 | STDMETHOD_(ULONG,Release)(THIS) PURE;
|
---|
121 | /*** IStillImageW methods ***/
|
---|
122 | STDMETHOD(Initialize)(THIS_ HINSTANCE hinst, DWORD dwVersion) PURE;
|
---|
123 | STDMETHOD(GetDeviceList)(THIS_ DWORD dwType, DWORD dwFlags, DWORD *pdwItemsReturned, LPVOID *ppBuffer) PURE;
|
---|
124 | STDMETHOD(GetDeviceInfo)(THIS_ LPWSTR pwszDeviceName, LPVOID *ppBuffer) PURE;
|
---|
125 | STDMETHOD(CreateDevice)(THIS_ LPWSTR pwszDeviceName, DWORD dwMode, PSTIDEVICEW *pDevice, LPUNKNOWN pUnkOuter) PURE;
|
---|
126 | STDMETHOD(GetDeviceValue)(THIS_ LPWSTR pwszDeviceName, LPWSTR pValueName, LPDWORD pType, LPBYTE pData, LPDWORD cbData) PURE;
|
---|
127 | STDMETHOD(SetDeviceValue)(THIS_ LPWSTR pwszDeviceName, LPWSTR pValueName, DWORD type, LPBYTE pData, DWORD cbData) PURE;
|
---|
128 | STDMETHOD(GetSTILaunchInformation)(THIS_ LPWSTR pwszDeviceName, DWORD *pdwEventCode, LPWSTR pwszEventName) PURE;
|
---|
129 | STDMETHOD(RegisterLaunchApplication)(THIS_ LPWSTR pwszAppName, LPWSTR pwszCommandLine) PURE;
|
---|
130 | STDMETHOD(UnregisterLaunchApplication)(THIS_ LPWSTR pwszAppName) PURE;
|
---|
131 | STDMETHOD(EnableHwNotifications)(THIS_ LPCWSTR pwszDeviceName, BOOL bNewState) PURE;
|
---|
132 | STDMETHOD(GetHwNotificationState)(THIS_ LPCWSTR pwszDeviceName, BOOL *pbCurrentState) PURE;
|
---|
133 | STDMETHOD(RefreshDeviceBus)(THIS_ LPCWSTR pwszDeviceName) PURE;
|
---|
134 | STDMETHOD(LaunchApplicationForDevice)(THIS_ LPWSTR pwszDeviceName, LPWSTR pwszAppName, LPSTINOTIFY pStiNotify);
|
---|
135 | STDMETHOD(SetupDeviceParameters)(THIS_ PSTI_DEVICE_INFORMATIONW pDevInfo);
|
---|
136 | STDMETHOD(WriteToErrorLog)(THIS_ DWORD dwMessageType, LPCWSTR pszMessage) PURE;
|
---|
137 | };
|
---|
138 | #undef INTERFACE
|
---|
139 |
|
---|
140 | #if !defined(__cplusplus) || defined(CINTERFACE)
|
---|
141 | /*** IUnknown methods ***/
|
---|
142 | #define IStillImage_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
---|
143 | #define IStillImage_AddRef(p) (p)->lpVtbl->AddRef(p)
|
---|
144 | #define IStillImage_Release(p) (p)->lpVtbl->Release(p)
|
---|
145 | /*** IStillImage methods ***/
|
---|
146 | #define IStillImage_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b)
|
---|
147 | #define IStillImage_GetDeviceList(p,a,b,c,d) (p)->lpVtbl->GetDeviceList(p,a,b,c,d)
|
---|
148 | #define IStillImage_GetDeviceInfo(p,a,b) (p)->lpVtbl->GetDeviceInfo(p,a,b)
|
---|
149 | #define IStillImage_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d)
|
---|
150 | #define IStillImage_GetDeviceValue(p,a,b,c,d,e) (p)->lpVtbl->GetDeviceValue(p,a,b,c,d,e)
|
---|
151 | #define IStillImage_SetDeviceValue(p,a,b,c,d,e) (p)->lpVtbl->SetDeviceValue(p,a,b,c,d,e)
|
---|
152 | #define IStillImage_GetSTILaunchInformation(p,a,b,c) (p)->lpVtbl->GetSTILaunchInformation(p,a,b,c)
|
---|
153 | #define IStillImage_RegisterLaunchApplication(p,a,b) (p)->lpVtbl->RegisterLaunchApplication(p,a,b)
|
---|
154 | #define IStillImage_UnregisterLaunchApplication(p,a) (p)->lpVtbl->UnregisterLaunchApplication(p,a)
|
---|
155 | #define IStillImage_EnableHwNotifications(p,a,b) (p)->lpVtbl->EnableHwNotifications(p,a,b)
|
---|
156 | #define IStillImage_GetHwNotificationState(p,a,b) (p)->lpVtbl->GetHwNotificationState(p,a,b)
|
---|
157 | #define IStillImage_RefreshDeviceBus(p,a) (p)->lpVtbl->RefreshDeviceBus(p,a)
|
---|
158 | #define IStillImage_LaunchApplicationForDevice(p,a,b,c) (p)->lpVtbl->LaunchApplicationForDevice(p,a,b,c)
|
---|
159 | #define IStillImage_SetupDeviceParameters(p,a) (p)->lpVtbl->SetupDeviceParameters(p,a)
|
---|
160 | #define IStillImage_WriteToErrorLog(p,a,b) (p)->lpVtbl->WriteToErrorLog(p,a,b)
|
---|
161 | #else
|
---|
162 | /*** IUnknown methods ***/
|
---|
163 | #define IStillImage_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
---|
164 | #define IStillImage_AddRef(p) (p)->AddRef()
|
---|
165 | #define IStillImage_Release(p) (p)->Release()
|
---|
166 | /*** IStillImage methods ***/
|
---|
167 | #define IStillImage_Initialize(p,a,b) (p)->Initialize(a,b)
|
---|
168 | #define IStillImage_GetDeviceList(p,a,b,c,d) (p)->GetDeviceList(a,b,c,d)
|
---|
169 | #define IStillImage_GetDeviceInfo(p,a,b) (p)->GetDeviceInfo(a,b)
|
---|
170 | #define IStillImage_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d)
|
---|
171 | #define IStillImage_GetDeviceValue(p,a,b,c,d,e) (p)->GetDeviceValue(a,b,c,d,e)
|
---|
172 | #define IStillImage_SetDeviceValue(p,a,b,c,d,e) (p)->SetDeviceValue(a,b,c,d,e)
|
---|
173 | #define IStillImage_GetSTILaunchInformation(p,a,b,c) (p)->GetSTILaunchInformation(a,b,c)
|
---|
174 | #define IStillImage_RegisterLaunchApplication(p,a,b) (p)->RegisterLaunchApplication(a,b)
|
---|
175 | #define IStillImage_UnregisterLaunchApplication(p,a) (p)->UnregisterLaunchApplication(a)
|
---|
176 | #define IStillImage_EnableHwNotifications(p,a,b) (p)->EnableHwNotifications(a,b)
|
---|
177 | #define IStillImage_GetHwNotificationState(p,a,b) (p)->GetHwNotificationState(a,b)
|
---|
178 | #define IStillImage_RefreshDeviceBus(p,a) (p)->RefreshDeviceBus(a)
|
---|
179 | #define IStillImage_LaunchApplicationForDevice(p,a,b,c) (p)->LaunchApplicationForDevice(a,b,c)
|
---|
180 | #define IStillImage_SetupDeviceParameters(p,a) (p)->SetupDeviceParameters(a)
|
---|
181 | #define IStillImage_WriteToErrorLog(p,a,b) (p)->WriteToErrorLog(a,b)
|
---|
182 | #endif
|
---|
183 |
|
---|
184 | #ifdef __cplusplus
|
---|
185 | };
|
---|
186 | #endif
|
---|
187 |
|
---|
188 | #include <poppack.h>
|
---|
189 |
|
---|
190 | #endif /* __WINE_STI_H */
|
---|