Repository: realm/realm-swift
File: src/tightdb/objc/TDBContext.h (C/C++)

Code before:
/*************************************************************************
 *
 * TIGHTDB CONFIDENTIAL
 * __________________
 *
 *  [2011] - [2014] TightDB Inc
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of TightDB Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to TightDB Incorporated
 * and its suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from TightDB Incorporated.
 *
 **************************************************************************/

#import <Foundation/Foundation.h>
#import <tightdb/objc/TDBTransaction.h>

typedef void(^TDBReadBlock)(TDBTransaction *transaction);
typedef BOOL(^TDBWriteBlock)(TDBTransaction *transaction);

/****************	  TDBContext	****************/

@interface TDBContext: NSObject

// Initializers
+(TDBContext *)contextWithPersistenceToFile:(NSString *)path error:(NSError **)error;

// Transactions
-(void)readWithBlock:(TDBReadBlock)block;
-(BOOL)writeWithBlock:(TDBWriteBlock)block error:(NSError **)error;

// Context state info
-(BOOL)hasChangedSinceLastTransaction;


/******** Experimental features **********/
-(BOOL)pinReadTransactions;
-(void)unpinReadTransactions;

@end


Review comment (suggestion):
No not eventually. We should hopefully be able to make the features we discussed last week in the next release. However, during lunch we just decided to include these raw methods for us and you to play with in Todays release.
It's not a problem to not include it though...


Code after:
/*************************************************************************
 *
 * TIGHTDB CONFIDENTIAL
 * __________________
 *
 *  [2011] - [2014] TightDB Inc
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of TightDB Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to TightDB Incorporated
 * and its suppliers and may be covered by U.S. and Foreign Patents,
 * patents in process, and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from TightDB Incorporated.
 *
 **************************************************************************/

#import <Foundation/Foundation.h>
#import <tightdb/objc/TDBTransaction.h>

typedef void(^TDBReadBlock)(TDBTransaction *transaction);
typedef BOOL(^TDBWriteBlock)(TDBTransaction *transaction);

/****************	  TDBContext	****************/

@interface TDBContext: NSObject

// Initializers
+(TDBContext *)contextWithPersistenceToFile:(NSString *)path error:(NSError **)error;

// Transactions
-(void)readWithBlock:(TDBReadBlock)block;
-(BOOL)writeWithBlock:(TDBWriteBlock)block error:(NSError **)error;

// Context state info
-(BOOL)hasChangedSinceLastTransaction;

@end