View Single Post
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#4
Both ways should work, but
the direct sqlite3 commands only changes the database and
the conversation app (appname rtcom-messaging-ui) didn't
get notified about the database change.

A cleaner way is to use the conversation backend rtcom-eventlogger.
Every change through this interface notifies any listeners (like
the rtcom-messaging-ui).

The below code deletes an event with event_id 3332. As it
uses rtcom-eventlogger api, the conversation
app should be notified and don't list the message with this
id anymore.

Code:
import glib
import gobject
import ctypes
import osso
osso_context = osso.Context("test_rtcom", "0.1")
rtcom_el_lib = ctypes.CDLL("librtcom-eventlogger.so.1")
rtcom_el_obj = rtcom_el_lib.rtcom_el_new()
rtcom_el_lib.rtcom_el_delete_event(rtcom_el_obj, int(3332), None)