Chris@40
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@40
|
2 /*
|
Chris@40
|
3 Copyright (c) 2016-2018 Queen Mary, University of London
|
Chris@40
|
4
|
Chris@40
|
5 Permission is hereby granted, free of charge, to any person
|
Chris@40
|
6 obtaining a copy of this software and associated documentation
|
Chris@40
|
7 files (the "Software"), to deal in the Software without
|
Chris@40
|
8 restriction, including without limitation the rights to use, copy,
|
Chris@40
|
9 modify, merge, publish, distribute, sublicense, and/or sell copies
|
Chris@40
|
10 of the Software, and to permit persons to whom the Software is
|
Chris@40
|
11 furnished to do so, subject to the following conditions:
|
Chris@40
|
12
|
Chris@40
|
13 The above copyright notice and this permission notice shall be
|
Chris@40
|
14 included in all copies or substantial portions of the Software.
|
Chris@40
|
15
|
Chris@40
|
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
Chris@40
|
17 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
Chris@40
|
18 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
Chris@40
|
19 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
Chris@40
|
20 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
Chris@40
|
21 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
Chris@40
|
22 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
Chris@40
|
23
|
Chris@40
|
24 Except as contained in this notice, the names of the Centre for
|
Chris@40
|
25 Digital Music and Queen Mary, University of London shall not be
|
Chris@40
|
26 used in advertising or otherwise to promote the sale, use or other
|
Chris@40
|
27 dealings in this Software without prior written authorization.
|
Chris@40
|
28 */
|
Chris@40
|
29
|
Chris@40
|
30 #ifndef CHECK_CODE_H
|
Chris@40
|
31 #define CHECK_CODE_H
|
Chris@40
|
32
|
Chris@40
|
33 enum class PluginCheckCode {
|
Chris@40
|
34
|
Chris@40
|
35 SUCCESS = 0,
|
Chris@40
|
36
|
Chris@40
|
37 /** Plugin library file is not found
|
Chris@40
|
38 */
|
Chris@40
|
39 FAIL_LIBRARY_NOT_FOUND = 1,
|
Chris@40
|
40
|
Chris@40
|
41 /** Plugin library does appear to be a library, but its
|
Chris@40
|
42 * architecture differs from that of the checker program, in
|
Chris@40
|
43 * a way that can be distinguished from other loader
|
Chris@40
|
44 * failures. On Windows this may arise from system error 193,
|
Chris@40
|
45 * ERROR_BAD_EXE_FORMAT
|
Chris@40
|
46 */
|
Chris@40
|
47 FAIL_WRONG_ARCHITECTURE = 2,
|
Chris@40
|
48
|
Chris@42
|
49 /** Plugin library depends on some other library that cannot be
|
Chris@42
|
50 * loaded. On Windows this may arise from system error 126,
|
Chris@42
|
51 * ERROR_MOD_NOT_FOUND, provided that the library file itself
|
Chris@42
|
52 * exists
|
Chris@40
|
53 */
|
Chris@40
|
54 FAIL_DEPENDENCY_MISSING = 3,
|
Chris@40
|
55
|
Chris@51
|
56 /** Plugin library loading was refused for some security-related
|
Chris@51
|
57 * reason
|
Chris@51
|
58 */
|
Chris@51
|
59 FAIL_FORBIDDEN = 4,
|
Chris@51
|
60
|
Chris@40
|
61 /** Plugin library cannot be loaded for some other reason
|
Chris@40
|
62 */
|
Chris@51
|
63 FAIL_NOT_LOADABLE = 5,
|
Chris@40
|
64
|
Chris@40
|
65 /** Plugin library can be loaded, but the expected plugin
|
Chris@40
|
66 * descriptor symbol is missing
|
Chris@40
|
67 */
|
Chris@51
|
68 FAIL_DESCRIPTOR_MISSING = 6,
|
Chris@40
|
69
|
Chris@40
|
70 /** Plugin library can be loaded and descriptor called, but no
|
Chris@40
|
71 * plugins are found in it
|
Chris@40
|
72 */
|
Chris@51
|
73 FAIL_NO_PLUGINS = 7,
|
Chris@40
|
74
|
Chris@40
|
75 /** Failure but no meaningful error code provided, or failure
|
Chris@40
|
76 * read from an older helper version that did not support
|
Chris@40
|
77 * error codes
|
Chris@40
|
78 */
|
Chris@51
|
79 FAIL_OTHER = 999
|
Chris@40
|
80 };
|
Chris@40
|
81
|
Chris@40
|
82 #endif
|