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;
276 memset(&req, 0x0, sizeof(ZigbeeZclGroupGetGroupMembership_t));
278 /* Update request structure */
279 req.node_id = node_id;
280 req.dest_ep = dest_ep;
281 req.group_count = group_count;
282 req.group_list = g_malloc0(sizeof(gshort) * group_count);
283 g_variant_get(group_list, "aq", &iter);
284 while (g_variant_iter_loop(iter, "q", req.group_list[i])) {
286 if (i >= group_count)
290 /* Allocate response callback data */
292 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
293 invocation, NULL, 0);
294 if (NULL == resp_cb_data) {
295 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
297 /* Send failure response */
298 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
303 /* Dispatch request */
304 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
305 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
306 ZBLIB_ZCL_GROUP_OPS_GET_GROUP_MEMBERSHIP,
308 on_zcl_group_get_group_membership_resp, resp_cb_data);
311 g_free(req.group_list);
314 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
316 /* Free response callback data */
317 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
319 /* Send failure response */
320 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
328 static void on_zcl_group_remove_group_resp(ZigBeeServiceInterface *service_interface,
329 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
331 ZigbeeServiceInterfaceRespCbData_t *cb_data =
332 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
334 ZigbeeZcl_group *group_object = NULL;
335 GDBusMethodInvocation *invocation = NULL;
337 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
339 NOT_USED(service_interface);
340 NOT_USED(request_id);
342 if (NULL == resp_data || 0 == resp_data_len) {
343 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
348 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
349 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
351 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
352 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
354 zigbee_zcl_group_complete_remove_group(group_object, invocation, payload->result);
359 static gboolean on_zcl_group_remove_group(ZigbeeZcl_group *zcl_group_object,
360 GDBusMethodInvocation *invocation,
366 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
367 ZigbeeZclGroupRemoveGroup_t req;
368 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
372 memset(&req, 0x0, sizeof(ZigbeeZclGroupRemoveGroup_t));
374 /* Update request structure */
375 req.node_id = node_id;
376 req.dest_ep = dest_ep;
377 req.group_id = group_id;
379 /* Allocate response callback data */
381 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
382 invocation, NULL, 0);
383 if (NULL == resp_cb_data) {
384 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
386 /* Send failure response */
387 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
392 /* Dispatch request */
393 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
394 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
395 ZBLIB_ZCL_GROUP_OPS_REMOVE_GROUP,
397 on_zcl_group_remove_group_resp, resp_cb_data);
399 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
401 /* Free response callback data */
402 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
404 /* Send failure response */
405 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
413 static void on_zcl_group_remove_all_group_resp(ZigBeeServiceInterface *service_interface,
414 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
416 ZigbeeServiceInterfaceRespCbData_t *cb_data =
417 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
419 ZigbeeZcl_group *group_object = NULL;
420 GDBusMethodInvocation *invocation = NULL;
422 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
424 NOT_USED(service_interface);
425 NOT_USED(request_id);
427 if (NULL == resp_data || 0 == resp_data_len) {
428 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
433 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
434 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
436 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
437 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
439 zigbee_zcl_group_complete_remove_all_group(group_object, invocation, payload->result);
444 static gboolean on_zcl_group_remove_all_group(ZigbeeZcl_group *zcl_group_object,
445 GDBusMethodInvocation *invocation,
450 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
451 ZigbeeZclGroupRemoveAllGroup_t req;
452 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
456 memset(&req, 0x0, sizeof(ZigbeeZclGroupRemoveAllGroup_t));
458 /* Update request structure */
459 req.node_id = node_id;
460 req.dest_ep = dest_ep;
462 /* Allocate response callback data */
464 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
465 invocation, NULL, 0);
466 if (NULL == resp_cb_data) {
467 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
469 /* Send failure response */
470 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
475 /* Dispatch request */
476 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
477 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
478 ZBLIB_ZCL_GROUP_OPS_REMOVE_ALL_GROUP,
480 on_zcl_group_remove_all_group_resp, resp_cb_data);
482 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
484 /* Free response callback data */
485 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
487 /* Send failure response */
488 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
496 static void on_zcl_group_add_group_if_identifying_resp(ZigBeeServiceInterface *service_interface,
497 guint request_id, gpointer resp_data, guint resp_data_len, gpointer resp_cb_data)
499 ZigbeeServiceInterfaceRespCbData_t *cb_data =
500 (ZigbeeServiceInterfaceRespCbData_t *)resp_cb_data;
502 ZigbeeZcl_group *group_object = NULL;
503 GDBusMethodInvocation *invocation = NULL;
505 ZigbeeGeneralResp_t *payload = (ZigbeeGeneralResp_t *)resp_data;
507 NOT_USED(service_interface);
508 NOT_USED(request_id);
510 if (NULL == resp_data || 0 == resp_data_len) {
511 Z_LOGE("resp_data=%p or resp_data_len=%d is null", resp_data, resp_data_len);
516 group_object = zigbee_service_dbus_interface_ref_interface_object(cb_data);
517 zblib_check_null_free_and_ret("group_object", group_object, cb_data);
519 invocation = zigbee_service_dbus_interface_ref_invocation(cb_data);
520 zblib_check_null_free_and_ret("invocation", invocation, cb_data);
522 zigbee_zcl_group_complete_add_group_if_identifying(group_object, invocation, payload->result);
527 static gboolean on_zcl_group_add_group_if_identifying(ZigbeeZcl_group *zcl_group_object,
528 GDBusMethodInvocation *invocation,
532 GVariant *group_name,
535 ZigBeeServiceInterface *service_interface = (ZigBeeServiceInterface *)user_data;
536 ZigbeeZclGroupAddGroupIfIdentifying_t req;
537 ZigbeeServiceInterfaceRespCbData_t *resp_cb_data = NULL;
539 GVariantIter *iter = NULL;
544 memset(&req, 0x0, sizeof(ZigbeeZclGroupAddGroupIfIdentifying_t));
546 /* Update request structure */
547 req.node_id = node_id;
548 req.dest_ep = dest_ep;
549 req.group_id = group_id;
550 g_variant_get(group_name, "a(y)", &iter);
551 while (g_variant_iter_loop(iter, "(y)", &req.group_name[i])) {
553 if (i >= ZIGBEE_ZCL_GROUP_NAME_MAX_LEN + 1)
557 /* Allocate response callback data */
559 zigbee_service_dbus_interface_create_resp_cb_data(zcl_group_object,
560 invocation, NULL, 0);
561 if (NULL == resp_cb_data) {
562 Z_LOGE("zigbee_service_dbus_interface_create_resp_cb_data failed!");
564 /* Send failure response */
565 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
570 /* Dispatch request */
571 ret = zigbee_service_dbus_interface_dispatch_request(service_interface,
572 ZBLIB_DRIVER_TYPE_ZCL_GROUP,
573 ZBLIB_ZCL_GROUP_OPS_ADD_GROUP_IF_IDENTIFYING,
575 on_zcl_group_add_group_if_identifying_resp, resp_cb_data);
577 Z_LOGE("zigbee_service_dbus_interface_dispatch_request failed!");
579 /* Free response callback data */
580 zigbee_service_dbus_interface_destroy_resp_cb_data(resp_cb_data);
582 /* Send failure response */
583 ZIGBEE_DBUS_FAIL_RESPONSE(invocation, ZIGBEE_DBUS_DEFAULT_REQ_FAILED_MSG);
591 void zigbee_service_dbus_interface_zcl_group_notification(ZigBeeServiceInterface *service_interface,
592 guint noti_id, gpointer noti_data, guint noti_data_len, gpointer noti_cb_data)
594 ZigbeeZcl_group *group_object;
596 zblib_check_null_ret("service_interface", service_interface);
598 if (NULL == noti_data || 0 == noti_data_len) {
599 Z_LOGE("noti_data=%p or noti_data_len=%d is null", noti_data, noti_data_len);
603 group_object = _service_interface_ref_zigbee_zcl_group(service_interface);
604 zblib_check_null_ret("group_object", group_object);
606 NOT_USED(noti_cb_data);
609 case ZBLIB_SERVICE_NOTI_ADD_GROUP_RSP: {
610 ZigbeeZclGroupAddGroupNoti_t *rsp =
611 (ZigbeeZclGroupAddGroupNoti_t*)noti_data;
613 Z_LOGD("add_group_rsp from : [0x%X]", rsp->node_id);
615 zigbee_zcl_group_emit_add_group_rsp(group_object, rsp->node_id, rsp->src_ep,
616 rsp->status, rsp->group_id);
619 case ZBLIB_SERVICE_NOTI_VIEW_GROUP_RSP: {
620 ZigbeeZclGroupViewGroupNoti_t *rsp =
621 (ZigbeeZclGroupViewGroupNoti_t*)noti_data;
623 Z_LOGD("view_group_rsp from : [0x%X]", rsp->node_id);
625 zigbee_zcl_group_emit_view_group_rsp(group_object, rsp->node_id, rsp->src_ep,
626 rsp->status, rsp->group_id, rsp->group_name);
629 case ZBLIB_SERVICE_NOTI_GET_GROUP_MEMBERSHIP_RSP: {
631 GVariant* group_list = NULL;
632 GVariantBuilder *attr_builder = NULL;
634 ZigbeeZclGroupGetGroupMembershipNoti_t *rsp =
635 (ZigbeeZclGroupGetGroupMembershipNoti_t*)noti_data;
637 Z_LOGD("get_group_membership_rsp from : [0x%X]", rsp->node_id);
639 attr_builder = g_variant_builder_new(G_VARIANT_TYPE("aq"));
641 for (i = 0; i < rsp->group_count; i++)
642 g_variant_builder_add(attr_builder, "q", rsp->group_list[i]);
643 group_list = g_variant_builder_end(attr_builder);
644 g_variant_builder_unref(attr_builder);
646 zigbee_zcl_group_emit_get_group_membership_rsp(group_object, rsp->node_id,
647 rsp->src_ep, rsp->capacity, rsp->group_count, group_list);
650 case ZBLIB_SERVICE_NOTI_REMOVE_GROUP_RSP: {
651 ZigbeeZclGroupRemoveGroupNoti_t *rsp =
652 (ZigbeeZclGroupRemoveGroupNoti_t*)noti_data;
654 Z_LOGD("remove_group_rsp from : [0x%X]", rsp->node_id);
656 zigbee_zcl_group_emit_remove_group_rsp(group_object, rsp->node_id, rsp->src_ep,
657 rsp->status, rsp->group_id);
661 Z_LOGE("Unexpected notification [%x]", noti_id);
665 /* ZigbeeZcl_group should be dereferenced */
666 g_object_unref(group_object);
669 gboolean zigbee_service_dbus_interface_zcl_group_init(ZigBeeServiceInterface *service_interface,
670 ZigbeeObjectSkeleton *zigbee_object)
672 ZigbeeZcl_group *zcl_group_object;
674 if (NULL == service_interface) {
675 Z_LOGE("service_interface is NULL");
679 zcl_group_object = zigbee_zcl_group_skeleton_new();
680 zigbee_object_skeleton_set_zcl_group(zigbee_object, zcl_group_object);
681 g_object_unref(zcl_group_object);
683 Z_LOGI("zcl_group_object: [%p]", zcl_group_object);
686 * Register signal handlers for 'zcl_group' interface
688 g_signal_connect(zcl_group_object,
690 G_CALLBACK(on_zcl_group_add_group), service_interface);
692 g_signal_connect(zcl_group_object,
694 G_CALLBACK(on_zcl_group_view_group), service_interface);
696 g_signal_connect(zcl_group_object,
697 "handle-get-group-membership",
698 G_CALLBACK(on_zcl_group_get_group_membership), service_interface);
700 g_signal_connect(zcl_group_object,
701 "handle-remove-group",
702 G_CALLBACK(on_zcl_group_remove_group), service_interface);
704 g_signal_connect(zcl_group_object,
705 "handle-remove-all-group",
706 G_CALLBACK(on_zcl_group_remove_all_group), service_interface);
708 g_signal_connect(zcl_group_object,
709 "handle-add-group-if-identifying",
710 G_CALLBACK(on_zcl_group_add_group_if_identifying), service_interface);