File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ struct C4Replicator
91
91
C4ReplicationCollection& addCollection (C4CollectionSpec const &, C4ReplicatorMode pushMode,
92
92
C4ReplicatorMode pullMode);
93
93
94
+ bool removeCollection (C4CollectionSpec const &);
95
+
94
96
fleece::MutableDict copyOptions () const ; // /< Returns copy of options (never null)
95
97
void setOptions (fleece::Dict); // /< Updates options Dict
96
98
void updateOptions (std::function<void (fleece::MutableDict)> const & callback);
Original file line number Diff line number Diff line change @@ -202,6 +202,18 @@ C4ReplicationCollection& C4Replicator::Parameters::addCollection(C4ReplicationCo
202
202
return copiedSpec;
203
203
}
204
204
205
+ bool C4Replicator::Parameters::removeCollection (C4CollectionSpec const & spec) {
206
+ for ( auto i = _collections.begin (); i != _collections.end (); ++i ) {
207
+ if ( i->collection == spec ) {
208
+ _collections.erase (i);
209
+ this ->C4ReplicatorParameters ::collections = _collections.data ();
210
+ collectionCount = _collections.size ();
211
+ return true ;
212
+ }
213
+ }
214
+ return false ;
215
+ }
216
+
205
217
MutableDict C4Replicator::Parameters::copyOptions () const {
206
218
if ( _options ) return Doc{_options}.asDict ().mutableCopy ();
207
219
else
You can’t perform that action at this time.
0 commit comments