This commit was manufactured by cvs2svn to create branch 'uc'.
[gnokii.git] / include / newmodules / newat.h
1 /*
2
3   G N O K I I
4
5   A Linux/Unix toolset and driver for Nokia mobile phones.
6
7   Released under the terms of the GNU GPL, see file COPYING for more details.
8
9   Header file for the various functions, definitions etc. used to implement
10   the handset interface.  See fbus-at.c for more details.
11
12 */
13
14 #ifndef __n_at_h
15 #define __n_at_h
16
17 #include "gsm-api.h"
18
19 /* Global variables */
20 extern bool            Nat_LinkOK;
21 extern GSM_Functions   Nat_Functions;
22 extern GSM_Information Nat_Information;
23
24 /* Prototypes for the functions designed to be used externally. */
25 GSM_Error Nat_Initialise(char *port_device, char *initlength,
26                           GSM_ConnectionType connection,
27                           void (*rlp_callback)(RLP_F96Frame *frame));
28
29 void      Nat_DispatchMessage(u16 MessageLength, u8 *MessageBuffer,
30                               u8 MessageType);
31
32 GSM_Error Nat_DialVoice(char *Number);
33 GSM_Error Nat_CancelCall(void);
34
35 GSM_Error Nat_SetDateTime(GSM_DateTime *date_time);
36 GSM_Error Nat_GetDateTime(GSM_DateTime *date_time);
37
38 GSM_Error Nat_GetAlarm(int alarm_number, GSM_DateTime *date_time);
39
40 GSM_Error Nat_SendDTMF(char *String);
41
42 GSM_Error Nat_GetSMSMessage(GSM_SMSMessage *message);
43 GSM_Error Nat_SaveSMSMessage(GSM_SMSMessage *message);
44 GSM_Error Nat_DeleteSMSMessage(GSM_SMSMessage *message);
45 GSM_Error Nat_GetSMSStatus(GSM_SMSStatus *Status);
46 GSM_Error Nat_SendSMSMessage(GSM_SMSMessage *message);
47
48 GSM_Error Nat_EnterSecurityCode(GSM_SecurityCode SecurityCode);
49 GSM_Error Nat_GetSecurityCodeStatus(int *Status);
50 GSM_Error Nat_GetSecurityCodeStatus(int *Status);
51
52 GSM_Error Nat_GetMemoryLocation(GSM_PhonebookEntry *entry);
53 GSM_Error Nat_WritePhonebookLocation(GSM_PhonebookEntry * entry);
54 GSM_Error Nat_GetMemoryStatus(GSM_MemoryStatus *Status);
55
56 GSM_Error Nat_GetBatteryLevel(GSM_BatteryUnits *units, float *level);
57 GSM_Error Nat_GetRFLevel(GSM_RFUnits *units, float *level);
58 GSM_Error Nat_GetPowerSource(GSM_PowerSource * source);
59
60 GSM_Error Nat_GetSMSCenter(GSM_MessageCenter *MessageCenter);
61 GSM_Error Nat_SetSMSCenter(GSM_MessageCenter *MessageCenter);
62
63 GSM_Error Nat_GetNetworkInfo(GSM_NetworkInfo *NetworkInfo);
64
65 GSM_Error Nat_GetManufacturer(char* manufacturer);
66
67 GSM_Error Nat_CallDivert(GSM_CallDivert *cd);
68
69 /* FIXME: not functional or returns errors with tested AT implementation */
70 GSM_Error Nat_GetDisplayStatus(int *Status);
71 GSM_Error Nat_PressKey(int key, int event);
72 GSM_Error Nat_SetAlarm(int alarm_number, GSM_DateTime *date_time);
73
74 struct AT_OneReply {
75   char *ReplyString;
76   void (*ReplyFunction) (u16 message_length, u8 *buffer, u8 message_type);
77 };
78
79 #endif /* __n_at_h */