vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h in motion-yapper-0.0.1 vs vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h in motion-yapper-0.0.2

- old
+ new

@@ -27,16 +27,18 @@ * A connection instance is thread-safe, and operates by serializing access to itself. * Thus you can share a single connection between multiple threads. * But for conncurrent access between multiple threads you must use multiple connections. **/ -typedef enum { - YapDatabaseConnectionFlushMemoryLevelNone = 0, - YapDatabaseConnectionFlushMemoryLevelMild = 1, - YapDatabaseConnectionFlushMemoryLevelModerate = 2, - YapDatabaseConnectionFlushMemoryLevelFull = 3, -} YapDatabaseConnectionFlushMemoryLevel; +enum { + YapDatabaseConnectionFlushMemoryFlags_None = 0, + YapDatabaseConnectionFlushMemoryFlags_Caches = 1 << 0, + YapDatabaseConnectionFlushMemoryFlags_Statements = 1 << 1, + YapDatabaseConnectionFlushMemoryFlags_All = (YapDatabaseConnectionFlushMemoryFlags_Caches | + YapDatabaseConnectionFlushMemoryFlags_Statements), +}; +typedef int YapDatabaseConnectionFlushMemoryFlags; typedef enum { YapDatabasePolicyContainment = 0, YapDatabasePolicyShare = 1, YapDatabasePolicyCopy = 2, @@ -416,32 +418,32 @@ * This method may be used to flush the internal caches used by the connection, * as well as flushing pre-compiled sqlite statements. * Depending upon how often you use the database connection, * you may want to be more or less aggressive on how much stuff you flush. * - * YapDatabaseConnectionFlushMemoryLevelNone (0): - * No-op. Doesn't flush any caches or anything from internal memory. + * YapDatabaseConnectionFlushMemoryFlags_None: + * No-op. Doesn't flush anything. * - * YapDatabaseConnectionFlushMemoryLevelMild (1): - * Flushes the object cache and metadata cache. + * YapDatabaseConnectionFlushMemoryFlags_Caches: + * Flushes all caches, including the object cache and metadata cache. * - * YapDatabaseConnectionFlushMemoryLevelModerate (2): - * Mild plus drops less common pre-compiled sqlite statements. + * YapDatabaseConnectionFlushMemoryFlags_Statements: + * Flushes all pre-compiled sqlite statements. * - * YapDatabaseConnectionFlushMemoryLevelFull (3): - * Full flush of all caches and removes all pre-compiled sqlite statements. + * YapDatabaseConnectionFlushMemoryFlags_All: + * Full flush of all caches and pre-compiled sqlite statements. **/ -- (void)flushMemoryWithLevel:(int)level; +- (void)flushMemoryWithFlags:(YapDatabaseConnectionFlushMemoryFlags)flags; #if TARGET_OS_IPHONE /** * When a UIApplicationDidReceiveMemoryWarningNotification is received, - * the code automatically invokes flushMemoryWithLevel and passes this set level. + * the code automatically invokes flushMemoryWithFlags and passes the set flags. * - * The default value is YapDatabaseConnectionFlushMemoryLevelMild. + * The default value is YapDatabaseConnectionFlushMemoryFlags_All. * - * @see flushMemoryWithLevel: + * @see flushMemoryWithFlags: **/ -@property (atomic, assign, readwrite) int autoFlushMemoryLevel; +@property (atomic, assign, readwrite) YapDatabaseConnectionFlushMemoryFlags autoFlushMemoryFlags; #endif @end