2 * Copyright (c) 2016 Samsung Electronics Co., Ltd. All rights reserved.
4 * Contact: Suresh Kumar N (suresh.n@samsung.com)
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #include "zigbee_service_interface_common.h"
21 #include <zblib_driver_zcl_group.h>
23 static void *_service_interface_ref_zigbee_zcl_group(ZigBeeServiceInterface *service_interface)
25 ZigbeeObjectSkeleton *zigbee_object = NULL;
26 ZigbeeCustomData_t *custom_data = NULL;
27 ZigbeeZcl_group *group_object = NULL;
29 custom_data = (ZigbeeCustomData_t *)zblib_service_interface_ref_user_data(service_interface);
30 if (NULL == custom_data) {
31 Z_LOGE("D-BUS service interface custom_data is NULL!");
35 /* Get zigbee object */
36 zigbee_object = g_hash_table_lookup(custom_data->objects, ZIGBEE_SERVICE_PATH);
37 if (NULL == zigbee_object) {
38 Z_LOGW("Cannot find ZigBee D-BUS interface object!", zigbee_object);
42 group_object = zigbee_object_get_zcl_group(ZIGBEE_OBJECT(zigbee_object));
46 static void on_zcl_group_add_group_resp(ZigBeeServiceInterface *service_interface,
47 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
49 ZigbeeServiceInterfaceRespCbData_t *cb_data =
50 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
52 ZigbeeZcl_group *group_object = NULL;
53 GDBusMethodInvocation *invocation = NULL;
55 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
57 NOT_USED(service_interface);
60 if (NULL == resp_data || 0 == resp_data_len) {
61 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
66 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
67 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
69 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
70 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
72 zigbee_zcl_group_complete_add_group(group_object, invocation, payload->result);
77 static gboolean on_zcl_group_add_group(ZigbeeZcl_group *zcl_group_object,
78 GDBusMethodInvocation *invocation,
85 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
86 ZigbeeZclGroupAddGroup_t req;
87 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
89 GVariantIter *iter = NULL;
94 memset(&req, 0x0, sizeof(ZigbeeZclGroupAddGroup_t));
96 /* Update request structure */
97 req.node_id = node_id;
98 req.dest_ep = dest_ep;
99 req.group_id = group_id;
102 g_variant_get(group_name, "a(y)", &iter);
103 while (g_variant_iter_loop(iter, "(y)", &req.group_name[i])) {
105 if (i >= ZIGBEE_ZCL_GROUP_NAME_MAX_LEN + 1)
109 /* Allocate response callback data */
111 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
112 invocation, NULL, 0);
113 if (NULL == resp_cb_data) {
114 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
116 /* Send failure response */
117 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
122 /* Dispatch request */
123 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
124 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
125 ZBLIB_ZCL_GROUP_OPS_ADD_GROUP,
127 on_zcl_group_add_group_resp, resp_cb_data);
129 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
131 /* Free response callback data */
132 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
134 /* Send failure response */
135 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
143 static void on_zcl_group_view_group_resp(ZigBeeServiceInterface *service_interface,
144 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
146 ZigbeeServiceInterfaceRespCbData_t *cb_data =
147 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
149 ZigbeeZcl_group *group_object = NULL;
150 GDBusMethodInvocation *invocation = NULL;
152 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
154 NOT_USED(service_interface);
155 NOT_USED(request_id);
157 if (NULL == resp_data || 0 == resp_data_len) {
158 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
163 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
164 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
166 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
167 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
169 zigbee_zcl_group_complete_view_group(group_object, invocation, payload->result);
174 static gboolean on_zcl_group_view_group(ZigbeeZcl_group *zcl_group_object,
175 GDBusMethodInvocation *invocation,
181 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
182 ZigbeeZclGroupViewGroup_t req;
183 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
187 memset(&req, 0x0, sizeof(ZigbeeZclGroupViewGroup_t));
189 /* Update request structure */
190 req.node_id = node_id;
191 req.dest_ep = dest_ep;
192 req.group_id = group_id;
194 /* Allocate response callback data */
196 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
197 invocation, NULL, 0);
198 if (NULL == resp_cb_data) {
199 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
201 /* Send failure response */
202 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
207 /* Dispatch request */
208 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
209 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
210 ZBLIB_ZCL_GROUP_OPS_VIEW_GROUP,
212 on_zcl_group_view_group_resp, resp_cb_data);
214 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
216 /* Free response callback data */
217 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
219 /* Send failure response */
220 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
228 static void on_zcl_group_get_group_membership_resp(ZigBeeServiceInterface *service_interface,
229 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
231 ZigbeeServiceInterfaceRespCbData_t *cb_data =
232 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
234 ZigbeeZcl_group *group_object = NULL;
235 GDBusMethodInvocation *invocation = NULL;
237 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
239 NOT_USED(service_interface);
240 NOT_USED(request_id);
242 if (NULL == resp_data || 0 == resp_data_len) {
243 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
248 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
249 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
251 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
252 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
254 zigbee_zcl_group_complete_get_group_membership(group_object, invocation, payload->result);
259 static gboolean on_zcl_group_get_group_membership(ZigbeeZcl_group *zcl_group_object,
260 GDBusMethodInvocation *invocation,
264 GVariant *group_list,
267 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
268 ZigbeeZclGroupGetGroupMembership_t req;
269 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
271 GVariantIter *iter = NULL;
277 memset(&req, 0x0, sizeof(ZigbeeZclGroupGetGroupMembership_t));
279 /* Update request structure */
280 req.node_id = node_id;
281 req.dest_ep = dest_ep;
282 req.group_count = group_count;
283 req.group_list = g_malloc0(sizeof(gushort) * group_count);
284 g_variant_get(group_list, "aq", &iter);
285 while (i < group_count && g_variant_iter_loop(iter, "q", &value)) {
286 Z_LOGD(" cluster: [%d]", value);
287 req.group_list[i] = value;
291 /* Allocate response callback data */
293 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
294 invocation, NULL, 0);
295 if (NULL == resp_cb_data) {
296 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
298 g_free(req.group_list);
300 /* Send failure response */
301 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
306 /* Dispatch request */
307 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
308 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
309 ZBLIB_ZCL_GROUP_OPS_GET_GROUP_MEMBERSHIP,
311 on_zcl_group_get_group_membership_resp, resp_cb_data);
314 g_free(req.group_list);
317 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
319 /* Free response callback data */
320 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
322 /* Send failure response */
323 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
331 static void on_zcl_group_remove_group_resp(ZigBeeServiceInterface *service_interface,
332 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
334 ZigbeeServiceInterfaceRespCbData_t *cb_data =
335 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
337 ZigbeeZcl_group *group_object = NULL;
338 GDBusMethodInvocation *invocation = NULL;
340 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
342 NOT_USED(service_interface);
343 NOT_USED(request_id);
345 if (NULL == resp_data || 0 == resp_data_len) {
346 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
351 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
352 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
354 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
355 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
357 zigbee_zcl_group_complete_remove_group(group_object, invocation, payload->result);
362 static gboolean on_zcl_group_remove_group(ZigbeeZcl_group *zcl_group_object,
363 GDBusMethodInvocation *invocation,
369 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
370 ZigbeeZclGroupRemoveGroup_t req;
371 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
375 memset(&req, 0x0, sizeof(ZigbeeZclGroupRemoveGroup_t));
377 /* Update request structure */
378 req.node_id = node_id;
379 req.dest_ep = dest_ep;
380 req.group_id = group_id;
382 /* Allocate response callback data */
384 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
385 invocation, NULL, 0);
386 if (NULL == resp_cb_data) {
387 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
389 /* Send failure response */
390 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
395 /* Dispatch request */
396 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
397 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
398 ZBLIB_ZCL_GROUP_OPS_REMOVE_GROUP,
400 on_zcl_group_remove_group_resp, resp_cb_data);
402 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
404 /* Free response callback data */
405 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
407 /* Send failure response */
408 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
416 static void on_zcl_group_remove_all_group_resp(ZigBeeServiceInterface *service_interface,
417 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
419 ZigbeeServiceInterfaceRespCbData_t *cb_data =
420 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
422 ZigbeeZcl_group *group_object = NULL;
423 GDBusMethodInvocation *invocation = NULL;
425 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
427 NOT_USED(service_interface);
428 NOT_USED(request_id);
430 if (NULL == resp_data || 0 == resp_data_len) {
431 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
436 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
437 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
439 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
440 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
442 zigbee_zcl_group_complete_remove_all_group(group_object, invocation, payload->result);
447 static gboolean on_zcl_group_remove_all_group(ZigbeeZcl_group *zcl_group_object,
448 GDBusMethodInvocation *invocation,
453 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
454 ZigbeeZclGroupRemoveAllGroup_t req;
455 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
459 memset(&req, 0x0, sizeof(ZigbeeZclGroupRemoveAllGroup_t));
461 /* Update request structure */
462 req.node_id = node_id;
463 req.dest_ep = dest_ep;
465 /* Allocate response callback data */
467 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
468 invocation, NULL, 0);
469 if (NULL == resp_cb_data) {
470 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
472 /* Send failure response */
473 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
478 /* Dispatch request */
479 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
480 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
481 ZBLIB_ZCL_GROUP_OPS_REMOVE_ALL_GROUP,
483 on_zcl_group_remove_all_group_resp, resp_cb_data);
485 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
487 /* Free response callback data */
488 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
490 /* Send failure response */
491 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
499 static void on_zcl_group_add_group_if_identifying_resp(ZigBeeServiceInterface *service_interface,
500 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
502 ZigbeeServiceInterfaceRespCbData_t *cb_data =
503 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
505 ZigbeeZcl_group *group_object = NULL;
506 GDBusMethodInvocation *invocation = NULL;
508 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
510 NOT_USED(service_interface);
511 NOT_USED(request_id);
513 if (NULL == resp_data || 0 == resp_data_len) {
514 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
519 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
520 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
522 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
523 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
525 zigbee_zcl_group_complete_add_group_if_identifying(group_object, invocation, payload->result);
530 static gboolean on_zcl_group_add_group_if_identifying(ZigbeeZcl_group *zcl_group_object,
531 GDBusMethodInvocation *invocation,
535 GVariant *group_name,
538 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
539 ZigbeeZclGroupAddGroupIfIdentifying_t req;
540 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
542 GVariantIter *iter = NULL;
547 memset(&req, 0x0, sizeof(ZigbeeZclGroupAddGroupIfIdentifying_t));
549 /* Update request structure */
550 req.node_id = node_id;
551 req.dest_ep = dest_ep;
552 req.group_id = group_id;
553 g_variant_get(group_name, "a(y)", &iter);
554 while (g_variant_iter_loop(iter, "(y)", &req.group_name[i])) {
556 if (i >= ZIGBEE_ZCL_GROUP_NAME_MAX_LEN + 1)
560 /* Allocate response callback data */
562 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
563 invocation, NULL, 0);
564 if (NULL == resp_cb_data) {
565 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
567 /* Send failure response */
568 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
573 /* Dispatch request */
574 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
575 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
576 ZBLIB_ZCL_GROUP_OPS_ADD_GROUP_IF_IDENTIFYING,
578 on_zcl_group_add_group_if_identifying_resp, resp_cb_data);
580 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
582 /* Free response callback data */
583 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
585 /* Send failure response */
586 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
594 void zigbee_service_dbus_interface_zcl_group_notification(ZigBeeServiceInterface *service_interface,
595 guint noti_id, gpointer noti_data, guint noti_data_len, gpointer noti_cb_data)
597 ZigbeeZcl_group *group_object;
599 zblib_check_null_ret("service_interface", service_interface);
601 if (NULL == noti_data || 0 == noti_data_len) {
602 Z_LOGE("noti_data=%p or noti_data_len=%d is null", noti_data, noti_data_len);
606 group_object = _service_interface_ref_zigbee_zcl_group(service_interface);
607 zblib_check_null_ret("group_object", group_object);
609 NOT_USED(noti_cb_data);
612 case ZBLIB_SERVICE_NOTI_ADD_GROUP_RSP: {
613 ZigbeeZclGroupAddGroupNoti_t *rsp =
614 (ZigbeeZclGroupAddGroupNoti_t*)noti_data;
616 Z_LOGD("add_group_rsp from : [0x%X]", rsp->node_id);
618 zigbee_zcl_group_emit_add_group_rsp(group_object, rsp->node_id, rsp->src_ep,
619 rsp->status, rsp->group_id);
622 case ZBLIB_SERVICE_NOTI_VIEW_GROUP_RSP: {
623 ZigbeeZclGroupViewGroupNoti_t *rsp =
624 (ZigbeeZclGroupViewGroupNoti_t*)noti_data;
626 Z_LOGD("view_group_rsp from : [0x%X]", rsp->node_id);
628 zigbee_zcl_group_emit_view_group_rsp(group_object, rsp->node_id, rsp->src_ep,
629 rsp->status, rsp->group_id, rsp->group_name);
632 case ZBLIB_SERVICE_NOTI_GET_GROUP_MEMBERSHIP_RSP: {
634 GVariant* group_list = NULL;
635 GVariantBuilder *attr_builder = NULL;
637 ZigbeeZclGroupGetGroupMembershipNoti_t *rsp =
638 (ZigbeeZclGroupGetGroupMembershipNoti_t*)noti_data;
640 Z_LOGD("get_group_membership_rsp from : [0x%X]", rsp->node_id);
642 attr_builder = g_variant_builder_new(G_VARIANT_TYPE("aq"));
644 for (i = 0; i < rsp->group_count; i++)
645 g_variant_builder_add(attr_builder, "q", rsp->group_list[i]);
646 group_list = g_variant_builder_end(attr_builder);
647 g_variant_builder_unref(attr_builder);
649 zigbee_zcl_group_emit_get_group_membership_rsp(group_object, rsp->node_id,
650 rsp->src_ep, rsp->capacity, rsp->group_count, group_list);
653 case ZBLIB_SERVICE_NOTI_REMOVE_GROUP_RSP: {
654 ZigbeeZclGroupRemoveGroupNoti_t *rsp =
655 (ZigbeeZclGroupRemoveGroupNoti_t*)noti_data;
657 Z_LOGD("remove_group_rsp from : [0x%X]", rsp->node_id);
659 zigbee_zcl_group_emit_remove_group_rsp(group_object, rsp->node_id, rsp->src_ep,
660 rsp->status, rsp->group_id);
664 Z_LOGE("Unexpected notification [%x]", noti_id);
668 /* ZigbeeZcl_group should be dereferenced */
669 g_object_unref(group_object);
672 gboolean zigbee_service_dbus_interface_zcl_group_init(ZigBeeServiceInterface *service_interface,
673 ZigbeeObjectSkeleton *zigbee_object)
675 ZigbeeZcl_group *zcl_group_object;
677 if (NULL == service_interface) {
678 Z_LOGE("service_interface is NULL");
682 zcl_group_object = zigbee_zcl_group_skeleton_new();
683 zigbee_object_skeleton_set_zcl_group(zigbee_object, zcl_group_object);
684 g_object_unref(zcl_group_object);
686 Z_LOGI("zcl_group_object: [%p]", zcl_group_object);
689 * Register signal handlers for 'zcl_group' interface
691 g_signal_connect(zcl_group_object,
693 G_CALLBACK(on_zcl_group_add_group), service_interface);
695 g_signal_connect(zcl_group_object,
697 G_CALLBACK(on_zcl_group_view_group), service_interface);
699 g_signal_connect(zcl_group_object,
700 "handle-get-group-membership",
701 G_CALLBACK(on_zcl_group_get_group_membership), service_interface);
703 g_signal_connect(zcl_group_object,
704 "handle-remove-group",
705 G_CALLBACK(on_zcl_group_remove_group), service_interface);
707 g_signal_connect(zcl_group_object,
708 "handle-remove-all-group",
709 G_CALLBACK(on_zcl_group_remove_all_group), service_interface);
711 g_signal_connect(zcl_group_object,
712 "handle-add-group-if-identifying",
713 G_CALLBACK(on_zcl_group_add_group_if_identifying), service_interface);