2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "zb-common.h"
20 API int zb_zdo_bind_req(zb_zigbee_h handle, zb_nwk_addr dst_addr16,
21 zb_ieee_addr src_addr64, unsigned char src_ep, zb_cluster_id clusterid,
22 zb_ieee_addr dst_addr64, unsigned char type, zb_nwk_addr group_addr,
23 unsigned char dst_ep, zb_zdo_bind_cb cb, void *user_data)
26 CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
27 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
28 RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
29 RETV_IF(NULL == src_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
30 RETV_IF(NULL == dst_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
31 RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
32 ret = zbl_bind_req(dst_addr16, src_addr64, src_ep, clusterid, dst_addr64, type,
33 group_addr, dst_ep, cb, user_data);
37 API int zb_zdo_unbind_req(zb_zigbee_h handle, zb_nwk_addr dst_addr16,
38 zb_ieee_addr src_addr64, unsigned char src_ep, zb_cluster_id clusterid,
39 zb_ieee_addr dst_addr64, unsigned char type, zb_nwk_addr group_addr,
40 unsigned char dst_ep, zb_zdo_unbind_cb cb, void *user_data)
43 CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE);
44 RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER);
45 RETV_IF(NULL == zbl_dbus_get_object(), ZIGBEE_ERROR_IO_ERROR);
46 RETV_IF(NULL == src_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
47 RETV_IF(NULL == dst_addr64, ZIGBEE_ERROR_INVALID_PARAMETER);
48 RETV_IF(0 == src_ep || 0 == dst_ep, ZIGBEE_ERROR_INVALID_ENDPOINT);
49 ret = zbl_unbind_req(dst_addr16, src_addr64, src_ep, clusterid, dst_addr64, type,
50 group_addr, dst_ep, cb, user_data);