Found in "gnokii-working" directory, some November-patches version
[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.2  2002/04/03 00:08:20  short
18   Found in "gnokii-working" directory, some November-patches version
19
20   Revision 1.1  2001/07/09 23:55:36  pkot
21   Initial support for 6100 series in the new structure (me)
22
23 */
24
25 #ifndef __phones_nk6100_h
26 #define __phones_nk6100_h
27
28 #include <gsm-common.h>
29 #include "gsm-statemachine.h"
30
31 /* Phone Memory types */
32
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
45
46 #ifdef __phones_nk6100_c  /* Prototype functions for phone-6100.c only */
47
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);
62
63
64 static int GetMemoryType(GSM_MemoryType memory_type);
65
66 #endif  /* #ifdef __phones_nk6100_c */
67
68 #endif  /* #ifndef __phones_nk6100_h */