Pepper_31_C++_interfaces
Public Member Functions | Static Public Member Functions | List of all members
pp::RemovableStorage_Dev Class Reference

#include <removable_storage_dev.h>

Inheritance diagram for pp::RemovableStorage_Dev:
Inheritance graph
Collaboration diagram for pp::RemovableStorage_Dev:
Collaboration graph

Public Member Functions

 RemovableStorage_Dev (const InstanceHandle &instance)
 
bool IsRemovableStorage ()
 
int32_t EnumerateDevices (const CompletionCallbackWithOutput< std::vector< DeviceRef_Dev > > &callback)
 
int32_t MonitorDeviceChange (PP_MonitorDeviceChangeCallback callback, void *user_data)
 
int32_t Open (const FileSystem &file_system, const DeviceRef_Dev &device_ref, const CompletionCallback &callback)
 
- Public Member Functions inherited from pp::Resource
 Resource ()
 The default constructor. More...
 
 Resource (const Resource &other)
 
virtual ~Resource ()
 Destructor. More...
 
Resourceoperator= (const Resource &other)
 
bool is_null () const
 
PP_Resource pp_resource () const
 
PP_Resource detach ()
 

Static Public Member Functions

static bool IsAvailable ()
 

Additional Inherited Members

- Protected Member Functions inherited from pp::Resource
 Resource (PP_Resource resource)
 
 Resource (PassRef, PP_Resource resource)
 
void PassRefFromConstructor (PP_Resource resource)
 

Detailed Description

Definition at line 33 of file removable_storage_dev.h.

Constructor & Destructor Documentation

pp::RemovableStorage_Dev::RemovableStorage_Dev ( const InstanceHandle instance)
explicit

Creates a removable storage resource.

Parameters
[in]instanceA InstanceHandle identifying one instance of a module.
Returns
A Resource corresponding to a removable storage resource if successful, 0 if failed.

Member Function Documentation

int32_t pp::RemovableStorage_Dev::EnumerateDevices ( const CompletionCallbackWithOutput< std::vector< DeviceRef_Dev > > &  callback)

Enumerates removable storage devices.

Parameters
[in]callbackA CompletionCallbackWithOutput to run on completion.
Returns
An error code from pp_errors.h.
static bool pp::RemovableStorage_Dev::IsAvailable ( )
static

Determines if the given resource is available.

Returns
A bool containing true if the given resource is available, otherwise false.
bool pp::RemovableStorage_Dev::IsRemovableStorage ( )

Determines if the given resource is a removable storage resource.

Returns
A bool containing true if the given resource is a removable storage resource, otherwise false.
int32_t pp::RemovableStorage_Dev::MonitorDeviceChange ( PP_MonitorDeviceChangeCallback  callback,
void *  user_data 
)

Requests device change notifications.

Parameters
[in]callbackThe callback to receive notifications. If not NULL, it will be called once for the currently available devices, and then every time the list of available devices changes. All calls will happen on the same thread as the one on which MonitorDeviceChange() is called. It will receive notifications until it will be destroyed or MonitorDeviceChange() is called to set a new callback for removable_storage. You can pass NULL to cancel sending notifications.
[in,out]user_dataAn opaque pointer that will be passed to callback.
Returns
An error code from pp_errors.h.
int32_t pp::RemovableStorage_Dev::Open ( const FileSystem file_system,
const DeviceRef_Dev device_ref,
const CompletionCallback callback 
)

Opens removable file system.

Parameters
[in]file_systemA FileSystem corresponding to a file system of PP_FILESYSTEMTYPE_REMOVABLESTORAGE type.
[in]device_refA DeviceRef_Dev corresponding to a device reference.
[in]callbackA CompletionCallback to run on completion.
Returns
An error code from pp_errors.h.

The documentation for this class was generated from the following file: