summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/phone/nokia/dct3/n7110.c
Side-by-side diff
Diffstat (limited to 'gammu/emb/common/phone/nokia/dct3/n7110.c') (more/less context) (show whitespace changes)
-rw-r--r--gammu/emb/common/phone/nokia/dct3/n7110.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gammu/emb/common/phone/nokia/dct3/n7110.c b/gammu/emb/common/phone/nokia/dct3/n7110.c
index 5a02c9c..b597f9b 100644
--- a/gammu/emb/common/phone/nokia/dct3/n7110.c
+++ b/gammu/emb/common/phone/nokia/dct3/n7110.c
@@ -1,26 +1,29 @@
/* (c) 2001-2004 by Marcin Wiacek */
-/* based on some work from Markus Plail and Gnokii */
+/* based on some Markus Plail work from Gnokii (www.gnokii.org)
+ * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot
+ * GNU GPL version 2 or later
+ */
#include "../../../gsmstate.h"
#ifdef GSM_ENABLE_NOKIA7110
#include <string.h>
#include <time.h>
#include "../../../misc/coding/coding.h"
#include "../../../gsmcomon.h"
#include "../../../service/gsmlogo.h"
#include "../../pfunc.h"
#include "../nfunc.h"
#include "../nfuncold.h"
#include "n7110.h"
#include "dct3func.h"
static GSM_Error N7110_GetAlarm(GSM_StateMachine *s, GSM_Alarm *alarm)
{
return DCT3_GetAlarm(s, alarm, 0x19);
}
static GSM_Error N7110_SetAlarm(GSM_StateMachine *s, GSM_Alarm *alarm)
{
@@ -505,48 +508,49 @@ static GSM_Error N7110_ReplyGetRingtone(GSM_Protocol_Message msg, GSM_StateMachi
case 0x24:
smprintf(s, "Invalid location. Too high ?\n");
return ERR_INVALIDLOCATION;
}
return ERR_UNKNOWNRESPONSE;
}
static GSM_Error N7110_GetRingtone(GSM_StateMachine *s, GSM_Ringtone *Ringtone, bool PhoneRingtone)
{
unsigned char req[] = {N7110_FRAME_HEADER, 0x22, 0x00, 0x00};
if (PhoneRingtone) return ERR_NOTSUPPORTED;
if (Ringtone->Format == 0x00) Ringtone->Format = RING_NOKIABINARY;
switch (Ringtone->Format) {
case RING_NOTETONE:
/* In the future get binary and convert */
return ERR_NOTSUPPORTED;
case RING_NOKIABINARY:
req[5]=N7110_ReturnBinaryRingtoneLocation(s->Phone.Data.Model)+Ringtone->Location;
s->Phone.Data.Ringtone=Ringtone;
smprintf(s, "Getting binary ringtone\n");
return GSM_WaitFor (s, req, 6, 0x1f, 4, ID_GetRingtone);
case RING_MIDI:
+ case RING_MMF:
return ERR_NOTSUPPORTED;
}
return ERR_NOTSUPPORTED;
}
static GSM_Error N7110_ReplyGetPictureImageInfo(GSM_Protocol_Message msg, GSM_StateMachine *s)
{
int i;
GSM_Phone_N7110Data *Priv = &s->Phone.Data.Priv.N7110;
smprintf(s, "Received info for Picture Images\n");
smprintf(s, "Number : %i\n",msg.Buffer[4]*256+msg.Buffer[5]);
smprintf(s, "Locations :");
Priv->LastPictureImageFolder.Number=msg.Buffer[4]*256+msg.Buffer[5];
for (i=0;i<Priv->LastPictureImageFolder.Number;i++) {
Priv->LastPictureImageFolder.Location[i]=msg.Buffer[6+i*2]*256+msg.Buffer[7+i*2];
smprintf(s, " %i",Priv->LastPictureImageFolder.Location[i]);
}
smprintf(s, "\n");
return ERR_NONE;
}
static GSM_Error N7110_GetPictureImageLocation(GSM_StateMachine *s, GSM_Bitmap *Bitmap, unsigned char *folder, int *location)
{
@@ -1626,48 +1630,49 @@ GSM_Phone_Functions N7110Phone = {
N71_92_GetSignalQuality,
DCT3_GetNetworkInfo,
NOTSUPPORTED, /* GetCategory */
NOTSUPPORTED, /* AddCategory */
NOTSUPPORTED, /* GetCategoryStatus */
N7110_GetMemoryStatus,
N7110_GetMemory,
NOTIMPLEMENTED, /* GetNextMemory */
N7110_SetMemory,
NOTIMPLEMENTED, /* AddMemory */
N7110_DeleteMemory,
NOTIMPLEMENTED, /* DeleteAllMemory */
N7110_GetSpeedDial,
NOTIMPLEMENTED, /* SetSpeedDial */
DCT3_GetSMSC,
DCT3_SetSMSC,
N7110_GetSMSStatus,
N7110_GetSMSMessage,
N7110_GetNextSMSMessage,
N7110_SetSMS,
N7110_AddSMS,
N7110_DeleteSMS,
DCT3_SendSMSMessage,
NOTSUPPORTED, /* SendSavedSMS */
+ NOTSUPPORTED, /* SetFastSMSSending */
N7110_SetIncomingSMS,
DCT3_SetIncomingCB,
N7110_GetSMSFolders,
NOTIMPLEMENTED, /* AddSMSFolder */
NOTIMPLEMENTED, /* DeleteSMSFolder */
DCT3_DialVoice,
N7110_AnswerCall,
DCT3_CancelCall,
NOTIMPLEMENTED, /* HoldCall */
NOTIMPLEMENTED, /* UnholdCall */
NOTIMPLEMENTED, /* ConferenceCall */
NOTIMPLEMENTED, /* SplitCall */
NOTIMPLEMENTED, /* TransferCall */
NOTIMPLEMENTED, /* SwitchCall */
NOTSUPPORTED, /* GetCallDivert */
N7110_SetCallDivert,
N7110_CancelAllDiverts,
N7110_SetIncomingCall,
N7110_SetIncomingUSSD,
DCT3DCT4_SendDTMF,
N7110_GetRingtone,
N7110_SetRingtone,
NOTSUPPORTED, /* GetRingtonesInfo */
NOTSUPPORTED, /* DeleteUserRingtones */
@@ -1680,45 +1685,45 @@ GSM_Phone_Functions N7110Phone = {
NOTSUPPORTED, /* GetMMSSettings */
NOTSUPPORTED, /* SetMMSSettings */
NOTSUPPORTED, /* GetSyncMLSettings */
NOTSUPPORTED, /* SetSyncMLSettings */
NOTSUPPORTED, /* GetChatSettings */
NOTSUPPORTED, /* SetChatSettings */
N7110_GetBitmap,
N7110_SetBitmap,
NOTSUPPORTED, /* GetToDoStatus */
NOTSUPPORTED, /* GetToDo */
NOTSUPPORTED, /* GetNextToDo */
NOTSUPPORTED, /* SetToDo */
NOTSUPPORTED, /* AddToDo */
NOTSUPPORTED, /* DeleteToDo */
NOTSUPPORTED, /* DeleteAllToDo */
N7110_GetCalendarStatus,
NOTIMPLEMENTED, /* GetCalendar */
N7110_GetNextCalendar,
NOTIMPLEMENTED, /* SetCalendar */
N7110_AddCalendar,
N71_65_DelCalendar,
NOTIMPLEMENTED, /* DeleteAllCalendar */
NOTSUPPORTED, /* GetCalendarSettings */
NOTSUPPORTED, /* SetCalendarSettings */
- NOTSUPPORTED, /* GetNote */
+ NOTSUPPORTED, /* GetNextNote */
N7110_GetProfile,
N7110_SetProfile,
NOTSUPPORTED, /* GetFMStation */
NOTSUPPORTED, /* SetFMStation */
NOTSUPPORTED, /* ClearFMStations */
NOTSUPPORTED, /* GetNextFileFolder */
NOTSUPPORTED, /* GetFilePart */
NOTSUPPORTED, /* AddFile */
NOTSUPPORTED, /* GetFileSystemStatus */
NOTSUPPORTED, /* DeleteFile */
NOTSUPPORTED, /* AddFolder */
NOTSUPPORTED, /* GetGPRSAccessPoint */
NOTSUPPORTED /* SetGPRSAccessPoint */
};
#endif
/* How should editor hadle tabs in this file? Add editor commands here.
* vim: noexpandtab sw=8 ts=8 sts=8:
*/