This repository was archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 173
/
Copy pathApiDefinition.cs
413 lines (331 loc) · 15 KB
/
ApiDefinition.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
using System;
using UIKit;
using Foundation;
using ObjCRuntime;
using CoreGraphics;
using CoreFoundation;
#if !NET
using NativeHandle = System.IntPtr;
#endif
namespace Firebase.Storage
{
// @interface FIRStorage : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "FIRStorage")]
interface Storage
{
// extern NSString *const _Nonnull FIRStorageErrorDomain;
[Field ("FIRStorageErrorDomain", "__Internal")]
NSString ErrorDomain { get; }
// +(instancetype _Nonnull)storage;
[Static]
[Export ("storage")]
Storage DefaultInstance { get; }
// +(instancetype _Nonnull)storageForApp:(FIRApp * _Nonnull)app;
[Static]
[Export ("storageForApp:")]
Storage From (Firebase.Core.App app);
// + (instancetype)storageWithURL:(NSString *)url NS_SWIFT_NAME(storage(url:));
[Static]
[Export ("storageWithURL:")]
Storage From (string url);
// + (instancetype)storageForApp:(FIRApp *)app URL:(NSString*) url NS_SWIFT_NAME (storage(app:url:));
[Static]
[Export ("storageForApp:URL:")]
Storage From (Firebase.Core.App app, string url);
// @property (readonly, nonatomic, strong) FIRApp * _Nonnull app;
[Export ("app", ArgumentSemantic.Strong)]
Firebase.Core.App App { get; }
// @property NSTimeInterval maxUploadRetryTime;
[Export ("maxUploadRetryTime")]
double MaxUploadRetryTime { get; set; }
// @property NSTimeInterval maxDownloadRetryTime;
[Export ("maxDownloadRetryTime")]
double MaxDownloadRetryTime { get; set; }
// @property NSTimeInterval maxOperationRetryTime;
[Export ("maxOperationRetryTime")]
double MaxOperationRetryTime { get; set; }
// @property (nonatomic, strong) dispatch_queue_t _Nonnull callbackQueue;
[Export ("callbackQueue", ArgumentSemantic.Strong)]
DispatchQueue CallbackQueue { get; set; }
// -(FIRStorageReference * _Nonnull)reference;
[Export ("reference")]
StorageReference GetRootReference ();
// -(FIRStorageReference * _Nonnull)referenceForURL:(NSString * _Nonnull)string;
[Export ("referenceForURL:")]
StorageReference GetReferenceFromUrl (string url);
// -(FIRStorageReference * _Nonnull)referenceWithPath:(NSString * _Nonnull)string;
[Export ("referenceWithPath:")]
StorageReference GetReferenceFromPath (string path);
// - (void) useEmulatorWithHost:(NSString*) host port:(NSInteger) port;
[Export ("useEmulatorWithHost:port:")]
void UseEmulatorWithHost (string host, uint port);
}
// @interface FIRStorageDownloadTask : FIRStorageObservableTask <FIRStorageTaskManagement>
[BaseType (typeof (StorageObservableTask), Name = "FIRStorageDownloadTask")]
interface StorageDownloadTask : StorageTaskManagement
{
}
// @interface FIRStorageListResult : NSObject <NSCopying>
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "FIRStorageListResult")]
interface StorageListResult : INSCopying {
// @property (readonly, nonatomic) NSArray<FIRStorageReference *> * _Nonnull prefixes;
[Export ("prefixes")]
StorageReference [] Prefixes { get; }
// @property (readonly, nonatomic) NSArray<FIRStorageReference *> * _Nonnull items;
[Export ("items")]
StorageReference [] Items { get; }
// @property (readonly, nonatomic) NSString * _Nullable pageToken;
[NullAllowed]
[Export ("pageToken")]
string PageToken { get; }
}
// @interface FIRStorageMetadata : NSObject <NSCopying>
[BaseType (typeof (NSObject), Name = "FIRStorageMetadata")]
interface StorageMetadata : INSCopying
{
// @property (readonly, copy, nonatomic) NSString * _Nonnull bucket;
[Export ("bucket")]
string Bucket { get; }
// @property (copy, nonatomic) NSString * _Nullable cacheControl;
[NullAllowed]
[Export ("cacheControl")]
string CacheControl { get; set; }
// @property (copy, nonatomic) NSString * _Nullable contentDisposition;
[NullAllowed]
[Export ("contentDisposition")]
string ContentDisposition { get; set; }
// @property (copy, nonatomic) NSString * _Nullable contentEncoding;
[NullAllowed]
[Export ("contentEncoding")]
string ContentEncoding { get; set; }
// @property (copy, nonatomic) NSString * _Nullable contentLanguage;
[NullAllowed]
[Export ("contentLanguage")]
string ContentLanguage { get; set; }
// @property (copy, nonatomic) NSString * _Nullable contentType;
[NullAllowed]
[Export ("contentType")]
string ContentType { get; set; }
// @property(copy, nonatomic, nullable, readonly) NSString *md5Hash;
[NullAllowed]
[Export ("md5Hash")]
string Md5Hash { get; set; }
// @property (readonly) int64_t generation;
[Export ("generation")]
long Generation { get; }
// @property (copy, nonatomic) NSDictionary<NSString *,NSString *> * _Nullable customMetadata;
[NullAllowed]
[Export ("customMetadata", ArgumentSemantic.Copy)]
NSDictionary<NSString, NSString> CustomMetadata { get; set; }
// @property (readonly) int64_t metageneration;
[Export ("metageneration")]
long Metageneration { get; }
// @property (readonly, copy, nonatomic) NSString * _Nullable name;
[NullAllowed]
[Export ("name")]
string Name { get; }
// @property (readonly, copy, nonatomic) NSString * _Nullable path;
[NullAllowed]
[Export ("path")]
string Path { get; }
// @property (readonly) int64_t size;
[Export ("size")]
long Size { get; }
// @property (readonly, copy, nonatomic) NSDate * _Nullable timeCreated;
[NullAllowed]
[Export ("timeCreated", ArgumentSemantic.Copy)]
NSDate TimeCreated { get; }
// @property (readonly, copy, nonatomic) NSDate * _Nullable updated;
[NullAllowed]
[Export ("updated", ArgumentSemantic.Copy)]
NSDate Updated { get; }
// @property (readonly, nonatomic, strong) FIRStorageReference * _Nullable storageReference;
[NullAllowed]
[Export ("storageReference", ArgumentSemantic.Strong)]
StorageReference StorageReference { get; }
// -(instancetype _Nullable)initWithDictionary:(NSDictionary * _Nonnull)dictionary __attribute__((objc_designated_initializer));
[DesignatedInitializer]
[Export ("initWithDictionary:")]
NativeHandle Constructor (NSDictionary dictionary);
// -(NSDictionary * _Nonnull)dictionaryRepresentation;
[Export ("dictionaryRepresentation")]
NSDictionary DictionaryRepresentation { get; }
// @property (readonly, getter = isFile) BOOL file;
[Export ("isFile")]
bool IsFile { get; }
// @property (readonly, getter = isFolder) BOOL folder;
[Export ("isFolder")]
bool IsFolder { get; }
}
delegate void StorageObservableTaskEventObserverHandler (StorageTaskSnapshot snapshot);
// @interface FIRStorageObservableTask : FIRStorageTask
[BaseType (typeof (StorageTask), Name = "FIRStorageObservableTask")]
interface StorageObservableTask
{
// -(FIRStorageHandle _Nonnull)observeStatus:(FIRStorageTaskStatus)status handler:(void (^ _Nonnull)(FIRStorageTaskSnapshot * _Nonnull))handler;
[Export ("observeStatus:handler:")]
string ObserveStatus (StorageTaskStatus status, StorageObservableTaskEventObserverHandler handler);
// -(void)removeObserverWithHandle:(FIRStorageHandle _Nonnull)handle;
[Export ("removeObserverWithHandle:")]
void RemoveObserver (string handle);
// -(void)removeAllObserversForStatus:(FIRStorageTaskStatus)status;
[Export ("removeAllObserversForStatus:")]
void RemoveAllObservers (StorageTaskStatus status);
// -(void)removeAllObservers;
[Export ("removeAllObservers")]
void RemoveAllObservers ();
}
delegate void StorageGetPutUpdateCompletionHandler ([NullAllowed] StorageMetadata metadata, [NullAllowed] NSError error);
delegate void StorageGetDataCompletionHandler ([NullAllowed] NSData data, [NullAllowed] NSError error);
delegate void StorageDownloadUrlCompletionHandler ([NullAllowed] NSUrl url, [NullAllowed] NSError error);
delegate void StorageWriteToFileCompletionHandler ([NullAllowed] NSUrl url, [NullAllowed] NSError error);
delegate void StorageDeleteCompletionHandler ([NullAllowed] NSError error);
// @interface FIRStorageReference : NSObject
[BaseType (typeof (NSObject), Name = "FIRStorageReference")]
interface StorageReference
{
// @property (readonly, nonatomic) FIRStorage * _Nonnull storage;
[Export ("storage")]
Storage Storage { get; }
// @property (readonly, nonatomic) NSString * _Nonnull bucket;
[Export ("bucket")]
string Bucket { get; }
// @property (readonly, nonatomic) NSString * _Nonnull fullPath;
[Export ("fullPath")]
string FullPath { get; }
// @property (readonly, nonatomic) NSString * _Nonnull name;
[Export ("name")]
string Name { get; }
// -(FIRStorageReference * _Nonnull)root;
[Export ("root")]
StorageReference Root { get; }
// -(FIRStorageReference * _Nullable)parent;
[NullAllowed]
[Export ("parent")]
StorageReference Parent { get; }
// -(FIRStorageReference * _Nonnull)child:(NSString * _Nonnull)path;
[Export ("child:")]
StorageReference GetChild (string path);
// -(FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData;
[Export ("putData:")]
StorageUploadTask PutData (NSData uploadData);
// -(FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData metadata:(FIRStorageMetadata * _Nullable)metadata;
[Export ("putData:metadata:")]
StorageUploadTask PutData (NSData uploadData, [NullAllowed] StorageMetadata metadata);
// -(FIRStorageUploadTask * _Nonnull)putData:(NSData * _Nonnull)uploadData metadata:(FIRStorageMetadata * _Nullable)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion;
[Export ("putData:metadata:completion:")]
StorageUploadTask PutData (NSData uploadData, [NullAllowed] StorageMetadata metadata, [NullAllowed] StorageGetPutUpdateCompletionHandler completion);
// -(FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL;
[Export ("putFile:")]
StorageUploadTask PutFile (NSUrl fileUrl);
// -(FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL metadata:(FIRStorageMetadata * _Nullable)metadata;
[Export ("putFile:metadata:")]
StorageUploadTask PutFile (NSUrl fileUrl, [NullAllowed] StorageMetadata metadata);
// -(FIRStorageUploadTask * _Nonnull)putFile:(NSURL * _Nonnull)fileURL metadata:(FIRStorageMetadata * _Nullable)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion;
[Export ("putFile:metadata:completion:")]
StorageUploadTask PutFile (NSUrl fileUrl, [NullAllowed] StorageMetadata metadata, [NullAllowed] StorageGetPutUpdateCompletionHandler completion);
// -(FIRStorageDownloadTask * _Nonnull)dataWithMaxSize:(int64_t)size completion:(void (^ _Nonnull)(NSData * _Nullable, NSError * _Nullable))completion;
[Export ("dataWithMaxSize:completion:")]
StorageDownloadTask GetData (long maxSize, StorageGetDataCompletionHandler completion);
// -(void)downloadURLWithCompletion:(void (^ _Nonnull)(NSURL * _Nullable, NSError * _Nullable))completion;
[Async]
[Export ("downloadURLWithCompletion:")]
void GetDownloadUrl (StorageDownloadUrlCompletionHandler completion);
// -(FIRStorageDownloadTask * _Nonnull)writeToFile:(NSURL * _Nonnull)fileURL;
[Export ("writeToFile:")]
StorageDownloadTask WriteToFile (NSUrl fileUrl);
// -(FIRStorageDownloadTask * _Nonnull)writeToFile:(NSURL * _Nonnull)fileURL completion:(void (^ _Nullable)(NSURL * _Nullable, NSError * _Nullable))completion;
[Export ("writeToFile:completion:")]
StorageDownloadTask WriteToFile (NSUrl fileURL, [NullAllowed] StorageWriteToFileCompletionHandler completion);
// -(void)listAllWithCompletion:(void (^ _Nonnull)(FIRStorageListResult * _Nonnull, NSError * _Nullable))completion;
[Export ("listAllWithCompletion:")]
void ListAll (Action<StorageListResult, NSError> completion);
// -(void)listWithMaxResults:(int64_t)maxResults completion:(void (^ _Nonnull)(FIRStorageListResult * _Nonnull, NSError * _Nullable))completion;
[Export ("listWithMaxResults:completion:")]
void List (long maxResults, Action<StorageListResult, NSError> completion);
// -(void)listWithMaxResults:(int64_t)maxResults pageToken:(NSString * _Nonnull)pageToken completion:(void (^ _Nonnull)(FIRStorageListResult * _Nonnull, NSError * _Nullable))completion;
[Export ("listWithMaxResults:pageToken:completion:")]
void List (long maxResults, string pageToken, Action<StorageListResult, NSError> completion);
// -(void)metadataWithCompletion:(void (^ _Nonnull)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion;
[Async]
[Export ("metadataWithCompletion:")]
void GetMetadata (StorageGetPutUpdateCompletionHandler completion);
// -(void)updateMetadata:(FIRStorageMetadata * _Nonnull)metadata completion:(void (^ _Nullable)(FIRStorageMetadata * _Nullable, NSError * _Nullable))completion;
[Async]
[Export ("updateMetadata:completion:")]
void UpdateMetadata (StorageMetadata metadata, [NullAllowed] StorageGetPutUpdateCompletionHandler completion);
// -(void)deleteWithCompletion:(void (^ _Nullable)(NSError * _Nullable))completion;
[Async]
[Export ("deleteWithCompletion:")]
void Delete ([NullAllowed] StorageDeleteCompletionHandler completion);
}
// @interface FIRStorageTask : NSObject
[BaseType (typeof (NSObject), Name = "FIRStorageTask")]
interface StorageTask
{
// @property (readonly, nonatomic, strong) FIRStorageTaskSnapshot * _Nonnull snapshot;
[Export ("snapshot", ArgumentSemantic.Strong)]
StorageTaskSnapshot Snapshot { get; }
}
interface IStorageTaskManagement
{
}
// @protocol FIRStorageTaskManagement <NSObject>
#if NET
[Model]
#else
[Model (AutoGeneratedName = true)]
#endif
[Protocol]
[BaseType (typeof (NSObject), Name = "FIRStorageTaskManagement")]
interface StorageTaskManagement
{
// @required -(void)enqueue;
[Abstract]
[Export ("enqueue")]
void Enqueue ();
// @optional -(void)pause;
[Export ("pause")]
void Pause ();
// @optional -(void)cancel;
[Export ("cancel")]
void Cancel ();
// @optional -(void)resume;
[Export ("resume")]
void Resume ();
}
// @interface FIRStorageTaskSnapshot : NSObject
[BaseType (typeof (NSObject), Name = "FIRStorageTaskSnapshot")]
interface StorageTaskSnapshot
{
// @property (readonly, copy, nonatomic) __kindof FIRStorageTask * _Nonnull task;
[Internal]
[Export ("task", ArgumentSemantic.Copy)]
IntPtr _Task { get; }
// @property (readonly, copy, nonatomic) FIRStorageMetadata * _Nullable metadata;
[NullAllowed]
[Export ("metadata", ArgumentSemantic.Copy)]
StorageMetadata Metadata { get; }
// @property (readonly, copy, nonatomic) FIRStorageReference * _Nonnull reference;
[Export ("reference", ArgumentSemantic.Copy)]
StorageReference Reference { get; }
// @property (readonly, nonatomic, strong) NSProgress * _Nullable progress;
[NullAllowed]
[Export ("progress", ArgumentSemantic.Strong)]
NSProgress Progress { get; }
// @property (readonly, copy, nonatomic) NSError * _Nullable error;
[NullAllowed]
[Export ("error", ArgumentSemantic.Copy)]
NSError Error { get; }
// @property (readonly, nonatomic) FIRStorageTaskStatus status;
[Export ("status")]
StorageTaskStatus Status { get; }
}
// @interface FIRStorageUploadTask : FIRStorageObservableTask <FIRStorageTaskManagement>
[BaseType (typeof (StorageObservableTask), Name = "FIRStorageUploadTask")]
interface StorageUploadTask : StorageTaskManagement
{
}
}