-
-
Save kcoleman731/257437edf71c7774e76c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @protocol LYRClientDelegate <NSObject> | |
| @optional | |
| /** | |
| @abstract Called when client status changes. | |
| @param client The client calling the delegate method. | |
| @param status The new status of the client. | |
| @param error An `NSError` object that contains error information in case the action was not successful. | |
| */ | |
| - (void)layerClient:(LYRClient *)client didChangeStatus:(LYRClientStatus)status error:(NSError *)error | |
| { | |
| if ((state & LYRClientStatusSessionOpen) == LYRClientStatusSessionOpen) { | |
| //Client is connected to the Layer service and ready for auth | |
| } | |
| if ((state & LYRClientStatusConnected) == LYRClientStatusConnected) { | |
| //Client is authenticated with the Layer service and ready for communication | |
| } | |
| if ((state & LYRClientStatusSessionClosed) == LYRClientStatusSessionClosed) { | |
| //Client is no longer authenticated, you should kick of re-auth procedures here is necessary | |
| } | |
| } | |
| /** | |
| @abstract Called when there's a progress update of the synchronization procedure | |
| @param client The client calling the delegate method | |
| @param tag Synchronization task tag (usefull for when you need to track the progress of each syncrhonization task) | |
| @param progress A `float` number representing the syncrhonization task progress. | |
| */ | |
| - (void)layerClient:(LYRClient *)client didReceiveSyncUpdateWithTag:(NSUInteger)tag progress:(float)progress; | |
| /** | |
| @abstract Called when user info of the logged in user changes. | |
| @param client The client calling the delegate method. | |
| @param error An `NSError` object that contains error information in case the action was not successful. | |
| */ | |
| - (void)layerClient:(LYRClient *)client didChangeUserInfoWithError:(NSError *)error; | |
| /** | |
| @abstract Called when contacts changed. | |
| @param client The client calling the delegate method. | |
| @param error An `NSError` object that contains error information in case the action was not successful. | |
| */ | |
| - (void)layerClient:(LYRClient *)client didChangeContactsWithError:(NSError *)error; | |
| /** | |
| @abstract Called when a message has been received. | |
| @param client The client calling the delegate method. | |
| @param messages An array of received `LYRMessage` objects. | |
| */ | |
| - (void)layerClient:(LYRClient *)client didReceiveMessages:(NSArray *)messages; | |
| /** | |
| @abstract Called when a message has been sent. | |
| @param client The client calling the delegate method. | |
| @param messages An NSArray of sent `LYRMessage` objects. | |
| */ | |
| - (void)layerClient:(LYRClient *)client didSendMessages:(NSArray *)messages; | |
| /** | |
| @abstract Called when a call has been received. | |
| @param client The client calling the delegate method. | |
| @param call The received `LYRCall` object. | |
| */ | |
| - (void)layerClient:(LYRClient *)client didReceiveCall:(LYRCall *)call; | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Kevin,
Thanks for that
For this
if ((state & LYRClientStatusSessionOpen) == LYRClientStatusSessionOpen) {
you mean
if ((
status& LYRClientStatusSessionOpen) == LYRClientStatusSessionOpen) {