| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 class WebIDBKeyPath; | 42 class WebIDBKeyPath; |
| 43 class WebIDBKeyRange; | 43 class WebIDBKeyRange; |
| 44 class WebIDBObserver; | 44 class WebIDBObserver; |
| 45 | 45 |
| 46 class WebIDBDatabase { | 46 class WebIDBDatabase { |
| 47 public: | 47 public: |
| 48 virtual ~WebIDBDatabase() { } | 48 virtual ~WebIDBDatabase() { } |
| 49 | 49 |
| 50 virtual void createObjectStore(long long transactionId, long long objectStor
eId, const WebString& name, const WebIDBKeyPath&, bool autoIncrement) = 0; | 50 virtual void createObjectStore(long long transactionId, long long objectStor
eId, const WebString& name, const WebIDBKeyPath&, bool autoIncrement) = 0; |
| 51 virtual void deleteObjectStore(long long transactionId, long long objectStor
eId) = 0; | 51 virtual void deleteObjectStore(long long transactionId, long long objectStor
eId) = 0; |
| 52 virtual void renameObjectStore(long long transactionId, long long objectStor
eId, const WebString& name) = 0; |
| 52 virtual void createTransaction(long long id, WebIDBDatabaseCallbacks*, const
WebVector<long long>& scope, WebIDBTransactionMode) = 0; | 53 virtual void createTransaction(long long id, WebIDBDatabaseCallbacks*, const
WebVector<long long>& scope, WebIDBTransactionMode) = 0; |
| 53 virtual void close() = 0; | 54 virtual void close() = 0; |
| 54 virtual void versionChangeIgnored() = 0; | 55 virtual void versionChangeIgnored() = 0; |
| 55 | 56 |
| 56 virtual void abort(long long transactionId) = 0; | 57 virtual void abort(long long transactionId) = 0; |
| 57 virtual void commit(long long transactionId) = 0; | 58 virtual void commit(long long transactionId) = 0; |
| 58 | 59 |
| 59 virtual void createIndex(long long transactionId, long long objectStoreId, l
ong long indexId, const WebString& name, const WebIDBKeyPath&, bool unique, bool
multiEntry) = 0; | 60 virtual void createIndex(long long transactionId, long long objectStoreId, l
ong long indexId, const WebString& name, const WebIDBKeyPath&, bool unique, bool
multiEntry) = 0; |
| 60 virtual void deleteIndex(long long transactionId, long long objectStoreId, l
ong long indexId) = 0; | 61 virtual void deleteIndex(long long transactionId, long long objectStoreId, l
ong long indexId) = 0; |
| 62 virtual void renameIndex(long long transactionId, long long objectStoreId, l
ong long indexId, const WebString& newName) = 0; |
| 61 | 63 |
| 62 static const long long minimumIndexId = 30; | 64 static const long long minimumIndexId = 30; |
| 63 | 65 |
| 64 typedef WebVector<WebIDBKey> WebIndexKeys; | 66 typedef WebVector<WebIDBKey> WebIndexKeys; |
| 65 | 67 |
| 66 virtual int32_t addObserver(std::unique_ptr<WebIDBObserver>, long long trans
actionId) = 0; | 68 virtual int32_t addObserver(std::unique_ptr<WebIDBObserver>, long long trans
actionId) = 0; |
| 67 virtual void removeObservers(const WebVector<int32_t>& observerIdsToRemove)
= 0; | 69 virtual void removeObservers(const WebVector<int32_t>& observerIdsToRemove)
= 0; |
| 68 virtual void get(long long transactionId, long long objectStoreId, long long
indexId, const WebIDBKeyRange&, bool keyOnly, WebIDBCallbacks*) = 0; | 70 virtual void get(long long transactionId, long long objectStoreId, long long
indexId, const WebIDBKeyRange&, bool keyOnly, WebIDBCallbacks*) = 0; |
| 69 virtual void getAll(long long transactionId, long long objectStoreId, long l
ong indexId, const WebIDBKeyRange&, long long maxCount, bool keyOnly, WebIDBCall
backs*) = 0; | 71 virtual void getAll(long long transactionId, long long objectStoreId, long l
ong indexId, const WebIDBKeyRange&, long long maxCount, bool keyOnly, WebIDBCall
backs*) = 0; |
| 70 virtual void put(long long transactionId, long long objectStoreId, const Web
Data& value, const WebVector<WebBlobInfo>&, const WebIDBKey&, WebIDBPutMode, Web
IDBCallbacks*, const WebVector<long long>& indexIds, const WebVector<WebIndexKey
s>&) = 0; | 72 virtual void put(long long transactionId, long long objectStoreId, const Web
Data& value, const WebVector<WebBlobInfo>&, const WebIDBKey&, WebIDBPutMode, Web
IDBCallbacks*, const WebVector<long long>& indexIds, const WebVector<WebIndexKey
s>&) = 0; |
| 71 virtual void setIndexKeys(long long transactionId, long long objectStoreId,
const WebIDBKey&, const WebVector<long long>& indexIds, const WebVector<WebIndex
Keys>&) = 0; | 73 virtual void setIndexKeys(long long transactionId, long long objectStoreId,
const WebIDBKey&, const WebVector<long long>& indexIds, const WebVector<WebIndex
Keys>&) = 0; |
| 72 virtual void setIndexesReady(long long transactionId, long long objectStoreI
d, const WebVector<long long>& indexIds) = 0; | 74 virtual void setIndexesReady(long long transactionId, long long objectStoreI
d, const WebVector<long long>& indexIds) = 0; |
| 73 virtual void openCursor(long long transactionId, long long objectStoreId, lo
ng long indexId, const WebIDBKeyRange&, WebIDBCursorDirection, bool keyOnly, Web
IDBTaskType, WebIDBCallbacks*) = 0; | 75 virtual void openCursor(long long transactionId, long long objectStoreId, lo
ng long indexId, const WebIDBKeyRange&, WebIDBCursorDirection, bool keyOnly, Web
IDBTaskType, WebIDBCallbacks*) = 0; |
| 74 virtual void count(long long transactionId, long long objectStoreId, long lo
ng indexId, const WebIDBKeyRange&, WebIDBCallbacks*) = 0; | 76 virtual void count(long long transactionId, long long objectStoreId, long lo
ng indexId, const WebIDBKeyRange&, WebIDBCallbacks*) = 0; |
| 75 virtual void deleteRange(long long transactionId, long long objectStoreId, c
onst WebIDBKeyRange&, WebIDBCallbacks*) = 0; | 77 virtual void deleteRange(long long transactionId, long long objectStoreId, c
onst WebIDBKeyRange&, WebIDBCallbacks*) = 0; |
| 76 virtual void clear(long long transactionId, long long objectStoreId, WebIDBC
allbacks*) = 0; | 78 virtual void clear(long long transactionId, long long objectStoreId, WebIDBC
allbacks*) = 0; |
| 77 virtual void ackReceivedBlobs(const WebVector<WebString>& uuids) = 0; | 79 virtual void ackReceivedBlobs(const WebVector<WebString>& uuids) = 0; |
| 78 | 80 |
| 79 protected: | 81 protected: |
| 80 WebIDBDatabase() { } | 82 WebIDBDatabase() { } |
| 81 }; | 83 }; |
| 82 | 84 |
| 83 } // namespace blink | 85 } // namespace blink |
| 84 | 86 |
| 85 #endif // WebIDBDatabase_h | 87 #endif // WebIDBDatabase_h |
| OLD | NEW |