From fa3daf5bda9d42804eedf9f09ff34fd6ed384950 Mon Sep 17 00:00:00 2001 From: Jiwan Kim Date: Tue, 2 May 2017 14:35:10 +0900 Subject: [PATCH] Change API privilege level - Change zb_zdo_set_compatible_startup_parameters to platform level. Change-Id: I1472ec32367cd460fa4d693cc99be768e419fe82 Signed-off-by: Jiwan Kim --- include/zb_zdo.h | 1 - include/zdo/zb_zdo_config.h | 91 ------------------------------------- include/zigbee_internal.h | 58 +++++++++++++++++++++++ 3 files changed, 58 insertions(+), 92 deletions(-) delete mode 100644 include/zdo/zb_zdo_config.h diff --git a/include/zb_zdo.h b/include/zb_zdo.h index 5853817..d71a8a5 100644 --- a/include/zb_zdo.h +++ b/include/zb_zdo.h @@ -86,7 +86,6 @@ */ #include -#include #include #include #include diff --git a/include/zdo/zb_zdo_config.h b/include/zdo/zb_zdo_config.h deleted file mode 100644 index 0e8bf73..0000000 --- a/include/zdo/zb_zdo_config.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef __TIZEN_NETWORK_ZIGBEE_ZDO_CONFIG_H__ -#define __TIZEN_NETWORK_ZIGBEE_ZDO_CONFIG_H__ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * @file zb_zdo_config.h - */ - -/** - * @ingroup CAPI_NETWORK_ZIGBEE_MODULE_ZDO_MODULE - * @brief Zigbee configuration API. - * @since_tizen 4.0 - * - * @{ - */ - -/** - * @brief Sets start-up attribute set - * @details In order to ensure interoperability, all ZigBee HA devices should implement - * compatible Startup Attribute Sets (SAS). This does not mean that set must be - * modifiable through a commissioning cluster, but that the device must internally - * implement these stack settings to ensure compatibility and consistent user - * experience. The start up set parameters described by the Commissioning cluster - * provide a good basis to specify a HA startup set. - * - * @since_tizen 4.0 - * @privlevel public - * @privilege %http://tizen.org/privilege/zigbee - * - * @param[in] handle The handle of zigbee - * @param[in] pan_id Short address - * @param[in] epan_id Usually 00-50-C2-77-10-00-00-00 is the global commissioning EPID - * @param[in] channel_mask - * @param[in] start_control - * @param[in] trust_center_addr - * @param[in] master_key - * @param[in] master_key_len - * @param[in] network_key - * @param[in] network_key_len - * @param[in] default_link_key_join - * - * @return 0 on success, otherwise a negative error value. - * @retval #ZIGBEE_ERROR_NONE Successful - * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error - * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied - * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported - */ -int zb_zdo_set_compatible_startup_parameters( - zigbee_h handle, - nwk_addr pan_id, /* default : NULL (0xFFFF) */ - ieee_addr epan_id, /* default : NULL (0x0000000000000000) */ - unsigned int channel_mask, /* default : NULL (0x07FFF800) */ - unsigned char start_control, /* default : 3 (un-comissioned, simlely push end-device's button when joining) */ - ieee_addr trust_center_addr, /* default : NULL (0x0000000000000000) */ - const unsigned char *master_key, /* default : NULL */ - unsigned char master_key_len, /* default : 0 */ - const unsigned char *network_key, /* default : NULL */ - unsigned char network_key_len, /* default : 0 */ - unsigned char default_link_key_join /* default : 0 */ - ); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif - -#endif /* __TIZEN_NETWORK_ZIGBEE_ZDO_CONFIG_H__ */ - diff --git a/include/zigbee_internal.h b/include/zigbee_internal.h index 1fd87ec..df3cdcd 100644 --- a/include/zigbee_internal.h +++ b/include/zigbee_internal.h @@ -425,6 +425,64 @@ int zb_send_to_local( * @} */ +/** + * @ingroup CAPI_NETWORK_ZIGBEE_MODULE_ZDO_MODULE + * @brief Zigbee configuration API. + * @since_tizen 4.0 + * + * @{ + */ + +/** + * @internal + * @brief Sets start-up attribute set + * @details In order to ensure interoperability, all ZigBee HA devices should implement + * compatible Startup Attribute Sets (SAS). This does not mean that set must be + * modifiable through a commissioning cluster, but that the device must internally + * implement these stack settings to ensure compatibility and consistent user + * experience. The start up set parameters described by the Commissioning cluster + * provide a good basis to specify a HA startup set. + * + * @since_tizen 4.0 + * @privlevel platform + * @privilege %http://tizen.org/privilege/zigbee.admin + * + * @param[in] handle The handle of zigbee + * @param[in] pan_id Short address + * @param[in] epan_id Usually 00-50-C2-77-10-00-00-00 is the global commissioning EPID + * @param[in] channel_mask + * @param[in] start_control + * @param[in] trust_center_addr + * @param[in] master_key + * @param[in] master_key_len + * @param[in] network_key + * @param[in] network_key_len + * @param[in] default_link_key_join + * + * @return 0 on success, otherwise a negative error value. + * @retval #ZIGBEE_ERROR_NONE Successful + * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error + * @retval #ZIGBEE_ERROR_PERMISSION_DENIED Permission denied + * @retval #ZIGBEE_ERROR_NOT_SUPPORTED Not supported + */ +int zb_zdo_set_compatible_startup_parameters( + zigbee_h handle, + nwk_addr pan_id, /* default : NULL (0xFFFF) */ + ieee_addr epan_id, /* default : NULL (0x0000000000000000) */ + unsigned int channel_mask, /* default : NULL (0x07FFF800) */ + unsigned char start_control, /* default : 3 (un-comissioned, simlely push end-device's button when joining) */ + ieee_addr trust_center_addr, /* default : NULL (0x0000000000000000) */ + const unsigned char *master_key, /* default : NULL */ + unsigned char master_key_len, /* default : 0 */ + const unsigned char *network_key, /* default : NULL */ + unsigned char network_key_len, /* default : 0 */ + unsigned char default_link_key_join /* default : 0 */ + ); + +/** + * @} + */ + #ifdef __cplusplus } #endif -- 2.34.1