6 A Linux/Unix toolset and driver for Nokia mobile phones.
8 Copyright (C) 2000 Hugh Blemings & Pavel Janík ml.
9 Copyright (C) 2001 Pawe³ Kot <pkot@linuxnews.pl>
11 Released under the terms of the GNU GPL, see file COPYING for more details.
13 This file provides functions specific to the 6100/5100 series.
14 See README for more details on supported mobile phones.
17 Revision 1.1.1.2 2002/04/03 00:08:20 short
18 Found in "gnokii-working" directory, some November-patches version
20 Revision 1.1 2001/07/09 23:55:36 pkot
21 Initial support for 6100 series in the new structure (me)
25 #ifndef __phones_nk6100_h
26 #define __phones_nk6100_h
28 #include <gsm-common.h>
29 #include "gsm-statemachine.h"
31 /* Phone Memory types */
33 #define P6100_MEMORY_MT 0x09 /* ?? combined ME and SIM phonebook */
34 #define P6100_MEMORY_ME 0x05 /* ME (Mobile Equipment) phonebook */
35 #define P6100_MEMORY_SM 0x06 /* SIM phonebook */
36 #define P6100_MEMORY_FD 0x04 /* ?? SIM fixdialling-phonebook */
37 #define P6100_MEMORY_ON 0x07 /* ?? SIM (or ME) own numbers list */
38 #define P6100_MEMORY_EN 0x08 /* ?? SIM (or ME) emergency number */
39 #define P6100_MEMORY_DC 0x01 /* ME dialled calls list */
40 #define P6100_MEMORY_RC 0x03 /* ME received calls list */
41 #define P6100_MEMORY_MC 0x02 /* ME missed (unanswered received) calls list */
42 #define P6100_MEMORY_VOICE 0x0b /* Voice Mailbox */
43 /* This is used when the memory type is unknown. */
44 #define P6100_MEMORY_XX 0xff
46 #ifdef __phones_nk6100_c /* Prototype functions for phone-6100.c only */
48 static GSM_Error Functions(GSM_Operation op, GSM_Data *data, GSM_Statemachine *state);
49 static GSM_Error Initialise(GSM_Statemachine *state);
50 static GSM_Error GetModelName(GSM_Data *data, GSM_Statemachine *state);
51 static GSM_Error GetRevision(GSM_Data *data, GSM_Statemachine *state);
52 static GSM_Error GetIMEI(GSM_Data *data, GSM_Statemachine *state);
53 static GSM_Error Identify(GSM_Data *data, GSM_Statemachine *state);
54 static GSM_Error GetBatteryLevel(GSM_Data *data, GSM_Statemachine *state);
55 static GSM_Error GetRFLevel(GSM_Data *data, GSM_Statemachine *state);
56 static GSM_Error GetMemoryStatus(GSM_Data *data, GSM_Statemachine *state);
57 static GSM_Error IncomingPhoneInfo(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
58 static GSM_Error IncomingModelInfo(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
59 static GSM_Error Incoming0x03(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
60 static GSM_Error Incoming0x0a(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
61 static GSM_Error Incoming0x17(int messagetype, unsigned char *buffer, int length, GSM_Data *data);
64 static int GetMemoryType(GSM_MemoryType memory_type);
66 #endif /* #ifdef __phones_nk6100_c */
68 #endif /* #ifndef __phones_nk6100_h */