5 A Linux/Unix GUI for Nokia mobile phones.
7 Released under the terms of the GNU GPL, see file COPYING for more details.
16 #include "xgnokii_lowlevel.h"
18 #include "xgnokii_common.h"
21 PhoneMonitor phoneMonitor;
22 pthread_mutex_t memoryMutex;
23 pthread_cond_t memoryCond;
24 pthread_mutex_t calendarMutex;
25 pthread_cond_t calendarCond;
26 pthread_mutex_t smsMutex;
27 pthread_mutex_t sendSMSMutex;
28 pthread_cond_t sendSMSCond;
29 pthread_mutex_t callMutex;
30 pthread_mutex_t netMonMutex;
31 pthread_mutex_t speedDialMutex;
32 pthread_cond_t speedDialCond;
33 pthread_mutex_t callerGroupMutex;
34 pthread_cond_t callerGroupCond;
35 pthread_mutex_t smsCenterMutex;
36 pthread_cond_t smsCenterCond;
37 pthread_mutex_t alarmMutex;
38 pthread_cond_t alarmCond;
39 pthread_mutex_t getBitmapMutex;
40 pthread_cond_t getBitmapCond;
41 pthread_mutex_t setBitmapMutex;
42 pthread_cond_t setBitmapCond;
43 pthread_mutex_t getNetworkInfoMutex;
44 pthread_cond_t getNetworkInfoCond;
45 static pthread_mutex_t eventsMutex;
46 static GSList *ScheduledEvents = NULL;
49 inline void GUI_InsertEvent (PhoneEvent *event)
51 while (phoneMonitor.working) {
56 g_print ("Inserting Event: %d\n", event->event);
58 pthread_mutex_lock (&eventsMutex);
59 ScheduledEvents = g_slist_prepend (ScheduledEvents, event);
60 pthread_mutex_unlock (&eventsMutex);
64 inline static PhoneEvent *RemoveEvent (void)
67 PhoneEvent *event = NULL;
69 pthread_mutex_lock (&eventsMutex);
70 list = g_slist_last (ScheduledEvents);
73 event = (PhoneEvent *) list->data;
74 ScheduledEvents = g_slist_remove_link (ScheduledEvents, list);
75 g_slist_free_1 (list);
77 pthread_mutex_unlock (&eventsMutex);
83 static void InitModelInf (void)
89 while ((error = GSM->GetModel(buf)) != GE_NONE && i++ < 15)
94 g_free (phoneMonitor.phone.model);
95 phoneMonitor.phone.version = g_strdup (buf);
96 phoneMonitor.phone.model = GetModelName (buf);
97 if (phoneMonitor.phone.model == NULL)
98 phoneMonitor.phone.model = g_strdup (_("unknown"));
102 while ((error = GSM->GetRevision (buf)) != GE_NONE && i++ < 5)
105 if (error == GE_NONE)
107 g_free (phoneMonitor.phone.revision);
108 phoneMonitor.phone.revision = g_strdup (buf);
112 while ((error = GSM->GetIMEI (buf)) != GE_NONE && i++ < 5)
115 if (error == GE_NONE)
117 g_free (phoneMonitor.phone.imei);
118 phoneMonitor.phone.imei = g_strdup (buf);
123 g_print ("Version: %s\n", phoneMonitor.phone.version);
124 g_print ("Model: %s\n", phoneMonitor.phone.model);
125 g_print ("IMEI: %s\n", phoneMonitor.phone.imei);
126 g_print ("Revision: %s\n", phoneMonitor.phone.revision);
130 static GSM_Error fbusinit(bool enable_monitoring)
133 static GSM_Error error=GE_NOLINK;
136 if (strcmp(GetMygnokiiVersion(),VERSION)!=0)
137 fprintf(stderr,_("WARNING: version of installed libmygnokii.so (%s) is different to version of xgnokii (%s)\n"),GetMygnokiiVersion(),VERSION);
140 /* Initialise the code for the GSM interface. */
141 if (error == GE_NOLINK)
142 error = GSM_Initialise (xgnokiiConfig.model, xgnokiiConfig.port,
143 xgnokiiConfig.initlength,
144 GetConnectionTypeFromString(xgnokiiConfig.connection),
146 xgnokiiConfig.synchronizetime);
149 g_print ("fbusinit: error %d\n", error);
152 if (error != GE_NONE) {
153 g_print (_("GSM/FBUS init failed! (Unknown model ?). Quitting.\n"));
154 /* FIXME: should popup some message... */
158 while (count++ < 40 && *GSM_LinkOK == false)
161 g_print("After usleep. GSM_LinkOK: %d\n", *GSM_LinkOK);
164 if (*GSM_LinkOK == true)
171 void GUI_InitPhoneMonitor (void)
173 phoneMonitor.phone.model = g_strdup (_("unknown"));
174 phoneMonitor.phone.version = phoneMonitor.phone.model;
175 phoneMonitor.phone.revision = g_strdup (_("unknown"));
176 phoneMonitor.phone.imei = g_strdup (_("unknown"));
177 phoneMonitor.rfLevel = phoneMonitor.batteryLevel = -1;
178 phoneMonitor.powerSource = GPS_BATTERY;
179 phoneMonitor.working = FALSE;
180 phoneMonitor.alarm = FALSE;
181 phoneMonitor.sms.unRead = phoneMonitor.sms.number = phoneMonitor.sms.number2 = 0;
182 phoneMonitor.sms.messages = NULL;
183 phoneMonitor.call.callInProgress = CS_Idle;
184 *phoneMonitor.call.callNum = '\0';
185 phoneMonitor.netmonitor.number = 0;
186 *phoneMonitor.netmonitor.screen = *phoneMonitor.netmonitor.screen3 =
187 *phoneMonitor.netmonitor.screen4 = *phoneMonitor.netmonitor.screen5 = '\0';
188 pthread_mutex_init (&memoryMutex, NULL);
189 pthread_cond_init (&memoryCond, NULL);
190 pthread_mutex_init (&calendarMutex, NULL);
191 pthread_cond_init (&calendarCond, NULL);
192 pthread_mutex_init (&smsMutex, NULL);
193 pthread_mutex_init (&sendSMSMutex, NULL);
194 pthread_cond_init (&sendSMSCond, NULL);
195 pthread_mutex_init (&callMutex, NULL);
196 pthread_mutex_init (&eventsMutex, NULL);
197 pthread_mutex_init (&callMutex, NULL);
198 pthread_mutex_init (&netMonMutex, NULL);
199 pthread_mutex_init (&speedDialMutex, NULL);
200 pthread_cond_init (&speedDialCond, NULL);
201 pthread_mutex_init (&callerGroupMutex, NULL);
202 pthread_cond_init (&callerGroupCond, NULL);
203 pthread_mutex_init (&smsCenterMutex, NULL);
204 pthread_cond_init (&smsCenterCond, NULL);
205 pthread_mutex_init (&getBitmapMutex, NULL);
206 pthread_cond_init (&getBitmapCond, NULL);
207 pthread_mutex_init (&setBitmapMutex, NULL);
208 pthread_cond_init (&setBitmapCond, NULL);
209 pthread_mutex_init (&getNetworkInfoMutex, NULL);
210 pthread_cond_init (&getNetworkInfoCond, NULL);
214 static inline void FreeElement (gpointer data, gpointer userData)
216 g_free ((GSM_SMSMessage *) data);
220 static inline void FreeArray (GSList **array)
224 g_slist_foreach (*array, FreeElement, NULL);
225 g_slist_free (*array);
231 void RefreshSMS (const gint number)
238 g_print ("RefreshSMS is running...\n");
241 pthread_mutex_lock (&smsMutex);
242 FreeArray (&(phoneMonitor.sms.messages));
243 phoneMonitor.sms.number = 0;
244 phoneMonitor.sms.number2 = 0;
245 pthread_mutex_unlock (&smsMutex);
250 msg = g_malloc (sizeof (GSM_SMSMessage));
251 msg->MemoryType = GMT_SM;
254 fprintf(stdout, _("test: %d %i %i %i\n"),msg->Location,phoneMonitor.sms.number,phoneMonitor.sms.number2,number);
256 pthread_mutex_lock (&smsMutex);
257 if( GetModelFeature(FN_SMS)==F_SMS71 ) msg->Location = 0; /* read next sms for 6210/7110 */
258 error = GSM->GetSMSMessage (msg);
259 pthread_mutex_unlock (&smsMutex);
262 pthread_mutex_lock (&smsMutex);
264 fprintf(stdout, _("Refresh SMS: g_slist_append: sms message"));
265 fprintf(stdout, _(" Location: %d"),msg->Location);
266 fprintf(stdout, _(" folder: %d"),msg->folder);
267 if ( msg-> SMSData) fprintf(stdout, _(" SMSData true\n"));
268 else fprintf(stdout, _(" SMSData false\n"));
270 /* RTH: unread sms from folder 0 to INBOX */
271 phoneMonitor.sms.messages = g_slist_append (phoneMonitor.sms.messages, msg);
272 phoneMonitor.sms.number++;
273 phoneMonitor.sms.number2++;
274 pthread_mutex_unlock (&smsMutex);
275 if (phoneMonitor.sms.number2 == number) return;
277 case GE_SMSTOOLONG: /* Picture Image in 7110 comp phone */
279 phoneMonitor.sms.number2++;
280 if (phoneMonitor.sms.number2 == number) return;
291 static gint A_GetMemoryStatus (gpointer data)
294 D_MemoryStatus *ms = (D_MemoryStatus *) data;
296 error = ms->status = GE_UNKNOWN;
300 pthread_mutex_lock (&memoryMutex);
301 error = ms->status = GSM->GetMemoryStatus (&(ms->memoryStatus));
302 pthread_cond_signal (&memoryCond);
303 pthread_mutex_unlock (&memoryMutex);
310 static gint A_GetMemoryLocation (gpointer data)
313 D_MemoryLocation *ml = (D_MemoryLocation *) data;
315 error = ml->status = GE_UNKNOWN;
319 pthread_mutex_lock (&memoryMutex);
320 error = ml->status = GSM->GetMemoryLocation (ml->entry);
321 pthread_cond_signal (&memoryCond);
322 pthread_mutex_unlock (&memoryMutex);
329 static gint A_GetMemoryLocationAll (gpointer data)
331 GSM_PhonebookEntry entry;
333 D_MemoryLocationAll *mla = (D_MemoryLocationAll *) data;
337 error = mla->status = GE_NONE;
338 entry.MemoryType = mla->type;
340 pthread_mutex_lock (&memoryMutex);
341 for (i = mla->min; i <= mla->max; i++)
344 if (readed<mla->used) {
345 error = GSM->GetMemoryLocation (&entry);
346 if (error != GE_NONE)
350 while (error != GE_NONE &&
351 error != GE_INVALIDPHBOOKLOCATION && error != GE_UNKNOWN) //n7110.c
353 g_print (_("%s: line %d: Can't get memory entry number %d from memory %d! %d\n"),
354 __FILE__, __LINE__, i, entry.MemoryType, error);
359 pthread_cond_signal (&memoryCond);
360 pthread_mutex_unlock (&memoryMutex);
364 error = GSM->GetMemoryLocation (&entry);
369 if (strcmp(entry.Number, "\0") || strcmp(entry.Name, "\0"))
373 entry.Number[0]='\0';
377 error = mla->InsertEntry (&entry);
378 if (error != GE_NONE)
382 pthread_cond_signal (&memoryCond);
383 pthread_mutex_unlock (&memoryMutex);
388 static gint A_WriteMemoryLocation (gpointer data)
391 D_MemoryLocation *ml = (D_MemoryLocation *) data;
393 error = ml->status = GE_UNKNOWN;
397 pthread_mutex_lock (&memoryMutex);
398 error = ml->status = GSM->WritePhonebookLocation (ml->entry);
399 pthread_cond_signal (&memoryCond);
400 pthread_mutex_unlock (&memoryMutex);
407 static gint A_WriteMemoryLocationAll (gpointer data)
409 /* GSM_PhonebookEntry entry; */
411 D_MemoryLocationAll *mla = (D_MemoryLocationAll *) data;
414 error = mla->status = GE_NONE;
415 /* entry.MemoryType = mla->type;
417 pthread_mutex_lock (&memoryMutex);
418 for (i = mla->min; i <= mla->max; i++)
421 error = GSM->GetMemoryLocation (&entry);
422 if (error != GE_NONE)
426 while (error != GE_NONE)
428 g_print (_("%s: line %d: Can't get memory entry number %d from memory %d! %d\n"),
429 __FILE__, __LINE__, i, entry.MemoryType, error);
434 pthread_cond_signal (&memoryCond);
435 pthread_mutex_unlock (&memoryMutex);
439 error = GSM->GetMemoryLocation (&entry);
443 error = mla->InsertEntry (&entry);
444 if (error != GE_NONE)
448 pthread_cond_signal (&memoryCond);
449 pthread_mutex_unlock (&memoryMutex); */
454 static gint A_GetCalendarNote (gpointer data)
457 D_CalendarNote *cn = (D_CalendarNote *) data;
459 error = cn->status = GE_UNKNOWN;
463 pthread_mutex_lock (&calendarMutex);
464 error = cn->status = GSM->GetCalendarNote (cn->entry);
465 pthread_cond_signal (&calendarCond);
466 pthread_mutex_unlock (&calendarMutex);
473 static gint A_GetCalendarNoteAll (gpointer data)
475 GSM_CalendarNote entry;
476 D_CalendarNoteAll *cna = (D_CalendarNoteAll *) data;
480 pthread_mutex_lock (&calendarMutex);
483 entry.Location = i++;
485 if ((e = GSM->GetCalendarNote (&entry)) != GE_NONE)
488 if (cna->InsertEntry (&entry) != GE_NONE)
492 pthread_mutex_unlock (&calendarMutex);
494 if (e == GE_INVALIDCALNOTELOCATION)
500 static gint A_WriteCalendarNote (gpointer data)
503 D_CalendarNote *cn = (D_CalendarNote *) data;
505 error = cn->status = GE_UNKNOWN;
509 pthread_mutex_lock (&calendarMutex);
510 error = cn->status = GSM->WriteCalendarNote (cn->entry);
511 pthread_cond_signal (&calendarCond);
512 pthread_mutex_unlock (&calendarMutex);
519 static gint A_DeleteCalendarNote (gpointer data)
521 GSM_CalendarNote *note = (GSM_CalendarNote *) data;
522 GSM_Error error = GE_UNKNOWN;
526 error = GSM->DeleteCalendarNote (note);
533 static gint A_GetCallerGroup (gpointer data)
537 D_CallerGroup *cg = (D_CallerGroup *) data;
539 error = cg->status = GE_UNKNOWN;
543 bitmap.type = GSM_CallerLogo;
544 bitmap.number = cg->number;
546 pthread_mutex_lock (&callerGroupMutex);
547 error = cg->status = GSM->GetBitmap (&bitmap);
548 strncpy (cg->text, bitmap.text, 256);
549 cg->text[255] = '\0';
550 pthread_cond_signal (&callerGroupCond);
551 pthread_mutex_unlock (&callerGroupMutex);
558 static gint A_SendCallerGroup (gpointer data)
561 D_CallerGroup *cg = (D_CallerGroup *) data;
567 bitmap.type = GSM_CallerLogo;
568 bitmap.number = cg->number;
569 if ((error = GSM->GetBitmap (&bitmap)) != GE_NONE)
574 strncpy (bitmap.text, cg->text, 256);
575 bitmap.text[255] = '\0';
577 return (GSM->SetBitmap (&bitmap));
581 static gint A_GetSMSCenter (gpointer data)
583 D_SMSCenter *c = (D_SMSCenter *) data;
586 error = c->status = GE_UNKNOWN;
589 pthread_mutex_lock (&smsCenterMutex);
590 error = c->status = GSM->GetSMSCenter (c->center);
591 pthread_cond_signal (&smsCenterCond);
592 pthread_mutex_unlock (&smsCenterMutex);
599 static gint A_SetSMSCenter (gpointer data)
601 D_SMSCenter *c = (D_SMSCenter *) data;
604 error = c->status = GE_UNKNOWN;
607 //pthread_mutex_lock (&smsCenterMutex);
608 error = c->status = GSM->SetSMSCenter (c->center);
610 //pthread_cond_signal (&smsCenterCond);
611 //pthread_mutex_unlock (&smsCenterMutex);
618 static gint A_SendSMSMessage (gpointer data)
620 D_SMSMessage *d = (D_SMSMessage *) data;
623 error = d->status = GE_UNKNOWN;
626 pthread_mutex_lock (&sendSMSMutex);
627 error = d->status = GSM->SendSMSMessage (d->sms);
628 pthread_cond_signal (&sendSMSCond);
629 pthread_mutex_unlock (&sendSMSMutex);
632 if (d->status == GE_SMSSENDOK)
639 static gint A_DeleteSMSMessage (gpointer data)
641 GSM_SMSMessage *sms = (GSM_SMSMessage *) data;
642 GSM_Error error = GE_UNKNOWN;
646 error = GSM->DeleteSMSMessage(sms);
654 static gint A_GetSpeedDial (gpointer data)
656 D_SpeedDial *d = (D_SpeedDial *) data;
659 error = d->status = GE_UNKNOWN;
663 pthread_mutex_lock (&speedDialMutex);
664 error = d->status = GSM->GetSpeedDial (&(d->entry));
665 pthread_cond_signal (&speedDialCond);
666 pthread_mutex_unlock (&speedDialMutex);
673 static gint A_SendSpeedDial (gpointer data)
675 D_SpeedDial *d = (D_SpeedDial *) data;
678 error = d->status = GE_UNKNOWN;
682 //pthread_mutex_lock (&speedDialMutex);
683 error = d->status = GSM->SetSpeedDial (&(d->entry));
685 //pthread_cond_signal (&speedDialCond);
686 //pthread_mutex_unlock (&speedDialMutex);
693 static gint A_SendDTMF (gpointer data)
695 gchar *buf = (gchar *) data;
696 GSM_Error error = GE_UNKNOWN;
700 error = GSM->SendDTMF (buf);
708 static gint A_NetMonOnOff (gpointer data)
711 gint mode = GPOINTER_TO_INT (data);
712 GSM_Error error = GE_UNKNOWN;
715 error = GSM->NetMonitor (0xf3, screen);
717 error = GSM->NetMonitor (0xf1, screen);
723 static gint A_NetMonitor (gpointer data)
725 gint number = GPOINTER_TO_INT (data);
728 phoneMonitor.netmonitor.number = 0;
730 phoneMonitor.netmonitor.number = number;
736 static gint A_DialVoice (gpointer data)
738 gchar *number = (gchar *) data;
739 GSM_Error error = GE_UNKNOWN;
743 error = GSM->DialVoice (number);
751 static gint A_GetAlarm (gpointer data)
753 D_Alarm *a = (D_Alarm *) data;
756 error = a->status = GE_UNKNOWN;
760 pthread_mutex_lock (&alarmMutex);
761 error = a->status = GSM->GetAlarm (0, &(a->time));
762 pthread_cond_signal (&alarmCond);
763 pthread_mutex_unlock (&alarmMutex);
770 static gint A_SetAlarm (gpointer data)
772 D_Alarm *a = (D_Alarm *) data;
775 error = a->status = GE_UNKNOWN;
779 error = a->status = GSM->SetAlarm (0, &(a->time));
787 static gint A_SendKeyStroke (gpointer data)
789 gchar *buf = (gchar *) data;
793 GSM->PressKey(buf[1], buf[0]);
800 static gint A_GetBitmap(gpointer data) {
802 D_Bitmap *d = (D_Bitmap *)data;
804 pthread_mutex_lock(&getBitmapMutex);
805 error = d->status = GSM->GetBitmap(d->bitmap);
806 pthread_cond_signal(&getBitmapCond);
807 pthread_mutex_unlock(&getBitmapMutex);
811 static gint A_SetBitmap(gpointer data) {
813 D_Bitmap *d = (D_Bitmap *)data;
816 pthread_mutex_lock(&setBitmapMutex);
817 if (d->bitmap->type == GSM_CallerLogo) {
818 bitmap.type = d->bitmap->type;
819 bitmap.number = d->bitmap->number;
820 error = d->status = GSM->GetBitmap(&bitmap);
821 if (error == GE_NONE) {
822 strncpy(d->bitmap->text,bitmap.text,sizeof(bitmap.text));
823 d->bitmap->ringtone = bitmap.ringtone;
824 error = d->status = GSM->SetBitmap(d->bitmap);
827 error = d->status = GSM->SetBitmap(d->bitmap);
829 pthread_cond_signal(&setBitmapCond);
830 pthread_mutex_unlock(&setBitmapMutex);
834 static gint A_GetNetworkInfo(gpointer data) {
836 D_NetworkInfo *d = (D_NetworkInfo *)data;
838 pthread_mutex_lock(&getNetworkInfoMutex);
839 error = d->status = GSM->GetNetworkInfo(d->info);
840 pthread_cond_signal(&getNetworkInfoCond);
841 pthread_mutex_unlock(&getNetworkInfoMutex);
845 static gint A_Exit (gpointer data)
848 return (0); /* just to be proper */
852 gint (*DoAction[])(gpointer) = {
855 A_GetMemoryLocationAll,
856 A_WriteMemoryLocation,
857 A_WriteMemoryLocationAll,
859 A_GetCalendarNoteAll,
861 A_DeleteCalendarNote,
883 void *GUI_Connect (void *a)
885 /* Define required unit types for RF and Battery level meters. */
886 GSM_RFUnits rf_units = GRF_Arbitrary;
887 GSM_BatteryUnits batt_units = GBU_Arbitrary;
890 gchar number[INCALL_NUMBER_LENGTH];
891 PhoneEvent *event=NULL;
897 g_print ("Initializing connection...\n");
900 phoneMonitor.working = _("Connecting...");
901 while (!fbusinit (true))
905 g_print ("Phone connected. Starting monitoring...\n");
911 phoneMonitor.working = _("Working...");
913 phoneMonitor.working = NULL;
915 if (GSM->GetRFLevel (&rf_units, &phoneMonitor.rfLevel) != GE_NONE)
916 phoneMonitor.rfLevel = -1;
918 if (rf_units == GRF_Arbitrary)
919 phoneMonitor.rfLevel *= 25;
921 if (GSM->GetPowerSource (&phoneMonitor.powerSource) == GE_NONE
922 && phoneMonitor.powerSource == GPS_ACDC)
923 phoneMonitor.batteryLevel = ((gint) phoneMonitor.batteryLevel + 25) % 125;
926 if (GSM->GetBatteryLevel (&batt_units, &phoneMonitor.batteryLevel) != GE_NONE)
927 phoneMonitor.batteryLevel = -1;
928 if (batt_units == GBU_Arbitrary)
929 phoneMonitor.batteryLevel *= 25;
932 if (GSM->GetAlarm (0, &Alarm) == GE_NONE && Alarm.IsSet != 0)
933 phoneMonitor.alarm = TRUE;
935 phoneMonitor.alarm = FALSE;
937 if (GSM->GetIncomingCallNr (number) == GE_NONE)
940 g_print ("Call in progress: %s\n", phoneMonitor.call.callNum);
943 if (GSM->GetDisplayStatus (&status)==GE_NONE) {
944 if (status & (1<<DS_Call_In_Progress))
946 pthread_mutex_lock (&callMutex);
947 phoneMonitor.call.callInProgress = CS_InProgress;
948 pthread_mutex_unlock (&callMutex);
952 pthread_mutex_lock (&callMutex);
953 phoneMonitor.call.callInProgress = CS_Waiting;
954 strncpy (phoneMonitor.call.callNum, number, INCALL_NUMBER_LENGTH);
955 pthread_mutex_unlock (&callMutex);
958 pthread_mutex_lock (&callMutex);
959 phoneMonitor.call.callInProgress = CS_Idle;
960 *phoneMonitor.call.callNum = '\0';
961 pthread_mutex_unlock (&callMutex);
966 pthread_mutex_lock (&callMutex);
967 phoneMonitor.call.callInProgress = CS_Idle;
968 *phoneMonitor.call.callNum = '\0';
969 pthread_mutex_unlock (&callMutex);
972 pthread_mutex_lock (&netMonMutex);
973 if (phoneMonitor.netmonitor.number)
975 GSM->NetMonitor (phoneMonitor.netmonitor.number,
976 phoneMonitor.netmonitor.screen);
977 GSM->NetMonitor (3, phoneMonitor.netmonitor.screen3);
978 GSM->NetMonitor (4, phoneMonitor.netmonitor.screen4);
979 GSM->NetMonitor (5, phoneMonitor.netmonitor.screen5);
983 *phoneMonitor.netmonitor.screen = *phoneMonitor.netmonitor.screen3 =
984 *phoneMonitor.netmonitor.screen4 = *phoneMonitor.netmonitor.screen5 = '\0';
986 pthread_mutex_unlock (&netMonMutex);
988 while ((event = RemoveEvent ()) != NULL)
991 g_print ("Processing Event: %d\n", event->event);
993 phoneMonitor.working = _("Working...");
994 if (event->event <= Event_Exit)
995 if ((error = DoAction[event->event] (event->data)) != GE_NONE)
996 g_print (_("Event %d failed with return code %d!\n"), event->event, error);