Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
symbian::device Namespace Reference

Classes

struct  MtpDeviceInfo
 
struct  MtpObjectInfo
 
struct  MtpStageResult
 Result of a checked SIS transfer to an MTP Installs folder. More...
 
struct  MtpStorageInfo
 
struct  UsbCdcUnion
 
struct  UsbCompletion
 
struct  UsbDeviceDescriptor
 
struct  UsbEndpointDescriptor
 
struct  UsbInterfaceAssociation
 
struct  UsbInterfaceDescriptor
 
struct  UsbPollFd
 
struct  UsbProbe
 
class  UsbSession
 

Functions

absl::StatusOr< std::vector< UsbDeviceDescriptor > > ListUsbDevices ()
 
absl::StatusOr< UsbProbe > InspectUsb (uint16_t vendor, uint16_t product, const std::string &anchor, const std::string &operation, uint32_t limit)
 Inspect a serial-matched USB device without changing its stored files.
 
absl::StatusOr< MtpStageResult > StageMtpSis (uint16_t vendor, uint16_t product, const std::string &anchor, const std::string &package_path, const std::string &filename, const std::string &expected_sha256)
 Stage one SIS on a serial-matched device, checking the readback digest.
 
static absl::StatusOr< std::vector< unsigned char > > AccessMtpFile (uint16_t vendor, uint16_t product, const std::string &anchor, uint32_t storage_id, std::string_view relative_path, uint32_t max_bytes, std::optional< std::string_view > delete_sha256)
 
absl::StatusOr< std::vector< unsigned char > > ReadMtpFile (uint16_t vendor, uint16_t product, const std::string &anchor, uint32_t storage_id, std::string_view relative_path, uint32_t max_bytes)
 Read one exact relative path from a serial-matched MTP storage.
 
absl::Status DeleteMtpFile (uint16_t vendor, uint16_t product, const std::string &anchor, uint32_t storage_id, std::string_view relative_path, std::string_view expected_sha256)
 Delete one exact file only after its bytes match the expected SHA-256.
 

Function Documentation

◆ AccessMtpFile()

static absl::StatusOr< std::vector< unsigned char > > symbian::device::AccessMtpFile ( uint16_t  vendor,
uint16_t  product,
const std::string &  anchor,
uint32_t  storage_id,
std::string_view  relative_path,
uint32_t  max_bytes,
std::optional< std::string_view >  delete_sha256 
)
static

◆ DeleteMtpFile()

absl::Status symbian::device::DeleteMtpFile ( uint16_t  vendor,
uint16_t  product,
const std::string &  anchor,
uint32_t  storage_id,
std::string_view  relative_path,
std::string_view  expected_sha256 
)

Delete one exact file only after its bytes match the expected SHA-256.

Folders, ambiguous paths and files above 16 MiB are rejected. The containing directory is checked again after DeleteObject confirms success.

◆ InspectUsb()

absl::StatusOr< UsbProbe > symbian::device::InspectUsb ( uint16_t  vendor,
uint16_t  product,
const std::string &  anchor,
const std::string &  operation,
uint32_t  limit 
)

Inspect a serial-matched USB device without changing its stored files.

operation is map, mtp or obex. mtp may return a bounded root listing; obex performs a Connect/Disconnect probe. No raw serial is returned. The caller must check UsbProbe::state for protocol outcomes.

◆ ListUsbDevices()

absl::StatusOr< std::vector< UsbDeviceDescriptor > > symbian::device::ListUsbDevices ( )

◆ ReadMtpFile()

absl::StatusOr< std::vector< unsigned char > > symbian::device::ReadMtpFile ( uint16_t  vendor,
uint16_t  product,
const std::string &  anchor,
uint32_t  storage_id,
std::string_view  relative_path,
uint32_t  max_bytes 
)

Read one exact relative path from a serial-matched MTP storage.

The caller selects a storage ID reported by InspectUsb. Names are resolved one directory at a time; ambiguous names and files above max_bytes fail.

◆ StageMtpSis()

absl::StatusOr< MtpStageResult > symbian::device::StageMtpSis ( uint16_t  vendor,
uint16_t  product,
const std::string &  anchor,
const std::string &  package_path,
const std::string &  filename,
const std::string &  expected_sha256 
)

Stage one SIS on a serial-matched device, checking the readback digest.

The device installer is not invoked. The transfer requires one writable MTP store with an unambiguous root Installs folder. Files larger than 16 MiB are rejected. The supplied SHA-256 binds the package to the caller's inspection.