Struct ptp::PtpCamera
[−]
[src]
pub struct PtpCamera<'a> { /* fields omitted */ }
Methods
impl<'a> PtpCamera<'a>
[src]
fn new(device: &Device<'a>) -> Result<PtpCamera<'a>, Error>
fn command(
&mut self,
code: CommandCode,
params: &[u32],
data: Option<&[u8]>,
timeout: Option<Duration>
) -> Result<Vec<u8>, Error>
&mut self,
code: CommandCode,
params: &[u32],
data: Option<&[u8]>,
timeout: Option<Duration>
) -> Result<Vec<u8>, Error>
execute a PTP transaction.
consists of the following phases:
- command
- command data (optional, if data
is Some)
- response data (optional, if response contains a payload)
- response status
NB: each phase involves a separate USB transfer, and timeout
is used for each phase,
so the total time taken may be greater than timeout
.
fn get_objectinfo(
&mut self,
handle: u32,
timeout: Option<Duration>
) -> Result<PtpObjectInfo, Error>
&mut self,
handle: u32,
timeout: Option<Duration>
) -> Result<PtpObjectInfo, Error>
fn get_object(
&mut self,
handle: u32,
timeout: Option<Duration>
) -> Result<Vec<u8>, Error>
&mut self,
handle: u32,
timeout: Option<Duration>
) -> Result<Vec<u8>, Error>
fn get_objecthandles(
&mut self,
storage_id: u32,
handle_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
&mut self,
storage_id: u32,
handle_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
fn get_objecthandles_root(
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
fn get_objecthandles_all(
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
fn get_numobjects(
&mut self,
storage_id: u32,
handle_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<u32, Error>
&mut self,
storage_id: u32,
handle_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<u32, Error>
fn get_storage_info(
&mut self,
storage_id: u32,
timeout: Option<Duration>
) -> Result<PtpStorageInfo, Error>
&mut self,
storage_id: u32,
timeout: Option<Duration>
) -> Result<PtpStorageInfo, Error>
fn get_storageids(
&mut self,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
&mut self,
timeout: Option<Duration>
) -> Result<Vec<u32>, Error>
fn get_numobjects_roots(
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<u32, Error>
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<u32, Error>
fn get_numobjects_all(
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<u32, Error>
&mut self,
storage_id: u32,
filter: Option<u32>,
timeout: Option<Duration>
) -> Result<u32, Error>
fn get_device_info(
&mut self,
timeout: Option<Duration>
) -> Result<PtpDeviceInfo, Error>
&mut self,
timeout: Option<Duration>
) -> Result<PtpDeviceInfo, Error>