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