private void doCheckLoginSig(String checkSigUrl, AbstractActionFuture future) { LoginModule login = (LoginModule)getContext().getModule(AbstractModule.Type.LOGIN); login.checkLoginSig(checkSigUrl, delegate(QQActionEvent evt) { if (evt.getType() == QQActionEvent.Type.EVT_OK) { doChannelLogin(future); } else if (evt.getType() == QQActionEvent.Type.EVT_ERROR) { future.notifyActionEvent( QQActionEvent.Type.EVT_ERROR, (QQException)evt.getTarget()); } }); }
public AbstractActionFuture sendMsg(QQMsg msg, QQActionListener.OnActionEvent listener) { if (msg.getType() == QQMsg.Type.SESSION_MSG) { AbstractActionFuture future = new AbstractActionFuture(listener); QQStranger stranger = (QQStranger)msg.getTo(); if (stranger.getGroupSig() == null || stranger.getGroupSig().Equals("")) { getSessionMsgSig(stranger, delegate(QQActionEvent evt) { if (evt.getType() == QQActionEvent.Type.EVT_OK) { doSendMsg(msg, future); } else if (evt.getType() == QQActionEvent.Type.EVT_ERROR) { future.notifyActionEvent(evt.getType(), evt.getTarget()); } }); } return(future); } else if (msg.getType() == QQMsg.Type.GROUP_MSG || msg.getType() == QQMsg.Type.DISCUZ_MSG) { if (getContext().getSession().getCfaceKey() == null || getContext().getSession().getCfaceKey().Equals("")) { AbstractActionFuture future = new AbstractActionFuture(listener); getCFaceSig(delegate(QQActionEvent evt) { if (evt.getType() == QQActionEvent.Type.EVT_OK) { doSendMsg(msg, future); } else if (evt.getType() == QQActionEvent.Type.EVT_ERROR) { future.notifyActionEvent(evt.getType(), evt.getTarget()); } }); return(future); } } return(doSendMsg(msg, listener)); }
/** * <p>relogin.</p> * * @param status a {@link iqq.im.bean.QQStatus} object. * @param listener a {@link iqq.im.QQActionListener.OnActionEvent} object. * @return a {@link iqq.im.evt.AbstractActionFuture} object. */ public AbstractActionFuture relogin(QQStatus status, QQActionListener.OnActionEvent listener) { getContext().getAccount().setStatus(status); getContext().getSession().setState(QQSession.State.LOGINING); AbstractActionFuture future = new AbstractActionFuture(listener); LoginModule loginModule = (LoginModule)getContext().getModule(AbstractModule.Type.LOGIN); loginModule.channelLogin(status, delegate(QQActionEvent evt) { if (evt.getType() == QQActionEvent.Type.EVT_ERROR) { login(listener); } else { listener(evt); } }); return(future); }
/** * <p>loginWithVerify.</p> * * @param verifyCode a {@link java.lang.String} object. * @param future a {@link iqq.im.evt.future.AbstractActionFuture} object. * @return a {@link iqq.im.evt.AbstractActionFuture} object. */ public AbstractActionFuture loginWithVerify(String verifyCode, AbstractActionFuture future) { doWebLogin(verifyCode, future); return(future); }