Reviewed by Sam.
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Nov 2007 01:16:23 +0000 (01:16 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Nov 2007 01:16:23 +0000 (01:16 +0000)
        Add new SQL callback interfaces and JS implementations of them.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSCustomSQLStatementCallback.cpp: Added.
        (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
        (WebCore::JSCustomSQLStatementCallback::handleEvent):
        * bindings/js/JSCustomSQLStatementCallback.h: Added.
        * bindings/js/JSCustomSQLStatementErrorCallback.cpp: Added.
        (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
        (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
        * bindings/js/JSCustomSQLStatementErrorCallback.h: Added.
        * bindings/js/JSCustomSQLTransactionCallback.cpp: Added.
        (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
        (WebCore::JSCustomSQLTransactionCallback::handleEvent):
        * bindings/js/JSCustomSQLTransactionCallback.h: Added.
        * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: Added.
        (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
        (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
        * bindings/js/JSCustomSQLTransactionErrorCallback.h: Added.
        * storage/JSCustomSQLStatementCallback.h: Added.
        * storage/JSCustomSQLStatementErrorCallback.h: Added.
        * storage/JSCustomSQLTransactionCallback.h: Added.
        * storage/JSCustomSQLTransactionErrorCallback.h: Added.
        * storage/SQLStatementCallback.h: Added.
        (WebCore::SQLStatementCallback::~SQLStatementCallback):
        * storage/SQLStatementCallback.idl: Added.
        * storage/SQLStatementErrorCallback.h: Added.
        (WebCore::SQLStatementErrorCallback::~SQLStatementErrorCallback):
        * storage/SQLStatementErrorCallback.idl: Added.
        * storage/SQLTransaction.h: Added.
        * storage/SQLTransaction.idl: Added.
        * storage/SQLTransactionCallback.h: Added.
        (WebCore::SQLTransactionCallback::~SQLTransactionCallback):
        * storage/SQLTransactionCallback.idl: Added.
        * storage/SQLTransactionErrorCallback.h: Added.
        (WebCore::SQLTransactionErrorCallback::~SQLTransactionErrorCallback):
        * storage/SQLTransactionErrorCallback.idl: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27335 268f45cc-cd09-0410-ab3c-d52691b4dbfc

25 files changed:
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSCustomSQLStatementCallback.cpp [new file with mode: 0644]
WebCore/bindings/js/JSCustomSQLStatementCallback.h [new file with mode: 0644]
WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp [new file with mode: 0644]
WebCore/bindings/js/JSCustomSQLStatementErrorCallback.h [new file with mode: 0644]
WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp [new file with mode: 0644]
WebCore/bindings/js/JSCustomSQLTransactionCallback.h [new file with mode: 0644]
WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp [new file with mode: 0644]
WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.h [new file with mode: 0644]
WebCore/storage/JSCustomSQLStatementCallback.h [new file with mode: 0644]
WebCore/storage/JSCustomSQLStatementErrorCallback.h [new file with mode: 0644]
WebCore/storage/JSCustomSQLTransactionCallback.h [new file with mode: 0644]
WebCore/storage/JSCustomSQLTransactionErrorCallback.h [new file with mode: 0644]
WebCore/storage/SQLStatementCallback.h [new file with mode: 0644]
WebCore/storage/SQLStatementCallback.idl [new file with mode: 0644]
WebCore/storage/SQLStatementErrorCallback.h [new file with mode: 0644]
WebCore/storage/SQLStatementErrorCallback.idl [new file with mode: 0644]
WebCore/storage/SQLTransaction.h [new file with mode: 0644]
WebCore/storage/SQLTransaction.idl [new file with mode: 0644]
WebCore/storage/SQLTransactionCallback.h [new file with mode: 0644]
WebCore/storage/SQLTransactionCallback.idl [new file with mode: 0644]
WebCore/storage/SQLTransactionErrorCallback.h [new file with mode: 0644]
WebCore/storage/SQLTransactionErrorCallback.idl [new file with mode: 0644]

index 9c48ae69e0f92b3cc7d6ae986122becb9dd85a23..1f9a39838b75a895538c698b6d7eb22250d49a99 100644 (file)
@@ -1,3 +1,46 @@
+2007-10-31  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Sam.
+
+        Add new SQL callback interfaces and JS implementations of them.
+        
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/js/JSCustomSQLStatementCallback.cpp: Added.
+        (WebCore::JSCustomSQLStatementCallback::JSCustomSQLStatementCallback):
+        (WebCore::JSCustomSQLStatementCallback::handleEvent):
+        * bindings/js/JSCustomSQLStatementCallback.h: Added.
+        * bindings/js/JSCustomSQLStatementErrorCallback.cpp: Added.
+        (WebCore::JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback):
+        (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
+        * bindings/js/JSCustomSQLStatementErrorCallback.h: Added.
+        * bindings/js/JSCustomSQLTransactionCallback.cpp: Added.
+        (WebCore::JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback):
+        (WebCore::JSCustomSQLTransactionCallback::handleEvent):
+        * bindings/js/JSCustomSQLTransactionCallback.h: Added.
+        * bindings/js/JSCustomSQLTransactionErrorCallback.cpp: Added.
+        (WebCore::JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback):
+        (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
+        * bindings/js/JSCustomSQLTransactionErrorCallback.h: Added.
+        * storage/JSCustomSQLStatementCallback.h: Added.
+        * storage/JSCustomSQLStatementErrorCallback.h: Added.
+        * storage/JSCustomSQLTransactionCallback.h: Added.
+        * storage/JSCustomSQLTransactionErrorCallback.h: Added.
+        * storage/SQLStatementCallback.h: Added.
+        (WebCore::SQLStatementCallback::~SQLStatementCallback):
+        * storage/SQLStatementCallback.idl: Added.
+        * storage/SQLStatementErrorCallback.h: Added.
+        (WebCore::SQLStatementErrorCallback::~SQLStatementErrorCallback):
+        * storage/SQLStatementErrorCallback.idl: Added.
+        * storage/SQLTransaction.h: Added.
+        * storage/SQLTransaction.idl: Added.
+        * storage/SQLTransactionCallback.h: Added.
+        (WebCore::SQLTransactionCallback::~SQLTransactionCallback):
+        * storage/SQLTransactionCallback.idl: Added.
+        * storage/SQLTransactionErrorCallback.h: Added.
+        (WebCore::SQLTransactionErrorCallback::~SQLTransactionErrorCallback):
+        * storage/SQLTransactionErrorCallback.idl: Added.
+
 2007-10-31  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by Dave Harrison.
index 42a30a7c66f58ad3cf852b7f75d33ec00728fccc..463c947f5295faab52a98e866d06f9b91b90fae5 100644 (file)
@@ -430,6 +430,7 @@ all : \
     JSSQLError.h \
     JSSQLResultSet.h \
     JSSQLResultSetRowList.h \
+    JSSQLTransaction.h \
     JSSVGAElement.h \
     JSSVGAngle.h \
     JSSVGAnimatedAngle.h \
index a84217959bbba5a112dbcda26f6053604deb3c70..8d752f370eb0f1deb20453e69acb0f9b5332382c 100644 (file)
                1A7CCAEB0CD901A100B7B64E /* SQLError.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CCAE90CD901A100B7B64E /* SQLError.idl */; };
                1A7CCAEE0CD901DB00B7B64E /* JSSQLError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CCAEC0CD901DB00B7B64E /* JSSQLError.cpp */; };
                1A7CCAEF0CD901DB00B7B64E /* JSSQLError.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCAED0CD901DB00B7B64E /* JSSQLError.h */; };
+               1A7CCB030CD945DD00B7B64E /* JSCustomSQLStatementCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CCAFB0CD945DD00B7B64E /* JSCustomSQLStatementCallback.cpp */; };
+               1A7CCB040CD945DD00B7B64E /* JSCustomSQLStatementCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCAFC0CD945DD00B7B64E /* JSCustomSQLStatementCallback.h */; };
+               1A7CCB050CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CCAFD0CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.cpp */; };
+               1A7CCB060CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCAFE0CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.h */; };
+               1A7CCB070CD945DD00B7B64E /* JSCustomSQLTransactionCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CCAFF0CD945DD00B7B64E /* JSCustomSQLTransactionCallback.cpp */; };
+               1A7CCB080CD945DD00B7B64E /* JSCustomSQLTransactionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB000CD945DD00B7B64E /* JSCustomSQLTransactionCallback.h */; };
+               1A7CCB090CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CCB010CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.cpp */; };
+               1A7CCB0A0CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB020CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.h */; };
+               1A7CCB100CD9462C00B7B64E /* SQLStatementCallback.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CCB0C0CD9462C00B7B64E /* SQLStatementCallback.idl */; };
+               1A7CCB110CD9462C00B7B64E /* SQLStatementErrorCallback.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CCB0D0CD9462C00B7B64E /* SQLStatementErrorCallback.idl */; };
+               1A7CCB120CD9462C00B7B64E /* SQLTransactionCallback.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CCB0E0CD9462C00B7B64E /* SQLTransactionCallback.idl */; };
+               1A7CCB130CD9462C00B7B64E /* SQLTransactionErrorCallback.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CCB0F0CD9462C00B7B64E /* SQLTransactionErrorCallback.idl */; };
+               1A7CCB190CD9469A00B7B64E /* SQLStatementCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB150CD9469A00B7B64E /* SQLStatementCallback.h */; };
+               1A7CCB1A0CD9469A00B7B64E /* SQLStatementErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB160CD9469A00B7B64E /* SQLStatementErrorCallback.h */; };
+               1A7CCB1B0CD9469A00B7B64E /* SQLTransactionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB170CD9469A00B7B64E /* SQLTransactionCallback.h */; };
+               1A7CCB1C0CD9469A00B7B64E /* SQLTransactionErrorCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB180CD9469A00B7B64E /* SQLTransactionErrorCallback.h */; };
+               1A7CCB240CD946FD00B7B64E /* SQLTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB220CD946FD00B7B64E /* SQLTransaction.h */; };
+               1A7CCB250CD946FD00B7B64E /* SQLTransaction.idl in Resources */ = {isa = PBXBuildFile; fileRef = 1A7CCB230CD946FD00B7B64E /* SQLTransaction.idl */; };
+               1A7CCB2E0CD9499700B7B64E /* JSSQLTransaction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CCB2C0CD9499700B7B64E /* JSSQLTransaction.cpp */; };
+               1A7CCB2F0CD9499700B7B64E /* JSSQLTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A7CCB2D0CD9499700B7B64E /* JSSQLTransaction.h */; };
                1A8180A50B1D4E4300CE46C4 /* ResourceResponse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8180A40B1D4E4300CE46C4 /* ResourceResponse.cpp */; };
                1A820D910A13EBA600AF843C /* ImageDocument.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A820D8F0A13EBA600AF843C /* ImageDocument.cpp */; };
                1A820D920A13EBA600AF843C /* ImageDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A820D900A13EBA600AF843C /* ImageDocument.h */; };
                1A7CCAE90CD901A100B7B64E /* SQLError.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLError.idl; sourceTree = "<group>"; };
                1A7CCAEC0CD901DB00B7B64E /* JSSQLError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLError.cpp; sourceTree = "<group>"; };
                1A7CCAED0CD901DB00B7B64E /* JSSQLError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLError.h; sourceTree = "<group>"; };
+               1A7CCAFB0CD945DD00B7B64E /* JSCustomSQLStatementCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomSQLStatementCallback.cpp; sourceTree = "<group>"; };
+               1A7CCAFC0CD945DD00B7B64E /* JSCustomSQLStatementCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomSQLStatementCallback.h; sourceTree = "<group>"; };
+               1A7CCAFD0CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomSQLStatementErrorCallback.cpp; sourceTree = "<group>"; };
+               1A7CCAFE0CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomSQLStatementErrorCallback.h; sourceTree = "<group>"; };
+               1A7CCAFF0CD945DD00B7B64E /* JSCustomSQLTransactionCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomSQLTransactionCallback.cpp; sourceTree = "<group>"; };
+               1A7CCB000CD945DD00B7B64E /* JSCustomSQLTransactionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomSQLTransactionCallback.h; sourceTree = "<group>"; };
+               1A7CCB010CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCustomSQLTransactionErrorCallback.cpp; sourceTree = "<group>"; };
+               1A7CCB020CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCustomSQLTransactionErrorCallback.h; sourceTree = "<group>"; };
+               1A7CCB0C0CD9462C00B7B64E /* SQLStatementCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLStatementCallback.idl; sourceTree = "<group>"; };
+               1A7CCB0D0CD9462C00B7B64E /* SQLStatementErrorCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLStatementErrorCallback.idl; sourceTree = "<group>"; };
+               1A7CCB0E0CD9462C00B7B64E /* SQLTransactionCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLTransactionCallback.idl; sourceTree = "<group>"; };
+               1A7CCB0F0CD9462C00B7B64E /* SQLTransactionErrorCallback.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLTransactionErrorCallback.idl; sourceTree = "<group>"; };
+               1A7CCB150CD9469A00B7B64E /* SQLStatementCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLStatementCallback.h; sourceTree = "<group>"; };
+               1A7CCB160CD9469A00B7B64E /* SQLStatementErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLStatementErrorCallback.h; sourceTree = "<group>"; };
+               1A7CCB170CD9469A00B7B64E /* SQLTransactionCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLTransactionCallback.h; sourceTree = "<group>"; };
+               1A7CCB180CD9469A00B7B64E /* SQLTransactionErrorCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLTransactionErrorCallback.h; sourceTree = "<group>"; };
+               1A7CCB220CD946FD00B7B64E /* SQLTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLTransaction.h; sourceTree = "<group>"; };
+               1A7CCB230CD946FD00B7B64E /* SQLTransaction.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SQLTransaction.idl; sourceTree = "<group>"; };
+               1A7CCB2C0CD9499700B7B64E /* JSSQLTransaction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSQLTransaction.cpp; sourceTree = "<group>"; };
+               1A7CCB2D0CD9499700B7B64E /* JSSQLTransaction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSQLTransaction.h; sourceTree = "<group>"; };
                1A8180A40B1D4E4300CE46C4 /* ResourceResponse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResourceResponse.cpp; sourceTree = "<group>"; };
                1A820D8F0A13EBA600AF843C /* ImageDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ImageDocument.cpp; sourceTree = "<group>"; };
                1A820D900A13EBA600AF843C /* ImageDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ImageDocument.h; sourceTree = "<group>"; };
                        name = sql;
                        sourceTree = "<group>";
                };
+               1A7CCB140CD9463100B7B64E /* To Be Removed */ = {
+                       isa = PBXGroup;
+                       children = (
+                               519611650CAC56570010A80C /* SQLCallback.h */,
+                               519611660CAC56570010A80C /* SQLCallback.idl */,
+                               1A2E6FF30CC67855004A2062 /* VersionChangeCallback.h */,
+                               1A2E6FF70CC6788D004A2062 /* VersionChangeCallback.idl */,
+                       );
+                       name = "To Be Removed";
+                       sourceTree = "<group>";
+               };
                1AE42F670AA4B8CB00C8612D /* cf */ = {
                        isa = PBXGroup;
                        children = (
                1AE82EC90CAAE177002237AE /* storage */ = {
                        isa = PBXGroup;
                        children = (
+                               1A7CCB140CD9463100B7B64E /* To Be Removed */,
                                5196115E0CAC56570010A80C /* Database.cpp */,
                                5196115F0CAC56570010A80C /* Database.h */,
                                519611600CAC56570010A80C /* Database.idl */,
                                519611620CAC56570010A80C /* DatabaseThread.h */,
                                1AD51A130CB59CD300953D11 /* DatabaseTracker.cpp */,
                                1AD51A120CB59CD300953D11 /* DatabaseTracker.h */,
-                               519611650CAC56570010A80C /* SQLCallback.h */,
-                               519611660CAC56570010A80C /* SQLCallback.idl */,
                                1A7CCAE80CD901A100B7B64E /* SQLError.h */,
                                1A7CCAE90CD901A100B7B64E /* SQLError.idl */,
                                519611670CAC56570010A80C /* SQLResultSet.cpp */,
                                1AFE117B0CBFFB36003017FA /* SQLResultSetRowList.cpp */,
                                1AFE117C0CBFFB36003017FA /* SQLResultSetRowList.h */,
                                1AFE118C0CBFFC4E003017FA /* SQLResultSetRowList.idl */,
-                               1A2E6FF30CC67855004A2062 /* VersionChangeCallback.h */,
-                               1A2E6FF70CC6788D004A2062 /* VersionChangeCallback.idl */,
+                               1A7CCB150CD9469A00B7B64E /* SQLStatementCallback.h */,
+                               1A7CCB0C0CD9462C00B7B64E /* SQLStatementCallback.idl */,
+                               1A7CCB160CD9469A00B7B64E /* SQLStatementErrorCallback.h */,
+                               1A7CCB0D0CD9462C00B7B64E /* SQLStatementErrorCallback.idl */,
+                               1A7CCB170CD9469A00B7B64E /* SQLTransactionCallback.h */,
+                               1A7CCB0E0CD9462C00B7B64E /* SQLTransactionCallback.idl */,
+                               1A7CCB180CD9469A00B7B64E /* SQLTransactionErrorCallback.h */,
+                               1A7CCB0F0CD9462C00B7B64E /* SQLTransactionErrorCallback.idl */,
+                               1A7CCB220CD946FD00B7B64E /* SQLTransaction.h */,
+                               1A7CCB230CD946FD00B7B64E /* SQLTransaction.idl */,
                        );
                        indentWidth = 4;
                        path = storage;
                                1AE82FEB0CAB07EE002237AE /* JSSQLResultSet.h */,
                                1AFE11970CBFFCC4003017FA /* JSSQLResultSetRowList.cpp */,
                                1AFE11980CBFFCC4003017FA /* JSSQLResultSetRowList.h */,
+                               1A7CCB2C0CD9499700B7B64E /* JSSQLTransaction.cpp */,
+                               1A7CCB2D0CD9499700B7B64E /* JSSQLTransaction.h */,
                                1A2E6FFC0CC67907004A2062 /* JSVersionChangeCallback.cpp */,
                                1A2E6FFD0CC67907004A2062 /* JSVersionChangeCallback.h */,
                        );
                                1432E8460C51493800B1500F /* GCController.h */,
                                1AE831050CAB166E002237AE /* JSCustomSQLCallback.cpp */,
                                1AE831040CAB166E002237AE /* JSCustomSQLCallback.h */,
+                               1A7CCAFB0CD945DD00B7B64E /* JSCustomSQLStatementCallback.cpp */,
+                               1A7CCAFC0CD945DD00B7B64E /* JSCustomSQLStatementCallback.h */,
+                               1A7CCAFD0CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.cpp */,
+                               1A7CCAFE0CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.h */,
+                               1A7CCAFF0CD945DD00B7B64E /* JSCustomSQLTransactionCallback.cpp */,
+                               1A7CCB000CD945DD00B7B64E /* JSCustomSQLTransactionCallback.h */,
+                               1A7CCB010CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.cpp */,
+                               1A7CCB020CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.h */,
                                1A2E70610CC67CAA004A2062 /* JSCustomVersionChangeCallback.cpp */,
                                1A2E70600CC67CAA004A2062 /* JSCustomVersionChangeCallback.h */,
                                E10B93C20B73C291003ED890 /* JSCustomXPathNSResolver.cpp */,
                                A86938D00CD4931300B666A1 /* SVGResourceFilterPlatformDataMac.h in Headers */,
                                1A7CCAEA0CD901A100B7B64E /* SQLError.h in Headers */,
                                1A7CCAEF0CD901DB00B7B64E /* JSSQLError.h in Headers */,
+                               1A7CCB040CD945DD00B7B64E /* JSCustomSQLStatementCallback.h in Headers */,
+                               1A7CCB060CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.h in Headers */,
+                               1A7CCB080CD945DD00B7B64E /* JSCustomSQLTransactionCallback.h in Headers */,
+                               1A7CCB0A0CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.h in Headers */,
+                               1A7CCB190CD9469A00B7B64E /* SQLStatementCallback.h in Headers */,
+                               1A7CCB1A0CD9469A00B7B64E /* SQLStatementErrorCallback.h in Headers */,
+                               1A7CCB1B0CD9469A00B7B64E /* SQLTransactionCallback.h in Headers */,
+                               1A7CCB1C0CD9469A00B7B64E /* SQLTransactionErrorCallback.h in Headers */,
+                               1A7CCB240CD946FD00B7B64E /* SQLTransaction.h in Headers */,
+                               1A7CCB2F0CD9499700B7B64E /* JSSQLTransaction.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                E44613B10CD6331000FADA75 /* TimeRanges.idl in Resources */,
                                E44613B20CD6331000FADA75 /* VoidCallback.idl in Resources */,
                                1A7CCAEB0CD901A100B7B64E /* SQLError.idl in Resources */,
+                               1A7CCB100CD9462C00B7B64E /* SQLStatementCallback.idl in Resources */,
+                               1A7CCB110CD9462C00B7B64E /* SQLStatementErrorCallback.idl in Resources */,
+                               1A7CCB120CD9462C00B7B64E /* SQLTransactionCallback.idl in Resources */,
+                               1A7CCB130CD9462C00B7B64E /* SQLTransactionErrorCallback.idl in Resources */,
+                               1A7CCB250CD946FD00B7B64E /* SQLTransaction.idl in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                BC98543D0CD3D98B00069BC1 /* JSConsole.cpp in Sources */,
                                A869385C0CD4831500B666A1 /* SVGResourceFilterPlatformDataMac.mm in Sources */,
                                1A7CCAEE0CD901DB00B7B64E /* JSSQLError.cpp in Sources */,
+                               1A7CCB030CD945DD00B7B64E /* JSCustomSQLStatementCallback.cpp in Sources */,
+                               1A7CCB050CD945DD00B7B64E /* JSCustomSQLStatementErrorCallback.cpp in Sources */,
+                               1A7CCB070CD945DD00B7B64E /* JSCustomSQLTransactionCallback.cpp in Sources */,
+                               1A7CCB090CD945DD00B7B64E /* JSCustomSQLTransactionErrorCallback.cpp in Sources */,
+                               1A7CCB2E0CD9499700B7B64E /* JSSQLTransaction.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp b/WebCore/bindings/js/JSCustomSQLStatementCallback.cpp
new file mode 100644 (file)
index 0000000..d53cea3
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSCustomSQLStatementCallback.h"
+
+#include "CString.h"
+#include "Frame.h"
+#include "kjs_proxy.h"
+#include "JSSQLResultSet.h"
+#include "JSSQLTransaction.h"
+#include "Page.h"
+
+namespace WebCore {
+    
+using namespace KJS;
+    
+JSCustomSQLStatementCallback::JSCustomSQLStatementCallback(JSObject* callback, Frame* frame)
+    : m_callback(callback)
+    , m_frame(frame)
+{
+}
+    
+void JSCustomSQLStatementCallback::handleEvent(SQLTransaction* transaction, SQLResultSet* resultSet, bool& raisedException)
+{
+    ASSERT(m_callback);
+    ASSERT(m_frame);
+        
+    KJSProxy* proxy = m_frame->scriptProxy();
+    if (!proxy)
+        return;
+        
+    ScriptInterpreter* interpreter = proxy->interpreter();
+    ExecState* exec = interpreter->globalExec();
+        
+    KJS::JSLock lock;
+        
+    JSValue* handleEventFuncValue = m_callback->get(exec, "handleEvent");
+    JSObject* handleEventFunc = 0;
+    if (handleEventFuncValue->isObject()) {
+        handleEventFunc = static_cast<JSObject*>(handleEventFuncValue);
+        if (!handleEventFunc->implementsCall())
+            handleEventFunc = 0;
+    }
+        
+    if (!handleEventFunc && !m_callback->implementsCall()) {
+        // FIXME: Should an exception be thrown here?
+        return;
+    }
+        
+    RefPtr<JSCustomSQLStatementCallback> protect(this);
+        
+    List args;
+    args.append(toJS(exec, transaction));
+    args.append(toJS(exec, resultSet));
+        
+    interpreter->startTimeoutCheck();
+    if (handleEventFunc)
+        handleEventFunc->call(exec, m_callback, args);
+    else
+        m_callback->call(exec, m_callback, args);
+    interpreter->stopTimeoutCheck();
+        
+    if (exec->hadException()) {
+        JSObject* exception = exec->exception()->toObject(exec);
+        String message = exception->get(exec, exec->propertyNames().message)->toString(exec);
+        int lineNumber = exception->get(exec, "line")->toInt32(exec);
+        String sourceURL = exception->get(exec, "sourceURL")->toString(exec);
+        if (Interpreter::shouldPrintExceptions())
+            printf("SQLStatementCallback: %s\n", message.utf8().data());
+        if (Page* page = m_frame->page())
+            page->chrome()->addMessageToConsole(JSMessageSource, ErrorMessageLevel, message, lineNumber, sourceURL);
+        
+        raisedException = true;
+        
+        exec->clearException();
+    }
+        
+    Document::updateDocumentsRendering();
+}
+    
+}
diff --git a/WebCore/bindings/js/JSCustomSQLStatementCallback.h b/WebCore/bindings/js/JSCustomSQLStatementCallback.h
new file mode 100644 (file)
index 0000000..27bca7b
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLStatementCallback_h
+#define JSCustomSQLStatementCallback_h
+
+#include "SQLStatementCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+
+class Frame;
+class SQLResultSet;
+
+class JSCustomSQLStatementCallback : public SQLStatementCallback {
+public:
+    JSCustomSQLStatementCallback(KJS::JSObject* callback, Frame*);
+    
+    virtual void handleEvent(SQLTransaction*, SQLResultSet*, bool& raisedException);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+
+}
+
+#endif // JSCustomSQLStatementCallback_h
diff --git a/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp b/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp
new file mode 100644 (file)
index 0000000..9e64298
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSCustomSQLStatementErrorCallback.h"
+
+#include "CString.h"
+#include "Frame.h"
+#include "kjs_proxy.h"
+#include "JSSQLError.h"
+#include "JSSQLTransaction.h"
+#include "Page.h"
+
+namespace WebCore {
+    
+using namespace KJS;
+    
+JSCustomSQLStatementErrorCallback::JSCustomSQLStatementErrorCallback(JSObject* callback, Frame* frame)
+    : m_callback(callback)
+    , m_frame(frame)
+{
+}
+    
+bool JSCustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLError* error)
+{
+    ASSERT(m_callback);
+    ASSERT(m_frame);
+        
+    KJSProxy* proxy = m_frame->scriptProxy();
+    if (!proxy)
+        return true;
+        
+    ScriptInterpreter* interpreter = proxy->interpreter();
+    ExecState* exec = interpreter->globalExec();
+        
+    KJS::JSLock lock;
+        
+    JSValue* handleEventFuncValue = m_callback->get(exec, "handleEvent");
+    JSObject* handleEventFunc = 0;
+    if (handleEventFuncValue->isObject()) {
+        handleEventFunc = static_cast<JSObject*>(handleEventFuncValue);
+        if (!handleEventFunc->implementsCall())
+            handleEventFunc = 0;
+    }
+        
+    if (!handleEventFunc && !m_callback->implementsCall()) {
+        // FIXME: Should an exception be thrown here?
+        return true;
+    }
+        
+    RefPtr<JSCustomSQLStatementErrorCallback> protect(this);
+        
+    List args;
+    args.append(toJS(exec, transaction));
+    args.append(toJS(exec, error));
+        
+    JSValue *result;
+    interpreter->startTimeoutCheck();
+    if (handleEventFunc)
+        result = handleEventFunc->call(exec, m_callback, args);
+    else
+        result = m_callback->call(exec, m_callback, args);
+    interpreter->stopTimeoutCheck();
+        
+    if (exec->hadException()) {
+        JSObject* exception = exec->exception()->toObject(exec);
+        String message = exception->get(exec, exec->propertyNames().message)->toString(exec);
+        int lineNumber = exception->get(exec, "line")->toInt32(exec);
+        String sourceURL = exception->get(exec, "sourceURL")->toString(exec);
+        if (Interpreter::shouldPrintExceptions())
+            printf("SQLStatementErrorCallback: %s\n", message.utf8().data());
+        if (Page* page = m_frame->page())
+            page->chrome()->addMessageToConsole(JSMessageSource, ErrorMessageLevel, message, lineNumber, sourceURL);
+        exec->clearException();
+            
+        // The spec says:
+        // "If the error callback returns false, then move on to the next statement..."
+        // "Otherwise, the error callback did not return false, or there was no error callback"
+        // Therefore an exception and returning true are the same thing - so, return true on an exception
+        return true;
+    }
+        
+    Document::updateDocumentsRendering();
+
+    return result->toBoolean(exec);
+}
+
+}
diff --git a/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.h b/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.h
new file mode 100644 (file)
index 0000000..7bc40c6
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLStatementErrorCallback_h
+#define JSCustomSQLStatementErrorCallback_h
+
+#include "SQLStatementErrorCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+    
+class Frame;
+class SQLError;
+    
+class JSCustomSQLStatementErrorCallback : public SQLStatementErrorCallback {
+public:
+    JSCustomSQLStatementErrorCallback(KJS::JSObject* callback, Frame*);
+        
+    virtual bool handleEvent(SQLTransaction*, SQLError*);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+    
+}
+
+#endif // JSCustomSQLStatementErrorCallback_h
+
diff --git a/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp b/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp
new file mode 100644 (file)
index 0000000..6445539
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSCustomSQLTransactionCallback.h"
+
+#include "CString.h"
+#include "Frame.h"
+#include "kjs_proxy.h"
+#include "JSSQLTransaction.h"
+#include "Page.h"
+
+namespace WebCore {
+    
+using namespace KJS;
+    
+JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback(JSObject* callback, Frame* frame)
+    : m_callback(callback)
+    , m_frame(frame)
+{
+}
+    
+void JSCustomSQLTransactionCallback::handleEvent(SQLTransaction* transaction, bool& raisedException)
+{
+    ASSERT(m_callback);
+    ASSERT(m_frame);
+        
+    KJSProxy* proxy = m_frame->scriptProxy();
+    if (!proxy)
+        return;
+        
+    ScriptInterpreter* interpreter = proxy->interpreter();
+    ExecState* exec = interpreter->globalExec();
+        
+    KJS::JSLock lock;
+        
+    JSValue* handleEventFuncValue = m_callback->get(exec, "handleEvent");
+    JSObject* handleEventFunc = 0;
+    if (handleEventFuncValue->isObject()) {
+        handleEventFunc = static_cast<JSObject*>(handleEventFuncValue);
+        if (!handleEventFunc->implementsCall())
+            handleEventFunc = 0;
+    }
+        
+    if (!handleEventFunc && !m_callback->implementsCall()) {
+        // FIXME: Should an exception be thrown here?
+        return;
+    }
+        
+    RefPtr<JSCustomSQLTransactionCallback> protect(this);
+        
+    List args;
+    args.append(toJS(exec, transaction));
+
+    interpreter->startTimeoutCheck();
+    if (handleEventFunc)
+        handleEventFunc->call(exec, m_callback, args);
+    else
+        m_callback->call(exec, m_callback, args);
+    interpreter->stopTimeoutCheck();
+        
+    if (exec->hadException()) {
+        JSObject* exception = exec->exception()->toObject(exec);
+        String message = exception->get(exec, exec->propertyNames().message)->toString(exec);
+        int lineNumber = exception->get(exec, "line")->toInt32(exec);
+        String sourceURL = exception->get(exec, "sourceURL")->toString(exec);
+        if (Interpreter::shouldPrintExceptions())
+            printf("SQLTransactionCallback: %s\n", message.utf8().data());
+        if (Page* page = m_frame->page())
+            page->chrome()->addMessageToConsole(JSMessageSource, ErrorMessageLevel, message, lineNumber, sourceURL);
+        exec->clearException();
+        
+        raisedException = true;
+    }
+        
+    Document::updateDocumentsRendering();
+}
+    
+}
diff --git a/WebCore/bindings/js/JSCustomSQLTransactionCallback.h b/WebCore/bindings/js/JSCustomSQLTransactionCallback.h
new file mode 100644 (file)
index 0000000..40f099d
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLTransactionCallback_h
+#define JSCustomSQLTransactionCallback_h
+
+#include "SQLTransactionCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+
+class Frame;
+class SQLResultSet;
+
+class JSCustomSQLTransactionCallback : public SQLTransactionCallback {
+public:
+    JSCustomSQLTransactionCallback(KJS::JSObject* callback, Frame*);
+    
+    virtual void handleEvent(SQLTransaction*, bool& raisedException);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+
+}
+
+#endif // JSCustomSQLTransactionCallback_h
diff --git a/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp b/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp
new file mode 100644 (file)
index 0000000..206f62b
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "JSCustomSQLTransactionErrorCallback.h"
+
+#include "CString.h"
+#include "Frame.h"
+#include "kjs_proxy.h"
+#include "JSSQLError.h"
+#include "Page.h"
+
+namespace WebCore {
+    
+using namespace KJS;
+    
+JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback(JSObject* callback, Frame* frame)
+    : m_callback(callback)
+    , m_frame(frame)
+{
+}
+    
+bool JSCustomSQLTransactionErrorCallback::handleEvent(SQLError* error)
+{
+    ASSERT(m_callback);
+    ASSERT(m_frame);
+        
+    KJSProxy* proxy = m_frame->scriptProxy();
+    if (!proxy)
+        return true;
+        
+    ScriptInterpreter* interpreter = proxy->interpreter();
+    ExecState* exec = interpreter->globalExec();
+        
+    KJS::JSLock lock;
+        
+    JSValue* handleEventFuncValue = m_callback->get(exec, "handleEvent");
+    JSObject* handleEventFunc = 0;
+    if (handleEventFuncValue->isObject()) {
+        handleEventFunc = static_cast<JSObject*>(handleEventFuncValue);
+        if (!handleEventFunc->implementsCall())
+            handleEventFunc = 0;
+    }
+        
+    if (!handleEventFunc && !m_callback->implementsCall()) {
+        // FIXME: Should an exception be thrown here?
+        return true;
+    }
+        
+    RefPtr<JSCustomSQLTransactionErrorCallback> protect(this);
+        
+    List args;
+    args.append(toJS(exec, error));
+
+    JSValue *result;
+    interpreter->startTimeoutCheck();
+    if (handleEventFunc)
+        result = handleEventFunc->call(exec, m_callback, args);
+    else
+        result = m_callback->call(exec, m_callback, args);
+    interpreter->stopTimeoutCheck();
+        
+    if (exec->hadException()) {
+        JSObject* exception = exec->exception()->toObject(exec);
+        String message = exception->get(exec, exec->propertyNames().message)->toString(exec);
+        int lineNumber = exception->get(exec, "line")->toInt32(exec);
+        String sourceURL = exception->get(exec, "sourceURL")->toString(exec);
+        if (Interpreter::shouldPrintExceptions())
+            printf("SQLTransactionErrorCallback: %s\n", message.utf8().data());
+        if (Page* page = m_frame->page())
+            page->chrome()->addMessageToConsole(JSMessageSource, ErrorMessageLevel, message, lineNumber, sourceURL);
+        exec->clearException();
+    }
+        
+    Document::updateDocumentsRendering();
+    
+    return result->toBoolean(exec);
+}
+    
+}
diff --git a/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.h b/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.h
new file mode 100644 (file)
index 0000000..6b079c4
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLTransactionErrorCallback_h
+#define JSCustomSQLTransactionErrorCallback_h
+
+#include "SQLTransactionErrorCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+
+class Frame;
+class SQLError;
+
+class JSCustomSQLTransactionErrorCallback : public SQLTransactionErrorCallback {
+public:
+    JSCustomSQLTransactionErrorCallback(KJS::JSObject* callback, Frame*);
+    
+    virtual bool handleEvent(SQLError*);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+
+}
+
+#endif // JSCustomSQLTransactionErrorCallback_h
diff --git a/WebCore/storage/JSCustomSQLStatementCallback.h b/WebCore/storage/JSCustomSQLStatementCallback.h
new file mode 100644 (file)
index 0000000..27bca7b
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLStatementCallback_h
+#define JSCustomSQLStatementCallback_h
+
+#include "SQLStatementCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+
+class Frame;
+class SQLResultSet;
+
+class JSCustomSQLStatementCallback : public SQLStatementCallback {
+public:
+    JSCustomSQLStatementCallback(KJS::JSObject* callback, Frame*);
+    
+    virtual void handleEvent(SQLTransaction*, SQLResultSet*, bool& raisedException);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+
+}
+
+#endif // JSCustomSQLStatementCallback_h
diff --git a/WebCore/storage/JSCustomSQLStatementErrorCallback.h b/WebCore/storage/JSCustomSQLStatementErrorCallback.h
new file mode 100644 (file)
index 0000000..7bc40c6
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLStatementErrorCallback_h
+#define JSCustomSQLStatementErrorCallback_h
+
+#include "SQLStatementErrorCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+    
+class Frame;
+class SQLError;
+    
+class JSCustomSQLStatementErrorCallback : public SQLStatementErrorCallback {
+public:
+    JSCustomSQLStatementErrorCallback(KJS::JSObject* callback, Frame*);
+        
+    virtual bool handleEvent(SQLTransaction*, SQLError*);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+    
+}
+
+#endif // JSCustomSQLStatementErrorCallback_h
+
diff --git a/WebCore/storage/JSCustomSQLTransactionCallback.h b/WebCore/storage/JSCustomSQLTransactionCallback.h
new file mode 100644 (file)
index 0000000..40f099d
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLTransactionCallback_h
+#define JSCustomSQLTransactionCallback_h
+
+#include "SQLTransactionCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+
+class Frame;
+class SQLResultSet;
+
+class JSCustomSQLTransactionCallback : public SQLTransactionCallback {
+public:
+    JSCustomSQLTransactionCallback(KJS::JSObject* callback, Frame*);
+    
+    virtual void handleEvent(SQLTransaction*, bool& raisedException);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+
+}
+
+#endif // JSCustomSQLTransactionCallback_h
diff --git a/WebCore/storage/JSCustomSQLTransactionErrorCallback.h b/WebCore/storage/JSCustomSQLTransactionErrorCallback.h
new file mode 100644 (file)
index 0000000..6b079c4
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef JSCustomSQLTransactionErrorCallback_h
+#define JSCustomSQLTransactionErrorCallback_h
+
+#include "SQLTransactionErrorCallback.h"
+
+#include <kjs/object.h>
+#include <kjs/protect.h>
+#include <wtf/Forward.h>
+
+namespace KJS {
+    class JSObject;
+}
+
+namespace WebCore {
+
+class Frame;
+class SQLError;
+
+class JSCustomSQLTransactionErrorCallback : public SQLTransactionErrorCallback {
+public:
+    JSCustomSQLTransactionErrorCallback(KJS::JSObject* callback, Frame*);
+    
+    virtual bool handleEvent(SQLError*);
+private:
+    KJS::ProtectedPtr<KJS::JSObject> m_callback;
+    RefPtr<Frame> m_frame;
+};
+
+}
+
+#endif // JSCustomSQLTransactionErrorCallback_h
diff --git a/WebCore/storage/SQLStatementCallback.h b/WebCore/storage/SQLStatementCallback.h
new file mode 100644 (file)
index 0000000..9a4b059
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef SQLStatementCallback_h
+#define SQLStatementCallback_h
+
+#include "Threading.h"
+
+namespace WebCore {
+
+class SQLTransaction;
+class SQLResultSet;
+    
+class SQLStatementCallback : public ThreadSafeShared<SQLStatementCallback> {
+public:
+    virtual ~SQLStatementCallback() { }
+    virtual void handleEvent(SQLTransaction*, SQLResultSet*, bool& raisedException) = 0;
+};
+
+}
+
+#endif // SQLStatementErrorCallback_h
+
+
diff --git a/WebCore/storage/SQLStatementCallback.idl b/WebCore/storage/SQLStatementCallback.idl
new file mode 100644 (file)
index 0000000..9ac5f4c
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+
+    interface SQLStatementCallback {
+        void handleEvent(in SQLTransaction transaction);
+    };
+
+}
diff --git a/WebCore/storage/SQLStatementErrorCallback.h b/WebCore/storage/SQLStatementErrorCallback.h
new file mode 100644 (file)
index 0000000..37ad231
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SQLStatementErrorCallback_h
+#define SQLStatementErrorCallback_h
+
+#include "Threading.h"
+
+namespace WebCore {
+
+class SQLTransaction;
+class SQLError;
+    
+class SQLStatementErrorCallback : public ThreadSafeShared<SQLStatementErrorCallback> {
+public:
+    virtual ~SQLStatementErrorCallback() { }
+    virtual bool handleEvent(SQLTransaction*, SQLError*) = 0;
+};
+
+}
+
+#endif // SQLStatementErrorCallback_h
+
+
diff --git a/WebCore/storage/SQLStatementErrorCallback.idl b/WebCore/storage/SQLStatementErrorCallback.idl
new file mode 100644 (file)
index 0000000..9fae8bf
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+
+    interface SQLStatementErrorCallback {
+        boolean handleEvent(in SQLTransaction transaction, in SQLError error);
+    };
+
+}
diff --git a/WebCore/storage/SQLTransaction.h b/WebCore/storage/SQLTransaction.h
new file mode 100644 (file)
index 0000000..13348f5
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SQLTransaction_h
+#define SQLTransaction_h
+
+#include "Threading.h"
+
+namespace WebCore {
+
+class SQLTransaction : public ThreadSafeShared<SQLTransaction> {
+};
+    
+} // namespace WebCore
+
+#endif // SQLTransaction_h
+
diff --git a/WebCore/storage/SQLTransaction.idl b/WebCore/storage/SQLTransaction.idl
new file mode 100644 (file)
index 0000000..d78f172
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+
+    interface SQLTransaction {
+    };
+}
diff --git a/WebCore/storage/SQLTransactionCallback.h b/WebCore/storage/SQLTransactionCallback.h
new file mode 100644 (file)
index 0000000..0affd1b
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *Transaction
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SQLTransactionCallback_h
+#define SQLTransactionCallback_h
+
+#include "Threading.h"
+
+namespace WebCore {
+
+class SQLTransaction;
+class SQLError;
+    
+class SQLTransactionCallback : public ThreadSafeShared<SQLTransactionCallback> {
+public:
+    virtual ~SQLTransactionCallback() { }
+    virtual void handleEvent(SQLTransaction*, bool& raisedException) = 0;
+};
+
+}
+
+#endif // SQLTransactionCallback_h
diff --git a/WebCore/storage/SQLTransactionCallback.idl b/WebCore/storage/SQLTransactionCallback.idl
new file mode 100644 (file)
index 0000000..cee726f
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+
+    interface SQLTransactionCallback {
+        void handleEvent(in SQLTransaction transaction);
+    };
+
+}
diff --git a/WebCore/storage/SQLTransactionErrorCallback.h b/WebCore/storage/SQLTransactionErrorCallback.h
new file mode 100644 (file)
index 0000000..73be74d
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SQLTransactionErrorCallback_h
+#define SQLTransactionErrorCallback_h
+
+#include "Threading.h"
+
+namespace WebCore {
+    
+    class SQLError;
+    
+    class SQLTransactionErrorCallback : public ThreadSafeShared<SQLTransactionErrorCallback> {
+    public:
+        virtual ~SQLTransactionErrorCallback() { }
+        virtual bool handleEvent(SQLError*) = 0;
+    };
+    
+}
+
+#endif // SQLTransactionErrorCallback_h
+
+
diff --git a/WebCore/storage/SQLTransactionErrorCallback.idl b/WebCore/storage/SQLTransactionErrorCallback.idl
new file mode 100644 (file)
index 0000000..9355d9a
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module storage {
+
+    interface SQLTransactionErrorCallback {
+        void handleEvent(in SQLError error);
+    };
+
+}