OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 static Vector<char> encode(int64_t databaseId, MetaDataType); | 137 static Vector<char> encode(int64_t databaseId, MetaDataType); |
138 }; | 138 }; |
139 | 139 |
140 class ObjectStoreMetaDataKey { | 140 class ObjectStoreMetaDataKey { |
141 public: | 141 public: |
142 ObjectStoreMetaDataKey(); | 142 ObjectStoreMetaDataKey(); |
143 static const char* decode(const char* start, const char* limit, ObjectStoreM
etaDataKey* result); | 143 static const char* decode(const char* start, const char* limit, ObjectStoreM
etaDataKey* result); |
144 static Vector<char> encode(int64_t databaseId, int64_t objectStoreId, int64_
t metaDataType); | 144 static Vector<char> encode(int64_t databaseId, int64_t objectStoreId, int64_
t metaDataType); |
145 static Vector<char> encodeMaxKey(int64_t databaseId); | 145 static Vector<char> encodeMaxKey(int64_t databaseId); |
| 146 static Vector<char> encodeMaxKey(int64_t databaseId, int64_t objectStoreId); |
146 int64_t objectStoreId() const; | 147 int64_t objectStoreId() const; |
147 int64_t metaDataType() const; | 148 int64_t metaDataType() const; |
148 int compare(const ObjectStoreMetaDataKey& other); | 149 int compare(const ObjectStoreMetaDataKey& other); |
149 | 150 |
150 private: | 151 private: |
151 int64_t m_objectStoreId; | 152 int64_t m_objectStoreId; |
152 int64_t m_metaDataType; // FIXME: Make this a byte. | 153 int64_t m_metaDataType; // FIXME: Make this a byte. |
153 }; | 154 }; |
154 | 155 |
155 class IndexMetaDataKey { | 156 class IndexMetaDataKey { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 }; | 275 }; |
275 | 276 |
276 } // namespace IDBLevelDBCoding | 277 } // namespace IDBLevelDBCoding |
277 | 278 |
278 } // namespace WebCore | 279 } // namespace WebCore |
279 | 280 |
280 #endif // ENABLE(LEVELDB) | 281 #endif // ENABLE(LEVELDB) |
281 #endif // ENABLE(INDEXED_DATABASE) | 282 #endif // ENABLE(INDEXED_DATABASE) |
282 | 283 |
283 #endif // IDBLevelDBCoding_h | 284 #endif // IDBLevelDBCoding_h |
OLD | NEW |