Pepper_47_C++_interfaces
|
#include <removable_storage_dev.h>
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) |
![]() | |
Resource () | |
The default constructor. More... | |
Resource (const Resource &other) | |
virtual | ~Resource () |
Destructor. More... | |
Resource & | operator= (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 | |
![]() | |
Resource (PP_Resource resource) | |
Resource (PassRef, PP_Resource resource) | |
void | PassRefFromConstructor (PP_Resource resource) |
void | Clear () |
Sets this resource to null. This releases ownership of the resource. More... | |
Definition at line 33 of file removable_storage_dev.h.
|
explicit |
Creates a removable storage resource.
[in] | instance | A InstanceHandle identifying one instance of a module. |
Resource
corresponding to a removable storage resource if successful, 0 if failed. Definition at line 38 of file removable_storage_dev.cc.
References pp::Resource::PassRefFromConstructor(), and pp::InstanceHandle::pp_instance().
int32_t pp::RemovableStorage_Dev::EnumerateDevices | ( | const CompletionCallbackWithOutput< std::vector< DeviceRef_Dev > > & | callback | ) |
Enumerates removable storage devices.
[in] | callback | A CompletionCallbackWithOutput to run on completion. |
pp_errors.h
. Definition at line 56 of file removable_storage_dev.cc.
References pp::Resource::pp_resource().
|
static |
Determines if the given resource is available.
bool
containing true
if the given resource is available, otherwise false
. Definition at line 51 of file removable_storage_dev.cc.
bool pp::RemovableStorage_Dev::IsRemovableStorage | ( | ) |
Determines if the given resource is a removable storage resource.
bool
containing true
if the given resource is a removable storage resource, otherwise false
. Definition at line 46 of file removable_storage_dev.cc.
References pp::Resource::pp_resource().
int32_t pp::RemovableStorage_Dev::MonitorDeviceChange | ( | PP_MonitorDeviceChangeCallback | callback, |
void * | user_data | ||
) |
Requests device change notifications.
[in] | callback | The 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_data | An opaque pointer that will be passed to callback . |
pp_errors.h
. Definition at line 69 of file removable_storage_dev.cc.
References pp::Resource::pp_resource().
int32_t pp::RemovableStorage_Dev::Open | ( | const FileSystem & | file_system, |
const DeviceRef_Dev & | device_ref, | ||
const CompletionCallback & | callback | ||
) |
Opens removable file system.
[in] | file_system | A FileSystem corresponding to a file system of PP_FILESYSTEMTYPE_REMOVABLESTORAGE type. |
[in] | device_ref | A DeviceRef_Dev corresponding to a device reference. |
[in] | callback | A CompletionCallback to run on completion. |
pp_errors.h
. Definition at line 77 of file removable_storage_dev.cc.
References pp::CompletionCallback::MayForce(), pp::CompletionCallback::pp_completion_callback(), and pp::Resource::pp_resource().