61ae4895a180d565d2fa9051412dc8e04f683d4c
[sfa.git] / sfa / util / genicode.py
1 #----------------------------------------------------------------------\r
2 # Copyright (c) 2008 Board of Trustees, Princeton University\r
3 #\r
4 # Permission is hereby granted, free of charge, to any person obtaining\r
5 # a copy of this software and/or hardware specification (the "Work") to\r
6 # deal in the Work without restriction, including without limitation the\r
7 # rights to use, copy, modify, merge, publish, distribute, sublicense,\r
8 # and/or sell copies of the Work, and to permit persons to whom the Work\r
9 # is furnished to do so, subject to the following conditions:\r
10 #\r
11 # The above copyright notice and this permission notice shall be\r
12 # included in all copies or substantial portions of the Work.\r
13 #\r
14 # THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS \r
15 # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF \r
16 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND \r
17 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT \r
18 # HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, \r
19 # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, \r
20 # OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS \r
21 # IN THE WORK.\r
22 #----------------------------------------------------------------------\r
23 \r
24 from sfa.util.enumeration import Enum\r
25 \r
26 GENICODE = Enum(\r
27     SUCCESS=0,\r
28     BADARGS=1,\r
29     ERROR=2,\r
30     FORBIDDEN=3,\r
31     BADVERSION=4,\r
32     SERVERERROR=5,\r
33     TOOBIG=6,\r
34     REFUSED=7,\r
35     TIMEDOUT=8,\r
36     DBERROR=9,\r
37     RPCERROR=10,\r
38     UNAVAILABLE=11,\r
39     SEARCHFAILED=12,\r
40     UNSUPPORTED=13,\r
41     BUSY=14,\r
42     EXPIRED=15,\r
43     INPORGRESS=16,\r
44     ALREADYEXISTS=17       \r
45 )   \r