Tizen(Headed) Native API
6.5
|
The Update Control API provides functions which implement update operations This section provides more information about the Update Control API.
Required Header
#include <update_control.h>
Overview
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
Related Features
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 Type Documentation
Enumeration for the update control error.
- Since :
- 5.0
- Enumerator:
Enumeration for the update control properties.
- Since :
- 5.0
- Enumerator:
Function Documentation
int update_control_cancel_reservation | ( | void | ) |
Cancels the update reservation.
- Warning:
- This is not for use by third-party applications.
- Since :
- 5.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/updatecontrol.admin
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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
- See also:
- update_control_initialize()
int update_control_do_update | ( | void | ) |
Requests triggering update to new firmware.
- Warning:
- This is not for use by third-party applications.
- Since :
- 5.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/updatecontrol.admin
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 5.0
- Remarks:
- The value must be released using free()
- Parameters:
-
[in] property The key of property to get [out] value The value of given property
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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.
- Since :
- 5.0
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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
- See also:
- update_control_deinitialize()
int update_control_make_reservation | ( | struct tm * | reservation_time | ) |
Makes reservation for update.
- Warning:
- This is not for use by third-party applications.
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().
- Since :
- 5.0
- Privilege Level:
- platform
- Privilege:
- http://tizen.org/privilege/updatecontrol.admin
- Remarks:
- Only one reservation can be used at any given time. If a new reservation is made, the previous one will be removed.
- Parameters:
-
[in] reservation_time The time to start update
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
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