buggnokii - Bugs: bug #32492, difficulties once getting number...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32492: difficulties once getting number of SMS based MEMORY_TYPE

Submitted by:  capede <capede>
Submitted on:  Tue 15 Feb 2011 12:27:10 PM UTC  
 
Category: libgnokiiSeverity: 3 - Normal
Item Group: feature requestStatus: Invalid
Privacy: PublicAssigned to: Pawel Kot <pkot>
Open/Closed: Closed

Tue 15 Feb 2011 02:07:22 PM UTC, comment #5:

For future: I believe it is much better to discuss such things in the mailing list as there's much bigger audience there.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Tue 15 Feb 2011 02:05:20 PM UTC, comment #4:

from your response i've concluded that
--------------------
the question about :
"cost some resources"

and the answer is :
"You just need to loop over the set of 20 elements and 'just for one to call the GetSMSFolderStatus'. I consider "some resources" as close enough to 0. "
---------------------

---------------------
and for question :
"'combining number of sms' and wrap it"

answer :
"Probably these two could be combined into one API call which would act as the wrapper. But I do not see big benefit. Usually when you want the status of the folder you want it for all the folders. "
---------------------

thx, case closed :)

capede <capede>
Tue 15 Feb 2011 01:50:16 PM UTC, comment #3:

> the required parameter :
> - memory type ( GN_MT_SM for example )
> then calling gn_sm_functions(GN_OP_NEWFEATURE,data,state)
> which supposed to generate :


Memory type is an abstraction. We need to ask the phone how given memory type maps to the actual folder ID. You do it by GetSMSFolders.

> - the number of sms inside 'memory type',
> which has been set ( in these example case 'GN_MT_SM' ),
> without 're-loop' for existence of all
> memory(which will cost some resources)


You just need to loop over the set of 20 elements and just for one to call the GetSMSFolderStatus. I consider "some resources" as close enough to 0.

Probably these two could be combined into one API call which would act as the wrapper. But I do not see big benefit. Usually when you want the status of the folder you want it for all the folders.

> - show sms info, `info` mean ( id, msg, date, etc like
> you wrote on gn_sms structure ), which this info come
> from the `memory type` which has been set before.


Which SMS? There can be thousands of them in the given memory type.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Tue 15 Feb 2011 01:34:56 PM UTC, comment #2:

im apologizing for bad language, coz im not speak english native though,
here are behave of the feature request,

the required parameter :
- memory type ( GN_MT_SM for example )

then calling gn_sm_functions(GN_OP_NEWFEATURE,data,state) which supposed to generate :
- the number of sms inside 'memory type', which has been set ( in these example case 'GN_MT_SM' ), without 're-loop' for existence of all memory(which will cost some resources)
- show sms info, `info` mean ( id, msg, date, etc like you wrote on gn_sms structure ), which this info come from the `memory type` which has been set before.

you could questioning for any typos that might make any confuse..

capede <capede>
Tue 15 Feb 2011 12:55:06 PM UTC, comment #1:

I have read your post several times and I have completely no clue what you mean. Can you rephrase? If that's a feature request for libgnokii API please describe the interface and how should it behave.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Tue 15 Feb 2011 12:27:10 PM UTC, original submission:

hi,

i had difficulties when tryin gettin number based on MEMORY_TYPE, after i conduct thoroughly investigation around file gnokii-sms.c

i found these :

function getsms()
{
..
e = gn_sm_functions(GN_OP_GetSMSFolders, data, state);

if (e == GN_ERR_NONE) {
for (j = 0; j < folderlist.number; j++) {
data->sms_folder = folderlist.folder + j;
if (folderlist.folder_id[j] == gn_str2memory_type(memory_type_string)) {
e = gn_sm_functions(GN_OP_GetSMSFolderStatus, data, state);
if (e == GN_ERR_NONE) {
folder_count = folderlist.folder[j].number;
dprintf("Folder %s (%s) has %u messages\n", folderlist.folder[j].name, gn_memory_type2str(folderlist.folder_id[j]), folderlist.folder[j].number);
}
}
}
}
....
}

which i thought it based number of sum all memory and re-parse the fit MEMORY_TYPE_STRING, and show the information,
i just curious, is there no other way ?, i thought, this might cost much resources for the loop of looking 'what kind memory that the phone had'.

is there another way like this algorithm :
1. set memory type // thus, the phone only will fetch data inside from 'set' memory
2. show counted number
3. sms and it own structure{id,msg,blablabla}

or perhaps this feature isnt yet exists ?

thank in advance :)

capede <capede>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pkot (Posted a comment)
  • -unavailable- added by capede (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 15 Feb 2011 02:07:22 PM UTCpkotStatusNone=>Invalid
      Assigned toNone=>pkot
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1