Exemplo n.º 1
0
  @Override
  public SkyData toSkyData() {
    SkyData data = new SkyData();

    if (getType() != null) {
      data.add("type", getType());
    }

    data.add("dlanName", getDlanName());
    data.add("dlanId", getDlanId());
    //        data.add("isEncrypt", getIsEncrypt());

    data.add("cmd", this.getCmd());
    data.add("cmdservice", this.getService().toString());
    data.add("cmdparams", this.getCmdparams());

    Iterator<DlanPushData> iter = list.iterator();
    int i = 0;
    while (iter.hasNext()) {
      data.add("child" + i, iter.next().toSkyData());
      i++;
    }
    data.add("childcount", i);

    data.add("errorlog", errLog);

    return data;
  }
Exemplo n.º 2
0
 @Override
 public void deCodeSkyData(SkyData data) {
   Log.v("heni", "NoSignalData deCodeSkyData.");
   this.curSource = data.getString("source");
   this.isNosignal = data.getBoolean("isNosignal");
   this.setCmd(
       data.getString("cmd"),
       data.getString("cmdparams"),
       SkyModuleDefs.SKY_SERVICE.valueOf(data.getString("cmdservice")));
 }
Exemplo n.º 3
0
  @Override
  public void deCodeSkyData(SkyData data) {
    setDlanName(data.getString("dlanName"));
    setDlanItemId(data.getString("dlanId"));
    //        setIsEncrypt(data.getInt("isEncrypt"));
    int i = data.getInt("childcount");
    for (int j = 0; j < i; j++) {
      SkyData childdata = data.getSkyData("child" + j);
      UIData childuidata = UIDataFactory.getUIData(childdata);
      list.add((DlanPushData) childuidata);
    }

    this.setCmd(
        data.getString("cmd"),
        data.getString("cmdparams"),
        SkyModuleDefs.SKY_SERVICE.valueOf(data.getString("cmdservice")));
    this.setErrLog(data.getString("errorlog"));
  }
Exemplo n.º 4
0
  @Override
  public SkyData toSkyData() {
    Log.v("heni", "NoSignalData toSkyData.");
    SkyData data = new SkyData();
    if (getType() != null) {
      data.add("type", getType());
    }
    if (curSource != null) {
      data.add("source", curSource);
    }
    data.add("isNosignal", isNosignal);

    data.add("cmd", this.getCmd());
    data.add("cmdservice", this.getService().toString());
    data.add("cmdparams", this.getCmdparams());
    return data;
  }