1 /* 2 3 $Id$ 4 5 G N O K I I 6 7 A Linux/Unix toolset and driver for the mobile phones. 8 9 This file is part of gnokii. 10 11 Gnokii is free software; you can redistribute it and/or modify 12 it under the terms of the GNU General Public License as published by 13 the Free Software Foundation; either version 2 of the License, or 14 (at your option) any later version. 15 16 Gnokii is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 GNU General Public License for more details. 20 21 You should have received a copy of the GNU General Public License 22 along with gnokii; if not, write to the Free Software 23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 25 Copyright (C) 1999-2000 Hugh Blemings, Pavel Janik 26 Copyright (C) 2001-2004 BORBELY Zoltan, Pawel Kot 27 28 Error codes. 29 30 */ 31 32 #ifndef _gnokii_error_h 33 #define _gnokii_error_h 34 35 /* 36 * Define standard GSM error/return code values. These codes are also used for 37 * some internal functions such as SIM read/write in the model specific code. 38 */ 39 typedef enum { 40 /* General codes */ 41 GN_ERR_NONE = 0, /* No error. */ 42 GN_ERR_FAILED, /* Command failed. */ 43 GN_ERR_UNKNOWNMODEL, /* Model specified isn't known/supported. */ 44 GN_ERR_INVALIDSECURITYCODE, /* Invalid Security code. */ 45 GN_ERR_INTERNALERROR, /* Problem occured internal to model specific code. */ 46 GN_ERR_NOTIMPLEMENTED, /* Command called isn't implemented in model. */ 47 GN_ERR_NOTSUPPORTED, /* Function not supported by the phone */ 48 GN_ERR_USERCANCELED, /* User aborted the action. */ 49 GN_ERR_UNKNOWN, /* Unknown error - well better than nothing!! */ 50 GN_ERR_MEMORYFULL, /* The specified memory is full. */ 51 52 /* Statemachine */ 53 GN_ERR_NOLINK, /* Couldn't establish link with phone. */ 54 GN_ERR_TIMEOUT, /* Command timed out. */ 55 GN_ERR_TRYAGAIN, /* Try again. */ 56 GN_ERR_WAITING, /* Waiting for the next part of the message. */ 57 GN_ERR_NOTREADY, /* Device not ready. */ 58 GN_ERR_BUSY, /* Command is still being executed. */ 59 60 /* Locations */ 61 GN_ERR_INVALIDLOCATION, /* The given memory location has not valid location. */ 62 GN_ERR_INVALIDMEMORYTYPE, /* Invalid type of memory. */ 63 GN_ERR_EMPTYLOCATION, /* The given location is empty. */ 64 65 /* Format */ 66 GN_ERR_ENTRYTOOLONG, /* The given entry is too long */ 67 GN_ERR_WRONGDATAFORMAT, /* Data format is not valid */ 68 GN_ERR_INVALIDSIZE, /* Wrong size of the object */ 69 70 /* The following are here in anticipation of data call requirements. */ 71 GN_ERR_LINEBUSY, /* Outgoing call requested reported line busy */ 72 GN_ERR_NOCARRIER, /* No Carrier error during data call setup ? */ 73 74 /* The following value signals the current frame is unhandled */ 75 GN_ERR_UNHANDLEDFRAME, /* The current frame isn't handled by the incoming function */ 76 GN_ERR_UNSOLICITED, /* Unsolicited message received. */ 77 78 /* Other */ 79 GN_ERR_NONEWCBRECEIVED, /* Attempt to read CB when no new CB received */ 80 GN_ERR_SIMPROBLEM, /* SIM card missing or damaged */ 81 GN_ERR_CODEREQUIRED, /* PIN or PUK code required */ 82 GN_ERR_NOTAVAILABLE, /* The requested information is not available */ 83 84 /* Config */ 85 GN_ERR_NOCONFIG, /* Config file cannot be found */ 86 GN_ERR_NOPHONE, /* Either global or given phone section cannot be found */ 87 GN_ERR_NOLOG, /* Incorrect logging section configuration */ 88 GN_ERR_NOMODEL, /* No phone model specified */ 89 GN_ERR_NOPORT, /* No port specified */ 90 GN_ERR_NOCONNECTION, /* No connection type specified */ 91 GN_ERR_LOCKED, /* Device is locked and cannot unlock */ 92 93 GN_ERR_ASYNC /* The actual response will be sent asynchronously */ 94 } gn_error; 95 96 GNOKII_API char *gn_error_print(gn_error e); 97 98 #endif /* _gnokii_error_h */ 99