]> git.saurik.com Git - apple/security.git/blobdiff - Analytics/SQLite/SFSQLite.h
Security-59754.41.1.tar.gz
[apple/security.git] / Analytics / SQLite / SFSQLite.h
index cb6a80df7b54a9ad578d1e545a044042695718dc..0ced947186cec6f66b6299ca597aa65d8d8546f7 100644 (file)
 
 // Header exposed for unit testing only
 
 
 // Header exposed for unit testing only
 
+#ifndef SECURITY_SFSQL_H
+#define SECURITY_SFSQL_H 1
+
+#if __OBJC2__
+
 #import <Foundation/Foundation.h>
 #import <sqlite3.h>
 
 #import <Foundation/Foundation.h>
 #import <sqlite3.h>
 
@@ -39,7 +44,7 @@ typedef NS_ENUM(NSInteger, SFSQLiteSynchronousMode) {
     SFSQLiteSynchronousModeFull = 2
 };
 
     SFSQLiteSynchronousModeFull = 2
 };
 
-@protocol SFSQLiteDelegate
+@protocol SFSQLiteDelegate <NSObject>
 @property (nonatomic, readonly) SInt32 userVersion;
 
 - (BOOL)migrateDatabase:(SFSQLite *)db fromVersion:(SInt32)version;
 @property (nonatomic, readonly) SInt32 userVersion;
 
 - (BOOL)migrateDatabase:(SFSQLite *)db fromVersion:(SInt32)version;
@@ -47,6 +52,7 @@ typedef NS_ENUM(NSInteger, SFSQLiteSynchronousMode) {
 
 // Wrapper around the SQLite API. Typically subclassed to add table accessor methods.
 @interface SFSQLite : NSObject {
 
 // Wrapper around the SQLite API. Typically subclassed to add table accessor methods.
 @interface SFSQLite : NSObject {
+@private
     id<SFSQLiteDelegate> _delegate;
     NSString* _path;
     NSString* _schema;
     id<SFSQLiteDelegate> _delegate;
     NSString* _path;
     NSString* _schema;
@@ -62,7 +68,6 @@ typedef NS_ENUM(NSInteger, SFSQLiteSynchronousMode) {
     NSMutableDictionary* _unitTestOverrides;
 #endif
     BOOL _hasMigrated;
     NSMutableDictionary* _unitTestOverrides;
 #endif
     BOOL _hasMigrated;
-    BOOL _shouldVacuum;
     BOOL _corrupt;
     BOOL _traced;
 }
     BOOL _corrupt;
     BOOL _traced;
 }
@@ -77,7 +82,6 @@ typedef NS_ENUM(NSInteger, SFSQLiteSynchronousMode) {
 @property (nonatomic, assign)           SFSQLiteSynchronousMode synchronousMode;
 @property (nonatomic, readonly)         BOOL       isOpen;
 @property (nonatomic, readonly)         BOOL       hasMigrated;
 @property (nonatomic, assign)           SFSQLiteSynchronousMode synchronousMode;
 @property (nonatomic, readonly)         BOOL       isOpen;
 @property (nonatomic, readonly)         BOOL       hasMigrated;
-@property (nonatomic, assign)           BOOL       shouldVacuum; // vacuum the db on open (default:YES)
 @property (nonatomic, assign)           BOOL       traced;
 
 @property (nonatomic, strong) id<SFSQLiteDelegate> delegate;
 @property (nonatomic, assign)           BOOL       traced;
 
 @property (nonatomic, strong) id<SFSQLiteDelegate> delegate;
@@ -147,3 +151,6 @@ typedef NS_ENUM(NSInteger, SFSQLiteSynchronousMode) {
 - (SInt32)dbUserVersion;
 
 @end
 - (SInt32)dbUserVersion;
 
 @end
+
+#endif /* __OBJC2__ */
+#endif /* SECURITY_SFSQL_H */