[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 = 
                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 */
                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, 
                                dprintf("Bitmap: width: %i, height: %i\n", 
blockstart[5], blockstart[6]);
                case PNOKIA_ENTRYTYPE_LOGOSWITCH:/* Logo on/off */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]