summaryrefslogtreecommitdiffabout
path: root/gammu/emb/common/service/gsmring.h
Side-by-side diff
Diffstat (limited to 'gammu/emb/common/service/gsmring.h') (more/less context) (ignore whitespace changes)
-rw-r--r--gammu/emb/common/service/gsmring.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/gammu/emb/common/service/gsmring.h b/gammu/emb/common/service/gsmring.h
index 207cf31..2d2dd7a 100644
--- a/gammu/emb/common/service/gsmring.h
+++ b/gammu/emb/common/service/gsmring.h
@@ -75,111 +75,113 @@ typedef enum {
DoubleDottedNote = 0x02<<6,
Length_2_3 = 0x03<<6
} GSM_RingNoteDurationSpec;
typedef enum {
Scale_55 = 1, /* 55 Hz for note A */
Scale_110, /* 110 Hz for note A */
Scale_220,
Scale_440, /* first scale for Nokia */
Scale_880,
Scale_1760,
Scale_3520, /* last scale for Nokia */
Scale_7040,
Scale_14080
} GSM_RingNoteScale;
typedef struct {
GSM_RingNoteDuration Duration;
GSM_RingNoteDurationSpec DurationSpec;
GSM_RingNoteNote Note;
GSM_RingNoteStyle Style;
GSM_RingNoteScale Scale;
int Tempo;
} GSM_RingNote;
typedef enum {
RING_Note = 1,
RING_EnableVibra,
RING_DisableVibra,
RING_EnableLight,
RING_DisableLight,
RING_EnableLED,
RING_DisableLED,
RING_Repeat
} GSM_RingCommandType;
typedef struct {
GSM_RingCommandType Type;
GSM_RingNote Note;
unsigned char Value;
} GSM_RingCommand;
typedef struct {
int NrCommands;
GSM_RingCommand Commands[MAX_RINGTONE_NOTES];
bool AllNotesScale;
} GSM_NoteRingtone;
+/* FIXME: should use BinaryTone instead? */
/* Structure to hold Nokia binary ringtones. */
typedef struct {
- unsigned char Frame[30000];
+ unsigned char Frame[50000];
int Length;
} GSM_NokiaBinaryRingtone;
typedef struct {
- unsigned char *Frame;
+ unsigned char *Buffer;
int Length;
} GSM_BinaryTone;
typedef enum {
RING_NOTETONE = 1,
RING_NOKIABINARY,
- RING_MIDI
+ RING_MIDI,
+ RING_MMF
} GSM_RingtoneFormat;
/**
* Structure for saving various ringtones formats
*/
typedef struct {
/**
* Ringtone saved in one of three formats
*/
GSM_NokiaBinaryRingtone NokiaBinary;
GSM_BinaryTone BinaryTone;
GSM_NoteRingtone NoteTone;
/**
* Ringtone format
*/
GSM_RingtoneFormat Format;
/**
* Ringtone name
*/
char Name[20*2];
/**
* Ringtone location
*/
int Location;
} GSM_Ringtone;
typedef struct {
int Group; //Nokia specific
int ID;
char Name[30*2];
} GSM_RingtoneInfo;
typedef struct {
int Number;
GSM_RingtoneInfo Ringtone[100];
} GSM_AllRingtonesInfo;
GSM_Error GSM_SaveRingtoneFile(char *FileName, GSM_Ringtone *ringtone);
GSM_Error GSM_ReadRingtoneFile(char *FileName, GSM_Ringtone *ringtone);
void saveott(FILE *file, GSM_Ringtone *ringtone);
void savemid(FILE *file, GSM_Ringtone *ringtone);
void saverng(FILE *file, GSM_Ringtone *ringtone);
void saveimelody(FILE *file, GSM_Ringtone *ringtone);
GSM_Error savewav(FILE *file, GSM_Ringtone *ringtone);
GSM_Error saverttl(FILE *file, GSM_Ringtone *ringtone);
unsigned char GSM_EncodeNokiaRTTLRingtone (GSM_Ringtone ringtone, unsigned char *package, int *maxlength);