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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 class IDBIndex : public ScriptWrappable, public RefCounted<IDBIndex> { | 45 class IDBIndex : public ScriptWrappable, public RefCounted<IDBIndex> { |
46 public: | 46 public: |
47 static PassRefPtr<IDBIndex> create(const IDBIndexMetadata& metadata, IDBObje
ctStore* objectStore, IDBTransaction* transaction) | 47 static PassRefPtr<IDBIndex> create(const IDBIndexMetadata& metadata, IDBObje
ctStore* objectStore, IDBTransaction* transaction) |
48 { | 48 { |
49 return adoptRef(new IDBIndex(metadata, objectStore, transaction)); | 49 return adoptRef(new IDBIndex(metadata, objectStore, transaction)); |
50 } | 50 } |
51 ~IDBIndex(); | 51 ~IDBIndex(); |
52 | 52 |
53 // Implement the IDL | 53 // Implement the IDL |
54 const String name() const { return m_metadata.name; } | 54 const String& name() const { return m_metadata.name; } |
55 PassRefPtr<IDBObjectStore> objectStore() const { return m_objectStore; } | 55 PassRefPtr<IDBObjectStore> objectStore() const { return m_objectStore; } |
56 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key
Path); } | 56 PassRefPtr<IDBAny> keyPathAny() const { return IDBAny::create(m_metadata.key
Path); } |
57 const IDBKeyPath keyPath() const { return m_metadata.keyPath; } | 57 const IDBKeyPath& keyPath() const { return m_metadata.keyPath; } |
58 bool unique() const { return m_metadata.unique; } | 58 bool unique() const { return m_metadata.unique; } |
59 bool multiEntry() const { return m_metadata.multiEntry; } | 59 bool multiEntry() const { return m_metadata.multiEntry; } |
60 int64_t id() const { return m_metadata.id; } | 60 int64_t id() const { return m_metadata.id; } |
61 | 61 |
62 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKey
Range>, const String& direction, ExceptionState&); | 62 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKey
Range>, const String& direction, ExceptionState&); |
63 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue
& key, const String& direction, ExceptionState&); | 63 PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue
& key, const String& direction, ExceptionState&); |
64 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange
>, ExceptionState&); | 64 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange
>, ExceptionState&); |
65 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key
, ExceptionState&); | 65 PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key
, ExceptionState&); |
66 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, PassRefPtr<IDB
KeyRange>, const String& direction, ExceptionState&); | 66 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, PassRefPtr<IDB
KeyRange>, const String& direction, ExceptionState&); |
67 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const ScriptVa
lue& key, const String& direction, ExceptionState&); | 67 PassRefPtr<IDBRequest> openKeyCursor(ScriptExecutionContext*, const ScriptVa
lue& key, const String& direction, ExceptionState&); |
(...skipping 12 matching lines...) Expand all Loading... |
80 | 80 |
81 IDBIndexMetadata m_metadata; | 81 IDBIndexMetadata m_metadata; |
82 RefPtr<IDBObjectStore> m_objectStore; | 82 RefPtr<IDBObjectStore> m_objectStore; |
83 RefPtr<IDBTransaction> m_transaction; | 83 RefPtr<IDBTransaction> m_transaction; |
84 bool m_deleted; | 84 bool m_deleted; |
85 }; | 85 }; |
86 | 86 |
87 } // namespace WebCore | 87 } // namespace WebCore |
88 | 88 |
89 #endif // IDBIndex_h | 89 #endif // IDBIndex_h |
OLD | NEW |