Examples of QQGroup


Examples of iqq.im.bean.QQGroup

      JSONArray groupJsonList = results.getJSONArray("gnamelist")// 群列表
      JSONArray groupMaskJsonList = results.getJSONArray("gmasklist")//禁止接收群消息标志:正常 0, 接收不提醒 1, 完全屏蔽 2

      for (int i = 0; i < groupJsonList.length(); i++) {
        JSONObject groupJson = groupJsonList.getJSONObject(i);
        QQGroup group = new QQGroup();
        group.setGin(groupJson.getLong("gid"));
        group.setCode(groupJson.getLong("code"));
        group.setFlag(groupJson.getInt("flag"));
        group.setName(groupJson.getString("name"));
        //添加到Store
        store.addGroup(group);
      }
     
      for(int i = 0; i < groupMaskJsonList.length(); i++) {
        JSONObject maskObj = groupMaskJsonList.getJSONObject(i);
        long gid = maskObj.getLong("gid");
        int mask = maskObj.getInt("mask");
        QQGroup group = store.getGroupByGin(gid);
        if(group != null) {
          group.setMask(mask);
        }
      }

      notifyActionEvent(QQActionEvent.Type.EVT_OK, store.getGroupList());
View Full Code Here

Examples of iqq.im.bean.QQGroup

                   recents.add(buddy);
                 }
               } break;
              
               case 1: //群
                 QQGroup group = store.getGroupByCode(rejson.getLong("uin"));
                 if(group != null){
                   recents.add(group);
                 }
               } break;
              
View Full Code Here

Examples of iqq.im.bean.QQGroup

    msg.setId(pollData.getLong("msg_id"));
    msg.setId2(pollData.getLong("msg_id2"));
    long fromUin = pollData.getLong("send_uin");
    long groupCode = pollData.getLong("group_code");
    long groupID = pollData.getLong("info_seq"); // 真实群号码
    QQGroup group = store.getGroupByCode(groupCode);
    if (group.getGid() <= 0) {
      group.setGid(groupID);
    }
    msg.parseContentList(pollData.getJSONArray("content").toString());
    msg.setType(QQMsg.Type.GROUP_MSG);
    msg.setGroup(group);
    msg.setTo(getContext().getAccount());
    msg.setDate(new Date(pollData.getLong("time") * 1000));

    if (group != null) {
      msg.setFrom(group.getMemberByUin(fromUin));
    }

    if (msg.getFrom() == null) {
      QQGroupMember member = new QQGroupMember();
      member.setUin(fromUin);
      msg.setFrom(member);
      if (group != null) {
        group.getMembers().add(member);
      }
    }

    return new QQNotifyEvent(QQNotifyEvent.Type.CHAT_MSG, msg);
  }
View Full Code Here

Examples of iqq.im.bean.QQGroup

    QQUser user = store.getBuddyByUin(fromUin); // 首先看看是不是自己的好友
    if (user != null) {
      msg.setType(QQMsg.Type.BUDDY_MSG); // 是自己的好友
    } else {
      if (serviceType == 0) { // 是群成员
        QQGroup group = store.getGroupByCode(typeId);
        for (QQUser u : group.getMembers()) {
          if (u.getUin() == fromUin) {
            user = u;
            break;
          }
        }
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.