FIRStorageTaskSnapshot.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <Foundation/Foundation.h>
  17. #import "FIRStorageConstants.h"
  18. #import "FIRStorageSwiftNameSupport.h"
  19. NS_ASSUME_NONNULL_BEGIN
  20. @class FIRStorageMetadata;
  21. @class FIRStorageReference;
  22. @class FIRStorageTask;
  23. /**
  24. * FIRStorageTaskSnapshot represents an immutable view of a task.
  25. * A Snapshot contains a task, storage reference, metadata (if it exists),
  26. * progress, and an error (if one occurred).
  27. */
  28. FIR_SWIFT_NAME(StorageTaskSnapshot)
  29. @interface FIRStorageTaskSnapshot : NSObject
  30. /**
  31. * Subclass of FIRStorageTask this snapshot represents.
  32. */
  33. @property(readonly, copy, nonatomic) __kindof FIRStorageTask *task;
  34. /**
  35. * Metadata returned by the task, or nil if no metadata returned.
  36. */
  37. @property(readonly, copy, nonatomic, nullable) FIRStorageMetadata *metadata;
  38. /**
  39. * FIRStorageReference this task is operates on.
  40. */
  41. @property(readonly, copy, nonatomic) FIRStorageReference *reference;
  42. /**
  43. * NSProgress object which tracks the progess of an upload or download.
  44. */
  45. @property(readonly, strong, nonatomic, nullable) NSProgress *progress;
  46. /**
  47. * Error during task execution, or nil if no error occurred.
  48. */
  49. @property(readonly, copy, nonatomic, nullable) NSError *error;
  50. /**
  51. * Status of the task.
  52. */
  53. @property(readonly, nonatomic) FIRStorageTaskStatus status;
  54. @end
  55. NS_ASSUME_NONNULL_END