コード例 #1
0
 public RDBRObj(string u, string _dev)
 {
     dev = _dev;
     uid = u;
     obj = new ReactiveProperty <T>(loadData());
     RealtimeDBFactory.get().initDoneCB().add(init);
 }
コード例 #2
0
        private void subscribeData()
        {
            string dataPath = getPath(DATA_PATH);

            Debug.Log("subscribeData:" + dataPath);
            RealtimeDBFactory.get().subscribe(dataPath, s => {
                replaceData(s);
                dataSubscribed = true;
                onFetchedCB.done();
            });
        }
コード例 #3
0
        private void post()
        {
            string nShal   = getHash();
            string oldSha1 = rObj.loadHash();

            if (nShal.Equals(oldSha1))
            {
                return;
            }
            Map <string, object> _da = new Map <string, object>();

            _da.put("hash", nShal);
            _da.put("data", obj);
            RealtimeDBFactory.get().putJson(rObj.getPath(""), _da);
            postedCB(obj);
        }
コード例 #4
0
 private StorageUtils()
 {
     authDoneCB = RealtimeDBFactory.getAuther().auth().authDoneCB();
 }