Home | History | Annotate | Download | only in webkit
      1 /*
      2  * Copyright (C) 2007, 2008, 2009 Holger Hans Peter Freyther
      3  * Copyright (C) 2008 Jan Michael C. Alonzo
      4  * Copyright (C) 2008 Collabora Ltd.
      5  * Copyright (C) 2010 Igalia S.L.
      6  *
      7  * This library is free software; you can redistribute it and/or
      8  * modify it under the terms of the GNU Library General Public
      9  * License as published by the Free Software Foundation; either
     10  * version 2 of the License, or (at your option) any later version.
     11  *
     12  * This library is distributed in the hope that it will be useful,
     13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     15  * Library General Public License for more details.
     16  *
     17  * You should have received a copy of the GNU Library General Public License
     18  * along with this library; see the file COPYING.LIB.  If not, write to
     19  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     20  * Boston, MA 02110-1301, USA.
     21  */
     22 
     23 #ifndef webkitglobals_h
     24 #define webkitglobals_h
     25 
     26 #include "webkitdefines.h"
     27 #include <glib.h>
     28 #include <libsoup/soup.h>
     29 
     30 G_BEGIN_DECLS
     31 
     32 /*
     33  * WebKitCacheModel:
     34  * @WEBKIT_CACHE_MODEL_DEFAULT: The default cache model. This is
     35  *   WEBKIT_CACHE_MODEL_WEB_BROWSER.
     36  * @WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER: Disable the cache completely, which
     37  *   substantially reduces memory usage. Useful for applications that only
     38  *   access a single local file, with no navigation to other pages. No remote
     39  *   resources will be cached.
     40  * @WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER: A cache model optimized for viewing
     41  *   a series of local files -- for example, a documentation viewer or a website
     42  *   designer. WebKit will cache a moderate number of resources.
     43  * @WEBKIT_CACHE_MODEL_WEB_BROWSER: Improve document load speed substantially
     44  *   by caching a very large number of resources and previously viewed content.
     45  *
     46  * Enum values used for determining the webview cache model.
     47  */
     48 typedef enum {
     49     WEBKIT_CACHE_MODEL_DEFAULT,
     50     WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER,
     51     WEBKIT_CACHE_MODEL_WEB_BROWSER,
     52     WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER,
     53 } WebKitCacheModel;
     54 
     55 WEBKIT_API SoupSession*
     56 webkit_get_default_session                      (void);
     57 
     58 WEBKIT_API WebKitWebPluginDatabase *
     59 webkit_get_web_plugin_database                  (void);
     60 
     61 WEBKIT_API WebKitIconDatabase *
     62 webkit_get_icon_database                        (void);
     63 
     64 WEBKIT_API void
     65 webkit_set_cache_model                          (WebKitCacheModel     cache_model);
     66 
     67 WEBKIT_API WebKitCacheModel
     68 webkit_get_cache_model                          (void);
     69 
     70 G_END_DECLS
     71 
     72 #endif
     73