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
98 lines (80 loc) · 3.01 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
using System;
using UIKit;
using Foundation;
using ObjCRuntime;
using CoreGraphics;
using Firebase.Core;
#if !NET
using NativeHandle = System.IntPtr;
#endif
namespace Firebase.CloudFunctions
{
// @interface FIRFunctions : NSObject
[DisableDefaultCtor]
[BaseType(typeof(NSObject), Name = "FIRFunctions")]
interface CloudFunctions
{
// + (FIRFunctions *)functions;
[Static]
[Export("functions")]
CloudFunctions DefaultInstance { get; }
// + (FIRFunctions *)functionsForApp:(FIRAPP *)app;
[Static]
[Export("functionsForApp:")]
CloudFunctions From(App app);
// + (instancetype)functionsForApp:(FIRApp *)app customDomain:(NSString *)customDomain
[Static]
[Export("functionsForApp:customDomain:")]
CloudFunctions FromCustomDomain(App app, string customDomain);
//+ (FIRFunctions *)functionsForCustomDomain:(NSString*) customDomain
[Static]
[Export ("functionsForCustomDomain:")]
CloudFunctions FromCustomDomain (string customDomain);
//+ (FIRFunctions *)functionsForApp:(FIRApp *)app region:(NSString*) region
[Static]
[Export("functionsForApp:region:")]
CloudFunctions FromRegion(App app, string region);
//+ (FIRFunctions *) functionsForRegion:(NSString*) region;
[Static]
[Export ("functionsForRegion:")]
CloudFunctions FromRegion (string region);
//- (FIRHTTPSCallable *)HTTPSCallableWithName:(NSString *)name;
[Export("HTTPSCallableWithName:")]
HttpsCallable HttpsCallable(string name);
// @property(nonatomic, readonly, nullable) NSString *emulatorOrigin;
[Export("emulatorOrigin")]
string EmulatorOrigin { get; }
//- (void)useFunctionsEmulatorOrigin:(NSString *)origin
[Export("useFunctionsEmulatorOrigin:")]
void UseFunctionsEmulatorOrigin(string origin);
//- (void)useEmulatorWithHost:(NSString *)host port:(NSInteger) port;
[Export ("useEmulatorWithHost:port:")]
void UseEmulatorOriginWithHost (string host, uint port);
}
// void (^)(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error);
delegate void HttpsCallableResultHandler([NullAllowed] HttpsCallableResult result, [NullAllowed] NSError error);
[DisableDefaultCtor]
[BaseType(typeof(NSObject), Name = "FIRHTTPSCallable")]
interface HttpsCallable
{
//- (void)callWithCompletion: (void (^)(FIRHTTPSCallableResult *_Nullable result, NSError *_Nullable error))completion;
[Export("callWithCompletion:")]
[Async]
void Call(HttpsCallableResultHandler completion);
//- (void)callWithObject:(nullable id)data completion:(void (^)(FIRHTTPSCallableResult* _Nullable result, NSError *_Nullable error))completion
[Export("callWithObject:completion:")]
[Async]
void Call([NullAllowed] NSObject data, HttpsCallableResultHandler completion);
//@property(nonatomic, assign) NSTimeInterval timeoutInterval;
[Export("timeoutInterval")]
double TimeoutInterval { get; set; }
}
[DisableDefaultCtor]
[BaseType(typeof(NSObject), Name = "FIRHTTPSCallableResult")]
interface HttpsCallableResult
{
//@property(nonatomic, strong, readonly) id data;
[Export("data")]
NSObject Data { get; }
}
}