LuxChat  2.0
Instant messenger for iOS
Instance Methods | List of all members
FIRStorageObservableTask Class Reference

#import <FIRStorageObservableTask.h>

Inheritance diagram for FIRStorageObservableTask:
FIRStorageTask FIRStorageDownloadTask FIRStorageUploadTask

Instance Methods

(FIRStorageHandle- observeStatus:handler:
 
(void) - removeObserverWithHandle:
 
(void) - removeAllObserversForStatus:
 
(void) - removeAllObservers
 

Additional Inherited Members

- Properties inherited from FIRStorageTask
FIRStorageTaskSnapshotsnapshot
 

Detailed Description

Extends FIRStorageTask to provide observable semantics such as adding and removing observers. Observers produce a FIRStorageHandle, which is used to keep track of and remove specific observers at a later date. This class is currently not thread safe and can only be called on the main thread.

Method Documentation

- (FIRStorageHandle) observeStatus: (FIRStorageTaskStatus)  status
handler: (void(^)(FIRStorageTaskSnapshot *snapshot))  handler 

Observes changes in the upload status: Resume, Pause, Progress, Success, and Failure.

Parameters
statusThe FIRStorageTaskStatus change to observe.
handlerA callback that fires every time the status event occurs, returns a FIRStorageTaskSnapshot containing the state of the task.
Returns
A task handle that can be used to remove the observer at a later date.
- (void) removeAllObservers

Removes all observers.

- (void) removeAllObserversForStatus: (FIRStorageTaskStatus)  status

Removes all observers for a single status.

Parameters
statusA FIRStorageTaskStatus to remove listeners for.
- (void) removeObserverWithHandle: (FIRStorageHandle handle

Removes the single observer with the provided handle.

Parameters
handleThe handle of the task to remove.

The documentation for this class was generated from the following file: