-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcore.js
50 lines (39 loc) · 1.42 KB
/
core.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
42
43
44
45
46
47
48
49
50
// ==========================================================================
// Project: ThothSC
// Copyright: ©2010 Maurits Lamers
// ==========================================================================
/*globals ThothSC */
/** @namespace
A framework to connect to the Thoth server application
@extends SC.Object
*/
ThothSC = SC.Object.create(
/** @scope Thoth.prototype */ {
NAMESPACE: 'ThothSC',
VERSION: '0.1.0',
SOCKETIO: 'socket.io', // traffic specifications
FAKE: 'fake', // fake client, for testing purposes and other offline tricks
//events
CONNECTION_CLOSED: 'closed ',
CONNECTION_OPENED: 'opened',
CONNECTION_ERROR: 'error',
CONNECTION_REAUTHFAILED: 'reauth_failed',
DS_ERROR_FETCH: 'ds_error_fetch',
DS_ERROR_REFRESH: 'ds_error_refresh',
DS_ERROR_CREATE: 'ds_error_create',
DS_ERROR_UPDATE: 'ds_error_update',
DS_ERROR_DELETE: 'ds_error_delete',
DS_ERROR_PUSHCREATE: 'ds_error_pushcreate',
DS_ERROR_PUSHUPDATE: 'ds_error_pushupdate',
DS_ERROR_PUSHDELETE: 'ds_error_pushdelete',
THOTH_ERROR_DENIEDONPOLICY: 0,
THOTH_ERROR_DATAINCONSISTENCY: 1,
THOTH_ERROR_DBERROR: 3,
MD5: 'md5', // encryption schemes for passwords
RIPEMD160: 'ripemd160',
SHA1: 'sha1',
SHA256: 'sha256',
SHA512: 'sha512',
client: null, // the data source will hook up the proper client here
requestCache: null // initialising a data source will put a request cache manager here
}) ;