How to get all messages from opimd?

Sebastian Krzyszkowiak dos at dosowisko.net
Mon Feb 20 21:34:10 CET 2012


On Mon, Feb 20, 2012 at 21:27, Tomas Tintera <trosos at seznam.cz> wrote:
> Hi, all.
>
> I can't find an easy way how to write client application that gets all messages from opimd. I tried
>
> mdbus -s org.freesmartphone.opimd /org/freesmartphone/PIM/Messages org.freesmartphone.PIM.Messages.Query '{}'
>
> but this doesn't work when opimd is still in the stage of reading SMSs from SIM - it simply returns only the messages that were already loaded from SIM.
>
> There is another tool that looks might help: the signal org.freesmartphone.PIM.Messages.NewMessage, which seems to be emitted when a message is loaded.
>
> To accomplish the task, one can thus combine these two methods, ie.
> 1. Start listening to the signal "org.freesmartphone.PIM.Messages.NewMessage" and saving all results.
> 2. Do "org.freesmartphone.PIM.Messages.Query {}" and save results. Each message obtained this way must be checked for duplicity (to prevent the situation that some of the "NewMessage" signals were received after we did step 1. and before we did step 2.).
>
> My question is: is there any easier way to get all messages from opimd (ie. without the need to checking for duplicit messages)? (It would be sufficient to wait until all messages are loaded from SIM to opimd and then do "org.freesmartphone.PIM.Messages.Query {}" - but is there any way to figure out whether all messsages are loaded from SIM to opimd?)
>
>
> With regards,
> Tomas Tintera

opimd doesn't read messages from SIM for a looong time. Which version
do you use?
Also, using opimd with mdbus can be problematic. For CLI usage there
is opimd-cli python script in [1] which should do exactly what you
want. It should be available in repo as opimd-utils-cli (IIRC).

[1] http://git.shr-project.org/git/?p=opimd-utils.git;a=summary

-- 
Sebastian Krzyszkowiak
dos



More information about the support mailing list