7 A Linux/Unix toolset and driver for mobile phones.
9 Copyright 2001 Manfred Jonsson <manfred.jonsson@gmx.de>
11 Released under the terms of the GNU GPL, see file COPYING for more details.
13 This file provides functions specific to at commands on siemens
14 phones. See README for more details on supported mobile phones.
17 Revision 1.1.1.1.10.1 2001/12/14 21:32:51 short
18 Fixed fatal linker error (global symbol conflict of "writephonebook")
20 Revision 1.1.1.1 2001/11/25 21:59:14 short
21 :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
23 Revision 1.1 2001/11/19 13:03:18 pkot
33 #include "gsm-common.h"
34 #include "gsm-statemachine.h"
35 #include "phones/generic.h"
36 #include "phones/atgen.h"
37 #include "phones/atsie.h"
38 #include "links/atbus.h"
39 #include "links/cbus.h"
42 static AT_SendFunctionType writephonebook;
45 static GSM_Error WritePhonebook(GSM_Data *data, GSM_Statemachine *state)
47 GSM_PhonebookEntry newphone;
50 if (writephonebook == NULL)
52 if (data->PhonebookEntry != NULL) {
53 memcpy(&newphone, data->PhonebookEntry, sizeof(GSM_PhonebookEntry));
54 rptr = data->PhonebookEntry->Name;
56 data->PhonebookEntry = &newphone;
58 return (*writephonebook)(data, state);
62 void AT_InitSiemens(GSM_Statemachine *state, char *foundmodel, char *setupmodel) {
63 /* names for s35 etc must be escaped */
65 if (foundmodel && !strncasecmp("35", foundmodel + 1, 2))
66 writephonebook = AT_InsertSendFunction(GOP_WritePhonebook, WritePhonebook);