Songbird Windows Storage Device Utilities Source. More...
#include "sbWindowsStorageDeviceUtils.h"
#include "sbWindowsDeviceUtils.h"
#include <sbWindowsUtils.h>
#include <ntddscsi.h>
Go to the source code of this file.
Classes | |
struct | _SCSI_PASS_THROUGH_WITH_BUFFERS |
Macros | |
#define | CDB6GENERIC_LENGTH 6 |
#define | SCSIOP_INQUIRY 0x12 |
Typedefs | |
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS | SCSI_PASS_THROUGH_WITH_BUFFERS |
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS * | PSCSI_PASS_THROUGH_WITH_BUFFERS |
Functions | |
nsresult | sbWinFindDevicesByStorageDevNum (STORAGE_DEVICE_NUMBER *aStorageDevNum, PRBool aMatchPartitionNumber, const GUID *aGUID, nsTArray< DEVINST > &aDevInstList) |
nsresult | sbWinGetStorageDevNum (DEVINST aDevInst, const GUID *aGUID, STORAGE_DEVICE_NUMBER *aStorageDevNum) |
nsresult | sbWinGetStorageDevNum (LPCTSTR aDevPath, STORAGE_DEVICE_NUMBER *aStorageDevNum) |
nsresult | sbWinVolumeIsReady (DEVINST aDevInst, PRBool *aIsReady) |
nsresult | sbWinVolumeGetIsReadOnly (const nsAString &aVolumeMountPath, PRBool *aIsReadOnly) |
nsresult | sbWinGetVolumeGUIDPath (DEVINST aDevInst, nsAString &aVolumeGUIDPath) |
nsresult | sbWinGetVolumeGUID (DEVINST aDevInst, nsAString &aVolumeGUID) |
nsresult | sbWinGetVolumePathNames (DEVINST aDevInst, nsTArray< nsString > &aPathNames) |
nsresult | sbWinGetVolumePathNames (nsAString &aVolumeGUIDPath, nsTArray< nsString > &aPathNames) |
nsresult | sbWinGetVolumeLabel (const nsAString &aVolumeMountPath, nsACString &aVolumeLabel) |
nsresult | sbWinSetVolumeLabel (const nsAString &aVolumeMountPath, const nsACString &aVolumeLabel) |
nsresult | sbWinGetSCSIProductInfo (DEVINST aDevInst, nsAString &aVendorID, nsAString &aProductID) |
Songbird Windows Storage Device Utilities Source.
Definition in file sbWindowsStorageDeviceUtils.cpp.
#define CDB6GENERIC_LENGTH 6 |
Definition at line 574 of file sbWindowsStorageDeviceUtils.cpp.
#define SCSIOP_INQUIRY 0x12 |
Definition at line 583 of file sbWindowsStorageDeviceUtils.cpp.
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS * PSCSI_PASS_THROUGH_WITH_BUFFERS |
typedef struct _SCSI_PASS_THROUGH_WITH_BUFFERS SCSI_PASS_THROUGH_WITH_BUFFERS |
nsresult sbWinFindDevicesByStorageDevNum | ( | STORAGE_DEVICE_NUMBER * | aStorageDevNum, |
PRBool | aMatchPartitionNumber, | ||
const GUID * | aGUID, | ||
nsTArray< DEVINST > & | aDevInstList | ||
) |
Search for devices with the storage device number specified by aStorageDevNum and interface class specified by aGUID. Return all matching device instances in aDevInstList. If aMatchPartitionNumber is true, look for device instances with a matching partition number. This should be set to true when looking for partition or volume interfaces and false when looking for disk interfaces.
aStorageDevNum | Storage device number for which to find device. |
aMatchPartitionNumber | Match partition numbers when looking for a device interface. |
aGUID | Device interface class for which to search. |
aDevInstList | List of matching device instances. |
Definition at line 79 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetSCSIProductInfo | ( | DEVINST | aDevInst, |
nsAString & | aVendorID, | ||
nsAString & | aProductID | ||
) |
Return in aVendorID and aProductID the SCSI vendor and product IDs for the device specified by aDevInst.
aDevInst | Device for which to get SCSI product info. |
aVendorID | SCSI vendor ID. |
aProductID | SCSI product ID. |
Definition at line 596 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetStorageDevNum | ( | DEVINST | aDevInst, |
const GUID * | aGUID, | ||
STORAGE_DEVICE_NUMBER * | aStorageDevNum | ||
) |
Return in aStorageDevNum the storage device number for the device instance specified by aDevInst using the device interface class specified by aGUID.
aDevInst | Device instance for which to get device number. |
aGUID | Device interface class. |
aDevNum | Device number. |
Definition at line 157 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetStorageDevNum | ( | LPCTSTR | aDevPath, |
STORAGE_DEVICE_NUMBER * | aStorageDevNum | ||
) |
Return in aStorageDevNum the storage device number for the device with the device path specified by aDevPath.
aDevPath | Device path. |
aStorageDevNum | Returned storage device number. |
Definition at line 189 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetVolumeGUID | ( | DEVINST | aDevInst, |
nsAString & | aVolumeGUID | ||
) |
Return in aVolumeGUID the volume GUID for the volume device specified by aDevInst. The volume GUID is extracted from the volume GUID path.
See http://msdn.microsoft.com/en-us/library/aa365248(VS.85).aspx
aDevInst | Volume device instance. |
aVolumeGUID | Returned volume GUID. |
Definition at line 395 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetVolumeGUIDPath | ( | DEVINST | aDevInst, |
nsAString & | aVolumeGUIDPath | ||
) |
Return in aVolumeGUIDPath the volume GUID path for the volume device specified by aDevInst.
See http://msdn.microsoft.com/en-us/library/aa365248(VS.85).aspx
aDevInst | Volume device instance. |
aVolumeGUIDPath | Returned volume GUID path. |
Definition at line 356 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetVolumeLabel | ( | const nsAString & | aVolumeMountPath, |
nsACString & | aVolumeLabel | ||
) |
Get the label for the volume mounted at the path specified by aVolumeMountPath and return the label in aVolumeLabel.
aVolumeMountPath | Volume mount path. |
aVolumeLabel | Returned volume label in UTF-8. |
Definition at line 516 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetVolumePathNames | ( | DEVINST | aDevInst, |
nsTArray< nsString > & | aPathNames | ||
) |
Return in aPathNames the list of paths names for the volume device specified by aDevInst.
aDevInst | Volume device instance. |
aPathNames | List of volume path names. |
Definition at line 428 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinGetVolumePathNames | ( | nsAString & | aVolumeGUIDPath, |
nsTArray< nsString > & | aPathNames | ||
) |
Return in aPathNames the list of paths names for the volume device specified by aVolumeGUIDPath.
aVolumeGUIDPath | Volume GUID path. |
aPathNames | List of volume path names. |
Definition at line 455 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinSetVolumeLabel | ( | const nsAString & | aVolumeMountPath, |
const nsACString & | aVolumeLabel | ||
) |
Set the label for the volume mounted at the path specified by aVolumeMountPath to the label specified by aVolumeLabel.
aVolumeMountPath | Volume mount path. |
aVolumeLabel | Volume label to set in UTF-8. |
Definition at line 550 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinVolumeGetIsReadOnly | ( | const nsAString & | aVolumeMountPath, |
PRBool * | aIsReadOnly | ||
) |
Return true in aIsReadOnly if the volume with the mount path specified by aVolumeMountPath is a read-only volue; otherwise, return false.
aVolumeMountPath | Volume mount path. |
aIsReadOnly | Returned read-only state. |
Definition at line 312 of file sbWindowsStorageDeviceUtils.cpp.
nsresult sbWinVolumeIsReady | ( | DEVINST | aDevInst, |
PRBool * | aIsReady | ||
) |
Return true in aIsReady if the volume device specified by aDevInst is ready; otherwise, return false in aIsReady.
aDevInst | Volume device instance. |
aIsReady | Returned is ready state. |
Definition at line 250 of file sbWindowsStorageDeviceUtils.cpp.