static void battery_temperature(const DsmeDbusMessage* request, DsmeDbusMessage** reply) { dsme_hw_get_battery_temperature(NULL, battery_temp_cb); *reply = dsme_dbus_reply_new(request); dsme_dbus_message_append_int(*reply, measured_battery_temp); }
static void get_state(const DsmeDbusMessage* request, DsmeDbusMessage** reply) { // first create a reply and append it to the list of yet unsent replies state_replies = g_slist_append(state_replies, dsme_dbus_reply_new(request)); // then proxy the query to the internal message queue DSM_MSGTYPE_STATE_QUERY query = DSME_MSG_INIT(DSM_MSGTYPE_STATE_QUERY); broadcast_internally(&query); }
static void get_version(const DsmeDbusMessage* request, DsmeDbusMessage** reply) { *reply = dsme_dbus_reply_new(request); dsme_dbus_message_append_string(*reply, dsme_version ? dsme_version : "unknown"); }
static void get_poweron_time(const DsmeDbusMessage* request, DsmeDbusMessage** reply) { *reply = dsme_dbus_reply_new(request); dsme_dbus_message_append_int(*reply, (int)pot_get_poweron_secs()); }