123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- /*!
- * \~chinese
- * @header EMClientDelegate.h
- * @abstract 此协议提供了一些实用工具类的回调
- * @author Hyphenate
- * @version 3.00
- *
- * \~english
- * @header EMClientDelegate.h
- * @abstract This protocol provides a number of utility classes callback
- * @author Hyphenate
- * @version 3.00
- */
- #import <Foundation/Foundation.h>
- /*!
- * \~chinese
- * 网络连接状态
- *
- * \~english
- * Network Connection Status
- */
- typedef enum {
- EMConnectionConnected = 0, /*! *\~chinese 已连接 *\~english Connected */
- EMConnectionDisconnected, /*! *\~chinese 未连接 *\~english Disconnected */
- } EMConnectionState;
- @class EMError;
- /*!
- * \~chinese
- * @abstract 此协议提供了一些实用工具类的回调
- *
- * \~english
- * @abstract This protocol provides a number of utility classes callback
- */
- @protocol EMClientDelegate <NSObject>
- @optional
- /*!
- * \~chinese
- * SDK连接服务器的状态变化时会接收到该回调
- *
- * 有以下几种情况, 会引起该方法的调用:
- * 1. 登录成功后, 手机无法上网时, 会调用该回调
- * 2. 登录成功后, 网络状态变化时, 会调用该回调
- *
- * @param aConnectionState 当前状态
- *
- * \~english
- * Invoked when server connection state has changed
- *
- * @param aConnectionState Current state
- */
- - (void)connectionStateDidChange:(EMConnectionState)aConnectionState;
- /*!
- * \~chinese
- * 自动登录完成时的回调
- *
- * @param aError 错误信息
- *
- * \~english
- * Invoked when auto login is completed
- *
- * @param aError Error
- */
- - (void)autoLoginDidCompleteWithError:(EMError *)aError;
- /*!
- * \~chinese
- * 当前登录账号在其它设备登录时会接收到此回调
- *
- * \~english
- * Invoked when current IM account logged into another device
- */
- - (void)userAccountDidLoginFromOtherDevice;
- /*!
- * \~chinese
- * 当前登录账号已经被从服务器端删除时会收到该回调
- *
- * \~english
- * Invoked when current IM account is removed from server
- */
- - (void)userAccountDidRemoveFromServer;
- /*!
- * \~chinese
- * 服务被禁用
- *
- * \~english
- * Delegate method will be invoked when User is forbidden
- */
- - (void)userDidForbidByServer;
- /*!
- * \~chinese
- * 当前登录账号被强制退出时会收到该回调,有以下原因:
- * 1.密码被修改;
- * 2.登录设备数过多;
- *
- * \~english
- * Delegate method will be invoked when current IM account is forced to logout with the following reasons:
- * 1. The password is modified
- * 2. Logged in too many devices
- */
- - (void)userAccountDidForcedToLogout:(EMError *)aError;
- #pragma mark - Deprecated methods
- /*!
- * \~chinese
- * SDK连接服务器的状态变化时会接收到该回调
- *
- * 有以下几种情况, 会引起该方法的调用:
- * 1. 登录成功后, 手机无法上网时, 会调用该回调
- * 2. 登录成功后, 网络状态变化时, 会调用该回调
- *
- * @param aConnectionState 当前状态
- *
- * \~english
- * Connection to the server status changes will receive the callback
- *
- * calling the method causes:
- * 1. After successful login, the phone can not access
- * 2. After a successful login, network status change
- *
- * @param aConnectionState Current state
- */
- - (void)didConnectionStateChanged:(EMConnectionState)aConnectionState __deprecated_msg("Use -connectionStateDidChange:");
- /*!
- * \~chinese
- * 自动登录完成时的回调
- *
- * @param aError 错误信息
- *
- * \~english
- * Callback Automatic login fails
- *
- * @param aError Error
- */
- - (void)didAutoLoginWithError:(EMError *)aError __deprecated_msg("Use -autoLoginDidCompleteWithError:");
- /*!
- * \~chinese
- * 当前登录账号在其它设备登录时会接收到此回调
- *
- * \~english
- * Will receive this callback when current account login from other device
- */
- - (void)didLoginFromOtherDevice __deprecated_msg("Use -userAccountDidLoginFromOtherDevice");
- /*!
- * \~chinese
- * 当前登录账号已经被从服务器端删除时会收到该回调
- *
- * \~english
- * Current login account will receive the callback is deleted from the server
- */
- - (void)didRemovedFromServer __deprecated_msg("Use -userAccountDidRemoveFromServer");
- @end
|