-
Notifications
You must be signed in to change notification settings - Fork 11
/
context.js
41 lines (37 loc) · 871 Bytes
/
context.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Pervasync state and settings
var configured = false;
var syncing = false;
var syncState = "";
function onSyncStateChange(state, syncSummary){
syncState = state;
console.log("sync state: " + state);
if (typeof this.onstatechange == 'function') {
try {
this.onstatechange(state, syncSummary);
} catch (e) {
console.warn(e);
}
}
}
var settings = {
VERSION: "7.0.4",
path: null,
encryptionKey: null,
syncServerUrl: null, // required
syncUserName: null, // required
syncDeviceName: "DEFAULT",
syncUserPassword: null, // required
adminDbName: "pvcadmin.realm",
maxMessageSize: 2000000,
lobBufferSize: 400000,
morePayload: "31{\"name\":\"MORE\",\"valueLength\":0}"
}
var pvcAdminRealm;
export default {
configured,
syncing,
syncState,
settings,
pvcAdminRealm,
onSyncStateChange
}