Examples of QQSession


Examples of iqq.im.core.QQSession

//            "file_id": 3648788200,
//            "key": "pcm4N6IKmQ852Pus",
//            "server": "123.138.154.167:8000"
//        }
   
    QQSession session  = getContext().getSession();
    req.addGetValue("fid", cface.getFileId() + "");
    req.addGetValue("gid", (msg.getGroup() != null ?
            msg.getGroup().getCode(): msg.getDiscuz().getDid()) + "");
    req.addGetValue("pic", cface.getFileName());
    String[] parts = cface.getServer().split(":");
    req.addGetValue("rip", parts[0]);
    req.addGetValue("rport", parts[1]);
    req.addGetValue("t", DateUtils.nowTimestamp() + "");
    req.addGetValue("type", msg.getGroup() != null ? "0" : "1");
    req.addGetValue("uin", msg.getFrom().getUin() + "");
    req.addGetValue("vfwebqq", session.getVfwebqq());
   
    req.setOutputStream(picOut);
    return req;
  }
View Full Code Here

Examples of iqq.im.core.QQSession

   */
  /** {@inheritDoc} */
  @Override
  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    QQHttpRequest req = createHttpRequest("GET", QQConstants.URL_GET_OFFPIC);
    QQSession session  = getContext().getSession();
    req.addGetValue("clientid", session.getClientId() + "");
    req.addGetValue("f_uin", msg.getFrom().getUin() + "");
    req.addGetValue("file_path", offpic.getFilePath());
    req.addGetValue("psessionid", session.getSessionId());
    req.setOutputStream(picOut);
    return req;
  }
View Full Code Here

Examples of iqq.im.core.QQSession

  }

  /** {@inheritDoc} */
  @Override
  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    QQSession session = getContext().getSession();
    // tuin=4245757755&verifysession=&type=1&code=&vfwebqq=**&t=1361631644492
    QQHttpRequest req = createHttpRequest("GET",
        QQConstants.URL_GET_USER_ACCOUNT);
    req.addGetValue("tuin", group.getCode() + "");
    req.addGetValue("vfwebqq", session.getVfwebqq());
    req.addGetValue("t", System.currentTimeMillis() / 1000 + "");
    req.addGetValue("verifysession", ""); // 验证码??
    req.addGetValue("type", 4 + "");
    req.addGetValue("code", "");

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_USER_FACE);
    req.addGetValue("uin", group.getCode() + "");
    req.addGetValue("vfwebqq", session.getVfwebqq());
    req.addGetValue("t", System.currentTimeMillis() / 1000 + "");
    req.addGetValue("cache", "0");
    req.addGetValue("type", "4");
    req.addGetValue("fid", "0");
    return req;
View Full Code Here

Examples of iqq.im.core.QQSession

  protected QQHttpRequest onBuildRequest() throws QQException, JSONException {
    // r:{"to":2982077931,"face":0,"content":"[\"123\",[\"face\",1],\"456\",[\"face\",0],\"\",\"\\n【提示:此用户正在使用Q+ Web:http://web.qq.com/】\",[\"font\",{\"name\":\"微软雅黑\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"ffcc99\"}]]","msg_id":91310001,"clientid":"74131454","psessionid":"8368046764001e636f6e6e7365727665725f77656271714031302e3133332e34312e3230320000230700001f01026e04002aafd23f6d0000000a40484a526f4866467a476d00000028d954c71693cd99ae8c0c64b651519e88f55ce5075140346da7d957f3abefb51d0becc25c425d7cf5"}
    // r:{"group_uin":3408869879,"content":"[\"群消息发送测试\",[\"face\",13],\"\",\"\\n【提示:此用户正在使用Q+ Web:http://web.qq.com/】\",[\"font\",{\"name\":\"微软雅黑\",\"size\":\"11\",\"style\":[0,0,0],\"color\":\"ffcc99\"}]]","msg_id":91310002,"clientid":"74131454","psessionid":"8368046764001e636f6e6e7365727665725f77656271714031302e3133332e34312e3230320000230700001f01026e04002aafd23f6d0000000a40484a526f4866467a476d00000028d954c71693cd99ae8c0c64b651519e88f55ce5075140346da7d957f3abefb51d0becc25c425d7cf5"}
    // clientid、psessionid

    QQSession session = getContext().getSession();
    JSONObject json = new JSONObject();
    QQHttpRequest req = null;
    if (msg.getType() == QQMsg.Type.BUDDY_MSG) {
      req = createHttpRequest("POST", QQConstants.URL_SEND_BUDDY_MSG);
      json.put("to", msg.getTo().getUin());
      json.put("face", 0); // 这个是干嘛的??
    } else if (msg.getType() == QQMsg.Type.GROUP_MSG) {
      req = createHttpRequest("POST", QQConstants.URL_SEND_GROUP_MSG);
      json.put("group_uin", msg.getGroup().getGin());
      json.put("key", session.getCfaceKey());
      json.put("sig", session.getCfaceSig());
    } else if (msg.getType() == QQMsg.Type.DISCUZ_MSG) {
      req = createHttpRequest("POST", QQConstants.URL_SEND_DISCUZ_MSG);
      json.put("did", msg.getDiscuz().getDid());
      json.put("key", session.getCfaceKey());
      json.put("sig", session.getCfaceSig());
    }else if (msg.getType() == QQMsg.Type.SESSION_MSG) {  // 临时会话消息
      req = createHttpRequest("POST", QQConstants.URL_SEND_SESSION_MSG);
      QQStranger member =  (QQStranger) msg.getTo();
      json.put("to", member.getUin());
      json.put("face", 0); // 这个是干嘛的??
      json.put("group_sig", member.getGroupSig());
      json.put("service_type", member.getServiceType() + "");
    } else {
      LOG.warn("unknown MsgType: " + msg.getType());
    }

    json.put("content", msg.packContentList());
    json.put("msg_id", 91310001 + "");
    json.put("clientid", session.getClientId());
    json.put("psessionid", session.getSessionId());

    req.addPostValue("r", json.toString());
    req.addPostValue("clientid", session.getClientId() + "");
    req.addPostValue("psessionid", session.getSessionId());
    req.addHeader("Referer", QQConstants.REFFER);

    System.out.println("sendMsg: " + json.toString());
    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_USER_FACE);
    req.addGetValue("uin", user.getUin() + "");
    req.addGetValue("vfwebqq", session.getVfwebqq());
    req.addGetValue("t", System.currentTimeMillis() / 1000 + "");
    req.addGetValue("cache", 0 + ""); // ??
    req.addGetValue("type", 1 + ""); // ??
    req.addGetValue("fid", 0 + ""); // ??

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.