[EFL][WK2] Rename async APIs for better consistency with EFL
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2014 01:57:35 +0000 (01:57 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2014 01:57:35 +0000 (01:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=130319

Reviewed by Gyuyoung Kim.

There are inconsistency with async keyword in several ewebkit2 APIs.
This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
In addition, added Async keyword into their callback name.

* UIProcess/API/efl/ewk_application_cache_manager.cpp:
(EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
(getApplicationCacheOriginsCallback):
(ewk_application_cache_manager_origins_async_get):
* UIProcess/API/efl/ewk_application_cache_manager.h:
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
(getAcceptPolicyCallback):
(ewk_cookie_manager_accept_policy_async_get):
(EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
(getHostnamesWithCookiesCallback):
(ewk_cookie_manager_hostnames_with_cookies_async_get):
* UIProcess/API/efl/ewk_cookie_manager.h:
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
(getDatabaseOriginsCallback):
(ewk_database_manager_origins_async_get):
* UIProcess/API/efl/ewk_database_manager.h:
* UIProcess/API/efl/ewk_storage_manager.cpp:
(EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
(getStorageOriginsCallback):
(ewk_storage_manager_origins_async_get):
* UIProcess/API/efl/ewk_storage_manager.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(timerCallback):
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(EWK2CookieManagerTest::getAcceptPolicy):
(EWK2CookieManagerTest::getHostnamesWithCookies):
* UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
(EWK2DatabaseManagerTest::timerCallback):
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
(EWK2StorageManagerTest::timerCallback):
(TEST_F):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165864 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/efl/ewk_application_cache_manager.cpp
Source/WebKit2/UIProcess/API/efl/ewk_application_cache_manager.h
Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.cpp
Source/WebKit2/UIProcess/API/efl/ewk_cookie_manager.h
Source/WebKit2/UIProcess/API/efl/ewk_database_manager.cpp
Source/WebKit2/UIProcess/API/efl/ewk_database_manager.h
Source/WebKit2/UIProcess/API/efl/ewk_storage_manager.cpp
Source/WebKit2/UIProcess/API/efl/ewk_storage_manager.h
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_database_manager.cpp
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp

index 15bd715..728f404 100644 (file)
@@ -1,3 +1,49 @@
+2014-03-18  Ryuan Choi  <ryuan.choi@samsung.com>
+
+        [EFL][WK2] Rename async APIs for better consistency with EFL
+        https://bugs.webkit.org/show_bug.cgi?id=130319
+
+        Reviewed by Gyuyoung Kim.
+
+        There are inconsistency with async keyword in several ewebkit2 APIs.
+        This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
+        In addition, added Async keyword into their callback name.
+
+        * UIProcess/API/efl/ewk_application_cache_manager.cpp:
+        (EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
+        (getApplicationCacheOriginsCallback):
+        (ewk_application_cache_manager_origins_async_get):
+        * UIProcess/API/efl/ewk_application_cache_manager.h:
+        * UIProcess/API/efl/ewk_cookie_manager.cpp:
+        (EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
+        (getAcceptPolicyCallback):
+        (ewk_cookie_manager_accept_policy_async_get):
+        (EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
+        (getHostnamesWithCookiesCallback):
+        (ewk_cookie_manager_hostnames_with_cookies_async_get):
+        * UIProcess/API/efl/ewk_cookie_manager.h:
+        * UIProcess/API/efl/ewk_database_manager.cpp:
+        (EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
+        (getDatabaseOriginsCallback):
+        (ewk_database_manager_origins_async_get):
+        * UIProcess/API/efl/ewk_database_manager.h:
+        * UIProcess/API/efl/ewk_storage_manager.cpp:
+        (EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
+        (getStorageOriginsCallback):
+        (ewk_storage_manager_origins_async_get):
+        * UIProcess/API/efl/ewk_storage_manager.h:
+        * UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
+        (timerCallback):
+        * UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
+        (EWK2CookieManagerTest::getAcceptPolicy):
+        (EWK2CookieManagerTest::getHostnamesWithCookies):
+        * UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
+        (EWK2DatabaseManagerTest::timerCallback):
+        (TEST_F):
+        * UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
+        (EWK2StorageManagerTest::timerCallback):
+        (TEST_F):
+
 2014-03-18  Tim Horton  <timothy_horton@apple.com>
 
         [iOS][WebKit2] Mark layer contents as being opaque if they are
index 70f13a9..b1d8dfb 100644 (file)
@@ -42,11 +42,11 @@ EwkApplicationCacheManager::~EwkApplicationCacheManager()
 {
 }
 
-struct Get_Origins_Data {
-    Ewk_Application_Cache_Origins_Get_Cb callback;
+struct EwkApplicationCacheOriginsAsyncData {
+    Ewk_Application_Cache_Origins_Async_Get_Cb callback;
     void* userData;
 
-    Get_Origins_Data(Ewk_Application_Cache_Origins_Get_Cb callback, void* userData)
+    EwkApplicationCacheOriginsAsyncData(Ewk_Application_Cache_Origins_Async_Get_Cb callback, void* userData)
         : callback(callback)
         , userData(userData)
     { }
@@ -55,7 +55,7 @@ struct Get_Origins_Data {
 static void getApplicationCacheOriginsCallback(WKArrayRef wkOrigins, WKErrorRef, void* context)
 {
     Eina_List* origins = nullptr;
-    auto callbackData = std::unique_ptr<Get_Origins_Data>(static_cast<Get_Origins_Data*>(context));
+    auto callbackData = std::unique_ptr<EwkApplicationCacheOriginsAsyncData>(static_cast<EwkApplicationCacheOriginsAsyncData*>(context));
 
     const size_t originsCount = WKArrayGetSize(wkOrigins);
     for (size_t i = 0; i < originsCount; ++i) {
@@ -66,12 +66,12 @@ static void getApplicationCacheOriginsCallback(WKArrayRef wkOrigins, WKErrorRef,
     callbackData->callback(origins, callbackData->userData);
 }
 
-void ewk_application_cache_manager_origins_get(const Ewk_Application_Cache_Manager* manager, Ewk_Application_Cache_Origins_Get_Cb callback, void* userData)
+void ewk_application_cache_manager_origins_async_get(const Ewk_Application_Cache_Manager* manager, Ewk_Application_Cache_Origins_Async_Get_Cb callback, void* userData)
 {
     EINA_SAFETY_ON_NULL_RETURN(manager);
     EINA_SAFETY_ON_NULL_RETURN(callback);
 
-    Get_Origins_Data* callbackData = new Get_Origins_Data(callback, userData);
+    EwkApplicationCacheOriginsAsyncData* callbackData = new EwkApplicationCacheOriginsAsyncData(callback, userData);
     WKApplicationCacheManagerGetApplicationCacheOrigins(manager->impl(), callbackData, getApplicationCacheOriginsCallback);
 }
 
index 0d3844f..502d5e7 100644 (file)
@@ -42,8 +42,8 @@ extern "C" {
 typedef struct EwkApplicationCacheManager Ewk_Application_Cache_Manager;
 
 /**
- * @typedef Ewk_Application_Cache_Origins_Get_Cb Ewk_Application_Cache_Origins_Get_Cb
- * @brief Callback for ewk_application_cache_manager_origins_get
+ * @typedef Ewk_Application_Cache_Origins_Async_Get_Cb Ewk_Application_Cache_Origins_Async_Get_Cb
+ * @brief Callback for ewk_application_cache_manager_origins_async_get
  *
  * @note The @a origins should be freed like below code after use.
  *
@@ -61,7 +61,7 @@ typedef struct EwkApplicationCacheManager Ewk_Application_Cache_Manager;
  *
  * @endcode
  */
-typedef void (*Ewk_Application_Cache_Origins_Get_Cb)(Eina_List *origins, void *user_data);
+typedef void (*Ewk_Application_Cache_Origins_Async_Get_Cb)(Eina_List *origins, void *user_data);
 
 /**
  * Requests for getting web application cache origins.
@@ -70,9 +70,9 @@ typedef void (*Ewk_Application_Cache_Origins_Get_Cb)(Eina_List *origins, void *u
  * @param result_callback callback to get web application cache origins
  * @param user_data user_data will be passsed when result_callback is called
  *
- * @see Ewk_Application_Cache_Origins_Get_Cb
+ * @see Ewk_Application_Cache_Origins_Async_Get_Cb
  */
-EAPI void ewk_application_cache_manager_origins_get(const Ewk_Application_Cache_Manager *manager, Ewk_Application_Cache_Origins_Get_Cb callback, void *data);
+EAPI void ewk_application_cache_manager_origins_async_get(const Ewk_Application_Cache_Manager *manager, Ewk_Application_Cache_Origins_Async_Get_Cb callback, void *data);
 
 /**
  * Requests for deleting all web application caches.
index ec4f287..b684f69 100644 (file)
@@ -165,11 +165,11 @@ void ewk_cookie_manager_accept_policy_set(Ewk_Cookie_Manager* manager, Ewk_Cooki
     manager->setHTTPAcceptPolicy(wkPolicy);
 }
 
-struct Get_Policy_Async_Data {
-    Ewk_Cookie_Manager_Async_Policy_Get_Cb callback;
+struct EwkCookiePolicyAsyncData {
+    Ewk_Cookie_Manager_Policy_Async_Get_Cb callback;
     void* userData;
 
-    Get_Policy_Async_Data(Ewk_Cookie_Manager_Async_Policy_Get_Cb callback, void* userData)
+    EwkCookiePolicyAsyncData(Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void* userData)
         : callback(callback)
         , userData(userData)
     { }
@@ -177,26 +177,26 @@ struct Get_Policy_Async_Data {
 
 static void getAcceptPolicyCallback(WKHTTPCookieAcceptPolicy policy, WKErrorRef wkError, void* data)
 {
-    auto callbackData = std::unique_ptr<Get_Policy_Async_Data>(static_cast<Get_Policy_Async_Data*>(data));
+    auto callbackData = std::unique_ptr<EwkCookiePolicyAsyncData>(static_cast<EwkCookiePolicyAsyncData*>(data));
     OwnPtr<EwkError> ewkError = EwkError::create(wkError);
 
     callbackData->callback(static_cast<Ewk_Cookie_Accept_Policy>(policy), ewkError.get(), callbackData->userData);
 }
 
-void ewk_cookie_manager_async_accept_policy_get(const Ewk_Cookie_Manager* manager, Ewk_Cookie_Manager_Async_Policy_Get_Cb callback, void* data)
+void ewk_cookie_manager_accept_policy_async_get(const Ewk_Cookie_Manager* manager, Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void* data)
 {
     EINA_SAFETY_ON_NULL_RETURN(manager);
     EINA_SAFETY_ON_NULL_RETURN(callback);
 
-    Get_Policy_Async_Data* callbackData = new Get_Policy_Async_Data(callback, data);
+    EwkCookiePolicyAsyncData* callbackData = new EwkCookiePolicyAsyncData(callback, data);
     manager->getHTTPAcceptPolicy(getAcceptPolicyCallback, callbackData);
 }
 
-struct Get_Hostnames_Async_Data {
-    Ewk_Cookie_Manager_Async_Hostnames_Get_Cb callback;
+struct EwkCookieHostnamesAsyncData {
+    Ewk_Cookie_Manager_Hostnames_Async_Get_Cb callback;
     void* userData;
 
-    Get_Hostnames_Async_Data(Ewk_Cookie_Manager_Async_Hostnames_Get_Cb callback, void* userData)
+    EwkCookieHostnamesAsyncData(Ewk_Cookie_Manager_Hostnames_Async_Get_Cb callback, void* userData)
         : callback(callback)
         , userData(userData)
     { }
@@ -205,7 +205,7 @@ struct Get_Hostnames_Async_Data {
 static void getHostnamesWithCookiesCallback(WKArrayRef wkHostnames, WKErrorRef wkError, void* context)
 {
     Eina_List* hostnames = 0;
-    auto callbackData = std::unique_ptr<Get_Hostnames_Async_Data>(static_cast<Get_Hostnames_Async_Data*>(context));
+    auto callbackData = std::unique_ptr<EwkCookieHostnamesAsyncData>(static_cast<EwkCookieHostnamesAsyncData*>(context));
     OwnPtr<EwkError> ewkError = EwkError::create(wkError);
 
     const size_t hostnameCount = WKArrayGetSize(wkHostnames);
@@ -223,12 +223,12 @@ static void getHostnamesWithCookiesCallback(WKArrayRef wkHostnames, WKErrorRef w
       eina_stringshare_del(static_cast<Eina_Stringshare*>(item));
 }
 
-void ewk_cookie_manager_async_hostnames_with_cookies_get(const Ewk_Cookie_Manager* manager, Ewk_Cookie_Manager_Async_Hostnames_Get_Cb callback, void* data)
+void ewk_cookie_manager_hostnames_with_cookies_async_get(const Ewk_Cookie_Manager* manager, Ewk_Cookie_Manager_Hostnames_Async_Get_Cb callback, void* data)
 {
     EINA_SAFETY_ON_NULL_RETURN(manager);
     EINA_SAFETY_ON_NULL_RETURN(callback);
 
-    Get_Hostnames_Async_Data* callbackData = new Get_Hostnames_Async_Data(callback, data);
+    EwkCookieHostnamesAsyncData* callbackData = new EwkCookieHostnamesAsyncData(callback, data);
     manager->getHostNamesWithCookies(getHostnamesWithCookiesCallback, callbackData);
 }
 
index 5257b75..e11c6d6 100644 (file)
@@ -74,20 +74,20 @@ enum Ewk_Cookie_Persistent_Storage {
 typedef enum Ewk_Cookie_Persistent_Storage Ewk_Cookie_Persistent_Storage;
 
 /**
- * @typedef Ewk_Cookie_Manager_Async_Policy_Get_Cb Ewk_Cookie_Manager_Async_Policy_Get_Cb
- * @brief Callback type for use with ewk_cookie_manager_async_accept_policy_get
+ * @typedef Ewk_Cookie_Manager_Policy_Async_Get_Cb Ewk_Cookie_Manager_Policy_Async_Get_Cb
+ * @brief Callback type for use with ewk_cookie_manager_accept_policy_async_get
  */
-typedef void (*Ewk_Cookie_Manager_Async_Policy_Get_Cb)(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info);
+typedef void (*Ewk_Cookie_Manager_Policy_Async_Get_Cb)(Ewk_Cookie_Accept_Policy policy, Ewk_Error *error, void *event_info);
 
 /**
- * @typedef Ewk_Cookie_Manager_Async_Hostnames_Get_Cb Ewk_Cookie_Manager_Async_Hostnames_Get_Cb
- * @brief Callback type for use with ewk_cookie_manager_async_hostnames_with_cookies_get
+ * @typedef Ewk_Cookie_Manager_Hostnames_Async_Get_Cb Ewk_Cookie_Manager_Hostnames_Async_Get_Cb
+ * @brief Callback type for use with ewk_cookie_manager_hostnames_with_cookies_async_get
  *
  * @note The @a hostnames list items are guaranteed to be eina_stringshare. Whenever possible
  * save yourself some cpu cycles and use eina_stringshare_ref() instead of eina_stringshare_add()
  * or strdup().
  */
-typedef void (*Ewk_Cookie_Manager_Async_Hostnames_Get_Cb)(Eina_List *hostnames, Ewk_Error *error, void *event_info);
+typedef void (*Ewk_Cookie_Manager_Hostnames_Async_Get_Cb)(Eina_List *hostnames, Ewk_Error *error, void *event_info);
 
 /**
  * @typedef Ewk_Cookie_Manager_Changes_Watch_Cb Ewk_Cookie_Manager_Changes_Watch_Cb
@@ -130,7 +130,7 @@ EAPI void ewk_cookie_manager_accept_policy_set(Ewk_Cookie_Manager *manager, Ewk_
  * @param callback The function to call when the policy is received or an error occured.
  * @param data User data (may be @c NULL).
  */
-EAPI void ewk_cookie_manager_async_accept_policy_get(const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Async_Policy_Get_Cb callback, void *data);
+EAPI void ewk_cookie_manager_accept_policy_async_get(const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void *data);
 
 /**
  * Asynchronously get the list of host names for which @a manager contains cookies.
@@ -139,7 +139,7 @@ EAPI void ewk_cookie_manager_async_accept_policy_get(const Ewk_Cookie_Manager *m
  * @param callback The function to call when the host names have been received.
  * @param data User data (may be @c NULL).
  */
-EAPI void ewk_cookie_manager_async_hostnames_with_cookies_get(const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Async_Hostnames_Get_Cb callback, void *data);
+EAPI void ewk_cookie_manager_hostnames_with_cookies_async_get(const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Hostnames_Async_Get_Cb callback, void *data);
 
 /**
  * Remove all cookies of @a manager for the given @a hostname.
index 9293de1..605e161 100644 (file)
@@ -63,12 +63,12 @@ Eina_List* EwkDatabaseManager::createOriginList(WKArrayRef origins) const
     return originList;
 }
 
-struct Ewk_Database_Origins_Async_Get_Context {
+struct EwkDatabaseOriginsAsyncData {
     const Ewk_Database_Manager* manager;
-    Ewk_Database_Origins_Get_Cb callback;
+    Ewk_Database_Origins_Async_Get_Cb callback;
     void* userData;
 
-    Ewk_Database_Origins_Async_Get_Context(const Ewk_Database_Manager* manager, Ewk_Database_Origins_Get_Cb callback, void* userData)
+    EwkDatabaseOriginsAsyncData(const Ewk_Database_Manager* manager, Ewk_Database_Origins_Async_Get_Cb callback, void* userData)
         : manager(manager)
         , callback(callback)
         , userData(userData)
@@ -77,18 +77,18 @@ struct Ewk_Database_Origins_Async_Get_Context {
 
 static void getDatabaseOriginsCallback(WKArrayRef origins, WKErrorRef wkError, void* context)
 {
-    OwnPtr<Ewk_Database_Origins_Async_Get_Context> webDatabaseContext = adoptPtr(static_cast<Ewk_Database_Origins_Async_Get_Context*>(context));
+    OwnPtr<EwkDatabaseOriginsAsyncData> webDatabaseContext = adoptPtr(static_cast<EwkDatabaseOriginsAsyncData*>(context));
     Eina_List* originList = webDatabaseContext->manager->createOriginList(origins);
     OwnPtr<EwkError> ewkError = EwkError::create(wkError);
     webDatabaseContext->callback(originList, ewkError.get(), webDatabaseContext->userData);
 }
 
-Eina_Bool ewk_database_manager_origins_get(const Ewk_Database_Manager* ewkDatabaseManager, Ewk_Database_Origins_Get_Cb callback, void* userData)
+Eina_Bool ewk_database_manager_origins_async_get(const Ewk_Database_Manager* ewkDatabaseManager, Ewk_Database_Origins_Async_Get_Cb callback, void* userData)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkDatabaseManager, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
 
-    Ewk_Database_Origins_Async_Get_Context* context = new Ewk_Database_Origins_Async_Get_Context(ewkDatabaseManager, callback, userData);
+    EwkDatabaseOriginsAsyncData* context = new EwkDatabaseOriginsAsyncData(ewkDatabaseManager, callback, userData);
     ewkDatabaseManager->getDatabaseOrigins(getDatabaseOriginsCallback, context);
 
     return true;
index 610a736..117231e 100644 (file)
@@ -44,14 +44,14 @@ extern "C" {
 typedef struct EwkDatabaseManager Ewk_Database_Manager;
 
 /**
- * @typedef Ewk_Database_Origins_Get_Cb Ewk_Database_Origins_Get_Cb
- * @brief Callback type for use with ewk_database_manager_origins_get()
+ * @typedef Ewk_Database_Origins_Async_Get_Cb Ewk_Database_Origins_Async_Get_Cb
+ * @brief Callback type for use with ewk_database_manager_origins_async_get()
  *
  * @param origins @c Eina_List containing @c Ewk_Security_Origin elements or @c NULL in case of error,
  *                        the Eina_List and its items should be freed after use. Use ewk_object_unref()
  *                        to free the items
  */
-typedef void (*Ewk_Database_Origins_Get_Cb)(Eina_List *origins, Ewk_Error *error, void *user_data);
+typedef void (*Ewk_Database_Origins_Async_Get_Cb)(Eina_List *origins, Ewk_Error *error, void *user_data);
 
 /**
  * Gets list of origins using web database asynchronously.
@@ -65,7 +65,7 @@ typedef void (*Ewk_Database_Origins_Get_Cb)(Eina_List *origins, Ewk_Error *error
  *
  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
  */
-EAPI Eina_Bool ewk_database_manager_origins_get(const Ewk_Database_Manager *manager, Ewk_Database_Origins_Get_Cb callback, void *user_data);
+EAPI Eina_Bool ewk_database_manager_origins_async_get(const Ewk_Database_Manager *manager, Ewk_Database_Origins_Async_Get_Cb callback, void *user_data);
 
 #ifdef __cplusplus
 }
index 33f4fd2..e2961ba 100644 (file)
@@ -63,12 +63,12 @@ Eina_List* EwkStorageManager::createOriginList(WKArrayRef origins) const
     return originList;
 }
 
-struct Ewk_Storage_Origins_Async_Get_Context {
+struct EwkStorageOriginsAsyncData {
     const Ewk_Storage_Manager* manager;
-    Ewk_Storage_Origins_Get_Cb callback;
+    Ewk_Storage_Origins_Async_Get_Cb callback;
     void* userData;
 
-    Ewk_Storage_Origins_Async_Get_Context(const Ewk_Storage_Manager* manager, Ewk_Storage_Origins_Get_Cb callback, void* userData)
+    EwkStorageOriginsAsyncData(const Ewk_Storage_Manager* manager, Ewk_Storage_Origins_Async_Get_Cb callback, void* userData)
         : manager(manager)
         , callback(callback)
         , userData(userData)
@@ -78,7 +78,7 @@ struct Ewk_Storage_Origins_Async_Get_Context {
 static void getStorageOriginsCallback(WKArrayRef origins, WKErrorRef wkError, void* context)
 {
     Eina_List* originList = 0;
-    auto webStorageContext = std::unique_ptr<Ewk_Storage_Origins_Async_Get_Context>(static_cast<Ewk_Storage_Origins_Async_Get_Context*>(context));
+    auto webStorageContext = std::unique_ptr<EwkStorageOriginsAsyncData>(static_cast<EwkStorageOriginsAsyncData*>(context));
 
     originList = webStorageContext->manager->createOriginList(origins);
 
@@ -86,12 +86,12 @@ static void getStorageOriginsCallback(WKArrayRef origins, WKErrorRef wkError, vo
     webStorageContext->callback(originList, ewkError.get(), webStorageContext->userData);
 }
 
-Eina_Bool ewk_storage_manager_origins_get(const Ewk_Storage_Manager* ewkStorageManager, Ewk_Storage_Origins_Get_Cb callback, void* userData)
+Eina_Bool ewk_storage_manager_origins_async_get(const Ewk_Storage_Manager* ewkStorageManager, Ewk_Storage_Origins_Async_Get_Cb callback, void* userData)
 {
     EINA_SAFETY_ON_NULL_RETURN_VAL(ewkStorageManager, false);
     EINA_SAFETY_ON_NULL_RETURN_VAL(callback, false);
 
-    Ewk_Storage_Origins_Async_Get_Context* context = new Ewk_Storage_Origins_Async_Get_Context(ewkStorageManager, callback, userData);
+    EwkStorageOriginsAsyncData* context = new EwkStorageOriginsAsyncData(ewkStorageManager, callback, userData);
     ewkStorageManager->getStorageOrigins(context, getStorageOriginsCallback);
 
     return true;
index 4f5c8fb..13c259d 100644 (file)
@@ -44,14 +44,14 @@ extern "C" {
 typedef struct EwkStorageManager Ewk_Storage_Manager;
 
 /**
- * @typedef Ewk_Storage_Origins_Get_Cb Ewk_Storage_Origins_Get_Cb
- * @brief Callback type for use with ewk_storage_manager_origins_get().
+ * @typedef Ewk_Storage_Origins_Async_Get_Cb Ewk_Storage_Origins_Async_Get_Cb
+ * @brief Callback type for use with ewk_storage_manager_origins_async_get().
  *
  * @param origins @c Eina_List containing @c Ewk_Security_Origin elements or @c NULL in case of error,
  *                        the Eina_List and its items should be freed after use. Use ewk_object_unref()
  *                        to free the items
  */
-typedef void (*Ewk_Storage_Origins_Get_Cb)(Eina_List *origins, Ewk_Error *error, void *user_data);
+typedef void (*Ewk_Storage_Origins_Async_Get_Cb)(Eina_List *origins, Ewk_Error *error, void *user_data);
 
 /**
  * Gets list of origins that are stored in storage db asynchronously.
@@ -65,7 +65,7 @@ typedef void (*Ewk_Storage_Origins_Get_Cb)(Eina_List *origins, Ewk_Error *error,
  *
  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure
  */
-EAPI Eina_Bool ewk_storage_manager_origins_get(const Ewk_Storage_Manager *manager, Ewk_Storage_Origins_Get_Cb callback, void *user_data);
+EAPI Eina_Bool ewk_storage_manager_origins_async_get(const Ewk_Storage_Manager *manager, Ewk_Storage_Origins_Async_Get_Cb callback, void *user_data);
 
 #ifdef __cplusplus
 }
index 2effbf6..cdc126b 100644 (file)
@@ -91,7 +91,7 @@ static void getOriginsCallback(Eina_List* origins, void* event_info)
 static Eina_Bool timerCallback(void* userData)
 {
     OriginsData* data = static_cast<OriginsData*>(userData);
-    ewk_application_cache_manager_origins_get(data->manager, getOriginsCallback, &data->items);
+    ewk_application_cache_manager_origins_async_get(data->manager, getOriginsCallback, &data->items);
 
     return true;
 }
index 06c7815..125cf22 100644 (file)
@@ -98,7 +98,7 @@ protected:
     Ewk_Cookie_Accept_Policy getAcceptPolicy(Ewk_Cookie_Manager* manager)
     {
         Ewk_Cookie_Accept_Policy policy = EWK_COOKIE_ACCEPT_POLICY_ALWAYS;
-        ewk_cookie_manager_async_accept_policy_get(manager, getAcceptPolicyCallback, &policy);
+        ewk_cookie_manager_accept_policy_async_get(manager, getAcceptPolicyCallback, &policy);
         ecore_main_loop_begin();
         return policy;
     }
@@ -106,7 +106,7 @@ protected:
     Eina_List* getHostnamesWithCookies(Ewk_Cookie_Manager* manager)
     {
         Eina_List* ret = 0;
-        ewk_cookie_manager_async_hostnames_with_cookies_get(manager, getHostnamesWithCookiesCallback, &ret);
+        ewk_cookie_manager_hostnames_with_cookies_async_get(manager, getHostnamesWithCookiesCallback, &ret);
         ecore_main_loop_begin();
         return ret;
     }
index 513d7b3..85750ef 100644 (file)
@@ -79,14 +79,14 @@ public:
 
         if (originData->didReceiveOriginsCallback) {
             originData->didReceiveOriginsCallback = false;
-            ewk_database_manager_origins_get(originData->manager, databaseOriginsCallback, originData);
+            ewk_database_manager_origins_async_get(originData->manager, databaseOriginsCallback, originData);
         }
 
         return ECORE_CALLBACK_RENEW;
     }
 };
 
-TEST_F(EWK2DatabaseManagerTest, ewk_database_manager_origins_get)
+TEST_F(EWK2DatabaseManagerTest, ewk_database_manager_origins_async_get)
 {
     Evas_Object* view = webView();
     const char* databaseHTML =
@@ -102,7 +102,7 @@ TEST_F(EWK2DatabaseManagerTest, ewk_database_manager_origins_get)
 
     OriginData originData;
     originData.manager = ewk_context_database_manager_get(ewk_view_context_get(view));
-    ASSERT_TRUE(ewk_database_manager_origins_get(originData.manager, databaseOriginsCallback, &originData));
+    ASSERT_TRUE(ewk_database_manager_origins_async_get(originData.manager, databaseOriginsCallback, &originData));
     Ecore_Timer* database_timer = ecore_timer_add(1, timerCallback, &originData);
 
     ecore_main_loop_begin();
index 0c6d336..eaa90e4 100644 (file)
@@ -79,7 +79,7 @@ public:
 
         if (originData->didReceiveOriginsCallback) {
             originData->didReceiveOriginsCallback = false;
-            ewk_storage_manager_origins_get(originData->manager, getStorageOriginsCallback, originData);
+            ewk_storage_manager_origins_async_get(originData->manager, getStorageOriginsCallback, originData);
         }
 
         return ECORE_CALLBACK_RENEW;
@@ -102,7 +102,7 @@ protected:
     }
 };
 
-TEST_F(EWK2StorageManagerTest, ewk_storage_manager_origins_get)
+TEST_F(EWK2StorageManagerTest, ewk_storage_manager_origins_async_get)
 {
     Evas_Object* view = webView();
     const char* storageHTML =
@@ -117,7 +117,7 @@ TEST_F(EWK2StorageManagerTest, ewk_storage_manager_origins_get)
 
     OriginData originData;
     originData.manager = ewk_context_storage_manager_get(ewk_view_context_get(view));
-    ASSERT_TRUE(ewk_storage_manager_origins_get(originData.manager, getStorageOriginsCallback, &originData));
+    ASSERT_TRUE(ewk_storage_manager_origins_async_get(originData.manager, getStorageOriginsCallback, &originData));
     Ecore_Timer* storage_timer = ecore_timer_add(1, reinterpret_cast<Ecore_Task_Cb>(timerCallback), &originData);
 
     ecore_main_loop_begin();