:pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Tue Dec 4 22:45 CET 2001
[gnokii.git] / include / phones / nk6100.h
1 /*
2   $Id$
3
4   G N O K I I
5
6   A Linux/Unix toolset and driver for Nokia mobile phones.
7
8   Copyright (C) 2000 Hugh Blemings & Pavel Janík ml.
9   Copyright (C) 2001 Pawe³ Kot <pkot@linuxnews.pl>
10
11   Released under the terms of the GNU GPL, see file COPYING for more details.
12
13   This file provides functions specific to the 6100/5100 series. 
14   See README for more details on supported mobile phones.
15
16   $Log$
17   Revision 1.1.1.1  2001/11/25 21:59:22  short
18   :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
19
20   Revision 1.3  2001/11/17 16:44:07  pkot
21   Cleanup. Reading SMS for 6100 series. Not that it has some bugs more and does not support UDH yet
22
23   Revision 1.2  2001/11/15 12:15:04  pkot
24   smslib updates. begin work on sms in 6100 series
25
26   Revision 1.1  2001/07/09 23:55:36  pkot
27   Initial support for 6100 series in the new structure (me)
28
29 */
30
31 #ifndef __phones_nk6100_h
32 #define __phones_nk6100_h
33
34 #include <gsm-common.h>
35 #include "gsm-statemachine.h"
36
37 /* Phone Memory types */
38
39 #define P6100_MEMORY_MT 0x09 /* ?? combined ME and SIM phonebook */
40 #define P6100_MEMORY_ME 0x05 /* ME (Mobile Equipment) phonebook */
41 #define P6100_MEMORY_SM 0x06 /* SIM phonebook */
42 #define P6100_MEMORY_FD 0x04 /* ?? SIM fixdialling-phonebook */
43 #define P6100_MEMORY_ON 0x07 /* ?? SIM (or ME) own numbers list */
44 #define P6100_MEMORY_EN 0x08 /* ?? SIM (or ME) emergency number */
45 #define P6100_MEMORY_DC 0x01 /* ME dialled calls list */
46 #define P6100_MEMORY_RC 0x03 /* ME received calls list */
47 #define P6100_MEMORY_MC 0x02 /* ME missed (unanswered received) calls list */
48 #define P6100_MEMORY_VOICE 0x0b /* Voice Mailbox */
49 /* This is used when the memory type is unknown. */
50 #define P6100_MEMORY_XX 0xff
51
52 #ifdef __phones_nk6100_c  /* Prototype functions for phone-6100.c only */
53
54 static GSM_Error Functions(GSM_Operation op, GSM_Data *data, GSM_Statemachine *state);
55 static GSM_Error Initialise(GSM_Statemachine *state);
56 static GSM_Error GetModelName(GSM_Data *data, GSM_Statemachine *state);
57 static GSM_Error GetRevision(GSM_Data *data, GSM_Statemachine *state);
58 static GSM_Error GetIMEI(GSM_Data *data, GSM_Statemachine *state);
59 static GSM_Error Identify(GSM_Data *data, GSM_Statemachine *state);
60 static GSM_Error GetBatteryLevel(GSM_Data *data, GSM_Statemachine *state);
61 static GSM_Error GetRFLevel(GSM_Data *data, GSM_Statemachine *state);
62 static GSM_Error GetMemoryStatus(GSM_Data *data, GSM_Statemachine *state);
63 static GSM_Error GetSMSMessage(GSM_Data *data, GSM_Statemachine *state);
64 static GSM_Error IncomingPhoneInfo(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
65 static GSM_Error IncomingModelInfo(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
66 static GSM_Error IncomingSMS(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
67 static GSM_Error Incoming0x03(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
68 static GSM_Error Incoming0x0a(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
69 static GSM_Error Incoming0x17(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
70
71
72 static int GetMemoryType(GSM_MemoryType memory_type);
73
74 #endif  /* #ifdef __phones_nk6100_c */
75
76 #endif  /* #ifndef __phones_nk6100_h */