// todo: actual upload

!747

m {
  static new L<Info> informationForServer;
  static new L<Info> forwarded;
  
  static class Info {
    S text;
    long timeSubmitted, timeForwarded;
    
    *() {}
    *(S *text, long *timeSubmitted) {}
  }
  
  p {
    readLocally("informationForServer forwarded");
    makeAndroid("Information forwarding android.", stringfunc { answer(s) });
  }
  
  static synchronized S answer(S s) {
    new Matches m;
    
    if (match3("Can you forward information to the main server?", s))
      return "yes";
    if (match3("please forward to main server: ...", s, m)) {
      informationForServer.add(new Info(m.m[0], now()));
      saveLocally("informationForServer");
      return "ok, forwarding: " + quote(m.m[0]);
    }
    if (match3("how many lines are in store?", s))
      return "" + informationForServer.size();
    if (match3("show me your store", s))
      return structure(informationForServer);
    
    return null;
  }
}