//
//  MCPPostgresConnection+ApplyChanges.h
//  DLOfflineSync
//
//  Created by Brent Gulanowski on 20/10/08.
//  Copyright 2008 Marketcircle, Inc. All rights reserved.
//


//#import <MCPostgresPersistence/MCPPostgresConnection.h>
#import <MCFoundation/MCPDatabaseConnection.h>

@class MCChangeSet, MCChangeRecord;

@interface NSObject (MCChangeImportRequesting)

- (void)connection:(MCPDatabaseConnection *)connection willImportChange:(MCChangeRecord *)record;
- (void)connection:(MCPDatabaseConnection *)connection didImportChange:(MCChangeRecord *)record;
- (void)connection:(MCPDatabaseConnection *)connection failedToImportChange:(MCChangeRecord *)record exception:(NSException *)exception;

@end


@interface MCPDatabaseConnection (ApplyChanges)

#define MCSS_USE_OFFLINE_IMPORT_TRANSACTIONS 1

- (BOOL)importChanges:(MCChangeSet *)changes notifyDelegate:(id)requester safeInsert:(BOOL)safeInsert;

@end
