2 * Copyright (C) 2007 Apple Inc. All rights reserved.
\r
4 * Redistribution and use in source and binary forms, with or without
\r
5 * modification, are permitted provided that the following conditions
\r
8 * 1. Redistributions of source code must retain the above copyright
\r
9 * notice, this list of conditions and the following disclaimer.
\r
10 * 2. Redistributions in binary form must reproduce the above copyright
\r
11 * notice, this list of conditions and the following disclaimer in the
\r
12 * documentation and/or other materials provided with the distribution.
\r
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
\r
14 * its contributors may be used to endorse or promote products derived
\r
15 * from this software without specific prior written permission.
\r
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
\r
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
\r
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
\r
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
\r
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
\r
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
\r
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
\r
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\r
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
\r
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
28 #ifndef WebDatabaseManager_h
\r
29 #define WebDatabaseManager_h
\r
31 #include "IWebDatabaseManager.h"
\r
33 class WebDatabaseManager : public IWebDatabaseManager {
\r
35 static WebDatabaseManager* createInstance();
\r
38 virtual HRESULT STDMETHODCALLTYPE QueryInterface(
\r
39 /* [in] */ REFIID riid,
\r
40 /* [iid_is][out] */ void** ppvObject);
\r
42 virtual ULONG STDMETHODCALLTYPE AddRef();
\r
44 virtual ULONG STDMETHODCALLTYPE Release();
\r
46 // IWebDatabaseManager
\r
47 virtual HRESULT STDMETHODCALLTYPE sharedWebDatabaseManager(
\r
48 /* [retval][out] */ IWebDatabaseManager** result);
\r
50 virtual HRESULT STDMETHODCALLTYPE origins(
\r
51 /* [retval][out] */ IEnumVARIANT** result);
\r
53 virtual HRESULT STDMETHODCALLTYPE databasesWithOrigin(
\r
54 /* [in] */ IWebSecurityOrigin* origin,
\r
55 /* [retval][out] */ IEnumVARIANT** result);
\r
57 virtual HRESULT STDMETHODCALLTYPE detailsForDatabaseWithOrigin(
\r
58 /* [in] */ BSTR databaseName,
\r
59 /* [in] */ IWebSecurityOrigin* origin,
\r
60 /* [retval][out] */ IPropertyBag** result);
\r
62 virtual HRESULT STDMETHODCALLTYPE deleteAllDatabases();
\r
64 virtual HRESULT STDMETHODCALLTYPE deleteDatabasesWithOrigin(
\r
65 /* [in] */ IWebSecurityOrigin* origin);
\r
67 virtual HRESULT STDMETHODCALLTYPE deleteDatabaseWithOrigin(
\r
68 /* [in] */ BSTR databaseName,
\r
69 /* [in] */ IWebSecurityOrigin* origin);
\r
71 WebDatabaseManager();
\r
72 ~WebDatabaseManager();
\r
77 void WebKitSetWebDatabasesPathIfNecessary();
\r