ZigBeeService *service = zblib_service_interface_ref_service(service_interface);
if (NULL == custom_data) {
+ /* LCOV_EXCL_START */
Z_LOGE("Unexpected invalid parameter !");
return;
+ /* LCOV_EXCL_STOP */
}
if (result) {
zigbee_manager_emit_zigbee_state(custom_data->zigbee_mgr, result);
} else {
/* ZigBee state will be emitted on bus termination */
- zblib_service_exit(service);
+ zblib_service_exit(service); // LCOV_EXCL_LINE
}
}
ZigbeeCustomData_t *custom_data = zblib_service_interface_ref_user_data(service_interface);
if (NULL == custom_data) {
+ /* LCOV_EXCL_START */
ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
return TRUE;
+ /* LCOV_EXCL_STOP */
}
zigbee_manager_complete_enable(zigbee_mgr, invocation);
return TRUE;
}
+/* LCOV_EXCL_START */
static gboolean on_manager_get_zigbee_state(ZigbeeManager *zigbee_mgr,
GDBusMethodInvocation *invocation, gpointer user_data)
{
return TRUE;
}
+/* LCOV_EXCL_STOP */
static void zigbee_service_dbus_interface_initialize_interfaces(ZigBeeServiceInterface *service_interface,
ZigbeeObjectSkeleton *zigbee_object)
guint notification_id;
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL");
return;
+ /* LCOV_EXCL_STOP */
}
/* Extract driver_type */
switch (driver_type) {
case ZBLIB_DRIVER_TYPE_ZCL_ALARM: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_alarm_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_CUSTOM: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_custom_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_DOOR_LOCK: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_door_lock_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_FAN_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_fan_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_LEVEL_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_level_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_MFGLIB_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_mfglib_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_ON_OFF: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_on_off_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_SERVICE: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_service_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_THERMOSTAT: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_thermostat_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_BASIC: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_basic_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_GLOBAL_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_global_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
break;
case ZBLIB_DRIVER_TYPE_ZCL_IDENTIFY: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_identify_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_COLOR_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_color_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_GROUP: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_group_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_POLL_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_poll_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZCL_SCENE: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zcl_scene_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZDO_DEV_CONTROL: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zdo_dev_control_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
case ZBLIB_DRIVER_TYPE_ZDO_BIND: {
+ /* LCOV_EXCL_START */
zigbee_service_dbus_interface_zdo_bind_notification(service_interface,
notification_id, noti_data, noti_data_len, noti_cb_data);
+ /* LCOV_EXCL_STOP */
}
break;
Z_LOGD("Firmware update result : [%s]", ((*rsp) ? "Succeed" : "Failed"));
_notify_zigbee_state(service_interface, *rsp);
} else
- Z_LOGE("Unhandled notification id: [%d]", notification_id);
+ Z_LOGE("Unhandled notification id: [%d]", notification_id); // LCOV_EXCL_LINE
}
break;
case ZBLIB_DRIVER_TYPE_NONE: /* Fall through */
default: {
- Z_LOGE("Unhandled driver type: [%d]", driver_type);
+ Z_LOGE("Unhandled driver type: [%d]", driver_type); // LCOV_EXCL_LINE
}
- break;
+ break; // LCOV_EXCL_LINE
}
}
+/* LCOV_EXCL_START */
static void zigbee_on_name_lost(GDBusConnection *connection,
const gchar *name, gpointer user_data)
{
/* Bus name is 'lost' */
custom_data->name_acquired = FALSE;
}
+/* LCOV_EXCL_STOP */
static void zigbee_on_name_acquired(GDBusConnection *connection,
const gchar *name, gpointer user_data)
Z_LOGI("'%s' - [BUS Acquired]", name);
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("service_interface is NULL!");
return;
+ /* LCOV_EXCL_STOP */
}
service = zblib_service_interface_ref_service(service_interface);
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL!");
return;
+ /* LCOV_EXCL_STOP */
}
custom_data = (ZigbeeCustomData_t *)zblib_service_interface_ref_user_data(service_interface);
if (NULL == custom_data) {
+ /* LCOV_EXCL_START */
Z_LOGE("D-BUS service interface custom_data is NULL!");
return;
+ /* LCOV_EXCL_STOP */
}
/*
*/
zigbee_object = g_hash_table_lookup(custom_data->objects, path);
if (zigbee_object) {
+ /* LCOV_EXCL_START */
Z_LOGW("ZigBee D-BUS interface object already created (object: %p)", zigbee_object);
goto OUT;
+ /* LCOV_EXCL_STOP */
}
/*
gboolean ret;
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/*
service_interface = zblib_service_interface_new(service,
ZIGBEE_DBUS_SERVICE_INTERFACE_NAME);
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("Create D-BUS service interface failed!");
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/*
ret = zblib_service_interface_set_noti_cb(service_interface,
zigbee_service_dbus_interface_noti_cb, NULL);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("Set service interface notification callback failed!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/*
ret = zblib_service_add_service_interface(service,
service_interface);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("Add D-BUS service interface failed!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/*
ret = zblib_service_interface_link_user_data(service_interface,
interface_data);
if (FALSE == ret) {
+ /* LCOV_EXCL_START */
Z_LOGE("Link D-BUS service interface data failed!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/* HASH table for maintaining 'objects' list */
return TRUE;
EXIT:
+ /* LCOV_EXCL_START */
g_free(interface_data);
/*
service_interface);
return FALSE;
+ /* LCOV_EXCL_STOP */
}
/**< Zigbee service dbus interface de-initialization */
gboolean ret;
if (NULL == service) {
+ /* LCOV_EXCL_START */
Z_LOGE("service is NULL");
return;
+ /* LCOV_EXCL_STOP */
}
service_interface = zblib_service_ref_service_interface(service,
ZIGBEE_DBUS_SERVICE_INTERFACE_NAME);
if (NULL == service_interface) {
+ /* LCOV_EXCL_START */
Z_LOGE("D-BUS service interface not found!");
return;
+ /* LCOV_EXCL_STOP */
}
interface_data = (ZigbeeCustomData_t *)zblib_service_interface_ref_user_data(service_interface);
if (NULL == interface_data) {
+ /* LCOV_EXCL_START */
Z_LOGE("D-BUS interface data not found!");
goto EXIT;
+ /* LCOV_EXCL_STOP */
}
/* Emit zigbee_state - disabled */
ret = zblib_service_remove_service_interface(service,
service_interface);
if (FALSE == ret)
- Z_LOGE("Remove service interface failed!");
+ Z_LOGE("Remove service interface failed!"); // LCOV_EXCL_LINE
/*
* Free Service interface object