Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8f48fe873b
Fetching contributors…

Cannot retrieve contributors at this time

43 lines (33 sloc) 1.466 kb
// TDReplicatorManager.h
// TouchDB
// Created by Jens Alfke on 2/15/12.
// Copyright (c) 2012 Couchbase, Inc. All rights reserved.
#import <TouchDB/TDDatabase.h>
@class TDDatabaseManager;
@protocol TDAuthorizer;
extern NSString* const kTDReplicatorDatabaseName;
/** Manages the _replicator database for persistent replications.
It doesn't really have an API; it works on its own by monitoring the '_replicator' database, and docs in it, for changes. Applications use the regular document APIs to manage replications.
A TDServer owns an instance of this class. */
@interface TDReplicatorManager : NSObject
TDDatabaseManager* _dbManager;
TDDatabase* _replicatorDB;
NSMutableDictionary* _replicatorsByDocID;
BOOL _updateInProgress;
- (id) initWithDatabaseManager: (TDDatabaseManager*)dbManager;
- (void) start;
- (void) stop;
/** Examines the JSON object describing a replication and determines the local database and remote URL, and some of the other parameters. */
- (TDStatus) parseReplicatorProperties: (NSDictionary*)body
toDatabase: (TDDatabase**)outDatabase
remote: (NSURL**)outRemote
isPush: (BOOL*)outIsPush
createTarget: (BOOL*)outCreateTarget
headers: (NSDictionary**)outHeaders
authorizer: (id<TDAuthorizer>*)outAuthorizer;
Jump to Line
Something went wrong with that request. Please try again.