151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)/* 251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * Copyright (C) 2013 Google Inc. All rights reserved. 351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * 451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * Redistribution and use in source and binary forms, with or without 551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * modification, are permitted provided that the following conditions are 651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * met: 751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * 851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * * Redistributions of source code must retain the above copyright 951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * notice, this list of conditions and the following disclaimer. 1051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * * Redistributions in binary form must reproduce the above 1151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * copyright notice, this list of conditions and the following disclaimer 1251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * in the documentation and/or other materials provided with the 1351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * distribution. 1451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * * Neither the name of Google Inc. nor the names of its 1551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * contributors may be used to endorse or promote products derived from 1651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * this software without specific prior written permission. 1751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * 1851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) */ 3051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 3151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)#ifndef WebDatabaseObserver_h 3251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)#define WebDatabaseObserver_h 3351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 3451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)namespace blink { 3551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 3651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)class WebString; 3751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 3851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)class WebDatabaseObserver { 3951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)public: 4051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void databaseOpened( 4151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 4251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName, 4351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseDisplayName, 4451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) unsigned long estimatedSize) = 0; 4551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void databaseModified( 4651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 4751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName) = 0; 4851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void databaseClosed( 4951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 5051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName) = 0; 5151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void reportOpenDatabaseResult( 5251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 5351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName, 5451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) bool isSyncDatabase, 5551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) int errorSite, int webSqlErrorCode, int sqliteErrorCode) { } 5651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void reportChangeVersionResult( 5751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 5851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName, 5951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) bool isSyncDatabase, 6051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) int errorSite, int webSqlErrorCode, int sqliteErrorCode) { } 6151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void reportStartTransactionResult( 6251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 6351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName, 6451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) bool isSyncDatabase, 6551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) int errorSite, int webSqlErrorCode, int sqliteErrorCode) { } 6651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void reportCommitTransactionResult( 6751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 6851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName, 6951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) bool isSyncDatabase, 7051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) int errorSite, int webSqlErrorCode, int sqliteErrorCode) { } 7151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void reportExecuteStatementResult( 7251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 7351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName, 7451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) bool isSyncDatabase, 7551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) int errorSite, int webSqlErrorCode, int sqliteErrorCode) { } 7651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) virtual void reportVacuumDatabaseResult( 7751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseIdentifier, 7851b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) const WebString& databaseName, 7951b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) bool isSyncDatabase, int sqliteErrorCode) { } 8051b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 8151b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)protected: 8251b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) ~WebDatabaseObserver() { } 8351b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)}; 8451b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 8551b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)} // namespace blink 8651b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles) 8751b2906e11752df6c18351cf520e30522d3b53a1Torne (Richard Coles)#endif // WebDatabaseObserver_h 88