forked from xamarin/GoogleApisForiOSComponents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApiDefinition.cs
98 lines (78 loc) · 3.21 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 Foundation;
using ObjCRuntime;
namespace Google.InstanceID
{
[Static]
interface Constants
{
// extern NSString *const kGGLInstanceIDRegisterAPNSOption;
[Field ("kGGLInstanceIDRegisterAPNSOption", "__Internal")]
NSString RegisterAPNSOption { get; }
// extern NSString *const kGGLInstanceIDAPNSServerTypeSandboxOption;
[Field ("kGGLInstanceIDAPNSServerTypeSandboxOption", "__Internal")]
NSString APNSServerTypeSandboxOption { get; }
// extern NSString *const kGGLInstanceIDScopeGCM;
[Field ("kGGLInstanceIDScopeGCM", "__Internal")]
NSString ScopeGCM { get; }
}
// typedef void (^GGLInstanceIDTokenHandler)(NSString *NSError *);
public delegate void TokenDelegate (string token,NSError error);
// typedef void (^GGLInstanceIDDeleteTokenHandler)(NSError *);
public delegate void DeleteTokenDelegate (NSError error);
// typedef void (^GGLInstanceIDHandler)(NSString *NSError *);
public delegate void IdDelegate (string identity,NSError error);
// typedef void (^GGLInstanceIDDeleteHandler)(NSError *);
public delegate void DeleteIdDelegate (NSError error);
// @interface GGLInstanceID : NSObject
[BaseType (typeof(NSObject), Name = "GGLInstanceID")]
partial interface InstanceId
{
// +(instancetype)sharedInstance;
[Static]
[Export ("sharedInstance")]
InstanceId SharedInstance { get; }
// -(void)startWithConfig:(GGLInstanceIDConfig *)config;
[Export ("startWithConfig:")]
void Start (Config config);
// -(void)stopAllRequests;
[Export ("stopAllRequests")]
void StopAllRequests ();
// -(void)tokenWithAuthorizedEntity:(NSString *)authorizedEntity scope:(NSString *)scope options:(NSDictionary *)options handler:(GGLInstanceIDTokenHandler)handler;
[Export ("tokenWithAuthorizedEntity:scope:options:handler:")]
void Token (string authorizedEntity, string scope, NSDictionary options, TokenDelegate handler);
// -(void)deleteTokenWithAuthorizedEntity:(NSString *)authorizedEntity scope:(NSString *)scope handler:(GGLInstanceIDDeleteTokenHandler)handler;
[Export ("deleteTokenWithAuthorizedEntity:scope:handler:")]
void DeleteToken (string authorizedEntity, string scope, DeleteTokenDelegate handler);
// -(void)getIDWithHandler:(GGLInstanceIDHandler)handler;
[Export ("getIDWithHandler:")]
void GetID (IdDelegate handler);
// -(void)deleteIDWithHandler:(GGLInstanceIDDeleteHandler)handler;
[Export ("deleteIDWithHandler:")]
void DeleteID (DeleteIdDelegate handler);
}
interface IInstanceIdDelegate
{
}
[Protocol, Model]
[BaseType (typeof(NSObject), Name = "GGLInstanceIDDelegate")]
partial interface InstanceIdDelegate
{
[Export ("onTokenRefresh")]
void OnTokenRefresh ();
}
[BaseType (typeof(NSObject), Name = "GGLInstanceIDConfig")]
partial interface Config : INSCopying, INSMutableCopying
{
// @property(nonatomic, readwrite, weak) id<GGLInstanceIDDelegate> delegate;
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
IInstanceIdDelegate Delegate { get; set; }
// the log level for the GGLInstanceID library.
// @property(nonatomic, readwrite, assign) GGLInstanceIDLogLevel logLevel;
[Export ("logLevel")]
LogLevel LogLevel { get; set; }
//+ (instancetype)defaultConfig;
[Static]
[Export ("defaultConfig")]
Config DefaultConfig { get; }
}
}