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
Expand file tree
/
Copy pathApiDefinition.cs
More file actions
248 lines (197 loc) · 7.28 KB
/
ApiDefinition.cs
File metadata and controls
248 lines (197 loc) · 7.28 KB
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
using System;
using UIKit;
using Foundation;
using ObjCRuntime;
using CoreGraphics;
#if !NET
using NativeHandle = System.IntPtr;
#endif
namespace Google.SignIn
{
// typedef void (^GIDAuthenticationHandler)(GIDAuthentication *authentication, NSError *error);
delegate void AuthenticationHandler (Authentication authentication, NSError error);
// typedef void (^GIDAccessTokenHandler)(NSString *, NSError *);
delegate void AccessTokenHandler (string accessToken, NSError error);
// @interface GIDAuthentication : NSObject <NSSecureCoding>
[BaseType (typeof (NSObject), Name = "GIDAuthentication")]
interface Authentication : INSSecureCoding
{
// @property (readonly, nonatomic) NSString * clientID;
[Export ("clientID")]
string ClientId { get; }
// @property (readonly, nonatomic) NSString * accessToken;
[Export ("accessToken")]
string AccessToken { get; }
// @property (readonly, nonatomic) NSDate * accessTokenExpirationDate;
[Export ("accessTokenExpirationDate")]
NSDate AccessTokenExpirationDate { get; }
// @property (readonly, nonatomic) NSString * refreshToken;
[Export ("refreshToken")]
string RefreshToken { get; }
// @property (readonly, nonatomic) NSString * idToken;
[Export ("idToken")]
string IdToken { get; }
// @property(nonatomic, readonly) NSDate *idTokenExpirationDate;
[Export ("idTokenExpirationDate")]
NSDate IdTokenExpirationDate { get; }
// // -(id<GTMFetcherAuthorizationProtocol>)fetcherAuthorizer;
// [Export ("fetcherAuthorizer")]
// IFetcherAuthorizationProtocol FetcherAuthorizer { get; }
// - (void)getTokensWithHandler:(GIDAuthenticationHandler)handler;
[Export ("getTokensWithHandler:")]
void GetTokens (AuthenticationHandler handler);
// - (void)refreshTokensWithHandler:(GIDAuthenticationHandler)handler;
[Export ("refreshTokensWithHandler:")]
void RefreshTokens (AuthenticationHandler handler);
}
// @interface GIDGoogleUser : NSObject <NSSecureCoding>
[BaseType (typeof (NSObject), Name = "GIDGoogleUser")]
interface GoogleUser : INSSecureCoding
{
// @property (readonly, nonatomic) NSString * userID;
[Export ("userID")]
string UserId { get; }
// @property (readonly, nonatomic) GIDProfileData * profile;
[Export ("profile")]
ProfileData Profile { get; }
// @property (readonly, nonatomic) GIDAuthentication * authentication;
[Export ("authentication")]
Authentication Authentication { get; }
// @property(nonatomic, readonly) NSArray *grantedScopes;
[Export ("grantedScopes")]
string [] GrantedScopes { get; }
// @property (readonly, nonatomic) NSString * hostedDomain;
[Export ("hostedDomain")]
string HostedDomain { get; }
// @property (readonly, nonatomic) NSString * serverAuthCode;
[Export ("serverAuthCode")]
string ServerAuthCode { get; }
}
// @interface GIDProfileData : NSObject <NSCopying, NSSecureCoding>
[BaseType (typeof (NSObject), Name = "GIDProfileData")]
interface ProfileData : INSCopying, INSSecureCoding
{
// @property (readonly, nonatomic) NSString * email;
[Export ("email")]
string Email { get; }
// @property (readonly, nonatomic) NSString * name;
[Export ("name")]
string Name { get; }
// @property(nonatomic, readonly) NSString *givenName;
[Export ("givenName")]
string GivenName { get; }
// @property(nonatomic, readonly) NSString *familyName;
[Export ("familyName")]
string FamilyName { get; }
// @property (readonly, nonatomic) BOOL hasImage;
[Export ("hasImage")]
bool HasImage { get; }
// -(NSURL *)imageURLWithDimension:(NSUInteger)dimension;
[Export ("imageURLWithDimension:")]
NSUrl GetImageUrl (nuint dimension);
}
interface ISignInDelegate
{
}
// @protocol GIDSignInDelegate
#if NET
[Model]
#else
[Model (AutoGeneratedName = true)]
#endif
[Protocol]
[BaseType (typeof (NSObject), Name = "GIDSignInDelegate")]
interface SignInDelegate
{
// @required -(void)signIn:(GIDSignIn *)signIn didSignInForUser:(GIDGoogleUser *)user withError:(NSError *)error;
[Abstract]
[EventArgs ("SignInDelegate")]
[EventName ("SignedIn")]
[Export ("signIn:didSignInForUser:withError:")]
void DidSignIn (SignIn signIn, GoogleUser user, NSError error);
// @optional -(void)signIn:(GIDSignIn *)signIn didDisconnectWithUser:(GIDGoogleUser *)user withError:(NSError *)error;
[EventArgs ("SignInDelegate")]
[EventName ("Disconnected")]
[Export ("signIn:didDisconnectWithUser:withError:")]
void DidDisconnect (SignIn signIn, GoogleUser user, NSError error);
}
// @interface GIDSignIn : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject),
Name = "GIDSignIn",
Delegates = new string [] { "Delegate" },
Events = new Type [] { typeof (SignInDelegate) })]
interface SignIn
{
// extern NSString *const kGIDSignInErrorDomain;
[Field ("kGIDSignInErrorDomain", "__Internal")]
NSString SignInErrorDomainKey { get; }
// @property (readonly, nonatomic) GIDGoogleUser * currentUser;
[Export ("currentUser")]
GoogleUser CurrentUser { get; }
// @property (nonatomic, weak) id<GIDSignInDelegate> delegate;
[NullAllowed]
[Export ("delegate", ArgumentSemantic.Weak)]
ISignInDelegate Delegate { get; set; }
// @property (nonatomic, weak) UIViewController * presentingViewController;
[Export ("presentingViewController", ArgumentSemantic.Weak)]
UIViewController PresentingViewController { get; set; }
// @property (copy, nonatomic) NSString * clientID;
[Export ("clientID")]
string ClientId { get; set; }
// @property (copy, nonatomic) NSArray * scopes;
[Export ("scopes", ArgumentSemantic.Copy)]
string [] Scopes { get; set; }
// @property (assign, nonatomic) BOOL shouldFetchBasicProfile;
[Export ("shouldFetchBasicProfile")]
bool ShouldFetchBasicProfile { get; set; }
// @property (copy, nonatomic) NSString * language;
[Export ("language")]
string Language { get; set; }
// @property(nonatomic, copy) NSString *loginHint;
[Export ("loginHint")]
string LoginHint { get; set; }
// @property (copy, nonatomic) NSString * serverClientID;
[Export ("serverClientID")]
string ServerClientId { get; set; }
// @property (copy, nonatomic) NSString * openIDRealm;
[Export ("openIDRealm")]
string OpenIdRealm { get; set; }
// @property(nonatomic, copy) NSString *hostedDomain;
[Export ("hostedDomain")]
string HostedDomain { get; set; }
// +(GIDSignIn *)sharedInstance;
[Static]
[Export ("sharedInstance")]
SignIn SharedInstance { get; }
// -(BOOL)handleURL:(NSURL *)url;
[Export ("handleURL:")]
bool HandleUrl (NSUrl url);
// -(BOOL)hasPreviousSignIn;
[Export ("hasPreviousSignIn")]
bool HasPreviousSignIn { get; }
// -(void)restorePreviousSignIn;
[Export ("restorePreviousSignIn")]
void RestorePreviousSignIn ();
// -(void)signIn;
[Export ("signIn")]
void SignInUser ();
// -(void)signOut;
[Export ("signOut")]
void SignOutUser ();
// -(void)disconnect;
[Export ("disconnect")]
void DisconnectUser ();
}
// @interface GIDSignInButton : UIControl
[BaseType (typeof (UIControl), Name = "GIDSignInButton")]
interface SignInButton
{
// @property (assign, nonatomic) GIDSignInButtonStyle style;
[Export ("style", ArgumentSemantic.Assign)]
ButtonStyle Style { get; set; }
// @property (assign, nonatomic) GIDSignInButtonColorScheme colorScheme;
[Export ("colorScheme", ArgumentSemantic.Assign)]
ButtonColorScheme ColorScheme { get; set; }
}
}