bugreport-service: Get bugreport based on event data
A bugreport identifier is sent along with BugreportCreated event so that
client can request the details of the bugreport to which the event
related:
static void bugreport_created_cb(diagnostics_ctx_h ctx, void *user_data)
{
...
const char *params[] = {"--type", "crash-info-json"};
diagnostics_data_h data;
diagnostics_get_data(ctx, params, ARRAY_SIZE(params), &data);
size_t bytes;
char buff[1024];
diagnostics_data_read(data, buff, sizeof(buff), 0, &bytes);
...
}
int main()
{
...
diagnostics_set_notification_cb(bugreport_created_cb, NULL);
diagnostics_subscribe_event("BugreportCreated", "org.tizen.bugreport-service");
g_main_loop_run(mainloop);
...
}
Change-Id: I056f16743e656504dcefe0972eae00bc4b6f58ab
13 files changed: