[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Ok I am stupid
From: |
Markus Plail |
Subject: |
Re: Ok I am stupid |
Date: |
Mon, 12 Aug 2002 09:09:36 +0200 |
User-agent: |
Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (i686-pc-linux-gnu) |
Hi Pawel!
* Pawel Kot writes:
> On Mon, 12 Aug 2002, Markus Plail wrote:
>> > PS. Why is GSM_Bitmap used with phonebook? Markus?
>>
>> That's because of caller group pictures.
> Ouch. This is kind of ugly. Unless the picture is returned by the
> phonebook frame, we don't need to read it every time. Just read all
> groups with pictures once and remember it somewhere.
Of course the picture is returned by the phonebook frame.
GSM_Error DecodePhonebook(unsigned char *blockstart, int length, GSM_Data
*data, int blocks, int memtype, int speeddialpos)
{
int subblockcount = 0, i;
char *str;
GSM_SubPhonebookEntry* subEntry = NULL;
for (i = 0; i < blocks; i++) {
if (data->PhonebookEntry)
subEntry =
&data->PhonebookEntry->SubEntries[subblockcount];
dprintf("Blockstart: %i\n", blockstart[0]);
switch(blockstart[0]) {
case PNOKIA_ENTRYTYPE_POINTER: /* Pointer */
switch (memtype) { /* Memory type */
case PNOKIA_MEMORY_SPEEDDIALS: /* Speed dial numbers */
[snip...]
case PNOKIA_ENTRYTYPE_LOGO: /* Caller group logo */
if (data->Bitmap) {
dprintf("Caller logo received (h: %i, w:
%i)!\n", blockstart[5], blockstart[6]);
data->Bitmap->width = blockstart[5];
data->Bitmap->height = blockstart[6];
data->Bitmap->size = (data->Bitmap->width *
data->Bitmap->height) / 8;
memcpy(data->Bitmap->bitmap, blockstart + 10,
data->Bitmap->size);
dprintf("Bitmap: width: %i, height: %i\n",
blockstart[5], blockstart[6]);
}
break;
case PNOKIA_ENTRYTYPE_LOGOSWITCH:/* Logo on/off */
.....
regards
Markus
- Re: Ok I am stupid, (continued)
- Re: Ok I am stupid, Markus Plail, 2002/08/10
- Re: Ok I am stupid, Konstantinos Agouros, 2002/08/11
- Re: Ok I am stupid, Konstantinos Agouros, 2002/08/11
- Re: Ok I am stupid, Konstantinos Agouros, 2002/08/11
- Re: Ok I am stupid, BORBELY Zoltan, 2002/08/11
- Re: Ok I am stupid, Konstantinos Agouros, 2002/08/11
- Re: Ok I am stupid, Pawel Kot, 2002/08/11
- Re: Ok I am stupid, Pawel Kot, 2002/08/11
- Re: Ok I am stupid, Markus Plail, 2002/08/12
- Re: Ok I am stupid, Pawel Kot, 2002/08/12
- Re: Ok I am stupid,
Markus Plail <=
- Re: Ok I am stupid ( Segmentation fault with xgnokii Nokia 6310), Ulrich Hopp, 2002/08/12
Re: Ok I am stupid, Pawel Kot, 2002/08/12