http://marcin-wiacek.fkn.pl/english/zips/mygnokii.tar.gz
[gnokii.git] / include / gsm-error.h
1 /*
2
3   $Id$
4
5   G N O K I I
6
7   A Linux/Unix toolset and driver for Nokia mobile phones.
8
9   Copyright (C) 2001 Pawe³ Kot <pkot@linuxnews.pl>
10
11   Released under the terms of the GNU GPL, see file COPYING for more details.
12
13   Error codes.
14
15   $Log$
16   Revision 1.1.1.1  2001/11/25 21:59:19  short
17   :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
18
19   Revision 1.2  2001/11/08 16:34:20  pkot
20   Updates to work with new libsms
21
22   Revision 1.1  2001/10/24 22:33:00  pkot
23   Moved error codes to a separate files
24
25
26 */
27
28 #ifndef __gsm_error_h_
29 #define __gsm_error_h_
30
31 /* Define standard GSM error/return code values. These codes are also used for
32    some internal functions such as SIM read/write in the model specific code. */
33
34 typedef enum {
35         GE_NONE = 0,              /* 0. No error. */
36         GE_DEVICEOPENFAILED,      /* 1. Couldn't open specified serial device. */
37         GE_UNKNOWNMODEL,          /* 2. Model specified isn't known/supported. */
38         GE_NOLINK,                /* 3. Couldn't establish link with phone. */
39         GE_TIMEOUT,               /* 4. Command timed out. */
40         GE_TRYAGAIN,              /* 5. Try again. */
41         GE_INVALIDSECURITYCODE,   /* 6. Invalid Security code. */
42         GE_NOTIMPLEMENTED,        /* 7. Command called isn't implemented in model. */
43         GE_INVALIDSMSLOCATION,    /* 8. Invalid SMS location. */
44         GE_INVALIDPHBOOKLOCATION, /* 9. Invalid phonebook location. */
45         GE_INVALIDMEMORYTYPE,     /* 10. Invalid type of memory. */
46         GE_INVALIDSPEEDDIALLOCATION, /* 11. Invalid speed dial location. */
47         GE_INVALIDCALNOTELOCATION,/* 12. Invalid calendar note location. */
48         GE_INVALIDDATETIME,       /* 13. Invalid date, time or alarm specification. */
49         GE_EMPTYSMSLOCATION,      /* 14. SMS location is empty. */
50         GE_PHBOOKNAMETOOLONG,     /* 15. Phonebook name is too long. */
51         GE_PHBOOKNUMBERTOOLONG,   /* 16. Phonebook number is too long. */
52         GE_PHBOOKWRITEFAILED,     /* 17. Phonebook write failed. */
53         GE_SMSSENDOK,             /* 18. SMS was send correctly. */
54         GE_SMSSENDFAILED,         /* 19. SMS send fail. */
55         GE_SMSWAITING,            /* 20. Waiting for the next part of SMS. */
56         GE_SMSTOOLONG,            /* 21. SMS message too long. */
57         GE_SMSWRONGFORMAT,        /* 22. Wrong format of the SMS */
58         GE_NONEWCBRECEIVED,       /* 23. Attempt to read CB when no new CB received */
59         GE_INTERNALERROR,         /* 24. Problem occured internal to model specific code. */
60         GE_CANTOPENFILE,          /* 25. Can't open file with bitmap/ringtone */
61         GE_WRONGNUMBEROFCOLORS,   /* 26. Wrong number of colors in specified bitmap file */
62         GE_WRONGCOLORS,           /* 27. Wrong colors in bitmap file */
63         GE_INVALIDFILEFORMAT,     /* 28. Invalid format of file */
64         GE_SUBFORMATNOTSUPPORTED, /* 29. Subformat of file not supported */
65         GE_FILETOOSHORT,          /* 30. Too short file to read */
66         GE_FILETOOLONG,           /* 31. Too long file to read */
67         GE_INVALIDIMAGESIZE,      /* 32. Invalid size of bitmap (in file, sms etc.) */
68         GE_NOTSUPPORTED,          /* 33. Function not supported by the phone */
69         GE_BUSY,                  /* 34. Command is still being executed. */
70         GE_USERCANCELED,          /* 35. */
71         GE_UNKNOWN,               /* 36. Unknown error - well better than nothing!! */
72         GE_MEMORYFULL,            /* 37. */
73         GE_NOTWAITING,            /* 38. Not waiting for a response from the phone */
74         GE_NOTREADY,              /* 39. */
75
76         /* The following are here in anticipation of data call requirements. */
77
78         GE_LINEBUSY,              /* 40. Outgoing call requested reported line busy */
79         GE_NOCARRIER              /* 41. No Carrier error during data call setup ? */
80 } GSM_Error;
81
82 extern char *print_error(GSM_Error e);
83
84 #endif