The MTP Storage Information API provides functions for gets the storage information of MTP responder storage.
Required Header
#include <mtp.h>
Overview
The MTP Storage Information api provides following functions :
- Get storage free space
- Get storage description
- Get storage type
- and, more storage information
Related Features
This API is related with the following features:
It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.
Functions |
int | mtp_storageinfo_get_description (mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **description) |
| Gets the description of the storage information.
|
int | mtp_storageinfo_get_free_space (mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *free_space) |
| Gets the free space of the storage information in bytes.
|
int | mtp_storageinfo_get_max_capacity (mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *max_capacity) |
| Gets the max capacity of the storage information in bytes.
|
int | mtp_storageinfo_get_storage_type (mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_storage_type_e *storage_type) |
| Gets the storage type of the storage information.
|
int | mtp_storageinfo_get_volume_identifier (mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **volume_identifier) |
| Gets the volume identifier of the storage information.
|
Function Documentation
Gets the description of the storage information.
- Since :
- 3.0
- Parameters:
-
[in] | mtp_device | The MTP device |
[in] | mtp_storage | The MTP storage |
[out] | description | The description of Storage information |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- mtp_get_storages()
Gets the free space of the storage information in bytes.
- Since :
- 3.0
- Parameters:
-
[in] | mtp_device | The MTP device |
[in] | mtp_storage | The MTP storage |
[out] | free_space | The free space of Storage information (bytes) |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- mtp_get_storages()
Gets the max capacity of the storage information in bytes.
- Since :
- 3.0
- Parameters:
-
[in] | mtp_device | The MTP device |
[in] | mtp_storage | The MTP storage |
[out] | max_capacity | The max capacity of Storage information (bytes) |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- mtp_get_storages()
Gets the storage type of the storage information.
- Since :
- 3.0
- Parameters:
-
[in] | mtp_device | The MTP device |
[in] | mtp_storage | The MTP storage |
[out] | storage_type | The storage type of Storage information |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- mtp_get_storages()
Gets the volume identifier of the storage information.
- Since :
- 3.0
- Parameters:
-
[in] | mtp_device | The MTP device |
[in] | mtp_storage | The MTP storage |
[out] | volume_identifier | The volume identifier of Storage information |
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
- See also:
- mtp_get_object_handles()