27 #ifndef SB_WINDOWS_DEVICE_UTILS_H_
28 #define SB_WINDOWS_DEVICE_UTILS_H_
53 #include <nsStringGlue.h>
73 LPSECURITY_ATTRIBUTES aSecurityAttributes,
74 DWORD aCreationDisposition,
75 DWORD aFlagsAndAttributes,
76 HANDLE aTemplateFile);
84 LPSECURITY_ATTRIBUTES aSecurityAttributes,
85 DWORD aCreationDisposition,
86 DWORD aFlagsAndAttributes,
87 HANDLE aTemplateFile);
91 PRBool* aHasInterface);
95 nsAString& aDevicePath);
105 (nsTArray<DEVINST>& aDevInstList,
106 DEVINST aRootDevInst,
108 PRBool aSearchAncestors = PR_FALSE);
112 DEVINST aRootDevInst,
113 const nsAString& aClass);
117 PSP_DEVINFO_DATA aDevInfoData);
120 SP_DEVINFO_DATA* aDevInfoData,
126 (PSP_DEVICE_INTERFACE_DETAIL_DATA* aDevIfDetailData,
128 SP_DEVINFO_DATA* aDevInfoData,
132 (nsAString& aDeviceInterfaceName,
133 nsAString& aDeviceInstanceID);
136 nsAString& aDeviceInstanceID);
142 DEVINST aDescendantDevInst,
143 PRBool* aIsDescendant);
167 mValue != INVALID_HANDLE_VALUE,
168 SetupDiDestroyDeviceInfoList(mValue),
169 mValue = INVALID_HANDLE_VALUE);
171 #endif // SB_WINDOWS_DEVICE_UTILS_H_
nsresult sbWinRegisterDeviceHandleNotification(HDEVNOTIFY *aDeviceNotification, HWND aEventWindow, DEVINST aDevInst, const GUID &aGUID)
nsresult sbWinGetDevInterfaceDetail(PSP_DEVICE_INTERFACE_DETAIL_DATA *aDevIfDetailData, HDEVINFO aDevInfo, SP_DEVINFO_DATA *aDevInfoData, const GUID *aGUID)
SB_AUTO_CLASS(sbAutoHDEVINFO, HDEVINFO, mValue!=INVALID_HANDLE_VALUE, SetupDiDestroyDeviceInfoList(mValue), mValue=INVALID_HANDLE_VALUE)
nsresult sbWinGetDevDetail(PSP_DEVICE_INTERFACE_DETAIL_DATA *aDevIfDetailData, SP_DEVINFO_DATA *aDevInfoData, HDEVINFO aDevInfo, const GUID *aGUID, DWORD aDevIndex)
nsresult sbWinGetDevicePath(DEVINST aDevInst, const GUID *aGUID, nsAString &aDevicePath)
nsresult sbWinGetDevInfoData(DEVINST aDevInst, HDEVINFO aDevInfo, PSP_DEVINFO_DATA aDevInfoData)
nsresult sbWinCreateAncestorDeviceFile(HANDLE *aDevFile, DEVINST aDevInst, const GUID *aGUID, DWORD aDesiredAccess, DWORD aShareMode, LPSECURITY_ATTRIBUTES aSecurityAttributes, DWORD aCreationDisposition, DWORD aFlagsAndAttributes, HANDLE aTemplateFile)
nsresult sbWinGetDeviceInstanceIDFromDeviceInterfaceName(nsAString &aDeviceInterfaceName, nsAString &aDeviceInstanceID)
nsresult sbWinGetDeviceInstanceID(DEVINST aDevInst, nsAString &aDeviceInstanceID)
nsresult sbWinDeviceIsDescendantOf(DEVINST aDevInst, DEVINST aDescendantDevInst, PRBool *aIsDescendant)
nsresult sbWinFindDevicesByInterface(nsTArray< DEVINST > &aDevInstList, DEVINST aRootDevInst, const GUID *aGUID, PRBool aSearchAncestors=PR_FALSE)
nsresult sbWinFindDeviceByClass(DEVINST *aDevInst, PRBool *aFound, DEVINST aRootDevInst, const nsAString &aClass)
nsresult sbWinCreateDeviceFile(HANDLE *aDevFile, DEVINST aDevInst, const GUID *aGUID, DWORD aDesiredAccess, DWORD aShareMode, LPSECURITY_ATTRIBUTES aSecurityAttributes, DWORD aCreationDisposition, DWORD aFlagsAndAttributes, HANDLE aTemplateFile)
nsresult sbWinDeviceEject(DEVINST aDevInst)
nsresult sbWinDeviceHasInterface(DEVINST aDevInst, const GUID *aGUID, PRBool *aHasInterface)