11 # define WIN32_LEAN_AND_MEAN 43 #ifdef LIBINTL_LIB_FOUND 45 setlocale(LC_ALL,
"");
46 if (path == NULL || strlen(path) == 0) {
47 #if defined(LOCALE_PATH) 50 bindtextdomain(
"libgammu",
".");
53 bindtextdomain(
"libgammu", path);
58 setlocale(LC_ALL,
"");
85 {
ERR_DEVICEOPENERROR,
"DEVICEOPENERROR",
N_(
"Error opening device. Unknown, busy or no permissions.")},
88 {
ERR_DEVICEBUSY,
"DEVICEBUSY",
N_(
"Error opening device, it is already opened by other application.")},
90 {
ERR_DEVICENODRIVER,
"DEVICENODRIVER",
N_(
"Error opening device. No required driver in operating system.")},
91 {
ERR_DEVICENOTWORK,
"DEVICENOTWORK",
N_(
"Error opening device. Some hardware not connected/wrongly configured.")},
97 {
ERR_TIMEOUT,
"TIMEOUT",
N_(
"No response in specified timeout. Probably phone not connected.")},
98 {
ERR_FRAMENOTREQUESTED,
"FRAMENOTREQUESTED",
N_(
"Frame not requested right now. See <https://wammu.eu/support/bugs/> for information how to report it.")},
99 {
ERR_UNKNOWNRESPONSE,
"UNKNOWNRESPONSE",
N_(
"Unknown response from phone. See <https://wammu.eu/support/bugs/> for information how to report it.")},
100 {
ERR_UNKNOWNFRAME,
"UNKNOWNFRAME",
N_(
"Unknown frame. See <https://wammu.eu/support/bugs/> for information how to report it.")},
103 {
ERR_SOURCENOTAVAILABLE,
"SOURCENOTAVAILABLE",
N_(
"Some functions not available for your system (disabled in config or not implemented).")},
108 {
ERR_NOTIMPLEMENTED,
"NOTIMPLEMENTED",
N_(
"Functionality not implemented. You are welcome to help authors with it.")},
114 {
ERR_EMPTYSMSC,
"EMPTYSMSC",
N_(
"No SMSC number given. Provide it manually or use the one configured in phone.")},
115 {
ERR_INSIDEPHONEMENU,
"INSIDEPHONEMENU",
N_(
"You're inside phone menu (maybe editing?). Leave it and try again.")},
117 {
ERR_WORKINPROGRESS,
"WORKINPROGRESS",
N_(
"Function is currently being implemented. If you want to help, please contact authors.")},
118 {
ERR_PHONEOFF,
"PHONEOFF",
N_(
"Phone is disabled and connected to charger.")},
120 {
ERR_BUG,
"BUG",
N_(
"Nobody is perfect, some bug appeared in protocol implementation. Please contact authors.")},
121 {
ERR_CANCELED,
"CANCELED",
N_(
"Transfer was canceled by phone, maybe you pressed cancel on phone.")},
126 {
ERR_MEMORY,
"MEMORY",
N_(
"Phone memory error, maybe it is read only.")},
131 {
ERR_SHOULDBEFILE,
"SHOULDBEFILE",
N_(
"You have to give file name and not folder name.")},
132 {
ERR_NOSIM,
"NOSIM",
N_(
"Can not access SIM card.")},
133 {
ERR_GNAPPLETWRONG,
"GNAPPLETWRONG",
N_(
"Wrong GNAPPLET version in phone. Use version from currently used Gammu.")},
145 {
ERR_DISABLED,
"DISABLED",
N_(
"Desired functionality has been disabled on compile time.")},
149 {
ERR_BUSY,
"BUSY",
N_(
"Command rejected because device was busy. Wait and restart.")},
154 {
ERR_INSTALL_NOT_FOUND,
"INSTALL_NOT_FOUND",
N_(
"Installation data not found, please consult debug log and/or documentation for more details.")},
162 {
ERR_SQL,
"SQL",
N_(
"Error in executing SQL query.")},
169 const char *def = NULL;
172 while (PrintErrorEntries[i].ErrorNum != 0) {
173 if (PrintErrorEntries[i].ErrorNum == e) {
185 const char *def = NULL;
188 while (PrintErrorEntries[i].ErrorNum != 0) {
189 if (PrintErrorEntries[i].ErrorNum == e) {
195 if (def == NULL) def =
N_(
"Unknown error description.");
223 smprintf(s,
"%s failed with error %s[%d]: %s\n", message,
const char * GSM_ErrorName(GSM_Error e)
GSM_Error NotImplementedFunction(void)
GSM_Error NotSupportedFunction(void)
GSM_Debug_Info GSM_global_debug
const char * GSM_ErrorString(GSM_Error e)
static PrintErrorEntry PrintErrorEntries[]
const char * GetGammuLocalePath(void)
void GSM_LogError(GSM_StateMachine *s, const char *message, const GSM_Error err)
GSM_Debug_Info * GSM_GetGlobalDebug()
GSM_Error NoneFunction(void)
const char * GetGammuVersion(void)
void GSM_InitLocales(const char UNUSED *path)
int smprintf(GSM_StateMachine *s, const char *format,...)