Tizen Native API
5.5
|
The Update Control API provides functions which implement update operations This section provides more information about the Update Control API.
#include <update_control.h>
The Update Control API provides functions which implement update operations such as connect to update server, request update information, and set update configurations. It enables the application to get the update information and control the platform version of the device. Therefore this API should be used by authorized developer like platform provider only. Because the update server may have various protocols, the implementation of APIs is able to be substituted by custom functions which connect to the server serviced by each service provider. As a default implementation, the agent for STDM (SmartThings Device Manager) is offered. SmartThings Device Manager Console
This API is related with the following features:
It is recommended to design applications with regard to features, for reliability.
You can check if a device supports the related features for this API by using System Information, and control your application's actions accordingly.
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 using features in your application can be found in the feature element description.
Functions | |
int | update_control_initialize (void) |
Initializes the update controller. | |
int | update_control_deinitialize (void) |
Deinitializes the update controller. | |
int | update_control_check_new_version (void) |
Requests checking new version of firmware. | |
int | update_control_download_package (void) |
Requests downloading new version of firmware. | |
int | update_control_do_update (void) |
Requests triggering update to new firmware. | |
int | update_control_make_reservation (struct tm *reservation_time) |
Makes reservation for update. | |
int | update_control_cancel_reservation (void) |
Cancels the update reservation. | |
int | update_control_get_property (update_control_property_e property, void **value) |
Gets the update property of the given key. |
Enumeration for the update control error.
Enumeration for the update control properties.
int update_control_cancel_reservation | ( | void | ) |
Cancels the update reservation.
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_PERMISSION_DENIED | Permission denied |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |
int update_control_check_new_version | ( | void | ) |
Requests checking new version of firmware.
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_CONNECTION_REFUSED | Connection refused |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |
int update_control_deinitialize | ( | void | ) |
Deinitializes the update controller.
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |
int update_control_do_update | ( | void | ) |
Requests triggering update to new firmware.
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_PERMISSION_DENIED | Permission denied |
UPDATE_CONTROL_ERROR_TIMED_OUT | Time out |
UPDATE_CONTROL_ERROR_INVALID_PACKAGE | Invalid package |
UPDATE_CONTROL_ERROR_PACKAGE_NOT_SUPPORTED | Package type not supported |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |
int update_control_download_package | ( | void | ) |
Requests downloading new version of firmware.
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_FILE_NO_SPACE_ON_DEVICE | No space left on device |
UPDATE_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
UPDATE_CONTROL_ERROR_CONNECTION_REFUSED | Connection refused |
UPDATE_CONTROL_ERROR_CONNECTION_ABORTED | Software caused connection abort |
UPDATE_CONTROL_ERROR_PROTOCOL_NOT_SUPPORTED | Protocol not supported |
UPDATE_CONTROL_ERROR_INVALID_URI | Invalid URI |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |
int update_control_get_property | ( | update_control_property_e | property, |
void ** | value | ||
) |
Gets the update property of the given key.
[in] | property | The key of property to get |
[out] | value | The value of given property |
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
UPDATE_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
UPDATE_CONTROL_ERROR_KEY_NOT_FOUND | Specified property not found |
UPDATE_CONTROL_ERROR_KEY_REJECTED | Specified property not available |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |
int update_control_initialize | ( | void | ) |
Initializes the update controller.
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_OUT_OF_MEMORY | Out of memory |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |
int update_control_make_reservation | ( | struct tm * | reservation_time | ) |
Makes reservation for update.
Makes update reservation at a specific time. At the given time, it automatically checks, downloads and updates to a new version. To cancel the reservation, call update_control_cancel_reservation().
[in] | reservation_time | The time to start update |
0
on success, otherwise a negative error value UPDATE_CONTROL_ERROR_NONE | Successful |
UPDATE_CONTROL_ERROR_INVALID_PARAMETER | Invalid parameter |
UPDATE_CONTROL_ERROR_PERMISSION_DENIED | Permission denied |
UPDATE_CONTROL_ERROR_SYSTEM_ERROR | System error |
UPDATE_CONTROL_ERROR_INVALID_OPERATION | Function not implemented |
UPDATE_CONTROL_ERROR_NOT_SUPPORTED | Not supported |