:pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Tue Nov 27 05:17 CET 2001
[gnokii.git] / include / gsm-filetypes.h
1 /*
2
3   $Id$
4
5   G N O K I I
6
7   A Linux/Unix toolset and driver for Nokia mobile phones.
8
9   Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. 
10
11   Released under the terms of the GNU GPL, see file COPYING for more details.
12   
13   Functions to read and write common file types.
14
15   $Log$
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
18
19   Revision 1.10  2001/06/28 00:28:46  pkot
20   Small docs updates (Pawel Kot)
21
22
23 */
24
25 int GSM_ReadVCalendarFile(char *FileName, GSM_CalendarNote *cnote,
26   int number);
27
28 int GetvCalTime(GSM_DateTime *dt, char *time);
29 int FillCalendarNote(GSM_CalendarNote *note, char *type,
30   char *text, char *time, char *alarm);
31
32
33 /* Ringtone Files */
34
35 GSM_Error GSM_ReadRingtoneFile(char *FileName, GSM_Ringtone *ringtone);
36 GSM_Error GSM_SaveRingtoneFile(char *FileName, GSM_Ringtone *ringtone);
37
38 int GetScale (char *num);
39 int GetDuration (char *num);
40
41 /* Defines the character that separates fields in rtttl files. */
42 #define RTTTL_SEP ":"
43
44 GSM_Error saverttl(FILE *file, GSM_Ringtone *ringtone);
45 GSM_Error saveott(FILE *file, GSM_Ringtone *ringtone);
46
47 GSM_Error loadrttl(FILE *file, GSM_Ringtone *ringtone);
48 GSM_Error loadott(FILE *file, GSM_Ringtone *ringtone);
49
50
51 /* Bitmap Files */
52
53 GSM_Error GSM_ReadBitmapFile(char *FileName, GSM_Bitmap *bitmap);
54 GSM_Error GSM_SaveBitmapFile(char *FileName, GSM_Bitmap *bitmap);
55 int GSM_SaveTextFile(char *FileName, char *text, int mode);
56 GSM_Error GSM_ShowBitmapFile(char *FileName);
57
58 void savenol(FILE *file, GSM_Bitmap *bitmap);
59 void savengg(FILE *file, GSM_Bitmap *bitmap);
60 void savensl(FILE *file, GSM_Bitmap *bitmap);
61 void savenlm(FILE *file, GSM_Bitmap *bitmap);
62 void saveota(FILE *file, GSM_Bitmap *bitmap);
63 void savebmp(FILE *file, GSM_Bitmap *bitmap);
64
65 #ifdef XPM
66   void savexpm(char *filename, GSM_Bitmap *bitmap);
67 #endif
68
69 GSM_Error loadngg(FILE *file, GSM_Bitmap *bitmap);
70 GSM_Error loadnol(FILE *file, GSM_Bitmap *bitmap);
71 GSM_Error loadnsl(FILE *file, GSM_Bitmap *bitmap);
72 GSM_Error loadnlm(FILE *file, GSM_Bitmap *bitmap);
73 GSM_Error loadota(FILE *file, GSM_Bitmap *bitmap);
74 GSM_Error loadbmp(FILE *file, GSM_Bitmap *bitmap);
75
76 #ifdef XPM
77   GSM_Error loadxpm(char *filename, GSM_Bitmap *bitmap);
78 #endif
79
80 typedef enum {
81   None=0,
82   NOL,
83   NGG,
84   NSL,
85   NLM,
86   BMP,
87   OTA,
88   XPMF,
89   RTTL,
90   OTT
91 } GSM_Filetypes;