* @exception E_OBJ_NOT_FOUND The data control request specified with the @c reqId does 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_EXCEED 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. E_MAX_EXCEEDED may be returned for messages over 16KB size.
* @see Tizen::App::DataControlProviderManager::SendDataControlError()
* @see Tizen::App::IMapDataControlProviderEventListener
*/
* @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_EXCEED 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. 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()
* @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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. 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);
* @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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. 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);
* @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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. 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);
* @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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. 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);
* @param[in] countPerPage The desired maximum count of rows on a page
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance has not been properly constructed.
- * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
* - The specified @c pColumnList is empty.
* - The specified @c pageNo parameter is less than @c 1.
* - The specified @c countPerPage parameter is less than @c 1.
* @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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. 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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. E_MAX_EXCEEDED may be returned for messages over 16KB size.
*/
result Insert(const Tizen::Base::String& dataId, const Tizen::Base::Collection::IMap& insertMap, 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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. E_MAX_EXCEEDED may be returned for messages over 16KB 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 The size of sending buffer has exceeded the maximum limit.
+ * @exception E_MAX_EXCEEDED Either of the following conditions has occurred: @n
+ * - 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_EXCEED 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. 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);
* @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_EXCEED 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. 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_EXCEED 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. E_MAX_EXCEEDED may be returned for messages over 4KB size.
*/
result SendMessage(const LocalMessagePort* pLocalMessagePort, const Tizen::Base::Collection::IMap* pMessage);
{
__launchManager.RemoveItem(req);
}
+int
+_AppControlManager::GetLaunchRequestCount(void)
+{
+ return __launchManager.GetCount();
+}
result
_AppControlManager::RegisterRequest(service_s* service, int& req, _AppHandler& handler)
namespace Tizen { namespace App
{
+static const int MAX_REQUEST_COUNT = 128;
+
class _MapDataControlEventArg
: public IEventArg
{
{
result r = E_SUCCESS;
+ int req = -1;
+ _AppControlManager* pAppManagerImpl = _AppControlManager::GetInstance();
+
+ // Check the request count of DataControl operation
+ int count = pAppManagerImpl->GetLaunchRequestCount();
+ SysLog(NID_APP, "Current launch request count: %d", count);
+
+ SysTryReturnResult(NID_APP, count < MAX_REQUEST_COUNT, E_MAX_EXCEEDED, "The number of requests has exceeded the maximum limit.");
+
_AppArg* pArg = new(std::nothrow) _AppArg; // XXX: pArg will be released in _AppManagerImpl::LaunchApp().
SysTryReturnResult(NID_APP, pArg != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
pArg->Construct(*this, static_cast <_DataControlRequestType>(type), pDataList);
- _AppControlManager* pAppManagerImpl = _AppControlManager::GetInstance();
- int req = -1;
-
- // Proceeds the previous request
- WaitingLoop* pLoop = WaitingLoop::GetInstance();
- pLoop->Wait(30);
-
if (__pMapDataControlEvent)
{
// reqId is system-wide id because the bundle is system-wide.
}
}
+ // Remove the request count
+ SysLog(NID_APP, "Remove a launch request: reqId: %d", reqId);
+ _AppControlManager::GetInstance()->RemoveLaunchRequest(reqId);
+
return E_SUCCESS;
CATCH:
#include <FAppISqlDataControlResponseListener.h>
#include <FBaseSysLog.h>
+#include <FBaseRtWaitingLoop.h>
+
#include <FIo_DataControlResultSetEnumerator.h>
#include "FApp_AppControlManager.h"
namespace Tizen { namespace App
{
+static const int MAX_REQUEST_COUNT = 128;
+
class _SqlDataControlEventArg
: public IEventArg
{
{
result r = E_SUCCESS;
+ int req = -1;
+ _AppControlManager* pAppManagerImpl = _AppControlManager::GetInstance();
+
+ // Check the request count of DataControl operation
+ int count = pAppManagerImpl->GetLaunchRequestCount();
+ SysLog(NID_APP, "Current launch request count: %d", count);
+
+ SysTryReturnResult(NID_APP, count < MAX_REQUEST_COUNT, E_MAX_EXCEEDED, "The number of requests has exceeded the maximum limit.");
+
_AppArg* pArg = new (std::nothrow) _AppArg; // XXX: pArg will be released in _AppManagerImpl::LaunchApp().
SysTryReturnResult(NID_APP, pArg != null, E_OUT_OF_MEMORY, "insufficient memory");
pArg->Construct(*this, static_cast <_DataControlRequestType>(type), pDataList);
- _AppControlManager* pAppManagerImpl = _AppControlManager::GetInstance();
- int req = -1;
-
if (__pSqlDataControlEvent)
{
// reqId is system-wide id because the bundle is system-wide.
}
}
+ // Remove the request count
+ _AppControlManager::GetInstance()->RemoveLaunchRequest(reqId);
+
return E_SUCCESS;
CATCH:
static result GetMimeFromExt(const Tizen::Base::String& ext, Tizen::Base::String& out);
+ void RemoveLaunchRequest(int req);
+
+ int GetLaunchRequestCount(void);
+
private:
_OSP_LOCAL_ _AppControlManager(void);
_OSP_LOCAL_ int AddLaunchRequest(_AppArg* pArg, LaunchCbType pCb, void* data, int prop = -1);
- _OSP_LOCAL_ void RemoveLaunchRequest(int req);
-
private:
_AppControlEvent __appControlEvent;
_RequestManagerT<_LaunchInfo> __launchManager;
return (r == E_SUCCESS) ? pItem : null;
}
+ int GetCount(void) const
+ {
+ return __requestList.GetCount();
+ }
+
private:
_RequestManagerT(const T& rhs);