예제 #1
0
  private void TL_MessageContainer(TL.Object obj) {
    TL.Vector v = (TL.Vector) obj;

    int count = v.count;
    Common.logDebug("msg_count: " + count);
    for (int i = 0; i < v.count; i++) {
      TL.Object message = v.getObject(i);
      ack_message(message.getInt("seqno"), message.getLong("msg_id"));
      process(message.getObject("body"));
    }
  }
예제 #2
0
파일: User.java 프로젝트: randhika/arcanum
  public static String calcHash() {
    ArrayList<Integer> ulist = new ArrayList<Integer>();
    for (int i = 0; i < User.users.size(); i++) {
      User user = User.users.get(User.users.keyAt(i));
      if (user.contact) ulist.add(user.id);
    }

    if (ulist.size() > 0) {
      Collections.sort(ulist);
      String hash_str = Common.join(ulist, ",");
      contacts_hash = Common.BytesToHex(Common.getMD5(hash_str.getBytes()));
    } else contacts_hash = "";

    Common.logDebug("contacts_hash: " + contacts_hash);
    return contacts_hash;
  }
예제 #3
0
 public void onDisconnect() {
   connected = false;
   Common.logDebug("disconnected");
 }