lib/vendor/Firebase.framework/Versions/A/Headers/Firebase.h in motion-firebase-2.0.1 vs lib/vendor/Firebase.framework/Versions/A/Headers/Firebase.h in motion-firebase-2.0.7

- old
+ new

@@ -179,17 +179,19 @@ * setValue:andPriority: should be used when setting initial data with a specific priority * and setPriority: should be used when updating the priority of existing data. * * Children are sorted based on this priority using the following rules: * - * Children with no priority (a null priority) come first. They are ordered lexicographically by name. - * Children with a priority that is parsable as a number come next. They are - * sorted numerically by priority first (small to large) and lexicographically by name second (A to z). - * Children with non-numeric priorities come last. They are sorted lexicographically - * by priority first and lexicographically by name second. - * Setting the priority to null removes any existing priority. + * Children with no priority come first. + * Children with a number as their priority come next. They are sorted numerically by priority (small to large). + * Children with a string as their priority come last. They are sorted lexicographically by priority. + * Whenever two children have the same priority (including no priority), they are sorted by name. Numeric + * names come first (sorted numerically), followed by the remaining names (sorted lexicographically). + * * Note that priorities are parsed and ordered as IEEE 754 double-precision floating-point numbers. + * Names are always stored as strings and are treated as numbers only when they can be parsed as a + * 32-bit integer * * @param priority The priority to set at the specified location. */ - (void) setPriority:(id)priority; @@ -274,11 +276,11 @@ * @param eventType The type of event to listen for. * @param block The block that should be called with initial data and updates as a FDataSnapshot. * @param cancelBlock The block that should be called if this client no longer has permission to receive these events * @return A handle used to unregister this block later using removeObserverWithHandle: */ -- (FirebaseHandle) observeEventType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block withCancelBlock:(void (^)(void))cancelBlock; +- (FirebaseHandle) observeEventType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block withCancelBlock:(void (^)(NSError* error))cancelBlock; /** * observeEventType:andPreviousSiblingWithBlock: is used to listen for data changes at a particular location. * This is the primary way to read data from Firebase. Your block will be triggered @@ -292,11 +294,11 @@ * @param eventType The type of event to listen for. * @param block The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child's name. * @param cancelBlock The block that should be called if this client no longer has permission to receive these events * @return A handle used to unregister this block later using removeObserverWithHandle: */ -- (FirebaseHandle) observeEventType:(FEventType)eventType andPreviousSiblingNameWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevName))block withCancelBlock:(void (^)(void))cancelBlock; +- (FirebaseHandle) observeEventType:(FEventType)eventType andPreviousSiblingNameWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevName))block withCancelBlock:(void (^)(NSError* error))cancelBlock; /** * This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. * @@ -323,11 +325,11 @@ * * @param eventType The type of event to listen for. * @param block The block that should be called with initial data and updates as a FDataSnapshot. * @param cancelBlock The block that will be called if you don't have permission to access this data */ -- (void) observeSingleEventOfType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block withCancelBlock:(void (^)(void))cancelBlock; +- (void) observeSingleEventOfType:(FEventType)eventType withBlock:(void (^)(FDataSnapshot* snapshot))block withCancelBlock:(void (^)(NSError* error))cancelBlock; /** * This is equivalent to observeEventType:withBlock:, except the block is immediately canceled after the initial data is returned. In addition, for FEventTypeChildAdded, FEventTypeChildMoved, and * FEventTypeChildChanged events, your block will be passed the name of the previous node by priority order. @@ -336,11 +338,11 @@ * * @param eventType The type of event to listen for. * @param block The block that should be called with initial data and updates as a FDataSnapshot, as well as the previous child's name. * @param cancelBlock The block that will be called if you don't have permission to access this data */ -- (void) observeSingleEventOfType:(FEventType)eventType andPreviousSiblingNameWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevName))block withCancelBlock:(void (^)(void))cancelBlock; +- (void) observeSingleEventOfType:(FEventType)eventType andPreviousSiblingNameWithBlock:(void (^)(FDataSnapshot* snapshot, NSString* prevName))block withCancelBlock:(void (^)(NSError* error))cancelBlock; /** @name Detaching observers */ /** * Detach a block previously attached with observeEventType:withBlock:. @@ -548,11 +550,59 @@ /** * Removes any credentials associated with this Firebase */ - (void) unauth; +/** + * Removes any credentials associated with this Firebase. The callback block will be triggered after this operation + * has been acknowledged by the Firebase servers. + */ +- (void) unauthWithCompletionBlock:(void (^)(NSError* error))block; + +/** @name Manual Connection Management */ + +/** + * Manually disconnect the Firebase client from the server and disable automatic reconnection. + * + * The Firebase client automatically maintains a persistent connection to the Firebase server, + * which will remain active indefinitely and reconnect when disconnected. However, the goOffline( ) + * and goOnline( ) methods may be used to manually control the client connection in cases where + * a persistent connection is undesirable. + * + * While offline, the Firebase client will no longer receive data updates from the server. However, + * all Firebase operations performed locally will continue to immediately fire events, allowing + * your application to continue behaving normally. Additionally, each operation performed locally + * will automatically be queued and retried upon reconnection to the Firebase server. + * + * To reconnect to the Firebase server and begin receiving remote events, see goOnline( ). + * Once the connection is reestablished, the Firebase client will transmit the appropriate data + * and fire the appropriate events so that your client "catches up" automatically. + * + * Note: Invoking this method will impact all Firebase connections. + */ ++ (void) goOffline; + +/** + * Manually reestablish a connection to the Firebase server and enable automatic reconnection. + * + * The Firebase client automatically maintains a persistent connection to the Firebase server, + * which will remain active indefinitely and reconnect when disconnected. However, the goOffline( ) + * and goOnline( ) methods may be used to manually control the client connection in cases where + * a persistent connection is undesirable. + * + * This method should be used after invoking goOffline( ) to disable the active connection. + * Once reconnected, the Firebase client will automatically transmit the proper data and fire + * the appropriate events so that your client "catches up" automatically. + * + * To disconnect from the Firebase server, see goOffline( ). + * + * Note: Invoking this method will impact all Firebase connections. + */ ++ (void) goOnline; + + /** @name Transactions */ /** * Performs an optimistic-concurrency transactional update to the data at this location. Your block will be called with an FMutableData * instance that contains the current data at this location. Your block should update this data to the value you @@ -649,6 +699,9 @@ + (void) setDispatchQueue:(dispatch_queue_t)queue; /** Retrieve the Firebase SDK version. */ + (NSString *) sdkVersion; ++ (void) setLoggingEnabled:(BOOL)enabled; + ++ (void) setOption:(NSString*)option to:(id)value; @end