Examples of QQSession


Examples of iqq.im.core.QQSession

   * @see iqq.im.action.AbstractHttpAction#onBuildRequest()
   */
  /** {@inheritDoc} */
  @Override
  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    QQSession session = getContext().getSession();
    QQHttpRequest req = createHttpRequest("GET", QQConstants.URL_GET_DISCUZ_LIST);
    req.addGetValue("clientid", session.getClientId()+"");
    req.addGetValue("psessionid", session.getSessionId());
    req.addGetValue("vfwebqq", session.getVfwebqq());
    req.addGetValue("t", DateUtils.nowTimestamp() + "");
    return req;
  }
View Full Code Here

Examples of iqq.im.core.QQSession

    this.buddy = buddy;
  }
  /** {@inheritDoc} */
  @Override
  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    QQSession session = getContext().getSession();
    /*
    tuin  236557647
    verifysession 
    code 
    vfwebqq  efa425e6afa21b3ca3ab8db97b65afa0535feb4af47a38cadcf1a4b1650169b4b4eee9955f843990
    t  1346856270187*/
   
   
   
    QQHttpRequest req = createHttpRequest("GET", QQConstants.URL_GET_FRIEND_INFO);
    req.addGetValue("tuin", buddy.getUin() + "");
    req.addGetValue("verifysession", "")//难道有验证码???
    req.addGetValue("code", "");
    req.addGetValue("vfwebqq", session.getVfwebqq());
    req.addGetValue("t", System.currentTimeMillis()/1000+"");

    req.addHeader("Referer", QQConstants.REFFER);
    return req;
  }
View Full Code Here

Examples of iqq.im.core.QQSession

  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    // retype:1 app:EQQ
    // itemlist:{"groupmask":{"321105219":"1","1638195794":"0","cAll":0,"idx":1075,"port":37883}}
    // vfwebqq:8b26c442e239630f250e1e74d135fd85ab78c38e7b8da1c95a2d1d560bdebd2691443df19d87e70d
    QQStore store = getContext().getStore();
    QQSession session = getContext().getSession();
    QQHttpRequest req = createHttpRequest("POST", QQConstants.URL_GROUP_MESSAGE_FILTER);
    req.addPostValue("retype", "1")// 群???
    req.addPostValue("app", "EQQ");
   
    JSONObject groupmask = new JSONObject();
    groupmask.put("cAll", 0);
    groupmask.put("idx", session.getIndex());
    groupmask.put("port", session.getPort());
    for(QQGroup g : store.getGroupList()) {
      if(g.getGin() > 0) {
        groupmask.put(g.getGin() + "", g.getMask() + "");
      }
    }
View Full Code Here

Examples of iqq.im.core.QQSession

    this.services.put(QQService.Type.HTTP, new ApacheHttpService());

    this.account = new QQAccount();
    this.account.setUsername(username);
    this.account.setPassword(password);
    this.session = new QQSession();
    this.store = new QQStore();
    this.notifyListener = notifyListener;
    this.actorDispatcher = actorDispatcher;
   
    this.init();
View Full Code Here

Examples of iqq.im.core.QQSession

 
  /**
   * <p>relogin.</p>
   */
  public void relogin() {
    QQSession session = getContext().getSession();
    if(session.getState() == QQSession.State.LOGINING) return;
    // 登录失效,重新登录
    relogin(getContext().getAccount().getStatus(), new QQActionListener() {

      @Override
      public void onActionEvent(QQActionEvent event) {
View Full Code Here

Examples of iqq.im.core.QQSession

          for (QQNotifyEvent evt : events) {
            getContext().fireNotify(evt);
          }
         
          // 准备提交下次poll请求
          QQSession session = getContext().getSession();
          if(session.getState() == QQSession.State.ONLINE) {
            doPollMsg();
          } else if(session.getState() != QQSession.State.KICKED) {
            relogin();
          }
        }else if(event.getType() == QQActionEvent.Type.EVT_ERROR){
          QQSession session = getContext().getSession();
          QQAccount account = getContext().getAccount();
          session.setState(QQSession.State.OFFLINE);
          account.setStatus(QQStatus.OFFLINE);
          //因为自带了错误重试机制,如果出现了错误回调,表明已经超时多次均失败,这里直接返回网络错误的异常
          QQException ex = (QQException) event.getTarget();
          QQErrorCode code = ex.getError();
          if(code == QQErrorCode.INVALID_LOGIN_AUTH) {
View Full Code Here

Examples of iqq.im.core.QQSession

  }

  /** {@inheritDoc} */
  @Override
  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    QQSession session = getContext().getSession();

    QQHttpRequest req = createHttpRequest("GET",
        QQConstants.URL_CHANGE_STATUS);
    req.addGetValue("newstatus", status.getValue());
    req.addGetValue("clientid", session.getClientId() + "");
    req.addGetValue("psessionid", session.getSessionId());
    req.addGetValue("t", System.currentTimeMillis() / 1000 + "");

    req.addHeader("Referer", QQConstants.REFFER);
    return req;
  }
View Full Code Here

Examples of iqq.im.core.QQSession

  @Override
  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {

    HttpService httpService = (HttpService) getContext().getSerivce(
        QQService.Type.HTTP);
    QQSession session = getContext().getSession();

    QQHttpRequest req = createHttpRequest("POST",
        QQConstants.URL_UPLOAD_OFFLINE_PICTURE);
    req.addGetValue("time", System.currentTimeMillis() / 1000 + "");
    req.addPostFile("file", file);
    req.addPostValue("callback", "parent.EQQ.Model.ChatMsg.callbackSendPic");
    req.addPostValue("locallangid", "2052");
    req.addPostValue("clientversion", "1409");
    req.addPostValue("uin", getContext().getAccount().getUin() + ""); // 自己的账号
    req.addPostValue("skey", httpService.getCookie("skey",  QQConstants.URL_UPLOAD_OFFLINE_PICTURE).getValue());
    req.addPostValue("appid", "1002101");
    req.addPostValue("peeruin", user.getUin() + ""); // 图片对方UIN
    req.addPostValue("fileid", "1");
    req.addPostValue("vfwebqq", session.getVfwebqq());
    req.addPostValue("senderviplevel", getContext().getAccount().getLevel().getLevel() + "");
    req.addPostValue("reciverviplevel", user.getLevel().getLevel() + "");
    return req;
  }
View Full Code Here

Examples of iqq.im.core.QQSession

  }
 
  /** {@inheritDoc} */
  @Override
  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    QQSession session = getContext().getSession();
    QQHttpRequest req = createHttpRequest("GET", QQConstants.URL_GET_STRANGER_INFO);
    req.addGetValue("tuin", user.getUin() + "");
    req.addGetValue("verifysession", "")// ?
    req.addGetValue("gid", "0");
    req.addGetValue("code", "");
    req.addGetValue("vfwebqq", session.getVfwebqq());
    req.addGetValue("t", System.currentTimeMillis()/1000 + "");
    return req;
  }
View Full Code Here

Examples of iqq.im.core.QQSession

  protected void onHttpStatusOK(QQHttpResponse response) throws QQException,
      JSONException {
    Pattern pt = Pattern.compile(QQConstants.REGXP_LOGIN_SIG);
    Matcher mc = pt.matcher(response.getResponseString());
    if(mc.find()){
      QQSession session = getContext().getSession();
      session.setLoginSig(mc.group(1));
      LOG.info("loginSig = " + session.getLoginSig());
      notifyActionEvent(QQActionEvent.Type.EVT_OK, session.getLoginSig());
    }else{
      notifyActionEvent(QQActionEvent.Type.EVT_ERROR, new QQException(QQErrorCode.INVALID_RESPONSE, "Login Sig Not Found!!"));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.