Imported gammu 0.90.7
[gammu.git] / common / service / gsmlogo.h
blobb371fb2be3e6f942ff96f5670773b4f53a0bc4bb
1 #ifndef __gsm_bitmaps_h
2 #define __gsm_bitmaps_h
4 #include "../gsmcomon.h"
6 /* Bitmap types. */
7 typedef enum {
8 GSM_None = 1,
9 GSM_StartupLogo,
10 GSM_OperatorLogo,
11 GSM_CallerLogo,
12 GSM_PictureImage,
13 GSM_WelcomeNoteText,
14 GSM_DealerNoteText,
15 GSM_ColourOperatorLogo,
16 GSM_ColourStartupLogo,
17 GSM_ColourWallPaper
18 } GSM_Bitmap_Types;
20 #define GSM_BITMAP_SIZE 864
22 /**
23 * Structure to hold incoming/outgoing bitmaps (and welcome-notes).
25 typedef struct {
26 /**
27 * Caller group number
29 unsigned char Location;
30 /**
31 * Bitmap height in pixels
33 unsigned char Height;
34 /**
35 * Bitmap width in pixels
37 unsigned char Width;
38 /**
39 * Bitmap type
41 GSM_Bitmap_Types Type;
42 /**
43 * Network operator code
45 char NetworkCode[7];
46 /**
47 * Text used for (dealer) welcome-note
48 * or callergroup name or Picture Image text
50 char Text [256];
51 /**
52 * When get caller group - is default name ?
54 bool DefaultName;
55 /**
56 * Actual Bitmap ((65+7)/8*96=864)
57 */
58 unsigned char Bitmap[GSM_BITMAP_SIZE];
59 bool DefaultBitmap;
60 /**
61 * Ringtone ID sent with caller group
63 unsigned char Ringtone;
64 bool DefaultRingtone;
65 /**
66 * With caller logos = displayed or not
68 bool Enabled;
69 /**
70 * For Picture Images - number of sender
72 char Sender [GSM_MAX_NUMBER_LENGTH+1];
73 unsigned char ID;
74 } GSM_Bitmap;
76 #define MAX_MULTI_BITMAP 6
78 typedef struct {
79 unsigned char Number;
80 GSM_Bitmap Bitmap[MAX_MULTI_BITMAP];
81 } GSM_MultiBitmap;
83 typedef enum {
84 GSM_NokiaStartupLogo = 1, /*size 84*48*/
85 GSM_NokiaOperatorLogo, /*size 72*14*/
86 GSM_Nokia7110OperatorLogo, /*size 78*21*/
87 GSM_Nokia6510OperatorLogo, /*size 78*21*/
88 GSM_NokiaCallerLogo, /*size 72*14*/
89 GSM_NokiaPictureImage, /*size 72*28*/
90 GSM_Nokia7110StartupLogo, /*size 96*65*/
91 GSM_Nokia6210StartupLogo, /*size 96*60*/
92 GSM_EMSSmallPicture, /*size 8*8 */
93 GSM_EMSMediumPicture, /*size 16*16*/
94 GSM_EMSBigPicture, /*size 32*32*/
95 GSM_EMSVariablePicture
96 } GSM_Phone_Bitmap_Types;
98 bool GSM_IsPointBitmap (GSM_Bitmap *bmp, int x, int y);
99 void GSM_SetPointBitmap (GSM_Bitmap *bmp, int x, int y);
100 void GSM_ClearPointBitmap (GSM_Bitmap *bmp, int x, int y);
101 void GSM_PrintBitmap (FILE *file, GSM_Bitmap *bitmap);
102 void GSM_ClearBitmap (GSM_Bitmap *bmp);
103 void GSM_ResizeBitmap (GSM_Bitmap *dest, GSM_Bitmap *src, int width, int height);
104 void GSM_GetMaxBitmapWidthHeight(GSM_Bitmap_Types Type, unsigned char *width, unsigned char *height);
105 void GSM_ReverseBitmap (GSM_Bitmap *Bitmap);
106 int GSM_GetBitmapSize (GSM_Bitmap *bmp);
108 GSM_Error GSM_SaveBitmapFile(char *FileName, GSM_MultiBitmap *bitmap);
109 GSM_Error GSM_ReadBitmapFile(char *FileName, GSM_MultiBitmap *bitmap);
110 GSM_Error BMP2Bitmap (unsigned char *buffer, FILE *file,GSM_Bitmap *bitmap);
111 GSM_Error Bitmap2BMP (unsigned char *buffer, FILE *file,GSM_Bitmap *bitmap);
112 void PHONE_GetBitmapWidthHeight (GSM_Phone_Bitmap_Types Type, int *width, int *height);
113 int PHONE_GetBitmapSize (GSM_Phone_Bitmap_Types Type, int width, int height);
114 void PHONE_ClearBitmap (GSM_Phone_Bitmap_Types Type, char *buffer, int width, int height);
115 void PHONE_DecodeBitmap (GSM_Phone_Bitmap_Types Type, char *buffer, GSM_Bitmap *Bitmap);
116 void PHONE_EncodeBitmap (GSM_Phone_Bitmap_Types Type, char *buffer, GSM_Bitmap *Bitmap);
118 void NOKIA_CopyBitmap (GSM_Phone_Bitmap_Types Type, GSM_Bitmap *Bitmap, char *Buffer, int *Length);
120 #endif
122 /* How should editor hadle tabs in this file? Add editor commands here.
123 * vim: noexpandtab sw=8 ts=8 sts=8: