This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 167
/
Copy pathApiDefinition.cs
151 lines (123 loc) · 6.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
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
using System;
using System.Collections.Generic;
using Foundation;
using ObjCRuntime;
using UserNotifications;
#if !NET
using NativeHandle = System.IntPtr;
#endif
namespace Firebase.CloudMessaging
{
// typedef void(^FIRMessagingFCMTokenFetchCompletion)(NSString * _Nullable FCMToken, NSError* _Nullable error) FIR_SWIFT_NAME(MessagingFCMTokenFetchCompletion);
delegate void MessagingFcmTokenFetchCompletionHandler ([NullAllowed] string fcmToken, [NullAllowed] NSError error);
// typedef void(^FIRMessagingDeleteFCMTokenCompletion)(NSError * _Nullable error) FIR_SWIFT_NAME(MessagingDeleteFCMTokenCompletion);
delegate void MessagingDeleteFcmTokenCompletionHandler ([NullAllowed] NSError error);
// typedef void (^FIRMessagingTopicOperationCompletion)(NSError *_Nullable error);
delegate void MessagingTopicOperationCompletionHandler ([NullAllowed] NSError error);
delegate void DeleteDataCompletionHandler ([NullAllowed] NSError error);
// @interface FIRMessagingMessageInfo : NSObject
[BaseType (typeof (NSObject), Name = "FIRMessagingMessageInfo")]
interface MessageInfo
{
// @property (readonly, assign, nonatomic) FIRMessagingMessageStatus status;
[Export ("status", ArgumentSemantic.Assign)]
MessageStatus Status { get; }
}
interface IMessagingDelegate
{
}
// @protocol FIRMessagingDelegate <NSObject>
#if NET
[Model]
#else
[Model (AutoGeneratedName = true)]
#endif
[Protocol]
[BaseType (typeof (NSObject), Name = "FIRMessagingDelegate")]
interface MessagingDelegate
{
// @optional -(void)messaging:(FIRMessaging * _Nonnull)messaging didReceiveRegistrationToken:(NSString * _Nonnull)fcmToken;
[Export ("messaging:didReceiveRegistrationToken:")]
void DidReceiveRegistrationToken (Messaging messaging, string fcmToken);
}
// @interface FIRMessaging : NSObject
[DisableDefaultCtor]
[BaseType (typeof (NSObject), Name = "FIRMessaging")]
interface Messaging
{
// @property(nonatomic, weak, nullable) id<FIRMessagingDelegate> delegate;
[NullAllowed]
[Export ("delegate", ArgumentSemantic.Weak)]
IMessagingDelegate Delegate { get; set; }
// +(instancetype _Nonnull)messaging;
[Static]
[Export ("messaging")]
Messaging SharedInstance { get; }
// +(FIRMessagingExtensionHelper * _Nonnull)extensionHelper __attribute__((swift_name("serviceExtension()"))) __attribute__((availability(ios, introduced=10.0)));
[Introduced (PlatformName.iOS, 10, 0, 0)]
[Static]
[Export ("extensionHelper")]
MessagingExtensionHelper ExtensionHelper { get; }
// @property(nonatomic, copy, nullable) NSData *APNSToken FIR_SWIFT_NAME(apnsToken);
[NullAllowed]
[Export ("APNSToken", ArgumentSemantic.Copy)]
NSData ApnsToken { get; set; }
// - (void)setAPNSToken:(nonnull NSData *)apnsToken type:(FIRMessagingAPNSTokenType)type;
[Export ("setAPNSToken:type:")]
void SetApnsToken (NSData apnsToken, ApnsTokenType type);
// @property(nonatomic, assign, getter=isAutoInitEnabled) BOOL autoInitEnabled;
[Export ("autoInitEnabled")]
bool AutoInitEnabled { [Bind ("isAutoInitEnabled")] get; set; }
// @property(nonatomic, readonly, nullable) NSString *FCMToken FIR_SWIFT_NAME(fcmToken);
[NullAllowed]
[Export ("FCMToken")]
string FcmToken { get; }
// -(void)tokenWithCompletion:(void (^ _Nonnull)(NSString * _Nullable, NSError * _Nullable))completion;
[Export ("tokenWithCompletion:")]
[Async]
void FetchToken (MessagingFcmTokenFetchCompletionHandler completion);
// -(void)deleteTokenWithCompletion:(void (^ _Nonnull)(NSError * _Nullable))completion;
[Export ("deleteTokenWithCompletion:")]
[Async]
void DeleteToken (MessagingDeleteFcmTokenCompletionHandler completion);
// - (void)retrieveFCMTokenForSenderID:(nonnull NSString *)senderID completion:(nonnull FIRMessagingFCMTokenFetchCompletion) completion FIR_SWIFT_NAME(retrieveFCMToken(forSenderID:completion:));
[Async]
[Export ("retrieveFCMTokenForSenderID:completion:")]
void RetrieveFcmToken (string senderId, MessagingFcmTokenFetchCompletionHandler completion);
// - (void)deleteFCMTokenForSenderID:(nonnull NSString *)senderID completion:(nonnull FIRMessagingDeleteFCMTokenCompletion) completion FIR_SWIFT_NAME(deleteFCMToken(forSenderID:completion:));
[Async]
[Export ("deleteFCMTokenForSenderID:completion:")]
void DeleteFcmToken (string senderId, MessagingDeleteFcmTokenCompletionHandler completion);
// -(void)subscribeToTopic:(NSString * _Nonnull)topic;
[Export ("subscribeToTopic:")]
void Subscribe (string topic);
// -(void)subscribeToTopic:(NSString * _Nonnull)topic completion:(nullable FIRMessagingTopicOperationCompletion)completion;
[Async]
[Export ("subscribeToTopic:completion:")]
void Subscribe (string topic, MessagingTopicOperationCompletionHandler completion);
// -(void)unsubscribeFromTopic:(NSString * _Nonnull)topic;
[Export ("unsubscribeFromTopic:")]
void Unsubscribe (string topic);
//-(void)unsubscribeFromTopic:(NSString * _Nonnull)topic completion:(nullable FIRMessagingTopicOperationCompletion)completion;
[Async]
[Export ("unsubscribeFromTopic:completion:")]
void Unsubscribe (string topic, MessagingTopicOperationCompletionHandler completion);
// -(FIRMessagingMessageInfo * _Nonnull)appDidReceiveMessage:(NSDictionary * _Nonnull)message;
[Export ("appDidReceiveMessage:")]
MessageInfo AppDidReceiveMessage (NSDictionary message);
// - (void)deleteDataWithCompletion:(void (^)(NSError *__nullable error))completion;
[Export ("deleteDataWithCompletion:")]
void DeleteData (DeleteDataCompletionHandler completion);
}
// @interface FIRMessagingExtensionHelper : NSObject
[Introduced (PlatformName.iOS, 10, 0, 0)]
[BaseType (typeof (NSObject), Name = "FIRMessagingExtensionHelper")]
interface MessagingExtensionHelper {
// -(void)populateNotificationContent:(UNMutableNotificationContent * _Nonnull)content withContentHandler:(void (^ _Nonnull)(UNNotificationContent * _Nonnull))contentHandler;
[Export ("populateNotificationContent:withContentHandler:")]
void PopulateNotificationContent (UNMutableNotificationContent content, Action<UNNotificationContent> contentHandler);
// - (void)exportDeliveryMetricsToBigQueryWithMessageInfo:(NSDictionary *)info;
[Export ("exportDeliveryMetricsToBigQueryWithMessageInfo:")]
void ExportDeliveryMetricsToBigQueryWithMessageInfo (NSDictionary info);
}
}