X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFAppMapDataControl.h;h=8b451aba0a99a8f2610821faf1b23ca3808b2e3c;hb=62622f9125ec85a499ef0d91dbed9b7eee2d8d41;hp=ee91c2a7e6308f95fbcb843171178318aa7429b8;hpb=3a94caca32c413d579f8a6233bc4c95671b2f759;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/inc/FAppMapDataControl.h b/inc/FAppMapDataControl.h index ee91c2a..8b451ab 100755 --- a/inc/FAppMapDataControl.h +++ b/inc/FAppMapDataControl.h @@ -1,5 +1,4 @@ // -// Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); @@ -40,19 +39,63 @@ class IMapDataControlResponseListener; /** * @class MapDataControl - * @brief This class represents the MAP-type data control behavior. + * @brief This class represents the key-value structured data control behavior. * * @since 2.0 * * @final This class is not intended for extension. * - * The %MapDataControl class represents the MAP-type data control behavior, that provides a standard mechanism + * The %MapDataControl class represents the key-value structured data control behavior, that provides a standard mechanism * for accessing specific data exported by other applications. * Data control provider can share its own data to data control consumers. * * For more information on the class features, see Data Controls. * * @see Tizen::App::AppManager + * + * The following example demonstrates how to use the %MapDataControl class. + * + * @code + * + * #include + * #include + * + * using namespace Tizen::Base; + * using namespace Tizen::App; + * + * class MyMapDataControlResponseListener: + * : public Tizen::App::IMapDataControlResponseListener + * { + * public: + * void OnMapDataControlGetValueResponseReceived(RequestId reqId, const String& providerId, const String& dataId, IList& resultValueList, bool providerResult, const String* pErrorMsg) + * { + * int count = resultValueList.GetCount(); + * for (int i = 0; i < count; i++) + * { + * String pPerson = static_cast< String* >(resultValueList.GetAt(i)); + * AppLog("%dth person: %ls", i, pPerson->GetPointer()); + * } + * } + * }; + * + * void + * MyClass::Execute(void) + * { + * String providerId(L"http://tizen.org/datacontrol/provider/example"); + * MapDataControl* pDc = AppManager::GetMapDataControlN(providerId); + * + * MyMapDataControlResponseListener* pResponseListener = new MyMapDataControlResponseListener(); + * + * pDc->SetMapDataControlResponseListener(pResponseListener); + * + * String dataId(L"test"); + * String person(L"person"); + * RequestId reqId; + * + * pDc->GetValue(dataId, person, reqId); + * } + * + * @endcode */ class _OSP_EXPORT_ MapDataControl @@ -68,7 +111,7 @@ public: virtual ~MapDataControl(void); /** - * Gets the value list associated with the specified @c key, from a key-values map owned by MAP-type data control provider. @n + * Gets the value list associated with the specified @c key, from a key-values map owned by key-value structured data control provider. @n * The %GetValue() method is asynchronous. * For receiving the response from data control provider, set the listener * with MapDataControl::SetMapDataControlResponseListener(). @n @@ -93,14 +136,16 @@ public: * @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 total size of method arguments has exceeded the maximum limit. + * - The number of requests sent 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 total size of method arguments 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); /** - * Adds the value associated with the specified @c key, to a key-values map owned by MAP-type data control provider. @n + * Adds the value associated with the specified @c key, to a key-values map owned by key-value structured data control provider. @n * The %AddValue() method is asynchronous. * For receiving the response from data control provider, set the listener * with MapDataControl::SetMapDataControlResponseListener(). @n @@ -120,15 +165,17 @@ public: * @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 total size of method arguments has exceeded the maximum limit. + * - The number of requests sent 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 total size of method arguments 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); /** * Sets the value associated with the specified @c key with a new value. @n - * The key-values map is owned by MAP-type data control provider. @n + * The key-values map is owned by key-value structured data control provider. @n * The %SetValue() method is asynchronous. * For receiving the response from data control provider, set the listener * with MapDataControl::SetMapDataControlResponseListener(). @n @@ -149,14 +196,16 @@ public: * @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 total size of method arguments has exceeded the maximum limit. + * - The number of requests sent 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 total size of method arguments 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); /** - * Removes the value associated with the specified @c key, from a key-values map owned by MAP-type data control provider. @n + * Removes the value associated with the specified @c key, from a key-values map owned by key-value structured data control provider. @n * The %RemoveValue() method is asynchronous. * For receiving the response from data control provider, set the listener * with MapDataControl::SetMapDataControlResponseListener(). @n @@ -176,9 +225,11 @@ public: * @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 total size of method arguments has exceeded the maximum limit. + * - The number of requests sent 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 total size of method arguments 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);