diff options
Diffstat (limited to 'WebKit/efl/ewk/ewk_settings.cpp')
| -rw-r--r-- | WebKit/efl/ewk/ewk_settings.cpp | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/WebKit/efl/ewk/ewk_settings.cpp b/WebKit/efl/ewk/ewk_settings.cpp index 0822dc2..b50cd75 100644 --- a/WebKit/efl/ewk/ewk_settings.cpp +++ b/WebKit/efl/ewk/ewk_settings.cpp @@ -22,6 +22,9 @@ #include "ewk_settings.h" #include "EWebKit.h" +#if ENABLE(DATABASE) +#include "DatabaseTracker.h" +#endif #include "IconDatabase.h" #include "Image.h" #include "IntSize.h" @@ -36,7 +39,7 @@ #include <sys/types.h> #include <unistd.h> -static uint64_t _ewk_default_web_database_quota = 1 * 1024; +static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024; /** * Returns the default quota for Web Database databases. By default @@ -50,6 +53,38 @@ uint64_t ewk_settings_web_database_default_quota_get() } /** + * Sets the current path to the directory WebKit will write Web + * Database databases. + * + * @path: the new database directory path + * + */ +void ewk_settings_web_database_path_set(const char *path) +{ +#if ENABLE(DATABASE) + WebCore::String corePath = WebCore::String::fromUTF8(path); + WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(corePath); +#endif +} + +/** + * Return directory path where web database is stored. + * + * @return newly allocated string with database path. Note that return must be + * freed with free() as it's a strdup()ed copy of the string due reference + * counting. + */ +const char *ewk_settings_web_database_path_get() +{ +#if ENABLE(DATABASE) + WebCore::String path = WebCore::DatabaseTracker::tracker().databaseDirectoryPath(); + return strdup(path.utf8().data()); +#else + return 0; +#endif +} + +/** * Sets directory where to store icon database, opening database. * * @param directory where to store icon database, must be |
