summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/phone/nokia/nfunc.h
blob: 5ba3df0e0ad891b609605d4cd16225ca2401bfbd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* (c) 2002-2004 by Marcin Wiacek */

#ifndef phone_nokia_h
#define phone_nokia_h

#include "ncommon.h"
#include "../../gsmcomon.h"
#include "../../gsmstate.h"

extern unsigned char N71_65_MEMORY_TYPES[];
extern GSM_Profile_PhoneTableValue Profile71_65[];

GSM_Error NOKIA_ReplyGetPhoneString		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplyGetMemoryError		(unsigned char error     , GSM_StateMachine *s);
GSM_Error N71_65_ReplyWritePhonebook		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplyGetCalendarInfo1		(GSM_Protocol_Message msg, GSM_StateMachine *s, GSM_NOKIACalToDoLocations *LastCalendar);
GSM_Error N71_65_ReplyGetNextCalendar1		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplyGetCalendarNotePos1	(GSM_Protocol_Message msg, GSM_StateMachine *s,int *FirstCalendarPos);
GSM_Error N71_65_ReplyAddCalendar1		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplyAddCalendar2		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplyDelCalendar		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplyCallInfo			(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplyUSSDInfo			(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplyCallDivert		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplyGetActiveConnectSet	(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplySetActiveConnectSet	(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplyGetWAPBookmark		(GSM_Protocol_Message msg, GSM_StateMachine *s, bool FullLength);
GSM_Error DCT3DCT4_ReplySetWAPBookmark		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplyDelWAPBookmark		(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplyEnableConnectFunc	(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplyDisableConnectFunc      (GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error DCT3DCT4_ReplyGetModelFirmware	(GSM_Protocol_Message msg, GSM_StateMachine *s);
GSM_Error N71_65_ReplySendDTMF			(GSM_Protocol_Message msg, GSM_StateMachine *s);
  
GSM_Error NOKIA_GetManufacturer			(GSM_StateMachine *s);
GSM_Error NOKIA_GetPhoneString			(GSM_StateMachine *s, unsigned char *msgframe, int msglen, unsigned char msgtype, char *retvalue, GSM_Phone_RequestID request, int startresponse);
GSM_Error NOKIA_SetIncomingSMS			(GSM_StateMachine *s, bool enable);
GSM_Error NOKIA_SetIncomingCall			(GSM_StateMachine *s, bool enable);
GSM_Error NOKIA_SetIncomingUSSD			(GSM_StateMachine *s, bool enable);
GSM_Error N71_65_EnableFunctions		(GSM_StateMachine *s, char *buff,int len);
GSM_Error N71_65_GetNextCalendar1		(GSM_StateMachine *s, GSM_CalendarEntry *Note, bool start, GSM_NOKIACalToDoLocations *LastCalendar, int *LastCalendarYear, int *LastCalendarPos);
GSM_Error N71_65_AddCalendar2			(GSM_StateMachine *s, GSM_CalendarEntry *Note);
GSM_Error N71_65_AddCalendar1			(GSM_StateMachine *s, GSM_CalendarEntry *Note, int *FirstCalendarPos);
GSM_Error N71_65_DelCalendar			(GSM_StateMachine *s, GSM_CalendarEntry *Note);
GSM_Error N71_65_GetCalendarInfo1		(GSM_StateMachine *s, GSM_NOKIACalToDoLocations *LastCalendar);
GSM_Error DCT3DCT4_EnableWAPFunctions		(GSM_StateMachine *s);
GSM_Error DCT3DCT4_SendDTMF			(GSM_StateMachine *s, char *sequence);
GSM_Error DCT3DCT4_DeleteWAPBookmarkPart	(GSM_StateMachine *s, GSM_WAPBookmark *bookmark);
GSM_Error DCT3DCT4_GetWAPBookmarkPart		(GSM_StateMachine *s, GSM_WAPBookmark *bookmark);
GSM_Error DCT3DCT4_DisableConnectionFunctions	(GSM_StateMachine *s);
GSM_Error DCT3DCT4_GetModel			(GSM_StateMachine *s);
GSM_Error DCT3DCT4_GetFirmware			(GSM_StateMachine *s);
GSM_Error DCT3DCT4_AnswerCall			(GSM_StateMachine *s, int ID);
GSM_Error DCT3DCT4_CancelCall			(GSM_StateMachine *s, int ID);
GSM_Error DCT3DCT4_GetActiveConnectSet		(GSM_StateMachine *s);
GSM_Error DCT3DCT4_SetActiveConnectSet		(GSM_StateMachine *s, GSM_MultiWAPSettings *settings);
GSM_Error DCT3DCT4_CancelAllDiverts		(GSM_StateMachine *s);
GSM_Error DCT3DCT4_SetCallDivert		(GSM_StateMachine *s, GSM_MultiCallDivert *divert);
GSM_Error DCT3DCT4_GetCallDivert		(GSM_StateMachine *s, GSM_MultiCallDivert *divert);

GSM_CalendarNoteType N71_65_FindCalendarType(GSM_CalendarNoteType Type, OnePhoneModel *model);
void 		N71_65_GetCalendarRecurrance	(GSM_StateMachine *s, unsigned char *buffer, GSM_CalendarEntry *entry);
int 		NOKIA_SetUnicodeString		(GSM_StateMachine *s, unsigned char *dest, unsigned char *string, bool FullLength);
void 		NOKIA_GetUnicodeString		(GSM_StateMachine *s, int *current, unsigned char *input, unsigned char *output, bool FullLength);
GSM_MemoryType 	NOKIA_GetMemoryType 		(GSM_StateMachine *s, GSM_MemoryType memory_type, unsigned char *ID);
void 		NOKIA_DecodeSMSState		(GSM_StateMachine *s, unsigned char state, GSM_SMSMessage *sms);
void		NOKIA_EncodeDateTime		(GSM_StateMachine *s, unsigned char* buffer, GSM_DateTime *datetime);
void		NOKIA_DecodeDateTime		(GSM_StateMachine *s, unsigned char* buffer, GSM_DateTime *datetime);
void 		NOKIA_SortSMSFolderStatus	(GSM_StateMachine *s, GSM_NOKIASMSFolder *Folder);
void 		NOKIA_GetDefaultCallerGroupName	(GSM_StateMachine *s, GSM_Bitmap *Bitmap);
void 		NOKIA_GetDefaultProfileName	(GSM_StateMachine *s, GSM_Profile *Profile);
void NOKIA_FindFeatureValue(GSM_StateMachine		*s,
			    GSM_Profile_PhoneTableValue ProfileTable[],
  			    unsigned char 		ID,
  			    unsigned char 		Value,
  			    GSM_Phone_Data 		*Data,
  			    bool			CallerGroups);
bool NOKIA_FindPhoneFeatureValue(GSM_StateMachine		*s,
				 GSM_Profile_PhoneTableValue 	ProfileTable[],
  				 GSM_Profile_Feat_ID		FeatureID,
  				 GSM_Profile_Feat_Value		FeatureValue,
  			    	 unsigned char 			*PhoneID,
  			    	 unsigned char 			*PhoneValue);
  
GSM_Error N71_65_DecodePhonebook		(GSM_StateMachine	*s,
						 GSM_MemoryEntry 	*entry,
  				 		 GSM_Bitmap 		*bitmap,
  				 		 GSM_SpeedDial 		*speed,
  				 		 unsigned char 		*MessageBuffer,
  				 		 int 			MessageLength,
						 bool			DayMonthReverse);
int 		N71_65_EncodePhonebookFrame	(GSM_StateMachine *s, unsigned char *req, GSM_MemoryEntry entry, int *block2, bool DCT4, bool VoiceTag);
int 		N71_65_PackPBKBlock		(GSM_StateMachine *s, int id, int size, int no, unsigned char *buf, unsigned char *block);

#endif

/* How should editor hadle tabs in this file? Add editor commands here.
 * vim: noexpandtab sw=8 ts=8 sts=8:
 */