Hi Konrad
On Wed, Feb 2, 2011 at 8:44 AM, Konrad Slowinski
<[email protected]> wrote:
> ---
> Makefile.am | 3 +-
> test/test-sms | 213
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 215 insertions(+), 1 deletions(-)
> create mode 100755 test/test-sms
It's good to have scripts like this one, but take a look on comment below.
> +if __name__ == "__main__":
> + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
> + bus = dbus.SystemBus()
> + manager = dbus.Interface(bus.get_object('org.ofono', '/'),
> + 'org.ofono.Manager')
<snip>
> + while in_key != 'x':
> + in_key = raw_input('Select any option: ')
<snip>
> + clear_screen()
> + print_sms_properties(sms)
> + print_menu()
> +
> + mainloop = gobject.MainLoop()
> + mainloop.run()
Here you have an "input mainloop" where you choose all the operations
and after you start the glib mainloop, in which you receive all the
signal outputs. I think it'd be better to have input and signal
outputs together. This would be accomplished by adding a
io_add_watch() like test-ussd script does and put your "input
mainloop" inside the handler.
regards,
Lucas De Marchi
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono