1 # -----------------------------------------------------------------------
2 # Copyright (C) 2007 Georgia Public Library Service
3 # Bill Erickson <billserickson@gmail.com>
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
16 # Collection of global constants
17 # -----------------------------------------------------------------------
19 # -----------------------------------------------------------------------
21 # -----------------------------------------------------------------------
28 # -----------------------------------------------------------------------
30 # -----------------------------------------------------------------------
31 OSRF_APP_SESSION_CONNECTED = 0
32 OSRF_APP_SESSION_CONNECTING = 1
33 OSRF_APP_SESSION_DISCONNECTED = 2
35 # -----------------------------------------------------------------------
36 # OpenSRF message types
37 # -----------------------------------------------------------------------
38 OSRF_MESSAGE_TYPE_REQUEST = 'REQUEST'
39 OSRF_MESSAGE_TYPE_STATUS = 'STATUS'
40 OSRF_MESSAGE_TYPE_RESULT = 'RESULT'
41 OSRF_MESSAGE_TYPE_CONNECT = 'CONNECT'
42 OSRF_MESSAGE_TYPE_DISCONNECT = 'DISCONNECT'
44 # -----------------------------------------------------------------------
45 # OpenSRF message statuses
46 # -----------------------------------------------------------------------
47 OSRF_STATUS_CONTINUE = 100
49 OSRF_STATUS_ACCEPTED = 202
50 OSRF_STATUS_COMPLETE = 205
51 OSRF_STATUS_REDIRECTED = 307
52 OSRF_STATUS_BADREQUEST = 400
53 OSRF_STATUS_UNAUTHORIZED = 401
54 OSRF_STATUS_FORBIDDEN = 403
55 OSRF_STATUS_NOTFOUND = 404
56 OSRF_STATUS_NOTALLOWED = 405
57 OSRF_STATUS_TIMEOUT = 408
58 OSRF_STATUS_EXPFAILED = 417
59 OSRF_STATUS_INTERNALSERVERERROR = 500
60 OSRF_STATUS_NOTIMPLEMENTED = 501
61 OSRF_STATUS_VERSIONNOTSUPPORTED = 505
64 # -----------------------------------------------------------------------
65 # Some well-known services
66 # -----------------------------------------------------------------------
67 OSRF_APP_SETTINGS = 'opensrf.settings'
68 OSRF_APP_MATH = 'opensrf.math'
71 # where do we find the settings config
72 OSRF_METHOD_GET_HOST_CONFIG = 'opensrf.settings.host_config.get'