pub struct DeviceInfo {Show 14 fields
pub standard_version: u16,
pub vendor_extension_id: u32,
pub vendor_extension_version: u16,
pub vendor_extension_desc: String,
pub functional_mode: u16,
pub operations_supported: Vec<OperationCode>,
pub events_supported: Vec<EventCode>,
pub device_properties_supported: Vec<u16>,
pub capture_formats: Vec<ObjectFormatCode>,
pub playback_formats: Vec<ObjectFormatCode>,
pub manufacturer: String,
pub model: String,
pub device_version: String,
pub serial_number: String,
}Expand description
Device information returned by GetDeviceInfo.
Contains device capabilities, manufacturer info, and supported operations.
Fields§
§standard_version: u16PTP standard version (e.g., 100 = v1.00).
vendor_extension_id: u32Vendor extension ID (0 = no extension).
vendor_extension_version: u16Vendor extension version.
vendor_extension_desc: StringVendor extension description.
functional_mode: u16Functional mode (0 = standard).
operations_supported: Vec<OperationCode>Operations supported by the device.
events_supported: Vec<EventCode>Events supported by the device.
device_properties_supported: Vec<u16>Device properties supported.
capture_formats: Vec<ObjectFormatCode>Object formats the device can capture/create.
playback_formats: Vec<ObjectFormatCode>Object formats the device can play/display.
manufacturer: StringManufacturer name.
model: StringDevice model name.
device_version: StringDevice version string.
serial_number: StringDevice serial number.
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
Sourcepub fn from_bytes(buf: &[u8]) -> Result<Self, Error>
pub fn from_bytes(buf: &[u8]) -> Result<Self, Error>
Parse DeviceInfo from a byte buffer.
The buffer should contain the DeviceInfo dataset as returned by GetDeviceInfo.
Sourcepub fn supports_operation(&self, operation: OperationCode) -> bool
pub fn supports_operation(&self, operation: OperationCode) -> bool
Sourcepub fn supports_rename(&self) -> bool
pub fn supports_rename(&self) -> bool
Check if the device supports renaming objects.
This checks for support of the SetObjectPropValue operation (0x9804), which is required to rename files and folders via the ObjectFileName property.
§Returns
Returns true if the device advertises SetObjectPropValue support.
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§fn clone(&self) -> DeviceInfo
fn clone(&self) -> DeviceInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more