Update: orig2001_12_04_22_45 -> orig2001_12_14_20_46
[gnokii.git] / common / phones / atsie.c
1 /*
2
3   $Id$
4
5   G N O K I I
6
7   A Linux/Unix toolset and driver for mobile phones.
8
9   Copyright 2001 Manfred Jonsson <manfred.jonsson@gmx.de>
10
11   Released under the terms of the GNU GPL, see file COPYING for more details.
12
13   This file provides functions specific to at commands on siemens
14   phones. See README for more details on supported mobile phones.
15
16   $Log$
17   Revision 1.1.1.1  2001/11/25 21:59:14  short
18   :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
19
20   Revision 1.1  2001/11/19 13:03:18  pkot
21   nk3110.c cleanup
22
23 */
24
25 #include <string.h>
26 #include <stdlib.h>
27 #include <ctype.h>
28
29 #include "misc.h"
30 #include "gsm-common.h"
31 #include "gsm-statemachine.h"
32 #include "phones/generic.h"
33 #include "phones/atgen.h"
34 #include "phones/atsie.h"
35 #include "links/atbus.h"
36 #include "links/cbus.h"
37
38
39 AT_SendFunctionType writephonebook;
40
41
42 static GSM_Error WritePhonebook(GSM_Data *data,  GSM_Statemachine *state)
43 {
44         GSM_PhonebookEntry newphone;
45         char *rptr, *wptr;
46
47         if (writephonebook == NULL)
48                 return GE_UNKNOWN;
49         if (data->PhonebookEntry != NULL) {
50                 memcpy(&newphone, data->PhonebookEntry, sizeof(GSM_PhonebookEntry));
51                 rptr = data->PhonebookEntry->Name;
52                 wptr = newphone.Name;
53                 data->PhonebookEntry = &newphone;
54         }
55         return (*writephonebook)(data, state);
56 }
57
58
59 void AT_InitSiemens(GSM_Statemachine *state, char *foundmodel, char *setupmodel) {
60         /* names for s35 etc must be escaped */
61 /*
62         if (foundmodel && !strncasecmp("35", foundmodel + 1, 2))
63                 writephonebook = AT_InsertSendFunction(GOP_WritePhonebook, WritePhonebook);
64 */
65 }