Translated using Weblate.
[gammu.git] / include / gammu-error.h
blob4398eeac2d0342d9fffb8242eeb468f4d0d2bcaa
1 /**
2 * \file gammu-error.h
3 * \author Michal Čihař
5 * Error codes definitions.
6 */
7 #ifndef __gammu_error_h
8 #define __gammu_error_h
10 /**
11 * \defgroup Error Error handling
12 * Error handling and manipulation.
15 /**
16 * Error types.
17 * \ingroup Error
19 typedef enum {
20 /**
21 * No error
23 ERR_NONE = 1,
24 /**
25 * Error during opening device
27 ERR_DEVICEOPENERROR,
28 /**
29 * Device locked
31 ERR_DEVICELOCKED,
32 /**
33 * Device does not exits
35 ERR_DEVICENOTEXIST,
36 /**
37 * Device is busy
39 ERR_DEVICEBUSY,
40 /**
41 * No permissions to open device
43 ERR_DEVICENOPERMISSION,
44 /**
45 * No driver installed for a device
47 ERR_DEVICENODRIVER,
48 /**
49 * Device doesn't seem to be working
51 ERR_DEVICENOTWORK,
52 /**
53 * Error during setting DTR/RTS in device
55 ERR_DEVICEDTRRTSERROR,
57 /** 10 **/
58 /**
59 * Error during changing speed in device
61 ERR_DEVICECHANGESPEEDERROR,
62 /**
63 * Error during writing device
65 ERR_DEVICEWRITEERROR,
66 /**
67 * Error during reading device
69 ERR_DEVICEREADERROR,
70 /**
71 * Can't set parity on device
73 ERR_DEVICEPARITYERROR,
74 /**
75 * Command timed out
77 ERR_TIMEOUT,
78 /**
79 * Frame handled, but not requested in this moment
81 ERR_FRAMENOTREQUESTED,
82 /**
83 * Response not handled by gammu
85 ERR_UNKNOWNRESPONSE,
86 /**
87 * Frame not handled by gammu
89 ERR_UNKNOWNFRAME,
90 /**
91 * Unknown connection type given by user
93 ERR_UNKNOWNCONNECTIONTYPESTRING,
94 /**
95 * Unknown model given by user
97 ERR_UNKNOWNMODELSTRING,
99 /** 20 **/
101 * Some functions not compiled in your OS
103 ERR_SOURCENOTAVAILABLE,
105 * Not supported by phone
107 ERR_NOTSUPPORTED,
109 * Empty entry or transfer end.
111 ERR_EMPTY,
113 * Not allowed
115 ERR_SECURITYERROR,
117 * Too high or too low location...
119 ERR_INVALIDLOCATION,
121 * Function not implemented
123 ERR_NOTIMPLEMENTED,
125 * Memory is full
127 ERR_FULL,
129 * Unknown response from phone
131 ERR_UNKNOWN,
133 * Error during opening file
135 ERR_CANTOPENFILE,
137 * More memory required
139 ERR_MOREMEMORY,
141 /** 30 **/
143 * No permission
145 ERR_PERMISSION,
147 * SMSC number is empty
149 ERR_EMPTYSMSC,
151 * Inside phone menu - can't make something
153 ERR_INSIDEPHONEMENU,
155 * Phone NOT connected - can't make something
157 ERR_NOTCONNECTED,
159 * Work in progress
161 ERR_WORKINPROGRESS,
163 * Phone is disabled and connected to charger
165 ERR_PHONEOFF,
167 * File format not supported by Gammu
169 ERR_FILENOTSUPPORTED,
171 * Found bug in implementation or phone
173 ERR_BUG,
175 * Action was canceled by user
177 ERR_CANCELED,
179 * Inside Gammu: phone module need to send another answer frame
181 ERR_NEEDANOTHERANSWER,
183 /** 40 **/
185 * You need other connectin for this operation.
187 ERR_OTHERCONNECTIONREQUIRED,
189 * Wrong CRC
191 ERR_WRONGCRC,
193 * Invalid date/time
195 ERR_INVALIDDATETIME,
197 * Phone memory error, maybe it is read only
199 ERR_MEMORY,
201 * Invalid data given to phone
203 ERR_INVALIDDATA,
205 * File with specified name already exist
207 ERR_FILEALREADYEXIST,
209 * File with specified name doesn't exist
211 ERR_FILENOTEXIST,
213 * You have to give folder (not file) name
215 ERR_SHOULDBEFOLDER,
217 * You have to give file (not folder) name
219 ERR_SHOULDBEFILE,
221 * Can not access SIM card
223 ERR_NOSIM,
225 /** 50 **/
227 * Invalid gnapplet version
229 ERR_GNAPPLETWRONG,
231 * Only part of folders listed
233 ERR_FOLDERPART,
235 * Folder is not empty
237 ERR_FOLDERNOTEMPTY,
239 * Data were converted
241 ERR_DATACONVERTED,
243 * Gammu is not configured.
245 ERR_UNCONFIGURED,
247 * Wrong folder selected (eg. for SMS).
249 ERR_WRONGFOLDER,
251 * Internal phone error (phone got crazy).
253 ERR_PHONE_INTERNAL,
255 * Could not write to a file (on local filesystem).
257 ERR_WRITING_FILE,
259 * No such section exists.
261 ERR_NONE_SECTION,
263 * Using default values.
265 ERR_USING_DEFAULTS,
267 /** 60 **/
269 * Corrupted data returned by phone.
271 ERR_CORRUPTED,
273 * Bad feature string.
275 ERR_BADFEATURE,
277 * Some functions not compiled in your OS
279 ERR_DISABLED,
281 * Bluetooth configuration requires channel option.
283 ERR_SPECIFYCHANNEL,
285 * Service is not running.
287 ERR_NOTRUNNING,
289 * Service setup is missing.
291 ERR_NOSERVICE,
293 * Command failed. Try again.
295 ERR_BUSY,
297 * Can not connect to server.
299 ERR_COULDNT_CONNECT,
301 * Can not resolve host name.
303 ERR_COULDNT_RESOLVE,
305 * Failed to get SMSC number from phone.
307 ERR_GETTING_SMSC,
309 /** 70 **/
311 * Operation aborted.
313 ERR_ABORTED,
315 * Installation data not found.
317 ERR_INSTALL_NOT_FOUND,
319 * Entry is read only.
321 ERR_READ_ONLY,
324 * Just marker of highest error code, should not be used.
326 ERR_LAST_VALUE
327 } GSM_Error;
330 * Returns text for error.
332 * \param e Error code.
333 * \return Text (in current locales) describing error
335 * \ingroup Error
337 const char *GSM_ErrorString(GSM_Error e);
340 * Returns name for error.
342 * \param e Error code.
343 * \return Text with error name
345 * \ingroup Error
347 const char *GSM_ErrorName(GSM_Error e);
348 #endif
350 /* Editor configuration
351 * vim: noexpandtab sw=8 ts=8 sts=8 tw=72: