Flora License
-Version 1.0, May, 2012
+Version 1.0, April, 2013
http://floralicense.org/license/
subsequently incorporated within the Work.
"Tizen Certified Platform" shall mean a software platform that complies
-with the standards set forth in the Compatibility Definition Document
-and passes the Compatibility Test Suite as defined from time to time
+with the standards set forth in the Tizen Compliance Specification
+and passes the Tizen Compliance Tests as defined from time to time
by the Tizen Technical Steering Group and certified by the Tizen
Association or its designated agent.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
* After this method, the application code cannot be executed. The application is destroyed subsequently. @n
*
* An application can be terminated by either system, such as power-off and OOM, or others, such as self and other applications. @n
- * When the termination by system, called an “urgent termination”, occurs, the method, OnAppTerminating(), cannot be executed properly.
- * For more details, while power-off, even if OnAppTerminating() is called, it has a short time for executing. If the application is killed by OOM, OnAppTerminating() is not called. @n
- * Because OnAppTerminating() is not likely to be called due to urgent termination, the application should save the critical data as they can do.
+ * When the termination by system, called an “urgent termination”, occurs, the method, %OnAppTerminating(), cannot be executed properly.
+ * For more details, while power-off, even if %OnAppTerminating() is called, it has a short time for executing. If the application is killed by OOM, %OnAppTerminating() is not called. @n
+ * Because %OnAppTerminating() is not likely to be called due to urgent termination, the application should save the critical data as they can do.
* For example, the application can set the check point or use the callback for low memory. @n
- * When the termination by self or other applications, called a “normal termination”, occurs, the method, OnAppTerminating(), can be executed properly.
+ * When the termination by self or other applications, called a “normal termination”, occurs, the method, %OnAppTerminating(), can be executed properly.
* It provides more time for executing than urgent termination, but limits to the time to 3 or 5 seconds. @n
- * The main loop is already quitted when OnAppTerminating() is called.
+ * The main loop is already quitted when %OnAppTerminating() is called.
* Thus, the application should not use a kind of asynchronous API of which the callback is triggered by the main loop.
*
* @since 2.0
* @param[in] pDataType The MIME type (RFC 2046) or file extension @n
* The '.' prefix must be used when specifying the file extension.
* @param[in] pCategory The application control category
- * @param[in] pExtraData A pointer to an argument map of key and value pair where the key is of type String and the value is of type String or of type ArrayList of String to deliver to the resolved application @n
+ * @param[in] pExtraData A pointer to an argument map of key and value pair where the key is of type Tizen::Base::String and the value is of
+ * type %Tizen::Base::String or of type Tizen::Base::Collection::ArrayList of %Tizen::Base::String to deliver to
+ * the resolved application @n
* The maximum size is 16 kilo bytes.
* @param[in] pListener A listener that gets notified
* @exception E_SUCCESS The method is successful.
* @return An error code
* @param[in] reqId The application control request ID
* @param[in] appControlResult The application control result
- * @param[in] pExtraData A pointer to an extra argument map of key and value pair where the key is of type String and the value is of type String or type ArrayList of String
+ * @param[in] pExtraData A pointer to an extra argument map of key and value pair where the key is of type Tizen::Base::String and the value is of type %Tizen::Base::String or type Tizen::Base::Collection::ArrayList of %Tizen::Base::String
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The application control request is not found.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @exception E_SUCCESS The method is successful.
* @exception E_APP_NOT_INSTALLED The expected shared directory cannot be found
* because the application specified with @c appId cannot be installed.
- * @remarks The returned path can be invalid when the application with specified with @c appId is uninstalled. @n
- * The specific error code can be accessed using the GetLastResult() method.
+ * @remarks
+ * - The returned path can be invalid when the application with specified with @c appId is uninstalled.
+ * - The specific error code can be accessed using the GetLastResult() method.
*/
static Tizen::Base::String GetAppSharedPath(const AppId& appId);
* @since 2.0
* @privlevel public
* @privilege %http://tizen.org/privilege/application.launch
- * @feature %http://tizen.org/feature/network.nfc for L¡±NFC=¡¯command¡¯¡± or %http://tzen.org/feature/usb.accessory for L¡±Serial=¡¯command¡¯¡± in the value of @c condition
+ * @feature %http://tizen.org/feature/network.nfc for L"NFC='command'" or %http://tizen.org/feature/usb.accessory for "Serial='command'" in the value of @c condition
*
* @return An error code
* @param[in] condition The launch condition for the application @n
<tr><td>L"DueTime='mm/dd/yyyy hh:mm:ss' LaunchPeriod='mm'"</td>
<td>The specific condition is the time period after due time.</td></tr>
<tr><td>L"WeeklyTime='EEE HH:mm:ss'"</td>
- <td>The specified condition is a day of week with specific time to launch an application for every week. For multiple description, "," delimiter can be used like following example.<br>i"Mon 09:00:00, Tue 09:00:00, Wed 09:00:00, Thu 09:00:00, Fir 09:00:00"<br> The format of a day of week is support following string only.<br>Mon: Monday<br>Tue: Tuesday<br>Wed: Wednesday<br>Thu: Thursday<br>Fri: Friday<br>Sat: Saturday<br>Sun: Sunday</td></tr>
+ <td>The specified condition is a day of a week with a specific time at which the application is launched on a weekly basis. For multiple descriptions, "," delimiter can be used as shown in the following example: <br>i"Mon 09:00:00, Tue 09:00:00, Wed 09:00:00, Thu 09:00:00, Fri 09:00:00"<br> To specify the day of the week, it must be in one of the following supported string format: <br>Mon: Monday<br>Tue: Tuesday<br>Wed: Wednesday<br>Thu: Thursday<br>Fri: Friday<br>Sat: Saturday<br>Sun: Sunday</td></tr>
<tr><td>L"Serial='command'"</td><td>The specified condition is a serial
communication input command.</td></tr>
<tr><td>L"NFC='command'"</td><td>The specified condition is a Near Field Communication (NFC) tag that has the NFC Data Exchange Format (NDEF) data.
* @exception E_MAX_EXCEEDED The size of @c pArguments has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. For more information, see <a href=¡±../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm¡±>Application Filtering</a>. @b Since: @b 2.1
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>. @b Since: @b 2.1
*
* @remarks When the registered application is about to be launched, the registered launch condition and arguments are given as parameters to IAppLaunchConditionEventListener::OnAppLaunchConditionMetN().
* @remarks The newly introduced launch condition does not work on the previous SDK version and the E_INVALID_CONDITION exception is returned.
* @remarks The launch period requires more consideration because an inappropriate short period value may lead
* to an adverse effect on the device battery.
* @remarks For the NFC launch condition, the detected NDEF message can be acquired using the @c pExtraData parameter of the %IAppLaunchConditionEventListener::OnAppLaunchConditionMetN() method.
- * @remarks Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
+ * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
* @see UnregisterAppLaunch()
* @see IsAppLaunchRegistered()
* @see LaunchApplication(const AppId&, LaunchOption);
* @since 2.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/appmanager.launch
- * @feature %http://tizen.org/feature/network.nfc for L¡±NFC=¡¯command¡¯¡± or %http://tzen.org/feature/usb.accessory for L¡±Serial=¡¯command¡¯¡± in the value of @c condition
+ * @feature %http://tizen.org/feature/network.nfc for L"NFC='command'" or %http://tizen.org/feature/usb.accessory for L"Serial='command'" in the value of @c condition
*
* @return An error code
* @param[in] appId The ID of the application registered for launch
* @exception E_MAX_EXCEEDED The size of @c pArguments has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
- * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. For more information, see <a href=¡±../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm¡±>Application Filtering</a>. @b Since: @b 2.1
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature. For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>. @b Since: @b 2.1
*
* @remarks When the registered application is about to be launched, the registered launch condition and arguments are given as parameters to IAppLaunchConditionEventListener::OnAppLaunchConditionMetN().
* @remarks The newly introduced launch condition does not work on the previous SDK version and the @c E_INVALID_CONDITION exception is returned.
* @remarks The launch period requires more consideration because an inappropriate short period value may lead
* to an adverse effect on the device battery.
* @remarks For the NFC launch condition, the detected NDEF message can be acquired using the @c pExtraData parameter of the %IAppLaunchConditionEventListener::OnAppLaunchConditionMetN() method.
- * @remarks Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
+ * @remarks Before calling this method, check whether the feature is supported by Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
* @see UnregisterAppLaunch()
* @see IsAppLaunchRegistered()
* @see LaunchApplication(const AppId&, LaunchOption);
* @exception E_OBJ_NOT_FOUND The data control request specified with the @c reqId did not exist.
* @exception E_MAX_EXCEEDED The size of sending buffer has exceeded the maximum limit.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
* @see Tizen::App::DataControlProviderManager::SendSqlDataControlSelectResult()
* @see Tizen::App::DataControlProviderManager::SendSqlDataControlInsertResult()
* @see Tizen::App::DataControlProviderManager::SendSqlDataControlUpdateDeleteResult()
* @param[in] operationId The application control operation ID
* @param[in] pUriData A pointer to the URI data
* @param[in] pMimeType A pointer to the MIME type (RFC 2046) data
- * @param[in] pExtraData A pointer to an argument map of key and value pair where the key is of type String and the value is of type String or of type ArrayList of String
+ * @param[in] pExtraData A pointer to an argument map of key and value pair where the key is of type String and the value is of type Tizen::Base::String or of type Tizen::Base::Collection::ArrayList of %Tizen::Base::String
* @remarks To reply to the application control request, use AppControlProviderManager::SendAppControlResult() with the given request ID.
* @remarks When the application receives the AppControl request on the background,
* %OnAppControlRequestReceived() is invoked before UiApp::OnForeground().
* @param[in] appId The ID of the requested application
* @param[in] operationId The operation ID used in application control invocation
* @param[in] appControlResult The application control result
- * @param[in] pExtraData A pointer to an result map of key and value pair where the key of type String and the value of type String or of type ArrayList of String
+ * @param[in] pExtraData A pointer to an result map of key and value pair where the key of type Tizen::Base::String and the value of
+ * type %Tizen::Base::String or of type Tizen::Base::ArrayList of %Tizen::Base::String
* @remarks The application control completion result is received when the requested application control
* sends the result using AppControlProviderManager::SendAppControlResult().
* @see AppControl
*
* @endcode
*/
+
class _OSP_EXPORT_ MapDataControl
: public Tizen::Base::Object
{
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result GetValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key, RequestId& reqId, int pageNo = 1, int countPerPage = 20);
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result AddValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key, const Tizen::Base::String& value, RequestId& reqId);
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result SetValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key, const Tizen::Base::String& oldValue, const Tizen::Base::String& newValue, RequestId& reqId);
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result RemoveValue(const Tizen::Base::String& dataId, const Tizen::Base::String& key, const Tizen::Base::String& value, RequestId& reqId);
* @if OSPDEPREC
* Notifies the user using a message and badge number. @n
* If the user checks the message, @c launchArguments is delivered to the application. @n
- * @c launchArguments is delivered as the value of the http://tizen.org/appcontrol/data/notification key
+ * @c launchArguments is delivered as the value of the %http://tizen.org/appcontrol/data/notification key
* for IAppControlProviderEventListener::OnAppControlRequestReceived().
*
* @brief <i> [Deprecated] </i>
/**
* @if OSPDEPREC
* Notifies the user about the ongoing activity using a message. @n
- * @c launchArguments is delivered as the value of the http://tizen.org/appcontrol/data/notification key
+ * @c launchArguments is delivered as the value of the %http://tizen.org/appcontrol/data/notification key
* for IAppControlProviderEventListener::OnAppControlRequestReceived().
*
* @brief <i> [Deprecated] </i>
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
*
* @since 2.1
*
- * @return A pointer to menu icon of an application, @n
+ * @return A pointer to the menu icon of an application, @n
* else @c null if it fails
* @exception E_SUCCESS The method is successful.
* @exception E_FILE_NOT_FOUND The menu icon does not exist.
* else @c null if it fails
* @exception E_SUCCESS The method is successful.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks Application can use the metadata to set app-wide information.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Application can use the metadata to set app-wide information.
*/
Tizen::Base::Collection::IMap* GetAppMetadataListN(void) const;
result MoveToInternalStorage(const PackageId& packageId);
/**
- * Gets a package information from the specific file. The supported file extensions are tpk and wgt.
+ * Gets a package information from a specific file. @n The supported file extensions are tpk and wgt.
*
* @since 2.1
* @privlevel platform
* else @c null if it fails
* @param[in] filePath The package file path
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_FILE_NOT_FOUND The specified file cannot be found or accessed.
* @exception E_UNSUPPORTED_FORMAT The specified format is invalid or not supported.
* @exception E_PARSING_FAILED The method has failed to parse the package file or xml file(s) inside the package.
* For more information on the predefined key-value pairs for package filter,
* see <a href="../org.tizen.native.appprogramming/html/guide/app/package_app_filter.htm">the predefined key-value pairs for package filter</a>.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
* For more information on the predefined key-value pairs for package app filter,
* see <a href="../org.tizen.native.appprogramming/html/guide/app/package_app_filter.htm">the predefined key-value pairs for package app filter</a>.
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @exception E_SYSTEM The method cannot proceed due to a severe system error.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
* @remarks The specific error code can be accessed using the GetLastResult() method.
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c pWhere is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLite SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result Select(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IList* pColumnList,
const Tizen::Base::String* pWhere, const Tizen::Base::String *pOrder, RequestId& reqId,
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c insertMap is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLite SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 1MB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 1MB size.
*/
result Insert(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& insertMap, RequestId& reqId);
* The string consists of one or more components, separated by a slash('/').
* @param[in] updateMap The column-value pairs to update @n
* The type of objects contained in the specified @c updateMap must be
- * Tizen::Base::String class. @n
+ * Tizen::Base::String class.
* @param[in] pWhere A filter to select desired rows to update @n
* It is an SQL 'WHERE' clause excluding the 'WHERE' itself such as
* column1 = 'stringValue' AND column2 = numericValue.
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c pWhere or @c updateMap is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLITE SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 1MB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 1MB size.
*/
result Update(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& updateMap,
const Tizen::Base::String* pWhere, RequestId& reqId);
* @exception E_ILLEGAL_ACCESS Either of the following conditions has occurred: @n
* - Access is denied due to insufficient permission.
* - The application using this method is not signed with the same certificate of provider application. @b Since: @b 2.1
- * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred:
* - The size of sending buffer has exceeded the maximum limit.
* - The number of sending requests has exceeded the maximum limit.
* @exception E_SYSTEM A system error has occurred.
* @remarks If the value specified in the @c pWhere is string, the value must be wrapped in
* single quotes. Otherwise it is not needed to wrap the numeric value in single quotes.
* For more information on the SQL statement, see SQLITE SQL documents.
- * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 16KB size.
+ * @remarks The recommended data size is under 16KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result Delete(const Tizen::Base::String& dataId, const Tizen::Base::String* pWhere, RequestId& reqId);
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
// This method is for internal use only.
// Using this method can cause behavioral, security-related, and consistency-related issues in the application.
//
- // The following methods are reserved and the name of the methods can be changed at any time without prior notice.
+ // This method is reserved and may change its name at any time without prior notice.
//
// @since 2.0
//
virtual ~DataRow(void);\r
\r
/**\r
- * Sets a @c ByteBuffer value to the column whose index is specified.\r
+ * Sets a Tizen::Base::ByteBuffer value to the column whose index is specified.\r
*\r
* @since 2.1\r
*\r
* @param[in] columnIndex The index of the column whose value is set @n\r
* The column index starts from 0.\r
* @param[in] pValue The value to set @n\r
- * The specified @c pValue is pointer to user-provided @c ByteBuffer type buffer.\r
+ * The specified @c pValue is a pointer to user-provided Tizen::Base::ByteBuffer type buffer.\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_ARG Either of the following conditions has occurred: @n\r
* - The specified @c columnIndex is out of range.\r
- * - The specified @c pValue is null.\r
+ * - The specified @c pValue is @c null.\r
* @exception E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
* @remarks This method performs a shallow copy. It copies only the pointer; not the element itself. @n\r
* The platform will take the ownership of @c pValue after calling this method.\r
\r
\r
/**\r
- * Sets a @c DateTime value to the column whose index is specified.\r
+ * Sets a Tizen::Base::DateTime value to the column whose index is specified.\r
*\r
* @since 2.1\r
*\r
result SetInt64At(int columnIndex, long long value);\r
\r
/**\r
- * Sets a @c String value to the column whose index is specified.\r
+ * Sets a Tizen::Base::String value to the column whose index is specified.\r
*\r
* @since 2.1\r
*\r
* @since 2.1\r
*\r
* @return An error code\r
- * @param[in] columnNames The list of column name to create @n\r
+ * @param[in] columnNames The list of column names to create @n\r
* The object type in the specified list should be String.\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_ARG The specified @c columnNames has no element.\r
* @return A pointer to the DataRow instance, @n\r
* else @c null if the memory is insufficient\r
* @remarks The column type is decided by the type of each element inserted in first row.\r
- * If a specific column element on the first row is not inserted, then the column's type is DB_COLUMNTYPE_NULL\r
- * On that case, when a new column element is added later,\r
+ * If a specific column element on the first row is not inserted, then the column's type is @c DB_COLUMNTYPE_NULL\r
+ * In that case, when a new column element is added later,\r
* then the column's type will be changed according to the new element.\r
*/\r
DataRow* CreateDataRowN(void);\r
\r
/**\r
- * Gets table enumerator.\r
+ * Gets a table enumerator.\r
*\r
* @since 2.1\r
*\r
\r
\r
/**\r
- * Get copy of this instance.\r
+ * Gets a copy of this instance.\r
*\r
* @since 2.1\r
*\r
- * @return A pointer to the copy of the DataSet instance, @n\r
-\r
+ * @return A pointer to the copy of the %DataSet instance, @n\r
* else @c null if the memory is insufficient\r
*/\r
DataSet* CloneN(void) const;\r
\r
/**\r
- * Checks whether the value of the specified instance of Object is equal to the value of the current instance of\r
+ * Checks whether the value of a specified instance of Tizen::Base::Object is equal to the value of a current instance of\r
* %DataSet.\r
*\r
* @since 2.1\r
*\r
- * @return @c true if the value of the specified instance of Object is equal to the value of the current\r
+ * @return @c true if the value of the specified instance of Tizen::Base::Object is equal to the value of the current\r
* instance of %DataSet, @n\r
* else @c false\r
- * @param[in] obj An instance of Object to compare\r
- * @remarks The method returns @c false if the specified @c obj is not a %DataSet instance.\r
+ * @param[in] obj An instance of Tizen::Base::Object to compare\r
+ * @remarks This method returns @c false if the specified @c obj is not a %DataSet instance.\r
*/\r
virtual bool Equals(const Tizen::Base::Object& obj) const;\r
\r
/**\r
- * Gets the hash value of the current instance.\r
+ * Gets the hash value of a current instance.\r
*\r
* @since 2.1\r
*\r
* - An unexpected device failure has occurred as the media ejected suddenly. @n\r
* - %File corruption is detected.\r
* @exception E_SYSTEM The method cannot proceed due to a severe system error.\r
- * @remarks After getting this DataSetEnumerator instance,\r
- * if MoveNext() is called at first, the cursor goes to the first position.\r
+ * @remarks After getting this %DataSetEnumerator instance,\r
+ * if this method is called first, the cursor goes to the first position.\r
* @see Tizen::Io::DataSetEnumerator::MovePrevious()\r
* @see Tizen::Io::DataSetEnumerator::MoveFirst()\r
* @see Tizen::Io::DataSetEnumerator::MoveLast()\r
virtual result GetDoubleAt(int columnIndex, double& value) const;\r
\r
/**\r
- * Gets a @c String value from the column whose index is specified.\r
+ * Gets a Tizen::Base::String value from the column whose index is specified.\r
*\r
* @since 2.1\r
*\r
* @return An error code\r
* @param[in] columnIndex The index of the column whose value is required\r
- * @param[in,out] value The String value obtained from the specified column\r
+ * @param[in,out] value The Tizen::Base::String value obtained from the specified column\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
* @exception E_INVALID_ARG The specified @c columnIndex is out of range.\r
virtual result GetStringAt(int columnIndex, Tizen::Base::String& value) const;\r
\r
/**\r
- * Gets a @c ByteBuffer value from the column whose index is specified.\r
+ * Gets a Tizen::Base::ByteBuffer value from the column whose index is specified.\r
*\r
* @since 2.1\r
*\r
* @return An error code\r
* @param[in] columnIndex The index of the column whose value is required\r
- * @param[in,out] value The ByteBuffer value obtained from the specified column @n\r
- * The ByteBuffer will be filled from the current position and data copy\r
- * will be continued until ByteBuffer limitation is reached or no more\r
- * blob data remains. @n\r
+ * @param[in,out] value The Tizen::Base::ByteBuffer value obtained from the specified column @n\r
+ * The %Tizen::Base::ByteBuffer will be filled from the current position and data copy\r
+ * will be continued until %Tizen::Base::ByteBuffer limitation is reached or no more\r
+ * blob data remains.\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
-\r
* @exception E_INVALID_ARG The specified @c columnIndex is out of range.\r
* @exception E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
- * @exception E_OVERFLOW The specified ByteBuffer @c value is insufficient to save the data.\r
+ * @exception E_OVERFLOW The specified Tizen::Base::ByteBuffer @c value is insufficient to save the data.\r
* @see Tizen::Base::ByteBuffer\r
*/\r
virtual result GetBlobAt(int columnIndex, Tizen::Base::ByteBuffer& value) const;\r
*\r
* @return An error code\r
* @param[in] columnIndex The index of the column whose value is required\r
- * @param[in,out] buffer The user-provided buffer used to receive the blob data @n\r
+ * @param[in,out] buffer The user-provided buffer used to receive the blob data\r
* @param[in] size The maximum buffer length in bytes\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
- * @exception E_INVALID_ARG The specified @c columnIndex is out of range, or the specified @c size is invalid.\r
+ * @exception E_INVALID_ARG Either the specified @c columnIndex is out of range or the specified @c size is invalid.\r
* @exception E_TYPE_MISMATCH The operation has attempted to access columns of different types.\r
* @exception E_OVERFLOW The specified @c buffer is insufficient to save the data.\r
*/\r
virtual result GetBlobAt(int columnIndex, void* buffer, int size) const;\r
\r
/**\r
- * Gets a @c DateTime value from the column whose index is specified.\r
+ * Gets a Tizen::Base::DateTime value from the column whose index is specified.\r
*\r
* @since 2.1\r
*\r
* @return An error code\r
* @param[in] columnIndex The index of the column whose value is required\r
- * @param[in,out] value The DateTime value obtained from the specified column\r
+ * @param[in,out] value The Tizen::Base::DateTime value obtained from the specified column\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
* @exception E_INVALID_ARG The specified @c columnIndex is out of range.\r
* else @c -1 if an exception occurs\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
- * @remarks The method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
+ * @remarks This method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
* The specific error code can be accessed using the GetLastResult() method.\r
*/\r
virtual int GetColumnCount(void) const;\r
\r
/**\r
- * Gets the type of the column indicated by the specified index.\r
+ * Gets the type of the column indicated by a specified index.\r
*\r
* @since 2.1\r
*\r
* @return The type of column, @n\r
- * else DB_COLUMNTYPE_UNDEFINED if an exception occurs\r
+ * else @c DB_COLUMNTYPE_UNDEFINED if an exception occurs\r
* @param[in] columnIndex The index of the destination column\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
* @exception E_INVALID_ARG The specified @c columnIndex is out of range.\r
- * @remarks The method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
- * Currently, DB_COLUMNTYPE_INT is returned for a 64-bit integer. @n\r
+ * @remarks This method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
+ * Currently, @c DB_COLUMNTYPE_INT is returned for a 64-bit integer. @n\r
* The specific error code can be accessed using the GetLastResult() method.\r
*/\r
virtual DbColumnType GetColumnType(int columnIndex) const;\r
\r
/**\r
- * Gets the name of the column indicated by the specified index.\r
+ * Gets the name of the column indicated by a specified index.\r
*\r
* @since 2.1\r
*\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
* @exception E_INVALID_ARG The specified @c columnIndex is out of range.\r
* @exception E_INVALID_ENCODING_RANGE The string conversion has failed due to invalid encoding range.\r
- * @remarks The method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
+ * @remarks This method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
* The specific error code can be accessed using the GetLastResult() method.\r
*/\r
virtual Tizen::Base::String GetColumnName(int columnIndex) const;\r
* @exception E_SUCCESS The method is successful.\r
* @exception E_INVALID_STATE The DataSet instance associated with this instance is deleted.\r
* @exception E_INVALID_ARG The specified @c columnIndex is out of range.\r
- * @remarks The method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
+ * @remarks This method must be called after MoveNext(), MoveFirst(), or MoveLast(). @n\r
* If the destination column is of type String, this method returns the @c byte length excluding\r
* the @c null terminator character. @n\r
* The specific error code can be accessed using the GetLastResult() method.\r
bool IsReadOnly(void) const;
/**
- * Gets the date and time of last modification of the directory entry.
+ * Gets the date and time of the last modification of the directory entry.
*
* @since 2.0
*
- * @return The date and time of last modification
+ * @return The date and time of the last modification
*/
Tizen::Base::DateTime GetDateTime(void) const;
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The @c localMessagePortName is empty.
* @exception E_SYSTEM The method has failed due to a severe system error.
- * @remarks It is not recommended to use the message port names which start with "http://tizen.org/messageport". E_INVALID_ARG may be returned because they are reserved by platform.
+ * @remarks It is not recommended to use the message port names that start with "http://tizen.org/messageport". @c E_INVALID_ARG may be returned because they are reserved by platform.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static LocalMessagePort* RequestLocalMessagePort(const Tizen::Base::String& localMessagePortName);
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The @c localMessagePortName is empty.
* @exception E_SYSTEM The method has failed due to a severe system error.
- * @remarks It is not recommended to use the message port names which start with "http://tizen.org/messageport". E_INVALID_ARG may be returned because they are reserved by platform.
+ * @remarks It is not recommended to use the message port names that start with "http://tizen.org/messageport". @c E_INVALID_ARG may be returned because they are reserved by platform.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
static LocalMessagePort* RequestTrustedLocalMessagePort(const Tizen::Base::String& localMessagePortName);
* @exception E_OBJ_NOT_FOUND The message port of the target application is not found.
* @exception E_MAX_EXCEEDED The size of @c pMessage has exceeded the maximum limit.
* @exception E_SYSTEM The method has failed due to a severe system error.
- * @remarks The recommended message size is under 4KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 4KB size.
+ * @remarks The recommended message size is under 4KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 4KB size.
*/
result SendMessage(const Tizen::Base::Collection::IMap* pMessage);
* @exception E_OBJ_NOT_FOUND The message port of the target application is not found.
* @exception E_MAX_EXCEEDED The size of @c pMessage has exceeded the maximum limit.
* @exception E_SYSTEM The method has failed due to a severe system error.
- * @remarks The recommended message size is under 4KB because severe system performance degradation may occur for large messages. E_MAX_EXCEEDED may be returned for messages over 4KB size.
+ * @remarks The recommended message size is under 4KB because severe system performance degradation may occur for large messages. @c E_MAX_EXCEEDED may be returned for messages over 4KB size.
*/
result SendMessage(const LocalMessagePort* pLocalMessagePort, const Tizen::Base::Collection::IMap* pMessage);
* @exception E_IN_PROGRESS The specified key is under processing or invalid state.
* @exception E_SYSTEM Either of the following conditions has occured:
* - The method cannot proceed due to a severe system error.
- * - It can be occurred and Wi-Fi Direct™ is not activated if the @c key is %http://tizen.org/setting/network.wifi.direct and Wi-Fi is activated.-
+ * - This error can occur and Wi-Fi Direct™ is not activated if the @c key is %http://tizen.org/setting/network.wifi.direct and Wi-Fi is activated.-
Direct™ is not activated if the @c key is %http://tizen.org/setting/network.wifi.direct and Wi-Fi is activated.
*/
static const char OSP_V_REQUEST_TYPE_MAP_INSERT[] = "map_insert";
static const char OSP_V_REQUEST_TYPE_MAP_UPDATE[] = "map_update";
static const char OSP_V_REQUEST_TYPE_MAP_DELETE[] = "map_delete";
-static const char OSP_V_VERSION_2_1_0_1[] = "ver_2.1.0.1";
+static const char OSP_V_VERSION_2_1_0_2[] = "ver_2.1.0.2";
static const char BUNDLE_KEY_PREFIX_AUL[] = "__AUL_";
static const char BUNDLE_KEY_PREFIX_SERVICE[] = "__APP_SVC_";
static const char BUNDLE_KEY_PREFIX_OSP[] = "__OSP_";
char dataControlRequestType[MAX_LEN_DATA_CONTROL_REQ_TYPE] = {0, };
snprintf(dataControlRequestType, MAX_LEN_DATA_CONTROL_REQ_TYPE, "%d", static_cast<int>(requestType));
bundle_add(b, OSP_K_DATACONTROL_REQUEST_TYPE, dataControlRequestType);
+ bundle_add(b, OSP_K_DATACONTROL_PROTOCOL_VERSION, OSP_V_VERSION_2_1_0_2);
std::unique_ptr<char[]> pProvider(_StringConverter::CopyToCharArrayN(dc.__providerId));
if (pProvider)
char dataControlRequestType[MAX_LEN_DATA_CONTROL_REQ_TYPE] = {0, };
snprintf(dataControlRequestType, MAX_LEN_DATA_CONTROL_REQ_TYPE, "%d", static_cast < int >(requestType));
bundle_add(b, OSP_K_DATACONTROL_REQUEST_TYPE, dataControlRequestType);
- bundle_add(b, OSP_K_DATACONTROL_PROTOCOL_VERSION, OSP_V_VERSION_2_1_0_1);
+ bundle_add(b, OSP_K_DATACONTROL_PROTOCOL_VERSION, OSP_V_VERSION_2_1_0_2);
std::unique_ptr<char[]> pProvider(_StringConverter::CopyToCharArrayN(dc.__providerId));
if (pProvider)
_NativeAppControlEventArg::~_NativeAppControlEventArg(void)
{
+/*
if (__pArgs)
{
SysLog(NID_APP, "Deleting native AppControl argument.");
delete __pArgs;
}
+*/
}
} } // Tizen::App
_AppControlResponseEventArg(IAppControlResponseListener* pResponseListener, _AppControlResponseType type, const AppId& appId, const Tizen::Base::String& operationId, result res, AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData, int reqId)
: __pResponseListener(pResponseListener)
, __type(type)
- , __appId(appId)
- , __operationId(operationId)
+ , __appId(appId.GetPointer())
+ , __operationId(operationId.GetPointer())
, __res(res)
, __appControlResult(appControlResult)
, __pExtraData(pExtraData)
virtual ~_AppControlResponseEventArg(void)
{
+ delete __pExtraData;
}
IAppControlResponseListener* GetListener(void) const
private:
IAppControlResponseListener* __pResponseListener;
_AppControlResponseType __type;
- const AppId& __appId;
- const Tizen::Base::String& __operationId;
+ const AppId __appId;
+ const Tizen::Base::String __operationId;
result __res;
AppCtrlResult __appControlResult;
const Tizen::Base::Collection::IMap* __pExtraData;
if (pResponseEvent != null)
{
- _AppControlResponseEventArg* pResponseEventArg = new (std::nothrow) _AppControlResponseEventArg(pListener, _APPCONTROL_RESPONSETYPE_COMPLETE, provider, oId, E_SUCCESS, ret, pMap.get(), reqId);
+ _AppControlResponseEventArg* pResponseEventArg = new (std::nothrow) _AppControlResponseEventArg(pListener, _APPCONTROL_RESPONSETYPE_COMPLETE, provider, oId, E_SUCCESS, ret, pMap.release(), reqId);
pResponseEvent->Fire(*pResponseEventArg);
SysLog(NID_APP, "OnAppControlCompleteResponseReceived, pResponseEvent is Fired");
}
using namespace Tizen::Base::Utility;
using namespace Tizen::Io;
-//extern const char* _DATACONTROL_RESULTSET_DIR;
-
namespace Tizen { namespace App
{
if (pResponseEvent != null)
{
- _AppControlResponseEventArg* pResponseEventArg = new (std::nothrow) _AppControlResponseEventArg(pListener, _APPCONTROL_RESPONSETYPE_COMPLETE, aId, oId, E_SUCCESS, static_cast<AppCtrlResult>(res), pArgs, responseEventRequestId);
+ _AppControlResponseEventArg* pResponseEventArg = new (std::nothrow) _AppControlResponseEventArg(pListener, _APPCONTROL_RESPONSETYPE_COMPLETE, aId, oId, E_SUCCESS, static_cast<AppCtrlResult>(res), const_cast<IMap*> (pArgs), responseEventRequestId);
if (pResponseEventArg != null)
{
pResponseEvent->Fire(*pResponseEventArg);
{
pListener->OnAppControlCompleteResponseReceived(aId, oId, ConvertAppControlResultCode(res), pArgs);
SysLog(NID_APP, "OnAppControlCompleteResponseReceived called directly");
+ IMap* pMap = const_cast<IMap*> (pArgs);
+ delete pMap;
}
}
else
_AppMessageImpl::AddData(kb, SELECTOR_NOTI_KEY, _AppInfo::GetApplicationId());
}
+ if (_AppImpl::GetInstance() != null)
+ {
+ const long handle = _AppImpl::GetInstance()->GetWindowHandle();
+ _AppArg::UpdateWindowHandle(kb, handle);
+ }
+
int pid = appsvc_run_service(kb, req, LaunchResultCb, this);
if (pid > 0)
{
state_handler.terminate = &OnTerminate;
state_handler.pause = &OnPause;
state_handler.resume = &OnResume;
- state_handler.device_orientation = &OnDeviceOrientationChanged;
+ state_handler.device_orientation = NULL;
state_handler.low_memory = &OnLowMemory;
- state_handler.low_battery = &OnLowBattery;
+ state_handler.low_battery = NULL;
state_handler.language_changed = &OnLanguageChanged;
state_handler.region_format_changed = &OnRegionFormatChanged;
}
-void
-_AppImpl::OnDeviceOrientationChanged(app_device_orientation_e orientation, void* user_data)
-{
- _AppImpl* pAppImpl = _AppImpl::GetInstance();
- SysTryReturnVoidResult(NID_APP, pAppImpl != null, E_INVALID_STATE, "[E_INVALID_STATE] Getting App instance failed.");
- SysTryReturnVoidResult(NID_APP, pAppImpl->__pIAppImpl != null, E_INVALID_STATE, "[E_INVALID_STATE] Getting App instance failed.");
-
- const AppState state = _AppInfo::GetAppState();
- SysTryReturnVoidResult(NID_APP, state == INITIALIZING || state == RUNNING, E_INVALID_STATE, "[E_INVALID_STATE] Invalid application state : %d.", state);
-
- pAppImpl->__pIAppImpl->OnDeviceOrientationChanged(orientation);
-}
-
-
_AppImpl::~_AppImpl(void)
{
__pAppImpl = null;
void
-_AppImpl::OnLowBattery(void* user_data)
-{
- // Osp doesn't implement this callback.
-}
-
-void
_AppImpl::OnBatteryLevelChanged(BatteryLevel batteryLevel)
{
SysTryReturnVoidResult(NID_APP, __pApp != null, E_INVALID_STATE, "[E_INVALID_STATE] Getting internal instance failed.");
String appId;
String reqType;
String providerId;
+ String version;
String* pDataId = null;
String callerReqId;
String* pColumnCount = null;
String* pErrorMsg = null;
String* pNo = null;
String* pCount = null;
+ String* pTmpPath = null;
String empty(L"NULL");
_AppArg resultArg;
int type = 0;
Integer::Parse(reqType, type);
requestType = static_cast< _DataControlRequestType >(type);
+ version = arg.GetValue(OSP_K_DATACONTROL_PROTOCOL_VERSION);
callerReqId = arg.GetValue(OSP_K_REQUEST_ID);
providerId = arg.GetValue(OSP_K_DATACONTROL_PROVIDER);
case _DATACONTROL_REQUEST_TYPE_SQL_INSERT:
SysLog(NID_APP, "[DC_PROV_RECV] SqlDataControl INSERT");
- // request list[1]: insert column count
+ // request list[1]: inserted column count
pColumnCount = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_COLUMNCOUNT));
SysTryCatch(NID_APP, pColumnCount, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
SysTryReturnVoidResult(NID_APP, pInsertMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
pInsertMap->Construct();
- i = 0;
- index = 0;
- while (i < columnCount * 2) // request list[2]: column-value pairs
+ SysLog(NID_APP, "[DC_PROV_RECV] version: %ls", version.GetPointer());
+ if (version == L"ver_2.1.0.2")
{
- pColumn = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_INSERTMAP + i++));
- SysTryCatch(NID_APP, pColumn != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
- SysLog(NID_APP, "[DC_PROV_RECV] column[%d]: %ls", index, pColumn->GetPointer());
+ pTmpPath = dynamic_cast< String* >(pList->GetAt(2)); // request list[2]: path
+ SysTryCatch(NID_APP, pTmpPath != null, , E_SYSTEM, "[E_SYSTEM] invalid request");
+ SysLog(NID_APP, "[DC_PROV_RECV] request: %ls", pTmpPath->GetPointer());
- pValue = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_INSERTMAP + i++));
- SysTryCatch(NID_APP, pValue != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
- SysLog(NID_APP, "[DC_PROV_RECV] value[%d]: %ls", index, pValue->GetPointer());
+ File request;
+ r = request.Construct(*pTmpPath, "r");
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to open request (%ls).",
+ GetErrorMessage(r), pTmpPath->GetPointer());
- pInsertMap->Add(*(new String(*pColumn)), *(new String(*pValue)));
- index++;
+ for (i = 0; i < columnCount; ++i) // column-value pairs
+ {
+ int length = -1;
+ int ret = request.Read(&length, sizeof(int));
+ SysTryCatch(NID_APP, ret > 0, , E_SYSTEM, "[%s] Failed to receive request.",
+ GetErrorMessage(GetLastResult()));
+
+ char* pColumn = new (std::nothrow) char[length + 1];
+ ret = request.Read(pColumn, length);
+ SysTryCatch(NID_APP, ret > 0, delete pColumn, E_SYSTEM, "[%s] Failed to receive request.",
+ GetErrorMessage(GetLastResult()));
+ pColumn[length] = '\0';
+ SysLog(NID_APP, "[DC_PROV_RECV] column[%d]: %s", i, pColumn);
+
+ ret = request.Read(&length, sizeof(int));
+ SysTryCatch(NID_APP, ret > 0, delete pColumn, E_SYSTEM, "[%s] Failed to receive request.",
+ GetErrorMessage(GetLastResult()));
+
+ char* pValue = new (std::nothrow) char[length + 1];
+ ret = request.Read(pValue, length);
+ if (ret == 0)
+ {
+ SysLogException(NID_APP, E_SYSTEM, "[%s] Failed to receive request.", GetErrorMessage(GetLastResult()));
+ delete pColumn;
+ delete pValue;
+ }
+ pValue[length] = '\0';
+ SysLog(NID_APP, "[DC_PROV_RECV] value[%d]: %s", i, pValue);
+
+ pInsertMap->Add(new (std::nothrow) String(pColumn), new (std::nothrow) String(pValue));
+ delete pColumn;
+ delete pValue;
+ }
+ }
+ else
+ {
+ i = 0;
+ index = 0;
+ while (i < columnCount * 2) // request list: column-value pairs
+ {
+ pColumn = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_INSERTMAP + i++));
+ SysTryCatch(NID_APP, pColumn != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
+ SysLog(NID_APP, "[DC_PROV_RECV] column[%d]: %ls", index, pColumn->GetPointer());
+
+ pValue = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_INSERTMAP + i++));
+ SysTryCatch(NID_APP, pValue != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
+ SysLog(NID_APP, "[DC_PROV_RECV] value[%d]: %ls", index, pValue->GetPointer());
+
+ pInsertMap->Add(new (std::nothrow) String(*pColumn), new (std::nothrow) String(*pValue));
+ index++;
+ }
+ }
+
+ if (pTmpPath)
+ {
+ r = File::Remove(*pTmpPath);
+ SysTryLog(NID_APP, !IsFailed(r), "Failed to remove result: %ls", pTmpPath->GetPointer());
}
pSqlListener->OnSqlDataControlInsertRequestReceived(reqId, providerId, *pDataId, *pInsertMap);
SysTryReturnVoidResult(NID_APP, pUpdateMap, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory.");
pUpdateMap->Construct();
- i = 0;
- index = 0;
- while (i < columnCount * 2) // request list[2]: column-value pairs
+ SysLog(NID_APP, "[DC_PROV_RECV] version: %ls", version.GetPointer());
+ if (version == L"ver_2.1.0.2")
{
- pColumn = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_UPDATEMAP + i++));
- SysTryCatch(NID_APP, pColumn != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
- SysLog(NID_APP, "[DC_PROV_RECV] column[%d]: %ls", index, pColumn->GetPointer());
+ pTmpPath = dynamic_cast< String* >(pList->GetAt(2)); // request list[2]: path
+ SysTryCatch(NID_APP, pTmpPath != null, , E_SYSTEM, "[E_SYSTEM] invalid request");
+ SysLog(NID_APP, "[DC_PROV_RECV] request: %ls", pTmpPath->GetPointer());
- pValue = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_UPDATEMAP + i++));
- SysTryCatch(NID_APP, pValue != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
- SysLog(NID_APP, "[DC_PROV_RECV] value[%d]: %ls", index, pValue->GetPointer());
+ File request;
+ r = request.Construct(*pTmpPath, "r");
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to open request (%ls).",
+ GetErrorMessage(r), pTmpPath->GetPointer());
- pUpdateMap->Add(*(new String(*pColumn)), *(new String(*pValue)));
- index++;
+ for (i = 0; i < columnCount; ++i) // column-value pairs
+ {
+ int length = -1;
+ int ret = request.Read(&length, sizeof(int));
+ SysTryCatch(NID_APP, ret > 0, , E_SYSTEM, "[%s] Failed to receive request.",
+ GetErrorMessage(GetLastResult()));
+
+ char* pColumn = new (std::nothrow) char[length + 1];
+ ret = request.Read(pColumn, length);
+ SysTryCatch(NID_APP, ret > 0, delete pColumn, E_SYSTEM, "[%s] Failed to receive request.",
+ GetErrorMessage(GetLastResult()));
+ pColumn[length] = '\0';
+ SysLog(NID_APP, "[DC_PROV_RECV] column[%d]: %s", i, pColumn);
+
+ ret = request.Read(&length, sizeof(int));
+ SysTryCatch(NID_APP, ret > 0, delete pColumn, E_SYSTEM, "[%s] Failed to receive request.",
+ GetErrorMessage(GetLastResult()));
+
+ char* pValue = new (std::nothrow) char[length + 1];
+ ret = request.Read(pValue, length);
+ if (ret == 0)
+ {
+ SysLogException(NID_APP, E_SYSTEM, "[%s] Failed to receive request.", GetErrorMessage(GetLastResult()));
+ delete pColumn;
+ delete pValue;
+ }
+ pValue[length] = '\0';
+ SysLog(NID_APP, "[DC_PROV_RECV] value[%d]: %s", i, pValue);
+
+ pUpdateMap->Add(new (std::nothrow) String(pColumn), new (std::nothrow) String(pValue));
+ delete pColumn;
+ delete pValue;
+ }
+
+ // request list: where clause
+ pWhere = dynamic_cast< String* >(pList->GetAt(3));
+ SysTryCatch(NID_APP, pWhere != null, , E_SYSTEM, "[E_SYSTEM] invalid request");
}
+ else
+ {
+ i = 0;
+ index = 0;
+ while (i < columnCount * 2) // request list: column-value pairs
+ {
+ pColumn = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_UPDATEMAP + i++));
+ SysTryCatch(NID_APP, pColumn != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
+ SysLog(NID_APP, "[DC_PROV_RECV] column[%d]: %ls", index, pColumn->GetPointer());
- // request list: where clause
- pWhere = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_UPDATEMAP + i));
- SysTryCatch(NID_APP, pWhere, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
+ pValue = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_UPDATEMAP + i++));
+ SysTryCatch(NID_APP, pValue != null, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
+ SysLog(NID_APP, "[DC_PROV_RECV] value[%d]: %ls", index, pValue->GetPointer());
+
+ pUpdateMap->Add(new (std::nothrow) String(*pColumn), new (std::nothrow) String(*pValue));
+ index++;
+ }
+
+ // request list: where clause
+ pWhere = dynamic_cast< String* >(pList->GetAt(_DATACONTROL_PACKET_INDEX_UPDATEMAP + i));
+ SysTryCatch(NID_APP, pWhere, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] invalid request");
+ }
if (pWhere->Equals(empty) == true)
{
SysLog(NID_APP, "[DC_PROV_RECV] pWhere: %ls", pWhere->GetPointer());
}
+ if (pTmpPath)
+ {
+ r = File::Remove(*pTmpPath);
+ SysTryLog(NID_APP, !IsFailed(r), "Failed to remove result: %ls", pTmpPath->GetPointer());
+ }
+
pSqlListener->OnSqlDataControlUpdateRequestReceived(reqId, providerId, *pDataId, *pUpdateMap, pWhere);
SysLog(NID_APP, "[DC_PROV_RECV] caller app: %ls, requestType: %d, caller req: %ls, provider: %ls, data: %ls, pUpdateMap: 0x%x, pWhere: 0x%x",
using namespace Tizen::Base::Utility;
using namespace Tizen::Io;
-//extern const char* _DATACONTROL_RESULTSET_DIR;
-
namespace
{
GetErrorMessage(E_INVALID_FORMAT));
}
- ArrayList* pRetArg = null;
- pRetArg = new (std::nothrow) ArrayList();
- SysTryReturn(NID_APP, pRetArg != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
- GetErrorMessage(E_OUT_OF_MEMORY));
-
- pRetArg->Construct();
-
_AppControlRegistry* pRegs = _AppControlRegistry::GetInstance();
-
- pRetArg = pRegs->FindAppControlListN(pOperationId, pUriScheme, pMimeType, pCategory);
+ ArrayList* pRetArg = pRegs->FindAppControlListN(pOperationId, pUriScheme, pMimeType, pCategory);
if ((pRetArg == null) || (pRetArg->GetCount() == 0))
{
// "The length of appid exceeded the limit(%d).",
// WIDGET_APP_MAX_APPID_LENGTH);
- AppControl* pAc = _AppControlRegistry::GetInstance()->GetAppControlN(appId, TIZEN_OPERATION_MAIN);
- SysTryReturnResult(NID_APP, pAc != null, E_OBJ_NOT_FOUND, "The target application (%ls) is not found.", appId.GetPointer());
+ std::unique_ptr<AppControl> pAc(_AppControlRegistry::GetInstance()->GetAppControlN(appId, TIZEN_OPERATION_MAIN));
+ SysTryReturnResult(NID_APP, pAc.get() != null, E_OBJ_NOT_FOUND, "The target application (%ls) is not found.", appId.GetPointer());
if (pArguments)
{
#include <cstdlib>
#include <pthread.h>
#include <typeinfo>
+#include <glib.h>
#include <FBaseInteger.h>
#include <FBaseSysLog.h>
_DataControlManager::_DataControlManager(void)
: __pDataControlRequestList(null)
+ , __uniqueId(-1)
{
__pDataControlRequestList = new (std::nothrow) HashMap(SingleObjectDeleter);
SysTryReturnVoidResult(NID_APP, __pDataControlRequestList != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
__pDataControlRequestList->Remove(reqId);
}
+int
+_DataControlManager::GetUniqueId(void)
+{
+ //++__uniqueId;
+ //__sync_fetch_and_add(&__uniqueId, 1);
+ g_atomic_int_inc(&__uniqueId);
+ return __uniqueId;
+}
+
}} // Tizen::App
void RemoveRequestInfo(Tizen::Base::Integer& reqId);
+ int GetUniqueId(void);
+
private:
_DataControlManager(void);
private:
static _DataControlManager* __pDataControlManagerInstance;
Tizen::Base::Collection::HashMap* __pDataControlRequestList;
+ int __uniqueId;
}; // _DataControlManager
using namespace Tizen::Base::Collection;
using namespace Tizen::Io;
-extern const char* _DATACONTROL_RESULTSET_DIR;
+extern const char* _DATACONTROL_RESULT_DIR;
namespace Tizen { namespace App
{
SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM,
"[E_SYSTEM] The method cannot proceed due to a severe system error.");
- String tempFilePath(_DATACONTROL_RESULTSET_DIR);
+ String tempFilePath(_DATACONTROL_RESULT_DIR);
tempFilePath.Append(callerAppId);
tempFilePath.Append(callerReqId);
pTempFilePath = new (std::nothrow) String(tempFilePath);
long long argSize = 0;
if (addItemCount > 0)
{
- if (version == L"ver_2.1.0.1")
+ if (version == L"ver_2.1.0.1" || version == L"ver_2.1.0.2")
{
- String tempFilePath(_DATACONTROL_RESULTSET_DIR);
+ String tempFilePath(_DATACONTROL_RESULT_DIR);
tempFilePath.Append(callerAppId);
tempFilePath.Append(callerReqId);
pTempFilePath = new (std::nothrow) String(tempFilePath);
SysTryCatch(NID_APP, pValue != null, r = E_INVALID_ARG, E_INVALID_ARG,
"[E_INVALID_ARG] The specified pResultValueList parameter should be String class.");
- int length = pValue->GetLength();
- r = pFile->Write(&length, sizeof(int)); // data length
- SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to write result.", GetErrorMessage(r));
-
unique_ptr< char[] > pData(_StringConverter::CopyToCharArrayN(*pValue));
SysTryCatch(NID_APP, pData != null, , GetLastResult(), "[%s] Invalid result value",
GetErrorMessage(GetLastResult()));
- r = pFile->Write(pData.get(), strlen(pData.get())); // data
- SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[E_SYSTEM] Failed to write result.", GetErrorMessage(r));
- argSize += pValue->GetLength() * sizeof(wchar_t);
+ int length = strlen(pData.get());
+ r = pFile->Write(&length, sizeof(int)); // data length
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send result.", GetErrorMessage(r));
+
+ r = pFile->Write(pData.get(), length); // data
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send result.", GetErrorMessage(r));
}
pFile->Flush();
}
pResultArgList->Add(*pResultValue); // list[3] ~
argSize += pValue->GetLength() * sizeof(wchar_t);
}
+ SysTryCatch(NID_APP, argSize <= _MAX_ARGUMENT_SIZE, r = E_MAX_EXCEEDED, E_MAX_EXCEEDED,
+ "[E_MAX_EXCEEDED] The size of sending argument (%d) exceeds the maximum limit.", argSize);
}
}
- SysTryCatch(NID_APP, argSize <= _MAX_ARGUMENT_SIZE, r = E_MAX_EXCEEDED, E_MAX_EXCEEDED,
- "[E_MAX_EXCEEDED] The size of sending argument (%d) exceeds the maximum limit.", argSize);
}
break;
}
if (resultCount > 0)
{
- if (version == L"ver_2.1.0.1")
+ if (version == L"ver_2.1.0.1" || version == L"ver_2.1.0.2")
{
pPath = dynamic_cast< String* >(pResultList->GetAt(3)); // result list[3]
SysTryCatch(NID_APP, pPath, delete pResultValueList, E_SYSTEM, "[E_SYSTEM] invalid result");
_PackageManagerProxy::~_PackageManagerProxy(void)
{
+ delete __pIpcClient;
}
result
_ServiceAppImpl::_ServiceAppImpl(ServiceApp* pServiceApp)
: __pAppImpl(_AppImpl::GetInstance())
, __pServiceApp(pServiceApp)
- , __pLifeDurationEventListener(null)
+ , __pAppTerminatingInternalEventListener(null)
, __pLifeDurationTimer(null)
, __lifeDuration(0)
+ , __pauseLifeDurationTimer(false)
{
__pServiceAppImpl = this;
SysTryReturnVoidResult(NID_APP, __pAppImpl, E_INVALID_STATE, "[E_INVALID_STATE] Getting internal instance failed.");
free(pOperation);
}
- if( __lifeDuration > 0)
+ if( __lifeDuration > 0 && __pauseLifeDurationTimer == false)
{
SetLifeDurationTimer(__lifeDuration);
}
_ServiceAppImpl::OnServiceAppImplTerminating(bool forcedTermination)
{
SysTryReturn(NID_APP, __pServiceApp != null, false, E_INVALID_STATE, "[E_INVALID_STATE] Getting ServiceApp instance failed.");
+
+ if( __pAppTerminatingInternalEventListener)
+ {
+ __pAppTerminatingInternalEventListener->OnApplicationTerminated(L"", 0);
+ }
return __pServiceApp->OnAppTerminating(*(AppRegistry::GetInstance()), forcedTermination);
}
__pLifeDurationTimer->Cancel();
SysLog(NID_APP, "Life duration timer is cancelled.", lifeDuration );
}
- __pLifeDurationTimer->Start(__lifeDuration);
- SysLog(NID_APP, "Life duration timer is started with timeout.(%d)", lifeDuration );
+
+ if( __pauseLifeDurationTimer == false)
+ {
+ __pLifeDurationTimer->Start(lifeDuration);
+ SysLog(NID_APP, "Life duration timer is started with timeout.(%d)", lifeDuration );
+ }
}
void
{
SysLog(NID_APP, "Life duration timer is expired, so terminating the application.");
timer.Cancel();
- if( __pLifeDurationEventListener)
+ App::GetInstance()->Terminate();
+}
+
+void
+_ServiceAppImpl::SetAppTerminatingInternalEventListener(_IAppEventListener* pListener)
+{
+ __pAppTerminatingInternalEventListener = pListener;
+}
+
+void
+_ServiceAppImpl::PauseLifeDurationTimer(void)
+{
+ __pauseLifeDurationTimer = true;
+ if( __pLifeDurationTimer)
{
- __pLifeDurationEventListener->OnApplicationTerminated(L"", 0);
+ __pLifeDurationTimer->Cancel();
+ SysLog(NID_APP, "Life duration timer is paused." );
}
- App::GetInstance()->Terminate();
}
void
-_ServiceAppImpl::SetLifeDurationEventListener(_IAppEventListener* pListener)
+_ServiceAppImpl::ResumeLifeDurationTimer(void)
{
- __pLifeDurationEventListener = pListener;
+ __pauseLifeDurationTimer = false;
+// SetLifeDurationTimer(__lifeDuration);
+ SysLog(NID_APP, "Life duration timer will be resumed." );
}
} } //Tizen::App
#include <FBaseColIMap.h>
#include <FBaseColIMapEnumerator.h>
#include <FBaseRtIEventArg.h>
+#include <FBaseSysLog.h>
#include <FIoFile.h>
+#include <FAppApp.h>
#include <FAppSqlDataControl.h>
#include <FAppISqlDataControlResponseListener.h>
-#include <FBaseSysLog.h>
-
+#include <FBase_StringConverter.h>
#include <FIo_DataControlResultSetEnumerator.h>
#include "FApp_AppControlManager.h"
#include "FApp_AppArg.h"
#include "FApp_DataControlManager.h"
+#define DATACONTROL_PROTOCOL_VER_2_1_0_2 // ver_2.1.0.2
+
using namespace std;
using namespace Tizen::Base;
static const int MAX_REQUEST_COUNT = 128;
static const int _MAX_ARGUMENT_SIZE = 16384; // 16KB
+static const int _MAX_REQUEST_ARGUMENT_SIZE = 1048576; // 1MB
+static const char* _DATACONTROL_REQUEST_DIR = "/tmp/osp/DataControlRequest/\0";
class _SqlDataControlEventArg
: public IEventArg
int columnCount = 0;
int id = 0;
int i = 0;
+ int uniqueId = -1;
+ File request;
+ IMapEnumerator* pMapEnum = null;
result r = E_SUCCESS;
SysLog(NID_APP, "[DC_CALLER_SEND] SqlDataControl INSERT");
columnCount = insertMap.GetCount();
SysTryReturnResult(NID_APP, columnCount > 0, E_INVALID_ARG, "The specified insertMap parameter is empty.");
- ArrayList* pArgList = new ArrayList();
+ ArrayList* pArgList = new (std::nothrow) ArrayList();
pArgList->Construct();
- pArgList->Add(*(new String(dataId))); // list(0): data ID
+ pArgList->Add(new (std::nothrow) String(dataId)); // list[0]: data ID
long long argSize = dataId.GetLength() * sizeof(wchar_t);
- pArgList->Add(*(new String(Integer::ToString(columnCount)))); // list(1): inserted column count
+ pArgList->Add(new (std::nothrow) String(Integer::ToString(columnCount))); // list[1]: inserted column count
SysLog(NID_APP, "[DC_CALLER_SEND] inserted column count: %d", columnCount);
- IMapEnumerator* pMapEnum = const_cast< IMap* >(&insertMap)->GetMapEnumeratorN();
- while (pMapEnum->MoveNext() == E_SUCCESS) // list(2): column-value pairs
+#ifdef DATACONTROL_PROTOCOL_VER_2_1_0_2
+ String tmpPath(_DATACONTROL_REQUEST_DIR);
+ tmpPath.Append(App::GetInstance()->GetAppId());
+
+ _DataControlManager* pDcMgr = _DataControlManager::GetInstance();
+ SysTryCatch(NID_APP, pDcMgr, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to get _DataControlManager instance.");
+ uniqueId = pDcMgr->GetUniqueId();
+
+ tmpPath.Append(uniqueId);
+ SysLog(NID_APP, "[DC_CALLER_SEND] request: %ls", tmpPath.GetPointer());
+
+ r = request.Construct(tmpPath, L"w+", true);
+ SysTryCatch(NID_APP, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[%s] Failed to create request (%ls).",
+ GetErrorMessage(r), tmpPath.GetPointer());
+
+ pArgList->Add(new (std::nothrow) String(tmpPath)); // list[2]: path
+#endif
+
+ pMapEnum = const_cast< IMap* >(&insertMap)->GetMapEnumeratorN();
+ while (pMapEnum->MoveNext() == E_SUCCESS) // list: column-value pairs
{
+#ifdef DATACONTROL_PROTOCOL_VER_2_1_0_2
+ int length = 0;
+ String* pColumn = null;
+ String* pValue = null;
+ unique_ptr< char[] > pData(null);
+
+ pColumn = dynamic_cast< String* >(pMapEnum->GetKey());
+ SysTryCatch(NID_APP, pColumn != null, r = E_INVALID_ARG, E_INVALID_ARG,
+ "[E_INVALID_ARG] The object is not String class.");
+
+ pData.reset(_StringConverter::CopyToCharArrayN(*pColumn));
+ SysTryCatch(NID_APP, pData != null, r = GetLastResult(), GetLastResult(), "[%s] Invalid request value",
+ GetErrorMessage(GetLastResult()));
+
+ length = strlen(pData.get());
+ r = request.Write(&length, sizeof(int)); // data length
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ r = request.Write(pData.get(), length); // data
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ pValue = dynamic_cast< String* >(pMapEnum->GetValue());
+ SysTryCatch(NID_APP, pValue != null, r = E_INVALID_ARG, E_INVALID_ARG,
+ "[E_INVALID_ARG] The object is not String class.");
+
+ pData.reset(_StringConverter::CopyToCharArrayN(*pValue));
+ SysTryCatch(NID_APP, pData != null, r = GetLastResult(), GetLastResult(), "[%s] Invalid request value",
+ GetErrorMessage(GetLastResult()));
+
+ length = strlen(pData.get());
+ r = request.Write(&length, sizeof(int)); // data length
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ r = request.Write(pData.get(), length); // data
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ argSize += pColumn->GetLength() * sizeof(wchar_t);
+ argSize += pValue->GetLength() * sizeof(wchar_t);
+#else
String* pColumn = dynamic_cast< String* >(pMapEnum->GetKey());
SysTryCatch(NID_APP, pColumn != null, r = E_INVALID_ARG, E_INVALID_ARG,
"[E_INVALID_ARG] The object is not String class.");
argSize += pColumn->GetLength() * sizeof(wchar_t);
argSize += pValue->GetLength() * sizeof(wchar_t);
i++;
+#endif
}
- SysTryCatch(NID_APP, argSize <= _MAX_ARGUMENT_SIZE, r = E_MAX_EXCEEDED, E_MAX_EXCEEDED,
+ SysTryCatch(NID_APP, argSize <= _MAX_REQUEST_ARGUMENT_SIZE, r = E_MAX_EXCEEDED, E_MAX_EXCEEDED,
"[E_MAX_EXCEEDED] The size of sending argument (%d) exceeds the maximum limit.", argSize);
+#ifdef DATACONTROL_PROTOCOL_VER_2_1_0_2
+ request.Flush();
+#endif
+
r = StartSqlDataControl(_DATACONTROL_REQUEST_TYPE_SQL_INSERT, pArgList, &id);
SysTryCatch(NID_APP, !IsFailed(r), , r, "[%s] Propagating to caller...", GetErrorMessage(r));
int columnCount = 0;
int id = 0;
int i = 0;
+ int uniqueId = -1;
+ File request;
+ IMapEnumerator* pMapEnum = null;
result r = E_SUCCESS;
SysLog(NID_APP, "[DC_CALLER_SEND] SqlDataControl UPDATE");
ArrayList* pArgList = new ArrayList();
pArgList->Construct();
- pArgList->Add(*(new String(dataId))); // list(0): data ID
+ pArgList->Add(new (std::nothrow) String(dataId)); // list[0]: data ID
long long argSize = dataId.GetLength() * sizeof(wchar_t);
- pArgList->Add(*(new String(Integer::ToString(columnCount)))); // list(1): updated column count
+ pArgList->Add(new (std::nothrow) String(Integer::ToString(columnCount))); // list[1]: updated column count
SysLog(NID_APP, "[DC_CALLER_SEND] updated column count: %d", columnCount);
- IMapEnumerator* pMapEnum = const_cast< IMap* >(&updateMap)->GetMapEnumeratorN();
- while (pMapEnum->MoveNext() == E_SUCCESS) // list(2): column-value pairs
+#ifdef DATACONTROL_PROTOCOL_VER_2_1_0_2
+ String tmpPath(_DATACONTROL_REQUEST_DIR);
+ tmpPath.Append(App::GetInstance()->GetAppId());
+
+ _DataControlManager* pDcMgr = _DataControlManager::GetInstance();
+ SysTryCatch(NID_APP, pDcMgr, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to get _DataControlManager instance.");
+ uniqueId = pDcMgr->GetUniqueId();
+
+ tmpPath.Append(uniqueId);
+ SysLog(NID_APP, "[DC_CALLER_SEND] request: %ls", tmpPath.GetPointer());
+
+ r = request.Construct(tmpPath, L"w+", true);
+ SysTryCatch(NID_APP, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[%s] Failed to create request (%ls).",
+ GetErrorMessage(r), tmpPath.GetPointer());
+
+ pArgList->Add(new (std::nothrow) String(tmpPath)); // list[2]: path
+#endif
+
+ pMapEnum = const_cast< IMap* >(&updateMap)->GetMapEnumeratorN();
+ while (pMapEnum->MoveNext() == E_SUCCESS) // list: column-value pairs
{
+#ifdef DATACONTROL_PROTOCOL_VER_2_1_0_2
+ int length = 0;
+ String* pColumn = null;
+ String* pValue = null;
+ unique_ptr< char[] > pData(null);
+
+ pColumn = dynamic_cast< String* >(pMapEnum->GetKey());
+ SysTryCatch(NID_APP, pColumn != null, r = E_INVALID_ARG, E_INVALID_ARG,
+ "[E_INVALID_ARG] The object is not String class.");
+
+ pData.reset(_StringConverter::CopyToCharArrayN(*pColumn));
+ SysTryCatch(NID_APP, pData != null, r = GetLastResult(), GetLastResult(), "[%s] Invalid request value",
+ GetErrorMessage(GetLastResult()));
+
+ length = strlen(pData.get());
+ r = request.Write(&length, sizeof(int)); // data length
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ r = request.Write(pData.get(), length); // data
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ pValue = dynamic_cast< String* >(pMapEnum->GetValue());
+ SysTryCatch(NID_APP, pValue != null, r = E_INVALID_ARG, E_INVALID_ARG,
+ "[E_INVALID_ARG] The object is not String class.");
+
+ pData.reset(_StringConverter::CopyToCharArrayN(*pValue));
+ SysTryCatch(NID_APP, pData != null, r = GetLastResult(), GetLastResult(), "[%s] Invalid request value",
+ GetErrorMessage(GetLastResult()));
+
+ length = strlen(pData.get());
+ r = request.Write(&length, sizeof(int)); // data length
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ r = request.Write(pData.get(), length); // data
+ SysTryCatch(NID_APP, !IsFailed(r), , E_SYSTEM, "[%s] Failed to send request.", GetErrorMessage(r));
+
+ argSize += pColumn->GetLength() * sizeof(wchar_t);
+ argSize += pValue->GetLength() * sizeof(wchar_t);
+#else
String* pColumn = dynamic_cast< String* >(pMapEnum->GetKey());
SysTryCatch(NID_APP, pColumn != null, r = E_INVALID_ARG, E_INVALID_ARG,
"[E_INVALID_ARG] The object is not String class.");
argSize += pColumn->GetLength() * sizeof(wchar_t);
argSize += pValue->GetLength() * sizeof(wchar_t);
i++;
+#endif
}
- if (pWhere != null) // list(3): where clause
+#ifdef DATACONTROL_PROTOCOL_VER_2_1_0_2
+ request.Flush();
+#endif
+
+ if (pWhere != null) // list: where clause
{
- pArgList->Add(*(new String(*pWhere)));
+ pArgList->Add(new (std::nothrow) String(*pWhere));
argSize += pWhere->GetLength() * sizeof(wchar_t);
SysLog(NID_APP, "[DC_CALLER_SEND] pWhere: %ls", pWhere->GetPointer());
}
else
{
- pArgList->Add(*(new String(L"NULL")));
+ pArgList->Add(new (std::nothrow) String(L"NULL"));
}
- SysTryCatch(NID_APP, argSize <= _MAX_ARGUMENT_SIZE, r = E_MAX_EXCEEDED, E_MAX_EXCEEDED,
+ SysTryCatch(NID_APP, argSize <= _MAX_REQUEST_ARGUMENT_SIZE, r = E_MAX_EXCEEDED, E_MAX_EXCEEDED,
"[E_MAX_EXCEEDED] The size of sending argument (%d) exceeds the maximum limit.", argSize);
r = StartSqlDataControl(_DATACONTROL_REQUEST_TYPE_SQL_UPDATE, pArgList, &id);
static void OnTerminate(void* user_data);
/**
- * Called when an orintation event occurs.
- *
- * @since 2.1
- * @param[in] orientation The information about the orientation event
- */
- static void OnDeviceOrientationChanged(app_device_orientation_e orientation, void* user_data);
-
- /**
* Called when the system memory is running low
*
* @since 2.1
static void OnLowMemory(void* user_data);
/**
- * Called when the battery power is running low
- *
- * @since 2.1
- * @param[in] user_data The user data passed from the callback registration function
- * @remarks This is a system dependent callback function
- */
- static void OnLowBattery(void* user_data);
-
- /**
* Called when language setting changes
*
* @since 2.1
result Execute(void);
- void SetLifeDurationEventListener(_IAppEventListener* pListener);
+ void SetAppTerminatingInternalEventListener(_IAppEventListener* pListener);
+
+ void PauseLifeDurationTimer(void);
+
+ void ResumeLifeDurationTimer(void);
private:
/**
ServiceApp* __pServiceApp;
- _IAppEventListener* __pLifeDurationEventListener;
+ _IAppEventListener* __pAppTerminatingInternalEventListener;
Tizen::Base::Runtime::Timer* __pLifeDurationTimer;
int __lifeDuration;
+ bool __pauseLifeDurationTimer;
+
friend class ServiceApp;
}; // _ServiceAppImpl
int installedTime = 0;
pkgmgrinfo_installed_storage storage = PMINFO_INTERNAL_STORAGE;
bool removable = true;
+ bool preloaded = true;
std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(packageId));
SysTryReturnResult(NID_APP, pPackageId, E_OUT_OF_MEMORY, "pPackageId is null");
SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_removable() is failed. result = [%d]", result);
}
+ result = pkgmgrinfo_pkginfo_is_preload(__packageInfoHandle, &preloaded);
+ if (result == PMINFO_R_OK)
+ {
+ SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_preload(): preloaded = [%d]", preloaded);
+
+ if (preloaded == false)
+ {
+ __downloaded = true;
+ }
+ }
+ else
+ {
+ SysLog(NID_APP, "pkgmgrinfo_pkginfo_is_preload() is failed. result = [%d]", result);
+ }
+
result = pkgmgrinfo_pkginfo_get_description(__packageInfoHandle, &pDescription);
if (result == PMINFO_R_OK)
{
delete __pMutex;
__pMutex = null;
}
+ g_main_context_unref(__pGMainContext);
}
result
int eventFd = -1;
__pGMainContext = pGMainContext;
- g_main_context_ref(__pGMainContext);
eventFd = eventfd(0, 0);
SysTryCatch(NID_BASE_RT, -1 != eventFd, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to open eventfd.");
, __pEventDispatcher(null)
, __pEventManager(null)
, __pEvent(null)
+ , __pGmainContext(null)
{
}
delete __pEventDispatcher;
delete __pEventManager;
delete __pEvent;
+ g_main_context_unref(__pGmainContext);
}
result
__pEventDispatcher = new (std::nothrow) _EventDispatcher();
__pEventDispatcher->Construct(pGMainContext);
+ __pGmainContext = pGMainContext;
return E_SUCCESS;
CATCH:
_EventDispatcher* __pEventDispatcher;
_EventManager* __pEventManager;
_EventDrivenThreadEvent* __pEvent;
+ GMainContext* __pGmainContext;
Tizen::Base::Collection::LinkedListT <_EventDrivenThreadEventArg*> __pendingEvents;
};
using namespace Tizen::Base::Collection;
using namespace Tizen::App;
-const char* _DATACONTROL_RESULTSET_DIR = "/tmp/osp/DataControlResultSet/\0";
+const char* _DATACONTROL_RESULT_DIR = "/tmp/osp/DataControlResult/\0";
namespace Tizen { namespace Io
{
result
_DataControlResultSetImpl::FillWith(IDbEnumerator* pDbEnum)
{
- String tempFilePath(_DATACONTROL_RESULTSET_DIR);
+ String tempFilePath(_DATACONTROL_RESULT_DIR);
String columnName;
String appId;
String reqType;
_IpcClient::_IpcClient(void)
: __pReverseSource(null)
- , __fdCount(0)
, __pFdLock(null)
, __pListener(null)
{
{
int pid;
bool reverse;
- char pkgId[256];
- char appExecutableName[256];
};
result
socketNameLength = socketName.size() + 1;
SysTryReturnResult(NID_IO, socketNameLength < 108, E_INVALID_ARG, "Server name is too long.");
- if (__fdCount == 0)
- {
- // Set an pkgId
- String pkgId = _AppInfo::GetPackageId();
- int length = (pkgId.GetLength() + 1) * sizeof(wchar_t);
- if (length > 255)
- {
- length = 255;
- }
-
- SysTryReturnResult(NID_IO, pkgId.GetLength() > 0, E_SYSTEM, "AppId dose not exist.");
-
- memcpy(helloMessage.pkgId, pkgId.GetPointer(), length);
-
- // Set an executableName
- String appExecutableName = _AppInfo::GetAppExecutableName();
- length = (appExecutableName.GetLength() + 1) * sizeof(wchar_t);
- if (length > 255)
- {
- length = 255;
- }
-
- if (appExecutableName.GetLength() != 0)
- {
- memcpy(helloMessage.appExecutableName, appExecutableName.GetPointer(), length);
- }
- }
-
client = socket(AF_UNIX, SOCK_STREAM, 0);
SysTryCatch(NID_IO, client != -1, r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Failed to create a socket : %s.", strerror(errno));
}
else
{
- ++__fdCount;
-
ReleaseFd(client);
}
GSource* __pReverseSource;
std::vector <int> __fds;
- int __fdCount;
Tizen::Base::Runtime::Mutex* __pFdLock;
Tizen::Base::String __name;
_IIpcClientEventListener* __pListener;
{
BN_clear_free(pKea->pPrivKey2);
}
+
+ delete pKea;
}
result
}
AlgorithmIdentifier::~AlgorithmIdentifier(void)
{
-
+ delete __pAlgorithmIdentifierImpl;
}
result
InitialVector::~InitialVector(void)
{
-
+ delete __pInitialVectorImpl;
}
result
Pkcs05PbEs2Parameters::~Pkcs05PbEs2Parameters(void)
{
-
+ delete __pPkcs05PbEs2ParametersImpl;
}
result
Pkcs05PbKdf2Parameters::~Pkcs05PbKdf2Parameters(void)
{
-
+ delete __pPkcs05PbKdf2ParametersImpl;
}
result
Pkcs05PbMacParameters::~Pkcs05PbMacParameters(void)
{
-
+ delete __pPkcs05PbMacParametersImpl;
}
result
Pkcs05Schemes::~Pkcs05Schemes(void)
{
-
+ delete __pPkcs05SchemesImpl;
}
result
Pkcs08Attribute::~Pkcs08Attribute(void)
{
-
+ delete __pPkcs08AttributeImpl;
}
result
Pkcs08AttributeValue::~Pkcs08AttributeValue(void)
{
-
+ delete __pPkcs08AttributeValueImpl;
}
result
//Default Destructor
Pkcs08EncryptedPrivateKeyInfo::~Pkcs08EncryptedPrivateKeyInfo(void)
{
-
+ delete __pPkcs08EncryptedPrivateKeyInfoImpl;
}
result
//Default Destructor
Pkcs08PrivateKeyInfo::~Pkcs08PrivateKeyInfo(void)
{
-
+ delete __pPkcs08PrivateKeyInfoImpl;
}
Rc2CbcParameters::~Rc2CbcParameters(void)
{
-
+ delete __pRc2CbcParametersImpl;
}
result
SysAssertf(__attributeType.GetLength() <= 0, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+ SysTryReturnResult(NID_SEC_CRYPTO, attrType.GetLength() > 0, E_INVALID_ARG, "[E_INVALID_ARG] The specified input parameter is invalid.");
+
//Initialize the Attribute instance with Attribute type
__attributeType = attrType;
_IpcServer* pIpcServer; /**< the pointer to an _ IpcServer */
GIOChannel* pReverseChannel; /**< the channel for sending reverse message */
std::vector <struct _ChannelInfo*> channels; /**< the set of channels associated with a client */
- Tizen::Base::String pkgId;
- Tizen::Base::String appExecutableName;
+ Tizen::Base::String appId;
};
Tizen::Base::String __name;
#include <ipc/ipc_message.h>
+#include <app_manager.h>
+
#include <FBaseRtMutex.h>
#include <FBaseSysLog.h>
#include <FBase_StringConverter.h>
{
int pid;
bool reverse; // true if the connection is for reverse message
- char pkgId[256];
- char appExecutableName[256];
};
gboolean
server = g_io_channel_unix_get_fd(source);
client = accept(server, (struct sockaddr*) &clientAddress, &clientLen);
- SysTryCatch(NID_IO, client != -1, , E_SYSTEM, "[E_SYSTEM] Accept failed.");
+ SysTryCatch(NID_IO, client != -1, ,E_SYSTEM, "[E_SYSTEM] Accept failed.");
read(client, &helloMessage, sizeof(helloMessage));
- helloMessage.pkgId[255] = '\0';
- helloMessage.appExecutableName[255] = '\0';
pChannel = g_io_channel_unix_new(client);
SysTryCatch(NID_IO, pChannel != null, , E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Not enough memory.");
pClientInfo->pIpcServer = pIpcServer;
pClientInfo->clientId = helloMessage.pid;
- pClientInfo->pkgId.Append((wchar_t*) helloMessage.pkgId);
- pClientInfo->appExecutableName.Append((wchar_t*) helloMessage.appExecutableName);
+
+ char* pAppId = NULL;
+ int ret = app_manager_get_app_id(helloMessage.pid, &pAppId);
+ SysTryCatch(NID_IO, ret >= 0, ,E_SYSTEM, "[E_SYSTEM] Failed to get_app_id: %d", ret);
+
+ pClientInfo->appId = pAppId;
+ free(pAppId);
+
pClientInfo->pReverseChannel = null;
pIpcServer->__clients[helloMessage.pid] = pClientInfo;
-
pIpcServer->__pCurrentClientInfo = pClientInfo;
pIpcServer->__pListener->OnIpcClientConnected(*pIpcServer, helloMessage.pid);
pIpcServer->__pCurrentClientInfo = null;
if (__pCurrentClientInfo)
{
- return __pCurrentClientInfo->pkgId;
+ String pkgId;
+ __pCurrentClientInfo->appId.SubString(0, 10, pkgId);
+
+ return pkgId;
}
return nullString;
if (__pCurrentClientInfo)
{
- return __pCurrentClientInfo->appExecutableName;
+ String appName;
+ __pCurrentClientInfo->appId.SubString(11, appName);
+
+ return appName;
}
return nullString;
if (__pCurrentClientInfo)
{
- return __pCurrentClientInfo->pkgId;
+ String pkgId;
+ __pCurrentClientInfo->appId.SubString(0, 10, pkgId);
+
+ return pkgId;
}
return nullString;
if (__pCurrentClientInfo)
{
- String appId(__pCurrentClientInfo->pkgId);
- appId.Append(L'.');
- appId.Append(__pCurrentClientInfo->appExecutableName);
-
- return appId;
+ return __pCurrentClientInfo->appId;
}
return nullString;