summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2015-05-20 09:56:07 +0000
commit41386e9cb918eed93b3f13648cbef387e371e451 (patch)
treea97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp
parente15dd966d523731101f70ccf768bba12435a0208 (diff)
downloadWebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp')
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp126
1 files changed, 104 insertions, 22 deletions
diff --git a/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp b/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp
index a0531d323..5aa9dcf6b 100644
--- a/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp
+++ b/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp
@@ -33,102 +33,184 @@ using namespace WebKit;
WKTypeID WKDatabaseManagerGetTypeID()
{
+#if ENABLE(SQL_DATABASE)
return toAPI(WebDatabaseManagerProxy::APIType);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetOriginKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::originKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::originKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetOriginQuotaKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::originQuotaKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::originQuotaKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetOriginUsageKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::originUsageKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::originUsageKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetDatabaseDetailsKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::databaseDetailsKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::databaseDetailsKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetDatabaseDetailsNameKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::databaseDetailsNameKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::databaseDetailsNameKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetDatabaseDetailsDisplayNameKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::databaseDetailsDisplayNameKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::databaseDetailsDisplayNameKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetDatabaseDetailsCreationTimeKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::databaseDetailsCreationTimeKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::databaseDetailsCreationTimeKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
WKStringRef WKDatabaseManagerGetDatabaseDetailsModificationTimeKey()
{
- static API::String& key = API::String::create(WebDatabaseManagerProxy::databaseDetailsModificationTimeKey()).leakRef();
- return toAPI(&key);
+#if ENABLE(SQL_DATABASE)
+ static API::String* key = API::String::create(WebDatabaseManagerProxy::databaseDetailsModificationTimeKey()).leakRef();
+ return toAPI(key);
+#else
+ return 0;
+#endif
}
void WKDatabaseManagerSetClient(WKDatabaseManagerRef databaseManagerRef, const WKDatabaseManagerClientBase* wkClient)
{
+#if ENABLE(SQL_DATABASE)
if (wkClient && wkClient->version)
return;
toImpl(databaseManagerRef)->initializeClient(wkClient);
+#else
+ UNUSED_PARAM(databaseManagerRef);
+ UNUSED_PARAM(wkClient);
+#endif
}
void WKDatabaseManagerGetDatabasesByOrigin(WKDatabaseManagerRef databaseManagerRef, void* context, WKDatabaseManagerGetDatabasesByOriginFunction callback)
{
- toImpl(databaseManagerRef)->getDatabasesByOrigin(toGenericCallbackFunction(context, callback));
+#if ENABLE(SQL_DATABASE)
+ toImpl(databaseManagerRef)->getDatabasesByOrigin(ArrayCallback::create(context, callback));
+#else
+ UNUSED_PARAM(databaseManagerRef);
+ UNUSED_PARAM(context);
+ UNUSED_PARAM(callback);
+#endif
}
void WKDatabaseManagerGetDatabaseOrigins(WKDatabaseManagerRef databaseManagerRef, void* context, WKDatabaseManagerGetDatabaseOriginsFunction callback)
{
- toImpl(databaseManagerRef)->getDatabaseOrigins(toGenericCallbackFunction(context, callback));
+#if ENABLE(SQL_DATABASE)
+ toImpl(databaseManagerRef)->getDatabaseOrigins(ArrayCallback::create(context, callback));
+#else
+ UNUSED_PARAM(databaseManagerRef);
+ UNUSED_PARAM(context);
+ UNUSED_PARAM(callback);
+#endif
}
void WKDatabaseManagerDeleteDatabasesWithNameForOrigin(WKDatabaseManagerRef databaseManagerRef, WKStringRef databaseNameRef, WKSecurityOriginRef originRef)
{
+#if ENABLE(SQL_DATABASE)
toImpl(databaseManagerRef)->deleteDatabaseWithNameForOrigin(toWTFString(databaseNameRef), toImpl(originRef));
+#else
+ UNUSED_PARAM(databaseManagerRef);
+ UNUSED_PARAM(databaseNameRef);
+ UNUSED_PARAM(originRef);
+#endif
}
void WKDatabaseManagerDeleteDatabasesForOrigin(WKDatabaseManagerRef databaseManagerRef, WKSecurityOriginRef originRef)
{
+#if ENABLE(SQL_DATABASE)
toImpl(databaseManagerRef)->deleteDatabasesForOrigin(toImpl(originRef));
+#else
+ UNUSED_PARAM(databaseManagerRef);
+ UNUSED_PARAM(originRef);
+#endif
}
void WKDatabaseManagerDeleteAllDatabases(WKDatabaseManagerRef databaseManagerRef)
{
+#if ENABLE(SQL_DATABASE)
toImpl(databaseManagerRef)->deleteAllDatabases();
+#else
+ UNUSED_PARAM(databaseManagerRef);
+#endif
}
void WKDatabaseManagerSetQuotaForOrigin(WKDatabaseManagerRef databaseManagerRef, WKSecurityOriginRef originRef, uint64_t quota)
{
+#if ENABLE(SQL_DATABASE)
toImpl(databaseManagerRef)->setQuotaForOrigin(toImpl(originRef), quota);
+#else
+ UNUSED_PARAM(databaseManagerRef);
+ UNUSED_PARAM(originRef);
+ UNUSED_PARAM(quota);
+#endif
}