1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.omadm.plugin;
18
19public interface ErrorCodes {
20
21    /** Success. */
22    int SYNCML_DM_SUCCESS = 0;
23
24    /** Unknown error (EXT). */
25    int SYNCML_DM_FAIL = 1;
26
27    /** Entry for tree mount point or transport already exists in the registry (EXT). */
28    int SYNCML_DM_ENTRY_EXIST = 2;
29
30    /** Entry for tree mount point or transport not found in the registry (EXT). */
31    int SYNCML_DM_ENTRY_NOT_FOUND = 3;
32
33    /** Another session is in progress (EXT). */
34    int SYNCML_DM_SESSION_BUSY = 4;
35
36    /** URI is invalid (EXT). */
37    int SYNCML_DM_INVALID_URI = 5;
38
39    /** Session authentication failed. */
40    int SYNCML_DM_SESSION_AUTH_FAIL = 6;
41
42    /** Second connection is not available (EXT). */
43    int SYNCML_DM_SESSION_NW_NOT_AVAILABLE = 7;
44
45    /** Session not connected. */
46    int SYNCML_DM_SESSION_NOT_CONNECTED = 8;
47
48    /** Session canceled. */
49    int SYNCML_DM_SESSION_CANCELED = 9;
50
51    /** File operation failure (EXT). */
52    int SYNCML_DM_IO_FAILURE = 10;
53
54    /** File not found (EXT). */
55    int SYNCML_DM_FILE_NOT_FOUND = 11;
56
57    /** URI is too long (EXT). */
58    int SYNCML_DM_URI_CONFLICT = 12;
59
60    /** Tree file is corrupted (EXT). */
61    int SYNCML_DM_TREE_CORRUPT = 13;
62
63    /** Internal error (EXT). */
64    int SYNCML_DM_SKIP_SUBTREE = 14;
65
66    /** Result is too large (EXT). */
67    int SYNCML_DM_RESULT_TOO_LARGE = 15;
68
69    /** Lock context is invalid (EXT). */
70    int SYNCML_DM_LOCK_CONTEXT_NOT_FOUND = 16;
71
72    /** Unable to create thread (EXT). */
73    int SYNCML_DM_UNABLE_START_THREAD = 17;
74
75    /** Too many data files: invalid configuration (EXT). */
76    int SYNCML_DM_TOO_MANY_DATA_FILES = 18;
77
78    /** File is locked; try again later (EXT). */
79    int SYNCML_DM_LOCK_TRY_AGAIN = 19;
80
81    /** Constraint failed (EXT). */
82    int SYNCML_DM_CONSTRAINT_FAILED = 20;
83
84    /** Unable to load Access Control List file (EXT). */
85    int SYNCML_DM_LOAD_ACL_FILE_FAILED = 21;
86
87    /** Tree is read-only (EXT). */
88    int SYNCML_DM_READ_ONLY_TREE = 22;
89
90    /** At least one of the parameters is invalid (EXT). */
91    int SYNCML_DM_INVALID_PARAMETER = 23;
92
93    /** LAWMO exec status code to the server. */
94    int SYNCML_DM_ACCEPTED_FOR_PROCESSING = 202;
95
96    /** Authentication accepted. */
97    int SYNCML_DM_AUTHENTICATION_ACCEPTED = 212;
98
99    /** Chunked item accepted and buffered. */
100    int SYNCML_DM_CHUNK_BUFFERED = 213;
101
102    /** Operation canceled. */
103    int SYNCML_DM_OPERATION_CANCELED = 214;
104
105    /** DM engine not executed. TODO: remove if unused. */
106    int SYNCML_DM_NOT_EXECUTED = 215;
107
108    /** Atomic rollback success. TODO: remove if unused. */
109    int SYNCML_DM_ATOMIC_ROLLBACK_SUCCESS = 216;
110
111    /** DM tree not modified. */
112    int SYNCML_DM_TREE_NOT_MODIFIED = 304;
113
114    /** Bad request. */
115    int SYNCML_DM_BAD_REQUEST = 400;
116
117    /** Unauthorized access. */
118    int SYNCML_DM_UNAUTHORIZED = 401;
119
120    /** Not found. */
121    int SYNCML_DM_NOT_FOUND = 404;
122
123    /** Command not allowed. */
124    int SYNCML_DM_COMMAND_NOT_ALLOWED = 405;
125
126    /** Requested operation not supported. */
127    int SYNCML_DM_UNSUPPORTED_OPERATION = 406;
128
129    /** Authentication required. */
130    int SYNCML_DM_AUTHENTICATION_REQUIRED = 407;
131
132    /** Request timeout. */
133    int SYNCML_DM_REQUEST_TIMEOUT = 408;
134
135    /** Incomplete command. */
136    int SYNCML_DM_INCOMPLETE_COMMAND = 412;
137
138    /** Request entity too large. */
139    int SYNCML_DM_REQUEST_ENTITY_TOO_LARGE = 413;
140
141    /** URI too long. */
142    int SYNCML_DM_URI_TOO_LONG = 414;
143
144    /** Unsupported media type format. TODO: remove if unused. */
145    int SYNCML_DM_UNSUPPORTED_MEDIA_TYPE_FORMAT = 415;
146
147    /** Request range not found. TODO: remove if unused. */
148    int SYNCML_DM_REQUESTED_RANGE_NOT_FOUND = 416;
149
150    /** The target already exists. */
151    int SYNCML_DM_TARGET_ALREADY_EXISTS = 418;
152
153    /** The device storage is full. */
154    int SYNCML_DM_DEVICE_FULL = 420;
155
156    /** Size mismatch. */
157    int SYNCML_DM_SIZE_MISMATCH = 424;
158
159    /** Permission verification failed. */
160    int SYNCML_DM_PERMISSION_FAILED = 425;
161
162    /** Command failed. */
163    int SYNCML_DM_COMMAND_FAILED = 500;
164
165    /** Command not implemented. */
166    int SYNCML_DM_COMMAND_NOT_IMPLEMENTED = 501;
167
168    /** Processing error. */
169    int SYNCML_DM_PROCESSING_ERROR = 506;
170
171    /** Atomic failed. TODO: remove if unused. */
172    int SYNCML_DM_ATOMIC_FAILED = 507;
173
174    /** Data store failure. */
175    int SYNCML_DM_DATA_STORE_FAILURE = 510;
176
177    /** Operation canceled failure. TODO: remove if unused. */
178    int SYNCML_DM_OPERATION_CANCELED_FAILURE = 514;
179
180    /** Atomic rollback failed. */
181    int SYNCML_DM_ATOMIC_ROLLBACK_FAILED = 516;
182
183    /** Atomic response too large. */
184    int SYNCML_DM_ATOMIC_RESPONSE_TOO_LARGE = 517;
185
186    /** Data set not complete for an ESN. TODO: remove if unused. */
187    int SYNCML_DM_ESN_SET_NOT_COMPLETE = 518;
188
189    /** Socket timeout error. TODO: remove if unused. */
190    int SYNCML_DM_SOCKET_TIMEOUT = 700;
191
192    /** Socket connect error. TODO: remove if unused. */
193    int SYNCML_DM_SOCKET_CONNECT_ERROR = 701;
194
195    /** Factory Data Reset result code. TODO: remove if unused. */
196    int SYNCML_DM_PROCESS_ACCEPTED = 1200;
197}
198