コード例 #1
0
  /**
   * get profile
   *
   * @param user
   * @return
   */
  public static String getProfil(User user) {
    String cmd = "";
    String func = "GETU";
    String res = "";

    cmd += USERNAME + sep_cmd + user.getPseudo() + sep_data;
    res = sendPacket(func, cmd);
    return (res);
  }
コード例 #2
0
  /**
   * Edit profile
   *
   * @param user
   * @return
   */
  public static boolean editProfil(User user) {
    String cmd = "";
    String func = "SETU";
    String res;

    cmd += USERNAME + sep_cmd + user.getPseudo() + sep_data;
    cmd += "name" + sep_cmd + user.getLast_name() + sep_data;
    cmd += "telephone" + sep_cmd + user.getPhone() + sep_data;
    cmd += "email" + sep_cmd + user.getEmail() + sep_data;
    cmd += "location" + sep_cmd + user.getLocation() + sep_data;
    cmd += "gender" + sep_cmd;
    if (user.isMale()) cmd += "M";
    else cmd += "F";
    cmd += sep_data;
    res = sendPacket(func, cmd);
    if (res.equals("OK")) return (true);
    return (false);
  }