blob: 45433aede4bc35f2936f065e6bc58d3e89de74b1 (
plain)
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
|
/**
* Delegate for receiving status of upstream messages sent via Google Cloud Messaging.
*/
@protocol GCMReceiverDelegate <NSObject>
@optional
/**
* The callback is invoked once GCM processes the message. If processing fails, the
* callback is invoked with a valid error object representing the error.
* Otherwise, the message is ready to be sent.
*
* @param messageID The messageID for the message that failed to be sent upstream.
* @param error The error describing why the send operation failed.
*/
- (void)willSendDataMessageWithID:(NSString *)messageID error:(NSError *)error;
/**
* This callback is invoked if GCM successfully sent the message upstream
* and the message was successfully received.
*
* @param messageID The messageID for the message sent.
*/
- (void)didSendDataMessageWithID:(NSString *)messageID;
/**
* Called when the GCM server deletes pending messages due to exceeded
* storage limits. This may occur, for example, when the device cannot be
* reached for an extended period of time.
*
* It is recommended to retrieve any missing messages directly from the
* app server.
*/
- (void)didDeleteMessagesOnServer;
@end
|