Tizen Native API
6.5
|
The MTP Device Information API provides functions for gets the device information of MTP responder device.
Required Header
#include <mtp.h>
Overview
The MTP Device Information api provides following functions :
- Get device manufacturer name
- Get device model name
- Get device serial number
- Get device version
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_deviceinfo_get_manufacturer_name (mtp_device_h mtp_device, char **manufacturer_name) |
Gets the manufacturer name of the device information. | |
int | mtp_deviceinfo_get_model_name (mtp_device_h mtp_device, char **model_name) |
Gets the model name of the device information. | |
int | mtp_deviceinfo_get_serial_number (mtp_device_h mtp_device, char **serial_number) |
Gets the serial number of the device information. | |
int | mtp_deviceinfo_get_device_version (mtp_device_h mtp_device, char **device_version) |
Gets the device version of the device information. |
Function Documentation
int mtp_deviceinfo_get_device_version | ( | mtp_device_h | mtp_device, |
char ** | device_version | ||
) |
Gets the device version of the device information.
- Since :
- 3.0
- Remarks:
- The device_version should be freed using free().
- Parameters:
-
[in] mtp_device The MTP device [out] device_version The device version of Device information
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MTP_ERROR_NONE Successful MTP_ERROR_NOT_SUPPORTED MTP is not supported MTP_ERROR_INVALID_PARAMETER Invalid parameter MTP_ERROR_NOT_INITIALIZED MTP is not initialized MTP_ERROR_NOT_ACTIVATED MTP is not activated MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized MTP_ERROR_COMM_ERROR MTP communication error MTP_ERROR_CONTROLLER MTP controller error MTP_ERROR_OUT_OF_MEMORY Out of memory MTP_ERROR_NO_DEVICE MTP have not any device
- See also:
- mtp_get_devices()
int mtp_deviceinfo_get_manufacturer_name | ( | mtp_device_h | mtp_device, |
char ** | manufacturer_name | ||
) |
Gets the manufacturer name of the device information.
- Since :
- 3.0
- Remarks:
- The manufacturer_name should be freed using free().
- Parameters:
-
[in] mtp_device The MTP device [out] manufacturer_name The manufacturer name of Device information
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MTP_ERROR_NONE Successful MTP_ERROR_NOT_SUPPORTED MTP is not supported MTP_ERROR_INVALID_PARAMETER Invalid parameter MTP_ERROR_NOT_INITIALIZED MTP is not initialized MTP_ERROR_NOT_ACTIVATED MTP is not activated MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized MTP_ERROR_COMM_ERROR MTP communication error MTP_ERROR_CONTROLLER MTP controller error MTP_ERROR_OUT_OF_MEMORY Memory Allocation failed MTP_ERROR_NO_DEVICE MTP have not any device
- See also:
- mtp_get_devices()
int mtp_deviceinfo_get_model_name | ( | mtp_device_h | mtp_device, |
char ** | model_name | ||
) |
Gets the model name of the device information.
- Since :
- 3.0
- Remarks:
- The model_name should be freed using free().
- Parameters:
-
[in] mtp_device The MTP device [out] model_name The model name of Device information
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MTP_ERROR_NONE Successful MTP_ERROR_NOT_SUPPORTED MTP is not supported MTP_ERROR_INVALID_PARAMETER Invalid parameter MTP_ERROR_NOT_INITIALIZED MTP is not initialized MTP_ERROR_NOT_ACTIVATED MTP is not activated MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized MTP_ERROR_COMM_ERROR MTP communication error MTP_ERROR_CONTROLLER MTP controller error MTP_ERROR_OUT_OF_MEMORY Out of memory MTP_ERROR_NO_DEVICE MTP have not any device
- See also:
- mtp_get_devices()
int mtp_deviceinfo_get_serial_number | ( | mtp_device_h | mtp_device, |
char ** | serial_number | ||
) |
Gets the serial number of the device information.
- Since :
- 3.0
- Remarks:
- The serial_number should be freed using free().
- Parameters:
-
[in] mtp_device The MTP device [out] serial_number The serial number of Device information
- Returns:
- 0 on success, otherwise a negative error value.
- Return values:
-
MTP_ERROR_NONE Successful MTP_ERROR_NOT_SUPPORTED MTP is not supported MTP_ERROR_INVALID_PARAMETER Invalid parameter MTP_ERROR_NOT_INITIALIZED MTP is not initialized MTP_ERROR_NOT_ACTIVATED MTP is not activated MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized MTP_ERROR_COMM_ERROR MTP communication error MTP_ERROR_CONTROLLER MTP controller error MTP_ERROR_OUT_OF_MEMORY Out of memory MTP_ERROR_NO_DEVICE MTP have not any device
- See also:
- mtp_get_devices()