motion-firebase 3.3.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,53 +0,0 @@
1
- /*
2
- * Firebase iOS Client Library
3
- *
4
- * Copyright © 2013 Firebase - All Rights Reserved
5
- * https://www.firebase.com
6
- *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
9
- *
10
- * 1. Redistributions of source code must retain the above copyright notice, this
11
- * list of conditions and the following disclaimer.
12
- *
13
- * 2. Redistributions in binaryform must reproduce the above copyright notice,
14
- * this list of conditions and the following disclaimer in the documentation
15
- * and/or other materials provided with the distribution.
16
- *
17
- * THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
18
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20
- * EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
21
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
- */
28
-
29
- #import <Foundation/Foundation.h>
30
- #import "FMutableData.h"
31
-
32
- /**
33
- * Used for runTransactionBlock:. An FTransactionResult instance is a container for the results of the transaction.
34
- */
35
- @interface FTransactionResult : NSObject
36
-
37
- /**
38
- * Used for runTransactionBlock:. Indicates that the new value should be saved at this location
39
- *
40
- * @param value An FMutableData instance containing the new value to be set
41
- * @return An FTransactionResult instance that can be used as a return value from the block given to runTransactionBlock:
42
- */
43
- + (FTransactionResult *) successWithValue:(FMutableData *)value;
44
-
45
-
46
- /**
47
- * Used for runTransactionBlock:. Indicates that the current transaction should no longer proceed.
48
- *
49
- * @return An FTransactionResult instance that can be used as a return value from the block given to runTransactionBlock:
50
- */
51
- + (FTransactionResult *) abort;
52
-
53
- @end
@@ -1,1055 +0,0 @@
1
- /*
2
- * Firebase iOS Client Library
3
- *
4
- * Copyright © 2013 Firebase - All Rights Reserved
5
- * https://www.firebase.com
6
- *
7
- * Redistribution and use in source and binary forms, with or without
8
- * modification, are permitted provided that the following conditions are met:
9
- *
10
- * 1. Redistributions of source code must retain the above copyright notice, this
11
- * list of conditions and the following disclaimer.
12
- *
13
- * 2. Redistributions in binaryform must reproduce the above copyright notice,
14
- * this list of conditions and the following disclaimer in the documentation
15
- * and/or other materials provided with the distribution.
16
- *
17
- * THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
18
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
19
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
20
- * EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
21
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
22
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
- */
28
-
29
-
30
- #import <Foundation/Foundation.h>
31
- #import "FQuery.h"
32
- #import "FirebaseApp.h"
33
- #import "FDataSnapshot.h"
34
- #import "FMutableData.h"
35
- #import "FTransactionResult.h"
36
- #import "FAuthData.h"
37
- #import "FAuthType.h"
38
- #import "FirebaseServerValue.h"
39
- #import "FConfig.h"
40
-
41
- /**
42
- * A Firebase reference represents a particular location in your Firebase
43
- * and can be used for reading or writing data to that Firebase location.
44
- *
45
- * This class is the starting point for all Firebase operations. After you've
46
- * initialized it with initWithUrl: you can use it
47
- * to read data (ie. observeEventType:withBlock:), write data (ie. setValue:), and to create new
48
- * Firebase references (ie. child:).
49
- */
50
- @interface Firebase : FQuery
51
-
52
-
53
- /** @name Initializing a Firebase object */
54
-
55
- /**
56
- * Initialize this Firebase reference with an absolute URL.
57
- *
58
- * @param url The Firebase URL (ie: https://SampleChat.firebaseIO-demo.com)
59
- */
60
- - (id)initWithUrl:(NSString *)url;
61
-
62
- /** @name Getting references to children locations */
63
-
64
- /**
65
- * Get a Firebase reference for the location at the specified relative path.
66
- * The relative path can either be a simple child key (e.g. 'fred') or a
67
- * deeper slash-separated path (e.g. 'fred/name/first').
68
- *
69
- * @param pathString A relative path from this location to the desired child location.
70
- * @return A Firebase reference for the specified relative path.
71
- */
72
- - (Firebase *) childByAppendingPath:(NSString *)pathString;
73
-
74
-
75
- /**
76
- * childByAutoId generates a new child location using a unique key and returns a
77
- * Firebase reference to it. This is useful when the children of a Firebase
78
- * location represent a list of items.
79
- *
80
- * The unique key generated by childByAutoId: is prefixed with a client-generated
81
- * timestamp so that the resulting list will be chronologically-sorted.
82
- *
83
- * @return A Firebase reference for the generated location.
84
- */
85
- - (Firebase *) childByAutoId;
86
-
87
-
88
- /** @name Writing data */
89
-
90
- /*! Write data to this Firebase location.
91
-
92
- This will overwrite any data at this location and all child locations.
93
-
94
- Data types that can be set are:
95
-
96
- - NSString -- @"Hello World"
97
- - NSNumber (also includes boolean) -- @YES, @43, @4.333
98
- - NSDictionary -- @{@"key": @"value", @"nested": @{@"another": @"value"} }
99
- - NSArray
100
-
101
- The effect of the write will be visible immediately and the corresponding
102
- events will be triggered. Synchronization of the data to the Firebase
103
- servers will also be started.
104
-
105
- Passing null for the new value is equivalent to calling remove:;
106
- all data at this location or any child location will be deleted.
107
-
108
- Note that setValue: will remove any priority stored at this location, so if priority
109
- is meant to be preserved, you should use setValue:andPriority: instead.
110
-
111
-
112
- **Server Values** - Placeholder values you may write into Firebase as a value or priority
113
- that will automatically be populated by the Firebase Server.
114
-
115
- - kFirebaseServerValueTimestamp - The number of milliseconds since the Unix epoch
116
-
117
-
118
- @param value The value to be written.
119
- */
120
- - (void) setValue:(id)value;
121
-
122
-
123
- #define kFirebaseServerValueTimestamp @{ @".sv": @"timestamp" }
124
-
125
- /**
126
- * The same as setValue: with a block that gets triggered after the write operation has
127
- * been committed to the Firebase servers.
128
- *
129
- * @param value The value to be written.
130
- * @param block The block to be called after the write has been committed to the Firebase servers.
131
- */
132
- - (void) setValue:(id)value withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
133
-
134
-
135
- /**
136
- * The same as setValue: with an additional priority to be attached to the data being written.
137
- * Priorities are used to order items.
138
- *
139
- * @param value The value to be written.
140
- * @param priority The priority to be attached to that data.
141
- */
142
- - (void) setValue:(id)value andPriority:(id)priority;
143
-
144
-
145
- /**
146
- * The same as setValue:andPriority: with a block that gets triggered after the write operation has
147
- * been committed to the Firebase servers.
148
- *
149
- * @param value The value to be written.
150
- * @param priority The priority to be attached to that data.
151
- * @param block The block to be called after the write has been committed to the Firebase servers.
152
- */
153
- - (void) setValue:(id)value andPriority:(id)priority withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
154
-
155
-
156
- /**
157
- * Remove the data at this Firebase location. Any data at child locations will also be deleted.
158
- *
159
- * The effect of the delete will be visible immediately and the corresponding events
160
- * will be triggered. Synchronization of the delete to the Firebase servers will
161
- * also be started.
162
- *
163
- * remove: is equivalent to calling setValue:nil
164
- */
165
- - (void) removeValue;
166
-
167
-
168
- /**
169
- * The same as remove: with a block that gets triggered after the remove operation has
170
- * been committed to the Firebase servers.
171
- *
172
- * @param block The block to be called after the remove has been committed to the Firebase servers.
173
- */
174
- - (void) removeValueWithCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
175
-
176
- /**
177
- * Set a priority for the data at this Firebase location.
178
- * Priorities can be used to provide a custom ordering for the children at a location
179
- * (if no priorities are specified, the children are ordered by key).
180
- *
181
- * You cannot set a priority on an empty location. For this reason
182
- * setValue:andPriority: should be used when setting initial data with a specific priority
183
- * and setPriority: should be used when updating the priority of existing data.
184
- *
185
- * Children are sorted based on this priority using the following rules:
186
- *
187
- * Children with no priority come first.
188
- * Children with a number as their priority come next. They are sorted numerically by priority (small to large).
189
- * Children with a string as their priority come last. They are sorted lexicographically by priority.
190
- * Whenever two children have the same priority (including no priority), they are sorted by key. Numeric
191
- * keys come first (sorted numerically), followed by the remaining keys (sorted lexicographically).
192
- *
193
- * Note that priorities are parsed and ordered as IEEE 754 double-precision floating-point numbers.
194
- * Keys are always stored as strings and are treated as numbers only when they can be parsed as a
195
- * 32-bit integer
196
- *
197
- * @param priority The priority to set at the specified location.
198
- */
199
- - (void) setPriority:(id)priority;
200
-
201
-
202
- /**
203
- * The same as setPriority: with a block block that is called once the priority has
204
- * been committed to the Firebase servers.
205
- *
206
- * @param priority The priority to set at the specified location.
207
- * @param block The block that is triggered after the priority has been written on the servers.
208
- */
209
- - (void) setPriority:(id)priority withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
210
-
211
- /**
212
- * Update changes the values at the specified paths in the dictionary without overwriting other
213
- * keys at this location.
214
- *
215
- * @param values A dictionary of the keys to change and their new values
216
- */
217
- - (void) updateChildValues:(NSDictionary *)values;
218
-
219
- /**
220
- * The same as update: with a block block that is called once the update has been committed to the
221
- * Firebase servers
222
- *
223
- * @param values A dictionary of the keys to change and their new values
224
- * @param block The block that is triggered after the update has been written on the Firebase servers
225
- */
226
- - (void) updateChildValues:(NSDictionary *)values withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
227
-
228
-
229
- /** @name Attaching observers to read data */
230
-
231
- /**
232
- * observeEventType:withBlock: is used to listen for data changes at a particular location.
233
- * This is the primary way to read data from Firebase. Your block will be triggered
234
- * for the initial data and again whenever the data changes.
235
- *
236
- * Use removeObserverWithHandle: to stop receiving updates.
237
- * @param eventType The type of event to listen for.
238
- * @param block The block that should be called with initial data and updates. It is passed the data as an FDataSnapshot.
239
- * @return A handle used to unregister this block later using removeObserverWithHandle:
240
- */
241
- - (FirebaseHandle) observeEventType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block;
242
-
243
-
244
- /**
245
- * observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data changes at a particular location.
246
- * This is the primary way to read data from Firebase. Your block will be triggered
247
- * for the initial data and again whenever the data changes. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and
248
- * FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.
249
- *
250
- * Use removeObserverWithHandle: to stop receiving updates.
251
- *
252
- * @param eventType The type of event to listen for.
253
- * @param block The block that should be called with initial data and updates. It is passed the data as an FDataSnapshot
254
- * and the previous child's key.
255
- * @return A handle used to unregister this block later using removeObserverWithHandle:
256
- */
257
- - (FirebaseHandle) observeEventType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevKey))block;
258
-
259
-
260
- /**
261
- * observeEventType:withBlock: is used to listen for data changes at a particular location.
262
- * This is the primary way to read data from Firebase. Your block will be triggered
263
- * for the initial data and again whenever the data changes.
264
- *
265
- * The cancelBlock will be called if you will no longer receive new events due to no longer having permission.
266
- *
267
- * Use removeObserverWithHandle: to stop receiving updates.
268
- *
269
- * @param eventType The type of event to listen for.
270
- * @param block The block that should be called with initial data and updates. It is passed the data as an FDataSnapshot.
271
- * @param cancelBlock The block that should be called if this client no longer has permission to receive these events
272
- * @return A handle used to unregister this block later using removeObserverWithHandle:
273
- */
274
- - (FirebaseHandle) observeEventType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block withCancelBlock:(void (^)(NSError* error))cancelBlock;
275
-
276
-
277
- /**
278
- * observeEventType:andPreviousSiblingKeyWithBlock: is used to listen for data changes at a particular location.
279
- * This is the primary way to read data from Firebase. Your block will be triggered
280
- * for the initial data and again whenever the data changes. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and
281
- * FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.
282
- *
283
- * The cancelBlock will be called if you will no longer receive new events due to no longer having permission.
284
- *
285
- * Use removeObserverWithHandle: to stop receiving updates.
286
- *
287
- * @param eventType The type of event to listen for.
288
- * @param block The block that should be called with initial data and updates. It is passed the data as an FDataSnapshot
289
- * and the previous child's key.
290
- * @param cancelBlock The block that should be called if this client no longer has permission to receive these events
291
- * @return A handle used to unregister this block later using removeObserverWithHandle:
292
- */
293
- - (FirebaseHandle) observeEventType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevKey))block withCancelBlock:(void (^)(NSError* error))cancelBlock;
294
-
295
-
296
- /**
297
- * This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned.
298
- *
299
- * @param eventType The type of event to listen for.
300
- * @param block The block that should be called. It is passed the data as an FDataSnapshot.
301
- */
302
- - (void) observeSingleEventOfType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block;
303
-
304
-
305
- /**
306
- * This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and
307
- * FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.
308
- *
309
- * @param eventType The type of event to listen for.
310
- * @param block The block that should be called. It is passed the data as an FDataSnapshot and the previous child's key.
311
- */
312
- - (void) observeSingleEventOfType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevKey))block;
313
-
314
-
315
- /**
316
- * This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned.
317
- *
318
- * The cancelBlock will be called if you do not have permission to read data at this location.
319
- *
320
- * @param eventType The type of event to listen for.
321
- * @param block The block that should be called. It is passed the data as an FDataSnapshot.
322
- * @param cancelBlock The block that will be called if you don't have permission to access this data
323
- */
324
- - (void) observeSingleEventOfType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block withCancelBlock:(void (^)(NSError* error))cancelBlock;
325
-
326
-
327
- /**
328
- * This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and
329
- * FEventTypeChildChanged events, your block will be passed the key of the previous node by priority order.
330
- *
331
- * The cancelBlock will be called if you do not have permission to read data at this location.
332
- *
333
- * @param eventType The type of event to listen for.
334
- * @param block The block that should be called. It is passed the data as an FDataSnapshot and the previous child's key.
335
- * @param cancelBlock The block that will be called if you don't have permission to access this data
336
- */
337
- - (void) observeSingleEventOfType:(FEventType)eventType andPreviousSiblingKeyWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevKey))block withCancelBlock:(void (^)(NSError* error))cancelBlock;
338
-
339
- /** @name Detaching observers */
340
-
341
- /**
342
- * Detach a block previously attached with observeEventType:withBlock:.
343
- *
344
- * @param handle The handle returned by the call to observeEventType:withBlock: which we are trying to remove.
345
- */
346
- - (void) removeObserverWithHandle:(FirebaseHandle)handle;
347
-
348
- /**
349
- * By calling `keepSynced:YES` on a location, the data for that location will automatically be downloaded and
350
- * kept in sync, even when no listeners are attached for that location. Additionally, while a location is kept
351
- * synced, it will not be evicted from the persistent disk cache.
352
- *
353
- * @param keepSynced Pass YES to keep this location synchronized, pass NO to stop synchronization.
354
- */
355
- - (void) keepSynced:(BOOL)keepSynced;
356
-
357
-
358
- /**
359
- * Calling removeAllObservers does not remove any observers at child references.
360
- * removeAllObservers must be called again for each child reference where a listener was established to remove the observers.
361
- */
362
- - (void) removeAllObservers;
363
-
364
- /** @name Querying and limiting */
365
-
366
-
367
- /**
368
- * This method is deprecated in favor of using queryStartingAtValue:. This can be used with queryOrderedByPriority
369
- * to query by priority.
370
- *
371
- * queryStartingAtPriority: is used to generate a reference to a limited view of the data at this location.
372
- * The FQuery instance returned by queryStartingAtPriority: will respond to events at nodes with a priority
373
- * greater than or equal to startPriority
374
- *
375
- * @param startPriority The lower bound, inclusive, for the priority of data visible to the returned FQuery
376
- * @return An FQuery instance, limited to data with priority greater than or equal to startPriority
377
- */
378
- - (FQuery *) queryStartingAtPriority:(id)startPriority __attribute__((deprecated("Use [[FQuery queryOrderedByPriority] queryStartingAtValue:] instead")));
379
-
380
-
381
- /**
382
- * This method is deprecated in favor of using queryStartingAtValue:childKey:. This can be used with queryOrderedByPriority
383
- * to query by priority.
384
- *
385
- * queryStartingAtPriority:andChildName: is used to generate a reference to a limited view of the data at this location.
386
- * The FQuery instance returned by queryStartingAtPriority:andChildName will respond to events at nodes with a priority
387
- * greater than startPriority, or equal to startPriority and with a name greater than or equal to childName
388
- *
389
- * @param startPriority The lower bound, inclusive, for the priority of data visible to the returned FQuery
390
- * @param childName The lower bound, inclusive, for the name of nodes with priority equal to startPriority
391
- * @return An FQuery instance, limited to data with priority greater than or equal to startPriority
392
- */
393
- - (FQuery *) queryStartingAtPriority:(id)startPriority andChildName:(NSString *)childName __attribute__((deprecated("Use [[FQuery queryOrderedByPriority] queryStartingAtValue:childKey:] instead")));
394
-
395
- /**
396
- * This method is deprecated in favor of using queryEndingAtValue:. This can be used with queryOrderedByPriority
397
- * to query by priority.
398
- *
399
- * queryEndingAtPriority: is used to generate a reference to a limited view of the data at this location.
400
- * The FQuery instance returned by queryEndingAtPriority: will respond to events at nodes with a priority
401
- * less than or equal to startPriority and with a name greater than or equal to childName
402
- *
403
- * @param endPriority The upper bound, inclusive, for the priority of data visible to the returned FQuery
404
- * @return An FQuery instance, limited to data with priority less than or equal to endPriority
405
- */
406
- - (FQuery *) queryEndingAtPriority:(id)endPriority __attribute__((deprecated("Use [[FQuery queryOrderedByPriority] queryEndingAtValue:] instead")));
407
-
408
-
409
- /**
410
- * This method is deprecated in favor of using queryEndingAtValue:childKey:. This can be used with queryOrderedByPriority
411
- * to query by priority.
412
- *
413
- * queryEndingAtPriority:andChildName: is used to generate a reference to a limited view of the data at this location.
414
- * The FQuery instance returned by queryEndingAtPriority:andChildName will respond to events at nodes with a priority
415
- * less than endPriority, or equal to endPriority and with a name less than or equal to childName
416
- *
417
- * @param endPriority The upper bound, inclusive, for the priority of data visible to the returned FQuery
418
- * @param childName The upper bound, inclusive, for the name of nodes with priority equal to endPriority
419
- * @return An FQuery instance, limited to data with priority less than endPriority or equal to endPriority and with a name less than or equal to childName
420
- */
421
- - (FQuery *) queryEndingAtPriority:(id)endPriority andChildName:(NSString *)childName __attribute__((deprecated("Use [[FQuery queryOrderedByPriority] queryEndingAtValue:childKey:] instead")));
422
-
423
-
424
- /**
425
- * This method is deprecated in favor of using queryEqualToValue:. This can be used with queryOrderedByPriority
426
- * to query by priority.
427
- *
428
- * queryEqualToPriority: is used to generate a reference to a limited view of the data at this location.
429
- * The FQuery instance returned by queryEqualToPriority: will respond to events at nodes with a priority equal to
430
- * supplied argument.
431
- *
432
- * @param priority The priority that the data returned by this FQuery will have
433
- * @return An Fquery instance, limited to data with the supplied priority.
434
- */
435
- - (FQuery *) queryEqualToPriority:(id)priority __attribute__((deprecated("Use [[FQuery queryOrderedByPriority] queryEqualToValue:] instead")));
436
-
437
-
438
- /**
439
- * This method is deprecated in favor of using queryEqualAtValue:childKey:. This can be used with queryOrderedByPriority
440
- * to query by priority.
441
- *
442
- * queryEqualToPriority:andChildName: is used to generate a reference to a limited view of the data at this location.
443
- * The FQuery instance returned by queryEqualToPriority:andChildName will respond to events at nodes with a priority
444
- * equal to the supplied argument with a name equal to childName. There will be at most one node that matches because
445
- * child names are unique.
446
- *
447
- * @param priority The priority that the data returned by this FQuery will have
448
- * @param childName The name of nodes with the right priority
449
- * @return An FQuery instance, limited to data with the supplied priority and the name.
450
- */
451
- - (FQuery *) queryEqualToPriority:(id)priority andChildName:(NSString *)childName __attribute__((deprecated("Use [[FQuery queryOrderedByPriority] queryEqualToValue:childKey:] instead")));
452
-
453
- /**
454
- * This method is deprecated in favor of using queryLimitedToFirst:limit or queryLimitedToLast:limit instead.
455
- *
456
- * queryLimitedToNumberOfChildren: is used to generate a reference to a limited view of the data at this location.
457
- * The FQuery instance returned by queryLimitedToNumberOfChildren: will respond to events from at most limit child nodes.
458
- *
459
- * @param limit The upper bound, inclusive, for the number of child nodes to receive events for
460
- * @return An FQuery instance, limited to at most limit child nodes.
461
- */
462
- - (FQuery *) queryLimitedToNumberOfChildren:(NSUInteger)limit __attribute__((deprecated("Use [FQuery queryLimitedToFirst:limit] or [FQuery queryLimitedToLast:limit] instead")));
463
-
464
-
465
- /**
466
- * queryLimitedToFirst: is used to generate a reference to a limited view of the data at this location.
467
- * The FQuery instance returned by queryLimitedToFirst: will respond to at most the first limit child nodes.
468
- *
469
- * @param limit The upper bound, inclusive, for the number of child nodes to receive events for
470
- * @return An FQuery instance, limited to at most limit child nodes.
471
- */
472
- - (FQuery *) queryLimitedToFirst:(NSUInteger)limit;
473
-
474
-
475
- /**
476
- * queryLimitedToLast: is used to generate a reference to a limited view of the data at this location.
477
- * The FQuery instance returned by queryLimitedToLast: will respond to at most the last limit child nodes.
478
- *
479
- * @param limit The upper bound, inclusive, for the number of child nodes to receive events for
480
- * @return An FQuery instance, limited to at most limit child nodes.
481
- */
482
- - (FQuery *) queryLimitedToLast:(NSUInteger)limit;
483
-
484
- /**
485
- * queryOrderBy: is used to generate a reference to a view of the data that's been sorted by the values of
486
- * a particular child key. This method is intended to be used in combination with queryStartingAtValue:,
487
- * queryEndingAtValue:, or queryEqualToValue:.
488
- *
489
- * @param key The child key to use in ordering data visible to the returned FQuery
490
- * @return An FQuery instance, ordered by the values of the specified child key.
491
- */
492
- - (FQuery *) queryOrderedByChild:(NSString *)key;
493
-
494
- /**
495
- * queryOrderedByKey: is used to generate a reference to a view of the data that's been sorted by child key.
496
- * This method is intended to be used in combination with queryStartingAtValue:, queryEndingAtValue:,
497
- * or queryEqualToValue:.
498
- *
499
- * @return An FQuery instance, ordered by child keys.
500
- */
501
- - (FQuery *) queryOrderedByKey;
502
-
503
- /**
504
- * queryOrderedByPriority: is used to generate a reference to a view of the data that's been sorted by child
505
- * priority. This method is intended to be used in combination with queryStartingAtValue:, queryEndingAtValue:,
506
- * or queryEqualToValue:.
507
- *
508
- * @return An FQuery instance, ordered by child priorities.
509
- */
510
- - (FQuery *) queryOrderedByPriority;
511
-
512
- /**
513
- * queryStartingAtValue: is used to generate a reference to a limited view of the data at this location.
514
- * The FQuery instance returned by queryStartingAtValue: will respond to events at nodes with a value
515
- * greater than or equal to startValue.
516
- *
517
- * @param startValue The lower bound, inclusive, for the value of data visible to the returned FQuery
518
- * @return An FQuery instance, limited to data with value greater than or equal to startValue
519
- */
520
- - (FQuery *) queryStartingAtValue:(id)startValue;
521
-
522
- /**
523
- * queryStartingAtValue:childKey: is used to generate a reference to a limited view of the data at this location.
524
- * The FQuery instance returned by queryStartingAtValue:childKey will respond to events at nodes with a value
525
- * greater than startValue, or equal to startValue and with a key greater than or equal to childKey.
526
- *
527
- * @param startValue The lower bound, inclusive, for the value of data visible to the returned FQuery
528
- * @param childKey The lower bound, inclusive, for the key of nodes with value equal to startValue
529
- * @return An FQuery instance, limited to data with value greater than or equal to startValue
530
- */
531
- - (FQuery *) queryStartingAtValue:(id)startValue childKey:(NSString *)childKey;
532
-
533
- /**
534
- * queryEndingAtValue: is used to generate a reference to a limited view of the data at this location.
535
- * The FQuery instance returned by queryEndingAtValue: will respond to events at nodes with a value
536
- * less than or equal to endValue.
537
- *
538
- * @param endValue The upper bound, inclusive, for the value of data visible to the returned FQuery
539
- * @return An FQuery instance, limited to data with value less than or equal to endValue
540
- */
541
- - (FQuery *) queryEndingAtValue:(id)endValue;
542
-
543
- /**
544
- * queryEndingAtValue:childKey: is used to generate a reference to a limited view of the data at this location.
545
- * The FQuery instance returned by queryEndingAtValue:childKey will respond to events at nodes with a value
546
- * less than endValue, or equal to endValue and with a key less than or equal to childKey.
547
- *
548
- * @param endValue The upper bound, inclusive, for the value of data visible to the returned FQuery
549
- * @param childKey The upper bound, inclusive, for the key of nodes with value equal to endValue
550
- * @return An FQuery instance, limited to data with value less than or equal to endValue
551
- */
552
- - (FQuery *) queryEndingAtValue:(id)endValue childKey:(NSString *)childKey;
553
-
554
- /**
555
- * queryEqualToValue: is used to generate a reference to a limited view of the data at this location.
556
- * The FQuery instance returned by queryEqualToValue: will respond to events at nodes with a value equal
557
- * to the supplied argument.
558
- *
559
- * @param value The value that the data returned by this FQuery will have
560
- * @return An Fquery instance, limited to data with the supplied value.
561
- */
562
- - (FQuery *) queryEqualToValue:(id)value;
563
-
564
- /**
565
- * queryEqualToValue:childKey: is used to generate a reference to a limited view of the data at this location.
566
- * The FQuery instance returned by queryEqualToValue:childKey will respond to events at nodes with a value
567
- * equal to the supplied argument with a key equal to childKey. There will be at most one node that matches because
568
- * child keys are unique.
569
- *
570
- * @param value The value that the data returned by this FQuery will have
571
- * @param childKey The key of nodes with the right value
572
- * @return An FQuery instance, limited to data with the supplied value and the key.
573
- */
574
- - (FQuery *) queryEqualToValue:(id)value childKey:(NSString *)childKey;
575
-
576
- /** @name Managing presence */
577
-
578
- /**
579
- * Ensure the data at this location is set to the specified value when
580
- * the client is disconnected (due to closing the browser, navigating
581
- * to a new page, or network issues).
582
- *
583
- * onDisconnectSetValue: is especially useful for implementing "presence" systems,
584
- * where a value should be changed or cleared when a user disconnects
585
- * so that he appears "offline" to other users.
586
- *
587
- * @param value The value to be set after the connection is lost.
588
- */
589
- - (void) onDisconnectSetValue:(id)value;
590
-
591
-
592
- /**
593
- * Ensure the data at this location is set to the specified value when
594
- * the client is disconnected (due to closing the browser, navigating
595
- * to a new page, or network issues).
596
- *
597
- * The completion block will be triggered when the operation has been successfully queued up on the Firebase servers
598
- *
599
- * @param value The value to be set after the connection is lost.
600
- * @param block Block to be triggered when the operation has been queued up on the Firebase servers
601
- */
602
- - (void) onDisconnectSetValue:(id)value withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
603
-
604
-
605
- /**
606
- * Ensure the data at this location is set to the specified value and priority when
607
- * the client is disconnected (due to closing the browser, navigating
608
- * to a new page, or network issues).
609
- *
610
- * @param value The value to be set after the connection is lost.
611
- * @param priority The priority to be set after the connection is lost.
612
- */
613
- - (void) onDisconnectSetValue:(id)value andPriority:(id)priority;
614
-
615
-
616
- /**
617
- * Ensure the data at this location is set to the specified value and priority when
618
- * the client is disconnected (due to closing the browser, navigating
619
- * to a new page, or network issues).
620
- *
621
- * The completion block will be triggered when the operation has been successfully queued up on the Firebase servers
622
- *
623
- * @param value The value to be set after the connection is lost.
624
- * @param priority The priority to be set after the connection is lost.
625
- * @param block Block to be triggered when the operation has been queued up on the Firebase servers
626
- */
627
- - (void) onDisconnectSetValue:(id)value andPriority:(id)priority withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
628
-
629
-
630
- /**
631
- * Ensure the data at this location is removed when
632
- * the client is disconnected (due to closing the app, navigating
633
- * to a new page, or network issues).
634
- *
635
- * onDisconnectRemoveValue is especially useful for implementing "presence" systems.
636
- */
637
- - (void) onDisconnectRemoveValue;
638
-
639
-
640
- /**
641
- * Ensure the data at this location is removed when
642
- * the client is disconnected (due to closing the app, navigating
643
- * to a new page, or network issues).
644
- *
645
- * onDisconnectRemoveValueWithCompletionBlock: is especially useful for implementing "presence" systems.
646
- *
647
- * @param block Block to be triggered when the operation has been queued up on the Firebase servers
648
- */
649
- - (void) onDisconnectRemoveValueWithCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
650
-
651
-
652
-
653
- /**
654
- * Ensure the data has the specified child values updated when
655
- * the client is disconnected (due to closing the browser, navigating
656
- * to a new page, or network issues).
657
- *
658
- *
659
- * @param values A dictionary of child node keys and the values to set them to after the connection is lost.
660
- */
661
- - (void) onDisconnectUpdateChildValues:(NSDictionary *)values;
662
-
663
-
664
- /**
665
- * Ensure the data has the specified child values updated when
666
- * the client is disconnected (due to closing the browser, navigating
667
- * to a new page, or network issues).
668
- *
669
- *
670
- * @param values A dictionary of child node keys and the values to set them to after the connection is lost.
671
- * @param block A block that will be called once the operation has been queued up on the Firebase servers
672
- */
673
- - (void) onDisconnectUpdateChildValues:(NSDictionary *)values withCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
674
-
675
-
676
- /**
677
- * Cancel any operations that are set to run on disconnect. If you previously called onDisconnectSetValue:,
678
- * onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the
679
- * connection is lost, call cancelDisconnectOperations:
680
- */
681
- - (void) cancelDisconnectOperations;
682
-
683
-
684
- /**
685
- * Cancel any operations that are set to run on disconnect. If you previously called onDisconnectSetValue:,
686
- * onDisconnectRemoveValue:, or onDisconnectUpdateChildValues:, and no longer want the values updated when the
687
- * connection is lost, call cancelDisconnectOperations:
688
- *
689
- * @param block A block that will be triggered once the Firebase servers have acknowledged the cancel request.
690
- */
691
- - (void) cancelDisconnectOperationsWithCompletionBlock:(void (^)(NSError* error, Firebase* ref))block;
692
-
693
-
694
- /** @name Reading and observing authentication data */
695
-
696
- /**
697
- * Get the authentication data of the current user.
698
- *
699
- * @return Authentication data of the current user.
700
- */
701
- @property (nonatomic, strong, readonly) FAuthData *authData;
702
-
703
-
704
- /**
705
- * Observer block will be triggered whenever a user gets authenticated or logged out.
706
- *
707
- * Authentication data is persisted across app restarts. If your have an old authentication, Firebase will attempt to
708
- * resume your old session. This approach does not wait for a server roundtrip. Rather, it inspects the
709
- * contents of the persisted JWT and assumes that the Firebase secret used to generate the token has not been revoked.
710
- *
711
- * In the event that the Firebase secret used to generate the token has been revoked, observers will likely see one
712
- * flicker / rapid flip-flop of authentication state once the server rejects the token.
713
- *
714
- * Use removeAuthEventObserverWithHandle: to stop receiving updates.
715
- *
716
- * @param block The block that should be called with initial authentication data and future updates
717
- * @return A handle used to unregister this block later with removeAuthEventObserverWithHandle:
718
- */
719
- - (FirebaseHandle) observeAuthEventWithBlock:(void (^)(FAuthData *authData))block;
720
-
721
-
722
- /**
723
- * Detach a block previously attached with observeAuthEventWithBlock:.
724
- *
725
- * @param handle The handle returned by the call to observeAuthEventWithBlock: which we are trying to remove.
726
- */
727
- - (void) removeAuthEventObserverWithHandle:(FirebaseHandle)handle;
728
-
729
- /** @name User creation and modification */
730
-
731
- /**
732
- * Used to create a new user account with the given email and password combo. The results will be passed to the given block.
733
- * Note that this method will not log the new user in.
734
- *
735
- * @param email The email for the account to be created
736
- * @param password The password for the account to be created
737
- * @param block The block to be called with the results of the operation
738
- */
739
- - (void) createUser:(NSString *)email password:(NSString *)password withCompletionBlock:(void (^)(NSError *error))block;
740
-
741
- /**
742
- * Used to create a new user account with the given email and password combo. The results will be passed
743
- * to the given block. Note that this method will not log the new user in. On success, invokes the result
744
- * block with an dictionary of user data, including the user id.
745
- *
746
- * @param email The email for the account to be created
747
- * @param password The password for the account to be created
748
- * @param block The block to be called with the results of the operation
749
- */
750
- - (void) createUser:(NSString *)email password:(NSString *)password withValueCompletionBlock:(void (^)(NSError *error, NSDictionary *result))block;
751
-
752
- /**
753
- * Remove a user account with the given email and password.
754
- *
755
- * @param email The email of the account to be removed
756
- * @param password The password for the account to be removed
757
- * @param block A block to receive the results of the operation
758
- */
759
- - (void) removeUser:(NSString *)email password:(NSString *)password withCompletionBlock:(void (^)(NSError *error))block;
760
-
761
-
762
- /**
763
- * Attempts to change the password for the account with the given credentials to the new password given. Results are reported to the supplied block.
764
- *
765
- * @param email The email for the account to be changed
766
- * @param oldPassword The old password for the account to be changed
767
- * @param newPassword The desired newPassword for the account
768
- * @param block A block to receive the results of the operation
769
- */
770
- - (void) changePasswordForUser:(NSString *)email fromOld:(NSString *)oldPassword toNew:(NSString *)newPassword withCompletionBlock:(void (^)(NSError *error))block;
771
-
772
-
773
- /**
774
- * Attempts to change the email for the account with the given credentials to the new email given. Results are reported to the supplied block.
775
- *
776
- * @param email The email for the account to be changed
777
- * @param password The password for the account to be changed
778
- * @param newEmail The desired newEmail for the account
779
- * @param block A block to receive the results of the operation
780
- */
781
- - (void) changeEmailForUser:(NSString *)email password:(NSString *)password toNewEmail:(NSString *)newEmail withCompletionBlock:(void (^)(NSError *error))block;
782
-
783
-
784
- /**
785
- * Send a password reset email to the owner of the account with the given email. Results are reported to the supplied block.
786
- *
787
- * @param email The email of the account to be removed
788
- * @param block A block to receive the results of the operation
789
- */
790
- - (void) resetPasswordForUser:(NSString *)email withCompletionBlock:(void (^)(NSError* error))block;
791
-
792
- /** @name Authenticating */
793
-
794
- /**
795
- * Attempts to log the user in anonymously. The block will receive the results of the attempt.
796
- *
797
- * @param block A block to receive the results of the authentication attempt.
798
- */
799
- - (void) authAnonymouslyWithCompletionBlock:(void (^)(NSError *error, FAuthData *authData))block;
800
-
801
- /**
802
- * Attempts to authenticate to Firebase with the given credentials. The block will receive the results of the attempt.
803
- *
804
- * @param email The email of the account
805
- * @param password The password for the account
806
- * @param block A block to receive the results of the authentication attempt
807
- */
808
- - (void) authUser:(NSString *)email password:(NSString *)password withCompletionBlock:(void (^)(NSError *error, FAuthData *authData))block;
809
-
810
- /**
811
- * Authenticate access to this Firebase using the provided credentials.
812
- *
813
- * The completion block will be called with the results of the authenticated attempt. Unlike
814
- * authWithCredential:withCompletionBlock:withCancelBlock:, no block will be called when the credentials become invalid.
815
- *
816
- * Instead, please use observeAuthEventWithBlock: to observe if a user gets logged out.
817
- *
818
- * @param token The Firebase authentication JWT generated by a secure code on a remote server.
819
- * @param block This block will be called with the results of the authentication attempt
820
- */
821
- - (void) authWithCustomToken:(NSString *)token withCompletionBlock:(void (^)(NSError *error, FAuthData *authData))block;
822
-
823
- /**
824
- * Authenticate to Firebase with an OAuth token from a provider.
825
- *
826
- * This method works with current OAuth 2.0 providers such as Facebook, Google+, and Github.
827
- *
828
- * For other providers that Firebase supports which require additional parameters for login, such as Twitter, please use authWithOAuthProvider:parameters:withCompletionBlock:.
829
- *
830
- * @param provider The provider, all lower case with no spaces.
831
- * @param oauthToken The OAuth Token to authenticate with the provider
832
- * @param block A block to receive the results of the authentication attempt
833
- */
834
- - (void) authWithOAuthProvider:(NSString *)provider token:(NSString *)oauthToken withCompletionBlock:(void (^) (NSError *error, FAuthData *authData))block;
835
-
836
- /**
837
- * Authenticate to Firebase with an OAuth token from a provider.
838
- *
839
- * This method is for OAuth providers that require extra parameters when authentication with the server, such as Twitter.
840
- * The OAuth token should be included as a parameter.
841
- *
842
- * @param provider The provider, all lowercase with no spaces.
843
- * @param parameters The parameters necessary to authenticate with the provider
844
- * @param block A block to receive the results of the authentication attempt
845
- */
846
- - (void) authWithOAuthProvider:(NSString *)provider parameters:(NSDictionary *)parameters withCompletionBlock:(void (^) (NSError *error, FAuthData *authData))block;
847
-
848
- /**
849
- * Make a reverse OAuth Request to a provider.
850
- *
851
- * This method is for OAuth providers that require a reverse request be made first. The json output of this block
852
- *
853
- * @param provider The provider, all lowercase with no spaces.
854
- * @param block The block to receive the results of the reverse OAuth request.
855
- */
856
- - (void) makeReverseOAuthRequestTo:(NSString *)provider withCompletionBlock:(void (^)(NSError *error, NSDictionary *json))block;
857
-
858
- /**
859
- * Removes any credentials associated with this Firebase.
860
- */
861
- - (void) unauth;
862
-
863
- /**
864
- * This method is deprecated. Use authWithCustomToken:withCompletionBlock: instead.
865
- *
866
- * Authenticate access to this Firebase using the provided credentials. The completion block will be called with
867
- * the results of the authenticated attempt, and the cancelBlock will be called if the credentials become invalid
868
- * at some point after authentication has succeeded.
869
- *
870
- * @param credential The Firebase authentication JWT generated by a secure code on a remote server.
871
- * @param block This block will be called with the results of the authentication attempt
872
- * @param cancelBlock This block will be called if at any time in the future the credentials become invalid
873
- */
874
- - (void) authWithCredential:(NSString *)credential withCompletionBlock:(void (^) (NSError* error, id data))block withCancelBlock:(void (^)(NSError* error))cancelBlock __attribute__((deprecated("Use authWithCustomToken:withCompletionblock: instead")));
875
-
876
- /**
877
- * This method is deprecated. Use unauth: instead.
878
- *
879
- * Removes any credentials associated with this Firebase. The callback block will be triggered after this operation
880
- * has been acknowledged by the Firebase servers.
881
- *
882
- * @param block This block will be called once the unauth has completed.
883
- */
884
- - (void) unauthWithCompletionBlock:(void (^)(NSError* error))block __attribute__((deprecated("Use unauth: instead")));
885
-
886
-
887
- /** @name Manual Connection Management */
888
-
889
- /**
890
- * Manually disconnect the Firebase client from the server and disable automatic reconnection.
891
- *
892
- * The Firebase client automatically maintains a persistent connection to the Firebase server,
893
- * which will remain active indefinitely and reconnect when disconnected. However, the goOffline( )
894
- * and goOnline( ) methods may be used to manually control the client connection in cases where
895
- * a persistent connection is undesirable.
896
- *
897
- * While offline, the Firebase client will no longer receive data updates from the server. However,
898
- * all Firebase operations performed locally will continue to immediately fire events, allowing
899
- * your application to continue behaving normally. Additionally, each operation performed locally
900
- * will automatically be queued and retried upon reconnection to the Firebase server.
901
- *
902
- * To reconnect to the Firebase server and begin receiving remote events, see goOnline( ).
903
- * Once the connection is reestablished, the Firebase client will transmit the appropriate data
904
- * and fire the appropriate events so that your client "catches up" automatically.
905
- *
906
- * Note: Invoking this method will impact all Firebase connections.
907
- */
908
- + (void) goOffline;
909
-
910
- /**
911
- * Manually reestablish a connection to the Firebase server and enable automatic reconnection.
912
- *
913
- * The Firebase client automatically maintains a persistent connection to the Firebase server,
914
- * which will remain active indefinitely and reconnect when disconnected. However, the goOffline( )
915
- * and goOnline( ) methods may be used to manually control the client connection in cases where
916
- * a persistent connection is undesirable.
917
- *
918
- * This method should be used after invoking goOffline( ) to disable the active connection.
919
- * Once reconnected, the Firebase client will automatically transmit the proper data and fire
920
- * the appropriate events so that your client "catches up" automatically.
921
- *
922
- * To disconnect from the Firebase server, see goOffline( ).
923
- *
924
- * Note: Invoking this method will impact all Firebase connections.
925
- */
926
- + (void) goOnline;
927
-
928
-
929
- /** @name Transactions */
930
-
931
- /**
932
- * Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData
933
- * instance that contains the current data at this location. Your block should update this data to the value you
934
- * wish to write to this location, and then return an instance of FTransactionResult with the new data.
935
- *
936
- * If, when the operation reaches the server, it turns out that this client had stale data, your block will be run
937
- * again with the latest data from the server.
938
- *
939
- * When your block is run, you may decide to abort the transaction by return [FTransactionResult abort].
940
- *
941
- * @param block This block receives the current data at this location and must return an instance of FTransactionResult
942
- */
943
- - (void) runTransactionBlock:(FTransactionResult* (^) (FMutableData* currentData))block;
944
-
945
-
946
- /**
947
- * Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData
948
- * instance that contains the current data at this location. Your block should update this data to the value you
949
- * wish to write to this location, and then return an instance of FTransactionResult with the new data.
950
- *
951
- * If, when the operation reaches the server, it turns out that this client had stale data, your block will be run
952
- * again with the latest data from the server.
953
- *
954
- * When your block is run, you may decide to abort the transaction by return [FTransactionResult abort].
955
- *
956
- * @param block This block receives the current data at this location and must return an instance of FTransactionResult
957
- * @param completionBlock This block will be triggered once the transaction is complete, whether it was successful or not. It will indicate if there was an error, whether or not the data was committed, and what the current value of the data at this location is.
958
- */
959
- - (void) runTransactionBlock:(FTransactionResult* (^) (FMutableData* currentData))block andCompletionBlock:(void (^) (NSError* error, BOOL committed, FDataSnapshot* snapshot))completionBlock;
960
-
961
-
962
-
963
- /**
964
- * Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData
965
- * instance that contains the current data at this location. Your block should update this data to the value you
966
- * wish to write to this location, and then return an instance of FTransactionResult with the new data.
967
- *
968
- * If, when the operation reaches the server, it turns out that this client had stale data, your block will be run
969
- * again with the latest data from the server.
970
- *
971
- * When your block is run, you may decide to abort the transaction by return [FTransactionResult abort].
972
- *
973
- * Since your block may be run multiple times, this client could see several immediate states that don't exist on the server. You can suppress those immediate states until the server confirms the final state of the transaction.
974
- *
975
- * @param block This block receives the current data at this location and must return an instance of FTransactionResult
976
- * @param completionBlock This block will be triggered once the transaction is complete, whether it was successful or not. It will indicate if there was an error, whether or not the data was committed, and what the current value of the data at this location is.
977
- * @param localEvents Set this to NO to suppress events raised for intermediate states, and only get events based on the final state of the transaction.
978
- */
979
- - (void) runTransactionBlock:(FTransactionResult* (^) (FMutableData* currentData))block andCompletionBlock:(void (^) (NSError* error, BOOL committed, FDataSnapshot* snapshot))completionBlock withLocalEvents:(BOOL)localEvents;
980
-
981
-
982
- /** @name Retrieving String Representation */
983
-
984
- /**
985
- * Gets the absolute URL of this Firebase location.
986
- *
987
- * @return The absolute URL of the referenced Firebase location.
988
- */
989
- - (NSString *) description;
990
-
991
- /** @name Properties */
992
-
993
- /**
994
- * Get a Firebase reference for the parent location.
995
- * If this instance refers to the root of your Firebase, it has no parent,
996
- * and therefore parent( ) will return null.
997
- *
998
- * @return A Firebase reference for the parent location.
999
- */
1000
- @property (strong, readonly, nonatomic) Firebase* parent;
1001
-
1002
-
1003
- /**
1004
- * Get a Firebase reference for the root location
1005
- *
1006
- * @return A new Firebase reference to root location.
1007
- */
1008
- @property (strong, readonly, nonatomic) Firebase* root;
1009
-
1010
-
1011
- /**
1012
- * Gets last token in a Firebase location (e.g. 'fred' in https://SampleChat.firebaseIO-demo.com/users/fred)
1013
- *
1014
- * @return The key of the location this reference points to.
1015
- */
1016
- @property (strong, readonly, nonatomic) NSString* key;
1017
-
1018
- /**
1019
- * Gets the FirebaseApp instance associated with this reference.
1020
- *
1021
- * @return The FirebaseApp object for this reference.
1022
- */
1023
- @property (strong, readonly, nonatomic) FirebaseApp *app;
1024
-
1025
-
1026
- /** @name Global configuration and settings */
1027
-
1028
- /** Set the default dispatch queue for event blocks.
1029
- *
1030
- * @param queue The queue to set as the default for running blocks for all Firebase event types.
1031
- * @deprecated This method is deprecated
1032
- * @note Please use [Firebase defaultConfig].callbackQueue instead
1033
- */
1034
- + (void) setDispatchQueue:(dispatch_queue_t)queue __attribute__((deprecated));
1035
-
1036
- /** Retrieve the Firebase SDK version. */
1037
- + (NSString *) sdkVersion;
1038
-
1039
- + (void) setLoggingEnabled:(BOOL)enabled;
1040
-
1041
- /**
1042
- * Returns the default config object, used for configuring Firebase client behavior.
1043
- *
1044
- * This can be modified until you create your first `Firebase` instance.
1045
- */
1046
- + (FConfig *)defaultConfig;
1047
-
1048
- /**
1049
- * @deprecated This method is deprecated
1050
- * @note Please enable persistence by setting [Firebase defaultConfig].persistenceEnabled = YES instead.
1051
- * @param option Option to set.
1052
- * @param value Value to set.
1053
- */
1054
- + (void) setOption:(NSString*)option to:(id)value __attribute__((deprecated));
1055
- @end