FIRStorageTaskSnapshot.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. NS_ASSUME_NONNULL_BEGIN
  19. @class FIRStorageMetadata;
  20. @class FIRStorageReference;
  21. @class FIRStorageTask;
  22. /**
  23. * FIRStorageTaskSnapshot represents an immutable view of a task.
  24. * A Snapshot contains a task, storage reference, metadata (if it exists),
  25. * progress, and an error (if one occurred).
  26. */
  27. NS_SWIFT_NAME(StorageTaskSnapshot)
  28. @interface FIRStorageTaskSnapshot : NSObject
  29. /**
  30. * Subclass of FIRStorageTask this snapshot represents.
  31. */
  32. @property(readonly, copy, nonatomic) __kindof FIRStorageTask *task;
  33. /**
  34. * Metadata returned by the task, or nil if no metadata returned.
  35. */
  36. @property(readonly, copy, nonatomic, nullable) FIRStorageMetadata *metadata;
  37. /**
  38. * FIRStorageReference this task is operates on.
  39. */
  40. @property(readonly, copy, nonatomic) FIRStorageReference *reference;
  41. /**
  42. * NSProgress object which tracks the progess of an upload or download.
  43. */
  44. @property(readonly, strong, nonatomic, nullable) NSProgress *progress;
  45. /**
  46. * Error during task execution, or nil if no error occurred.
  47. */
  48. @property(readonly, copy, nonatomic, nullable) NSError *error;
  49. /**
  50. * Status of the task.
  51. */
  52. @property(readonly, nonatomic) FIRStorageTaskStatus status;
  53. @end
  54. NS_ASSUME_NONNULL_END