public ChannelLoginAction(IQQContext context, QQActionListener listener, QQStatus status)
     : base(context, listener)
 {
     this._status = status;
 }
Example #2
0
 public static bool IsGeneralOnline(QQStatus stat)
 {
     return(stat == ONLINE || stat == CALLME ||
            stat == AWAY || stat == SILENT ||
            stat == BUSY || stat == HIDDEN);
 }
Example #3
0
 public ChangeStatusAction(QQContext context, QQActionEventHandler listener, QQStatus status)
     : base(context, listener)
 {
     this._status = status;
 }
Example #4
0
 public QQActionFuture ChannelLogin(QQStatus status, QQActionEventHandler listener)
 {
     return PushHttpAction(new ChannelLoginAction(Context, listener, status));
 }
Example #5
0
 public IQQActionFuture ChangeStatus(QQStatus status, QQActionListener listener = null)
 {
     return PushHttpAction(new ChangeStatusAction(Context, listener, status));
 }
Example #6
0
 public IQQActionFuture Relogin(QQStatus status, QQActionListener listener)
 {
     Context.Account.Status = status;
     Context.Session.State = QQSessionState.Logining;
     var login = Context.GetModule<LoginModule>(QQModuleType.LOGIN);
     var future = login.ChannelLogin(status, (sender, Event) =>
     {
         if (Event.Type == QQActionEventType.EvtError)
         {
             Context.Logger.LogInformation("iqq client ReloginChannel fail!!! use Login.");
             Login(listener);
         }
         else
         {
             listener(this, Event);
         }
     });
     return future;
 }
Example #7
0
 public QQActionFuture Relogin(QQStatus status, QQActionEventHandler listener)
 {
     Context.Account.Status = status;
     Context.Session.State = QQSessionState.LOGINING;
     var login = Context.GetModule<LoginModule>(QQModuleType.LOGIN);
     MyLogger.Default.Info("iqq client Relogin...");
     var future = login.ChannelLogin(status, (sender, Event) =>
     {
         if (Event.Type == QQActionEventType.EVT_ERROR)
         {
             MyLogger.Default.Info("iqq client ReloginChannel fail!!! use Relogin.");
             Login(listener);
         }
         else
         {
             listener(this, Event);
         }
     });
     return future;
 }
Example #8
0
 public static bool IsGeneralOnline(QQStatus stat)
 {
     return (stat == ONLINE || stat == CALLME
             || stat == AWAY || stat == SILENT
             || stat == BUSY || stat == HIDDEN);
 }