Esempio n. 1
0
 public ChannelLoginAction(IQQContext context, QQActionListener listener, QQStatus status)
     : base(context, listener)
 {
     this._status = status;
 }
Esempio n. 2
0
 public static bool IsGeneralOnline(QQStatus stat)
 {
     return(stat == ONLINE || stat == CALLME ||
            stat == AWAY || stat == SILENT ||
            stat == BUSY || stat == HIDDEN);
 }
Esempio n. 3
0
 public ChangeStatusAction(QQContext context, QQActionEventHandler listener, QQStatus status)
     : base(context, listener)
 {
     this._status = status;
 }
Esempio n. 4
0
 public QQActionFuture ChannelLogin(QQStatus status, QQActionEventHandler listener)
 {
     return PushHttpAction(new ChannelLoginAction(Context, listener, status));
 }
Esempio n. 5
0
 public IQQActionFuture ChangeStatus(QQStatus status, QQActionListener listener = null)
 {
     return PushHttpAction(new ChangeStatusAction(Context, listener, status));
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 8
0
 public static bool IsGeneralOnline(QQStatus stat)
 {
     return (stat == ONLINE || stat == CALLME
             || stat == AWAY || stat == SILENT
             || stat == BUSY || stat == HIDDEN);
 }