7 A Linux/Unix toolset and driver for Nokia mobile phones.
9 Copyright (C) 1999, 2000 Hugh Blemings & Pavel JanÃk ml.
11 Released under the terms of the GNU GPL, see file COPYING for more details.
13 Header file for 640 code.
16 Revision 1.1.1.1 2001/11/25 21:59:20 short
17 :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
19 Revision 1.10 2001/06/28 00:28:46 pkot
20 Small docs updates (Pawel Kot)
28 #ifndef __gsm_common_h
29 #include "gsm-common.h" /* Needed for GSM_Error etc. */
32 /* Global variables */
33 extern bool MB640_LinkOK;
34 extern GSM_Functions MB640_Functions;
35 extern GSM_Information MB640_Information;
38 /* Prototypes for the functions designed to be used externally. */
39 GSM_Error MB640_Initialise(char *port_device, char *initlength,
40 GSM_ConnectionType connection,
41 void (*rlp_callback)(RLP_F96Frame *frame));
43 void MB640_Terminate(void);
45 int MB640_GetMemoryType(GSM_MemoryType memory_type);
47 GSM_Error MB640_GetMemoryLocation(GSM_PhonebookEntry *entry);
49 GSM_Error MB640_WritePhonebookLocation(GSM_PhonebookEntry *entry);
51 GSM_Error MB640_GetSpeedDial(GSM_SpeedDial *entry);
53 GSM_Error MB640_SetSpeedDial(GSM_SpeedDial *entry);
55 GSM_Error MB640_GetMemoryStatus(GSM_MemoryStatus *Status);
57 GSM_Error MB640_GetSMSStatus(GSM_SMSStatus *Status);
58 GSM_Error MB640_GetSMSCenter(GSM_MessageCenter *MessageCenter);
59 GSM_Error MB640_GetSMSMessage(GSM_SMSMessage *message);
61 GSM_Error MB640_GetSMSCenter(GSM_MessageCenter *MessageCenter);
62 GSM_Error MB640_SetSMSCenter(GSM_MessageCenter *MessageCenter);
64 GSM_Error MB640_DeleteSMSMessage(GSM_SMSMessage *message);
66 GSM_Error MB640_SendSMSMessage(GSM_SMSMessage *SMS, int data_size);
67 GSM_Error MB640_SaveSMSMessage(GSM_SMSMessage *SMS);
69 GSM_Error MB640_GetRFLevel(GSM_RFUnits *units, float *level);
71 GSM_Error MB640_GetBatteryLevel(GSM_BatteryUnits *units, float *level);
73 /* These aren't presently implemented. */
74 GSM_Error MB640_GetPowerSource(GSM_PowerSource *source);
75 GSM_Error MB640_GetDisplayStatus(int *Status);
77 GSM_Error MB640_EnterSecurityCode(GSM_SecurityCode SecurityCode);
78 GSM_Error MB640_GetSecurityCodeStatus(int *Status);
80 GSM_Error MB640_GetIMEI(char *imei);
81 GSM_Error MB640_GetRevision(char *revision);
82 GSM_Error MB640_GetModel(char *model);
83 GSM_Error MB640_GetDateTime(GSM_DateTime *date_time);
84 GSM_Error MB640_SetDateTime(GSM_DateTime *date_time);
85 GSM_Error MB640_GetAlarm(int alarm_number, GSM_DateTime *date_time);
86 GSM_Error MB640_SetAlarm(int alarm_number, GSM_DateTime *date_time);
87 GSM_Error MB640_DialVoice(char *Number);
88 GSM_Error MB640_DialData(char *Number, char type, void (* callpassup)(char c));
89 GSM_Error MB640_GetIncomingCallNr(char *Number);
90 GSM_Error MB640_GetNetworkInfo(GSM_NetworkInfo *NetworkInfo);
91 GSM_Error MB640_GetCalendarNote(GSM_CalendarNote *CalendarNote);
92 GSM_Error MB640_WriteCalendarNote(GSM_CalendarNote *CalendarNote);
93 GSM_Error MB640_DeleteCalendarNote(GSM_CalendarNote *CalendarNote);
94 GSM_Error MB640_Netmonitor(unsigned char mode, char *Screen);
95 GSM_Error MB640_SendDTMF(char *String);
96 GSM_Error MB640_GetBitmap(GSM_Bitmap *Bitmap);
97 GSM_Error MB640_SetBitmap(GSM_Bitmap *Bitmap);
98 GSM_Error MB640_SetRingTone(GSM_Ringtone *ringtone);
99 GSM_Error MB640_SendRingTone(GSM_Ringtone *ringtone, char *dest);
100 GSM_Error MB640_Reset(unsigned char type);
101 GSM_Error MB640_GetProfile(GSM_Profile *Profile);
102 GSM_Error MB640_SetProfile(GSM_Profile *Profile);
103 bool MB640_SendRLPFrame(RLP_F96Frame *frame, bool out_dtx);
104 GSM_Error MB640_CancelCall(void);
106 GSM_Error MB640_EnableDisplayOutput();
107 GSM_Error MB640_DisableDisplayOutput();
109 GSM_Error MB640_EnableCellBroadcast ();
110 GSM_Error MB640_DisableCellBroadcast(void);
111 GSM_Error MB640_ReadCellBroadcast (GSM_CBMessage *Message);
112 /* All defines and prototypes from here down are specific to
113 this model and so are #ifdef out if __mbus_640_c isn't
117 #define MB640_MAX_MODEL_LENGTH (8)
119 /* Prototypes for internal functions. */
120 void MB640_ThreadLoop(void);
121 void MB640_SigHandler(int status);
122 bool MB640_OpenSerial(void);
123 GSM_Error MB640_SendPacket( u8 *buffer, u8 length );
126 #endif /* __mbus_640_c */
128 #endif /* __mbus_640_h */