public signal void status_changed(string message);
public signal void info_changed();
+ public signal void new_call(int index);
+ public signal void end_call(int index);
+ public signal void new_sms();
protected void dump_table(HashTable<string, Value?> vals)
{
public void on_call_status(int index, string status, HashTable<string, Value?> properties)
{
+ bool is_new = false;
+ bool is_done = false;
stderr.printf("CALL STATUS %d %s\n", index, status);
dump_table(properties);
CallInfo? info = lookup_call(index);
if (info == null)
{
+ is_new = true;
Value? v = properties.lookup("peer");
string title;
if (v != null)
calls.delete_link(i);
break;
}
+ is_done = true;
}
/*
os.system("vibrator-stop")
os.system("ledctrl --off gta02-aux:red");
*/
+
+ if (is_new && !is_done)
+ new_call(index);
+ if (is_done)
+ end_call(index);
}
public async void sms_log_and_delete(int idx)
// Delete message
yield sim.delete_message(idx);
+
+ // Notify reception of the sms
+ new_sms();
}
}