aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Local/FSTLevelDBQueryCache.h
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-01-31 11:23:55 -0800
committerGravatar GitHub <noreply@github.com>2018-01-31 11:23:55 -0800
commit729b8d176c75ecc0cbbd137cc6811116a64e310a (patch)
tree22b793b03611ce5ad615b7c7d9579f5ba5206b4a /Firestore/Source/Local/FSTLevelDBQueryCache.h
parent693d0649bfcc9c32201e2431ae08ea85fdbdb617 (diff)
Move all Firestore Objective-C to Objective-C++ (#734)
* Move all Firestore files to Objective-C++ * Update project file references * Don't use module imports from Objective-C++ * Use extern "C" for C-accessible globals * Work around more stringent type checking in Objective-C++ * NSMutableDictionary ivars aren't implicitly casted to NSDictionary * FSTMaybeDocument callback can't be passed a function that accepts FSTDocument * NSComparisonResult can't be multiplied by -1 without casting * Add a #include <inttypes.h> where needed * Avoid using C++ keywords as variables * Remove #if __cplusplus guards
Diffstat (limited to 'Firestore/Source/Local/FSTLevelDBQueryCache.h')
-rw-r--r--Firestore/Source/Local/FSTLevelDBQueryCache.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/Firestore/Source/Local/FSTLevelDBQueryCache.h b/Firestore/Source/Local/FSTLevelDBQueryCache.h
index 67c6575..1f6fbd4 100644
--- a/Firestore/Source/Local/FSTLevelDBQueryCache.h
+++ b/Firestore/Source/Local/FSTLevelDBQueryCache.h
@@ -16,38 +16,30 @@
#import <Foundation/Foundation.h>
-#import "Firestore/Source/Local/FSTQueryCache.h"
-
-#ifdef __cplusplus
#include <memory>
-namespace leveldb {
-class DB;
-}
-#endif
+#import "Firestore/Source/Local/FSTQueryCache.h"
+#include "leveldb/db.h"
@class FSTLocalSerializer;
-@protocol FSTGarbageCollector;
@class FSTPBTargetGlobal;
+@protocol FSTGarbageCollector;
NS_ASSUME_NONNULL_BEGIN
/** Cached Queries backed by LevelDB. */
@interface FSTLevelDBQueryCache : NSObject <FSTQueryCache>
-#ifdef __cplusplus
/**
* Retrieves the global singleton metadata row from the given database, if it exists.
*/
+ (nullable FSTPBTargetGlobal *)readTargetMetadataFromDB:(std::shared_ptr<leveldb::DB>)db;
-#endif
- (instancetype)init NS_UNAVAILABLE;
/** The garbage collector to notify about potential garbage keys. */
@property(nonatomic, weak, readwrite, nullable) id<FSTGarbageCollector> garbageCollector;
-#ifdef __cplusplus
/**
* Creates a new query cache in the given LevelDB.
*
@@ -55,7 +47,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (instancetype)initWithDB:(std::shared_ptr<leveldb::DB>)db
serializer:(FSTLocalSerializer *)serializer NS_DESIGNATED_INITIALIZER;
-#endif
@end