From: Jiwan Kim Date: Thu, 23 Mar 2017 00:36:05 +0000 (+0900) Subject: Fix ACR issue - Add privilege description X-Git-Tag: submit/tizen/20170512.045637~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f824080c3610d7287043e4a60a250b35e24445de;p=platform%2Fcore%2Fapi%2Fzigbee.git Fix ACR issue - Add privilege description - Add privilge information into doxygen - To support platform privilege, some APIs are separated into 'zigbee_internal.h' - Remove old scripts on spec file Change-Id: If2d2d50f30f4d8534c3d5d5fed0dd16be5ab978f Signed-off-by: Jiwan Kim --- diff --git a/CMakeLists.txt b/CMakeLists.txt index cf9de3b..f61b90e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,6 @@ SET(DBUS_INTERFACE "org.tizen.${PROJECT_NAME}") SET(DBUS_OBJECT_PATH "/org/tizen/${PROJECT_NAME}") #SET(ZB_DBUS "zb-dbus") -IF(TZ_VER_3) - ADD_DEFINITIONS("-DTZ_VER_3") - #ELSE(TZ_VER_3) - # CONFIGURE_FILE(${CAPI_NETWORK_ZIGBEE}-old.manifest.in ${CAPI_NETWORK_ZIGBEE}.manifest @ONLY) -ENDIF(TZ_VER_3) # enable client log ADD_DEFINITIONS("-DZB_ENABLE_CLIENT_LOG") IF(ZB_FEATURE_GLOBAL_RSP_SYNC) diff --git a/common/h b/common/h deleted file mode 100644 index e69de29..0000000 diff --git a/include/zb_custom.h b/include/zb_custom.h index 402e999..6c66782 100644 --- a/include/zb_custom.h +++ b/include/zb_custom.h @@ -107,6 +107,8 @@ typedef void (*zb_send_to_local_rsp)( * @brief Sends custom APS data * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle Handle of node descriptor * @param[in] addr16 Network address @@ -169,6 +171,8 @@ int zb_aps_send( * @brief Sends custom ZCL data * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle Handle of node descriptor * @param[in] addr16 Network address @@ -217,6 +221,8 @@ int zb_zcl_send( * @brief Transmits data that needs to be processed locally. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle handle of node descriptor * @param[in] length The length of data diff --git a/include/zb_error.h b/include/zb_error.h index 3b8f502..ff939fa 100644 --- a/include/zb_error.h +++ b/include/zb_error.h @@ -35,16 +35,17 @@ * @{ */ typedef enum { - ZIGBEE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - ZIGBEE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Parameter error */ - ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE = TIZEN_ERROR_RESULT_OUT_OF_RANGE, /**< Out of range error */ - ZIGBEE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - ZIGBEE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< DBus error */ - ZIGBEE_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available */ - ZIGBEE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ - ZIGBEE_ERROR_INVALID_ENDPOINT = TIZEN_ERROR_ZIGBEE | 0x01, /**< Endpoint 0 is reserved for ZDP */ - ZIGBEE_ERROR_INVALID_ADDRESS = TIZEN_ERROR_ZIGBEE | 0x02, /**< Wrong address */ - ZIGBEE_ERROR_OPERATION_FAILED = TIZEN_ERROR_ZIGBEE | 0x03, /**< Operation failed */ + ZIGBEE_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + ZIGBEE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + ZIGBEE_ERROR_PARAMETER_OUT_OF_RANGE = TIZEN_ERROR_RESULT_OUT_OF_RANGE, /**< Out of range */ + ZIGBEE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + ZIGBEE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< DBus error */ + ZIGBEE_ERROR_NO_DATA = TIZEN_ERROR_NO_DATA, /**< No data available */ + ZIGBEE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */ + ZIGBEE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + ZIGBEE_ERROR_INVALID_ENDPOINT = TIZEN_ERROR_ZIGBEE | 0x01, /**< Endpoint 0 is reserved for ZDP */ + ZIGBEE_ERROR_INVALID_ADDRESS = TIZEN_ERROR_ZIGBEE | 0x02, /**< Wrong address */ + ZIGBEE_ERROR_OPERATION_FAILED = TIZEN_ERROR_ZIGBEE | 0x03, /**< Operation failed */ } zb_error_e; /** diff --git a/include/zb_zcl.h b/include/zb_zcl.h index 6c5e658..b6ec4a8 100644 --- a/include/zb_zcl.h +++ b/include/zb_zcl.h @@ -113,6 +113,8 @@ int zb_get_data_size(unsigned char type); * according to the data type in #zb_zcl_data_type_e. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle handle of simple data value * @@ -200,6 +202,8 @@ int zb_get_value(zb_value_h handle, unsigned char *type, unsigned char **value, * @details This allocates heap for read attribute status record * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle handle of read attribute status record * @@ -505,6 +509,8 @@ int zb_set_value_to_read_attr_status_record( * @details This allocates heap for discover attribute information record * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of discover attribute information record * @@ -639,6 +645,8 @@ int zb_set_type_to_discover_attr_info( * @details Allocate memory for write attribute record * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle handle of write attribute record * @@ -795,6 +803,8 @@ int zb_set_value_to_write_attr_record( * @details This allocates heap for write attribute status record * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of write attribute status record * @@ -934,6 +944,8 @@ int zb_set_id_to_write_attr_status( * @details Allocate memory for reporting configuration record * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of reporting configuration record * @@ -1830,6 +1842,8 @@ int zb_get_change_from_report_config_record3( * @details Allocate memory for read reporting configuration record * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of read configuration record * @@ -1975,6 +1989,8 @@ int zb_set_id_to_read_report_config_record( * @details Allocate memory for reporting configuration response record * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of reporting configuration response record * @@ -2220,6 +2236,8 @@ int zb_set_id_to_report_config_response_record( * @details Allocate memory for reporting attribute * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of reporting attribute * @@ -2445,6 +2463,8 @@ int zb_set_value_to_attr_report( * @details Allocate memory for extended attribute information * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of extended attribute information * diff --git a/include/zb_zdo.h b/include/zb_zdo.h index 64327bf..7f92cd9 100644 --- a/include/zb_zdo.h +++ b/include/zb_zdo.h @@ -86,6 +86,8 @@ const char* zb_get_device_id_string(int device_id); * @details Creates simple descriptor handle * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of simple descriptor * @@ -451,6 +453,8 @@ int zb_simple_desc_set_out_clusters( * @details Creates node power descriptor handle * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of node power descriptor * @@ -707,6 +711,8 @@ int zb_node_power_desc_set_current_power_source_level( * @details Creates node descriptor handle * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[out] handle handle of node descriptor * diff --git a/include/zcl/zb_zcl_alarm_cluster.h b/include/zcl/zb_zcl_alarm_cluster.h index e91f9cb..a1e8368 100644 --- a/include/zcl/zb_zcl_alarm_cluster.h +++ b/include/zcl/zb_zcl_alarm_cluster.h @@ -102,6 +102,8 @@ typedef void (*zb_zcl_alarm_get_alarm_rsp)( * to the alarm log. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -133,6 +135,8 @@ int zb_zcl_alarm_reset_alarm( * record added to the alarm log. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -159,6 +163,8 @@ int zb_zcl_alarm_reset_all_alarm( * This command does not have a payload. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -188,6 +194,8 @@ int zb_zcl_alarm_get_alarm( * @details This command causes the alarm table to be cleared, and does not have a payload. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_basic_cluster.h b/include/zcl/zb_zcl_basic_cluster.h index 66ecee5..cd6c72b 100644 --- a/include/zcl/zb_zcl_basic_cluster.h +++ b/include/zcl/zb_zcl_basic_cluster.h @@ -45,6 +45,8 @@ extern "C" { * @details This function is aim to reset end-device as factory default settings. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] handle handle of zigbee diff --git a/include/zcl/zb_zcl_color_control_cluster.h b/include/zcl/zb_zcl_color_control_cluster.h index c330541..32c2911 100644 --- a/include/zcl/zb_zcl_color_control_cluster.h +++ b/include/zcl/zb_zcl_color_control_cluster.h @@ -74,6 +74,8 @@ * generated, where not disabled, with status code equal to INVALID_VALUE.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -110,6 +112,8 @@ int zb_zcl_ccontrol_move_to_hue( * a continuous fashion. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -147,6 +151,8 @@ int zb_zcl_ccontrol_move_hue( * one step. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -191,6 +197,8 @@ int zb_zcl_ccontrol_step_hue( * generated, where not disabled, with status code equal to INVALID_VALUE. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -225,6 +233,8 @@ int zb_zcl_ccontrol_move_to_saturation( * generated, where not disabled, with status code equal to INVALID_VALUE * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -264,6 +274,8 @@ int zb_zcl_ccontrol_move_saturation( * generated, where not disabled, with status code equal to INVALID_VALUE * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -310,6 +322,8 @@ int zb_zcl_ccontrol_step_saturation( * generated, where not disabled, with status code equal to INVALID_VALUE * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -352,6 +366,8 @@ int zb_zcl_ccontrol_move_to_hue_and_saturation( * generated, where not disabled, with status code equal to INVALID_VALUE\n\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -391,6 +407,8 @@ int zb_zcl_ccontrol_move_to_color( * can thus be used to stop the operation of any other command of this cluster. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -431,6 +449,8 @@ int zb_zcl_ccontrol_move_color( * generated, where not disabled, with status code equal to INVALID_VALUE\n\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -473,6 +493,8 @@ int zb_zcl_ccontrol_step_color( * generated, where not disabled, with status code equal to INVALID_VALUE.\n\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_global_commands.h b/include/zcl/zb_zcl_global_commands.h index 745328b..39a4c2d 100644 --- a/include/zcl/zb_zcl_global_commands.h +++ b/include/zcl/zb_zcl_global_commands.h @@ -76,6 +76,8 @@ typedef void (*zb_zcl_global_rsp)( * @details This function to read attributes in devices. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -127,6 +129,8 @@ int zb_zcl_global_read_attr( * @details This function to write attributes to other devices. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -176,6 +180,8 @@ int zb_zcl_global_write_attr( * @details This function to write attributes without fragmentation to other devices. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -225,6 +231,8 @@ int zb_zcl_global_write_attr_undivided( * @details This function to write attributes to other devices without any response. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -269,6 +277,8 @@ int zb_zcl_global_write_attr_no_rsp( * @details This function to set configuration about attribute status changing reporting. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -318,6 +328,8 @@ int zb_zcl_global_config_report( * @details This function to read configuration about attribute status changing reporting. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -394,6 +406,8 @@ typedef void (*zb_zcl_global_discover_attr_rsp)( * within the cluster to which this command is directed. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -446,6 +460,8 @@ int zb_zcl_global_discover_attr( * to be read. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -515,6 +531,8 @@ int zb_zcl_global_read_attr_structured( * always an error. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -601,6 +619,8 @@ typedef void (*zb_zcl_global_discover_cmds_rsp)( * that are theoretically supported by the cluster. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -654,6 +674,8 @@ int zb_zcl_global_discover_cmds_received( * that are theoretically supported by the cluster. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address @@ -740,6 +762,8 @@ typedef void (*zb_zcl_global_discover_attr_extended_rsp)( * that are theoretically supported by the cluster. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 target network address diff --git a/include/zcl/zb_zcl_groups_cluster.h b/include/zcl/zb_zcl_groups_cluster.h index 21ab0c2..b78e53e 100644 --- a/include/zcl/zb_zcl_groups_cluster.h +++ b/include/zcl/zb_zcl_groups_cluster.h @@ -169,6 +169,8 @@ typedef void (*zb_zcl_group_remove_group_rsp)( * particular group for one or more endpoints on the receiving device.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -203,6 +205,8 @@ int zb_zcl_group_add_group( * application name string for a particular group.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -234,6 +238,8 @@ int zb_zcl_group_view_group( * the group membership of the receiving device and endpoint in a number of ways.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -269,6 +275,8 @@ int zb_zcl_group_get_group_membership( * removed.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -303,6 +311,8 @@ int zb_zcl_group_remove_group( * well. (Note: scenes not associated with a group need not be removed).\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -331,6 +341,8 @@ int zb_zcl_group_remove_all_group( * absence of a commissioning tool.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_ias_zone_cluster.h b/include/zcl/zb_zcl_ias_zone_cluster.h index 7f63b06..fe2f9f9 100644 --- a/include/zcl/zb_zcl_ias_zone_cluster.h +++ b/include/zcl/zb_zcl_ias_zone_cluster.h @@ -85,6 +85,8 @@ typedef enum { * that only messages from the correct CIE are accepted. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_identify_cluster.h b/include/zcl/zb_zcl_identify_cluster.h index a06d832..5328ef1 100644 --- a/include/zcl/zb_zcl_identify_cluster.h +++ b/include/zcl/zb_zcl_identify_cluster.h @@ -45,6 +45,8 @@ extern "C" { * @details The identify command starts or stops the receiving device identifying itself. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -90,6 +92,8 @@ typedef void (*zb_zcl_identify_query_cb)( * This command has no payload.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_level_control_cluster.h b/include/zcl/zb_zcl_level_control_cluster.h index c6dcb71..5e89abf 100644 --- a/include/zcl/zb_zcl_level_control_cluster.h +++ b/include/zcl/zb_zcl_level_control_cluster.h @@ -73,6 +73,8 @@ extern "C" { * disregarded.\n\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -102,6 +104,8 @@ int zb_zcl_levelctrl_move_to_level( * up or down direction in a continuous fashion * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -135,6 +139,8 @@ int zb_zcl_levelctrl_move( * up or down direction in a continuous fashion * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -178,6 +184,8 @@ int zb_zcl_levelctrl_step( * commands are identical. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -223,6 +231,8 @@ int zb_zcl_levelctrl_stop( * endpoint, if implemented, shall be set to Off. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -262,6 +272,8 @@ int zb_zcl_levelctrl_move_to_level_with_on_off( * endpoint, if implemented, shall be set to Off. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -305,6 +317,8 @@ int zb_zcl_levelctrl_move_with_on_off( * endpoint, if implemented, shall be set to Off. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_on_off_cluster.h b/include/zcl/zb_zcl_on_off_cluster.h index feabfb3..0e1c39c 100644 --- a/include/zcl/zb_zcl_on_off_cluster.h +++ b/include/zcl/zb_zcl_on_off_cluster.h @@ -74,6 +74,8 @@ typedef enum { * its 'On' state. Otherwise, if it is in its 'On' state it shall enter its 'Off' state.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_poll_control_cluster.h b/include/zcl/zb_zcl_poll_control_cluster.h index 1143a93..e374ffb 100644 --- a/include/zcl/zb_zcl_poll_control_cluster.h +++ b/include/zcl/zb_zcl_poll_control_cluster.h @@ -126,6 +126,8 @@ typedef void (*zb_zcl_pollctrl_check_in)( * device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -165,6 +167,8 @@ int zb_zcl_pollctrl_check_in_response( * Check-in response. The Fast Poll Stop command has no payload. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -195,6 +199,8 @@ int zb_zcl_pollctrl_fast_poll_stop( * INVALID_VALUE (0x87) and the LongPollInterval attribute value is not updated.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -234,6 +240,8 @@ int zb_zcl_pollctrl_set_long_poll_interval( * INVALID_VALUE (0x87) and the ShortPollInterval attribute value is not updated.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_scenes_cluster.h b/include/zcl/zb_zcl_scenes_cluster.h index 34a435e..48ca7dd 100644 --- a/include/zcl/zb_zcl_scenes_cluster.h +++ b/include/zcl/zb_zcl_scenes_cluster.h @@ -280,6 +280,8 @@ typedef void (*zb_zcl_scene_get_scene_membership_rsp)( * @details The Add Scene command shall be addressed to a single device (not a group) * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -324,6 +326,8 @@ int zb_zcl_scene_add_scene( * @details The View Scene command shall be addressed to a single device (not a group) * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -357,6 +361,8 @@ int zb_zcl_scene_view_scene( * @details The Remove Scene command may be addressed to a single device or to a group. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -390,6 +396,8 @@ int zb_zcl_scene_remove_scene( * @details The Remove All Scenes may be addressed to a single device or to a group. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -421,6 +429,8 @@ int zb_zcl_scene_remove_all_scene( * @details The Store Scene command may be addressed to a single device or to a group. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -454,6 +464,8 @@ int zb_zcl_scene_store_scene( * @details The Recall Scene command may be addressed to a single device or to a group. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address @@ -483,6 +495,8 @@ int zb_zcl_scene_recall_scene( * devices in the group. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zcl/zb_zcl_thermostat_cluster.h b/include/zcl/zb_zcl_thermostat_cluster.h index dade763..f14939c 100644 --- a/include/zcl/zb_zcl_thermostat_cluster.h +++ b/include/zcl/zb_zcl_thermostat_cluster.h @@ -51,6 +51,8 @@ * specified in the Amount field. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address diff --git a/include/zdo/zb_zdo_bind_mgr.h b/include/zdo/zb_zdo_bind_mgr.h index b74616e..b8ca736 100644 --- a/include/zdo/zb_zdo_bind_mgr.h +++ b/include/zdo/zb_zdo_bind_mgr.h @@ -80,6 +80,8 @@ typedef void (*zb_zdo_bind_rsp)( * NOT_SUPPORTED status to the Bind_req if not supported. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] dst_addr16 The Network address of destination @@ -162,6 +164,8 @@ typedef void (*zb_zdo_unbind_rsp)( * address must be that of the a Primary binding table cache or the SrcAddress. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] dst_addr16 The Network address of destination diff --git a/include/zdo/zb_zdo_config.h b/include/zdo/zb_zdo_config.h index a09adf7..cfa19cd 100644 --- a/include/zdo/zb_zdo_config.h +++ b/include/zdo/zb_zdo_config.h @@ -44,6 +44,8 @@ extern "C" { * 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 diff --git a/include/zdo/zb_zdo_dev_disc.h b/include/zdo/zb_zdo_dev_disc.h index 6d02a7f..3c84147 100644 --- a/include/zdo/zb_zdo_dev_disc.h +++ b/include/zdo/zb_zdo_dev_disc.h @@ -101,6 +101,8 @@ typedef void (*zb_zdo_addr_rsp)( * devices for which macRxOnWhenIdle = TRUE.\n * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr64 IEEE address for device of interest @@ -136,6 +138,8 @@ int zb_zdo_nwk_addr_req( * The destination addressing on this command shall be unicast. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -222,6 +226,8 @@ typedef void (*zb_zdo_active_ep_rsp)( * address of the remote device for which the active endpoint list is required. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -320,6 +326,8 @@ typedef void (*zb_zdo_simple_desc_rsp)( * required simple descriptor. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -425,6 +433,8 @@ typedef void (*zb_zdo_extended_simple_desc_rsp)( * where fragmentation is not supported. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -583,6 +593,8 @@ typedef void (*zb_zdo_match_desc_rsp)( * match is being sought. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -676,6 +688,8 @@ typedef void (*zb_zdo_node_desc_rsp)( * address of the remote device for which the node descriptor is required. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -758,6 +772,8 @@ typedef void (*zb_zdo_power_desc_rsp)( * address of the remote device for which the power descriptor is required. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -851,6 +867,8 @@ typedef void (*zb_zdo_complex_desc_rsp)( * required. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -943,6 +961,8 @@ typedef void (*zb_zdo_user_desc_rsp)( * address of the remote device for which the user descriptor is required. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -1022,6 +1042,8 @@ typedef void (*zb_zdo_user_desc_conf)( * through 0x1f are not permitted to be included in this string. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -1058,6 +1080,8 @@ int zb_zdo_user_desc_set( * broadcast to all devices for which macRxOnWhenIdle = TRUE. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest diff --git a/include/zdo/zb_zdo_nwk_mgr.h b/include/zdo/zb_zdo_nwk_mgr.h index 11a875d..9b695fb 100644 --- a/include/zdo/zb_zdo_nwk_mgr.h +++ b/include/zdo/zb_zdo_nwk_mgr.h @@ -94,6 +94,8 @@ typedef void (*zb_zdo_mgmt_nwk_disc_rsp)( * Device.\n\n The destination addressing on this command shall be unicast. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 destination address @@ -179,6 +181,8 @@ typedef void (*zb_zdo_mgmt_lqi_rsp)( * the destination address must be that of a ZigBee Coordinator or ZigBee Router. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 destination address @@ -247,6 +251,8 @@ typedef void (*zb_zdo_mgmt_rtg_rsp)( * must be that of the ZigBee Router or ZigBee Coordinator. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 destination network address @@ -325,6 +331,8 @@ typedef void (*zb_zdo_mgmt_bind_rsp)( * binding table. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 destination network address @@ -383,6 +391,8 @@ typedef void (*zb_zdo_mgmt_leave_rsp)( * binding table. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr64 The IEEE address for designated device to leave @@ -449,6 +459,8 @@ typedef void (*zb_zdo_mgmt_direct_join_rsp)( * Mgmt_Direct_Join_req. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr64 The IEEE address for designated device to leave @@ -512,6 +524,8 @@ typedef void (*zb_zdo_mgmt_permit_joining_rsp)( * 'broadcast to all routers and coordinator'. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 destination network address @@ -590,6 +604,8 @@ typedef void (*zb_zdo_mgmt_cache_rsp)( * device.\n\n The destination addressing on this primitive shall be unicast. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 destination network address @@ -621,6 +637,8 @@ int zb_zdo_mgmt_cache_req( * unicast or broadcast to all devices for which macRxOnWhenIdle = TRUE. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] scan_channels The five most significant bits (b27,...,b31) are reserved. diff --git a/include/zdo/zb_zdo_svc_disc.h b/include/zdo/zb_zdo_svc_disc.h index 6eb18a0..cc9101b 100644 --- a/include/zdo/zb_zdo_svc_disc.h +++ b/include/zdo/zb_zdo_svc_disc.h @@ -79,6 +79,8 @@ typedef void (*zb_zdo_system_server_discover_rsp)( * all devices for which macRxOnWhenIdle = TRUE.' * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] server_mask Server Mask Bit Assignment @@ -137,6 +139,8 @@ typedef void (*zb_zdo_find_node_cache_rsp)( * Find_node_cache_req. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -188,6 +192,8 @@ typedef void (*zb_zdo_discovery_cache_rsp)( * TRUE. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -240,6 +246,8 @@ typedef void (*zb_zdo_discovery_store_rsp)( * The destination addressing on this request is unicast. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -303,6 +311,8 @@ typedef void (*zb_zdo_node_desc_store_rsp)( * this request is the Node Descriptor the Local Device wishes to cache. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -358,6 +368,8 @@ typedef void (*zb_zdo_power_desc_store_rsp)( * this request is the Power Descriptor the Local Device wishes to cache. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -418,6 +430,8 @@ typedef void (*zb_zdo_active_ep_store_rsp)( * Device to manage the discovery cache information for the Local Device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -480,6 +494,8 @@ typedef void (*zb_zdo_simple_desc_store_rsp)( * Device to manage the discovery cache information for the Local Device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest @@ -536,6 +552,8 @@ typedef void (*zb_zdo_remove_node_cache_rsp)( * ZigBee end device on the Primary Discovery Cache device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr16 Network address for device of interest diff --git a/include/zigbee.h b/include/zigbee.h index 7b6fe50..5049b73 100644 --- a/include/zigbee.h +++ b/include/zigbee.h @@ -81,44 +81,6 @@ int zb_create(zigbee_h *handle); */ void zb_destroy(zigbee_h handle); -/** - * @brief Called after enabling zigbee service - * @details Response of enabling the zigbee service - * - * @since_tizen 4.0 - * - * @param[in] status #ZB_ZDP_SUCCESS \n - * #ZB_ZDP_NOT_SUPPORTED \n - * @param[in] user_data user data - * - * @see zb_enable() - */ -typedef void (*zb_enable_cb)(unsigned char status, void *user_data); - -/** - * @brief Enables the zigbee service. - * @details All this function to start zigbee service - * - * @since_tizen 4.0 - * - * @remarks You must free all resources of the zigbee by calling zb_destroy() - * if zigbee service is no longer needed. - * - * @param[in] handle The handle of zigbee - * @param[in] cb zb_enable_cb - * @param[in] user_data user data - * - * @return 0 on success, otherwise a negative error value. - * @retval #ZIGBEE_ERROR_NONE Successful - * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error - * - * @see zb_create() - * @see zb_destroy() - * - */ -int zb_enable(zigbee_h handle, zb_enable_cb cb, void *user_data); - /** * @brief Called after receiving events from zigbee service * @details This function can receive events from the devices in the network. @@ -182,51 +144,13 @@ typedef void (*zb_event_cb)(nwk_addr addr16, ieee_addr addr64, zb_event_e event_ */ int zb_set_event_cb(zigbee_h handle, zb_event_cb event_handler); -/** - * @brief Disables the zigbee service. - * @details All this function to stop zigbee service - * - * @since_tizen 4.0 - * - * @param[in] handle The handle of zigbee - * - * @remarks You must free all resources of the zigbee by calling zb_destroy() - * if zigbee service is no longer needed. - * - * - * @return 0 on success, otherwise a negative error value. - * @retval #ZIGBEE_ERROR_NONE Successful - * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error - * @retval #ZIGBEE_ERROR_NO_DATA No data available - * - * @see zb_create() - * @see zb_destroy() - * - */ -int zb_disable(zigbee_h handle); - -/** - * @brief Resets chip for the zigbee transceiver. - * @details If the Zigbee transceiver works abnormally, this function do HW reset. - * - * @since_tizen 4.0 - * - * @param[in] handle The handle of zigbee - * - * @return 0 on success, otherwise a negative error value. - * @retval #ZIGBEE_ERROR_NONE Successful - * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error - * - */ -int zb_hw_reset(zigbee_h handle); - /** * @brief Switches channel when an occupied channel is noisy. * @details When noisy, do energy scan and active scan to switch operational channel. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] channel target channel number to switch @@ -246,6 +170,8 @@ int zb_coex_start(zigbee_h handle, unsigned char channel); * @details Halt current operation related to channel switching. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @@ -277,6 +203,8 @@ typedef void (*zb_form_network_cb)(nwk_addr panid, void *user_data); * @details This function to enable the zigbee coordinator. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks If you want to change parameters related to network configuration you should * call zb_zdo_set_compatible_startup_parameters() API @@ -290,7 +218,7 @@ typedef void (*zb_form_network_cb)(nwk_addr panid, void *user_data); * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error * - * @post When forming network finished, fome_network_done event will be generated. + * @post When forming network finished, form_network_done event will be generated. * * @see zb_disable_network() * @see zb_zdo_set_compatible_startup_parameters() @@ -315,6 +243,8 @@ typedef void (*zb_disable_network_cb)(unsigned char status, void *user_data); * @details This function to stop zigbee coordinator * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks You must destroy all device and routing information before calling this * function. @@ -338,6 +268,8 @@ int zb_disable_network(zigbee_h handle, zb_disable_network_cb cb, void *user_dat * sets true, the the target end device will reset its state-machine as factory default. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr The source EUI64 of the binding (the remote device's EUI64) @@ -359,6 +291,8 @@ int zb_leave_device(zigbee_h handle, ieee_addr addr, bool remove_children, bool * a remote device or devices allow or disallow association. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks Especially, this can be very useful for disabling joining all throughout the * network. Typically, this is the last step when commissioning a network. It closes it @@ -383,6 +317,8 @@ int zb_permit_join(zigbee_h handle, unsigned char timeout); * zigbee-service daemon. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[out] addr64 the Zigbee IEEE MAC address of this machine. @@ -401,6 +337,8 @@ int zb_get_controller_mac_address(zigbee_h handle, ieee_addr addr64); * @details The function shows network environment * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[out] addr64 the Zigbee IEEE MAC address @@ -425,6 +363,8 @@ int zb_get_network_info(zigbee_h handle, ieee_addr addr64, nwk_addr *nodeid, * at each device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[out] count The number of end-devices @@ -444,6 +384,8 @@ int zb_get_all_device_list(zigbee_h handle, int *count, zb_end_device_info_h **l * @details This function return end-point list at each device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr64 the Zigbee IEEE MAC address @@ -463,6 +405,8 @@ int zb_get_endpoint_list(zigbee_h handle, ieee_addr addr64, unsigned char *count * @details This function return in and out cluster list at each device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] handle The handle of zigbee * @param[in] addr64 the Zigbee IEEE MAC address @@ -487,6 +431,8 @@ int zb_get_cluster_list(zigbee_h handle, ieee_addr addr64, unsigned char ep, * at each device. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] list The device information list * @@ -521,6 +467,8 @@ typedef bool (*zb_end_device_cb)(int index, zb_end_device_info_h child, void *us * @brief Calls a function for each children end-point of parent. * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @param[in] list handle of end-devices parent * @param[in] cb zb_end_device_cb() @@ -539,6 +487,8 @@ int zb_devices_info_foreach_end_device(zb_end_device_info_h *list, * @brief Gets network address of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -559,6 +509,8 @@ int zb_get_network_address(zb_end_device_info_h handle, nwk_addr *addr16); * @brief Gets ieee address of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -579,6 +531,8 @@ int zb_get_ieee_address(zb_end_device_info_h handle, ieee_addr addr64); * @brief Gets a number of end-points of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -599,6 +553,8 @@ int zb_get_num_of_ep(zb_end_device_info_h handle, unsigned char *count); * @brief Gets list of end-points of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -619,6 +575,8 @@ int zb_get_ep_list(zb_end_device_info_h handle, unsigned char *ep_list); * @brief Gets 802.15.4 MAC capability of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -640,6 +598,8 @@ int zb_get_mac_capabiity(zb_end_device_info_h handle, unsigned char *capability) * @brief Gets ability of alternative PAN coordinator of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -662,6 +622,8 @@ int zb_get_alternative_pan_coordinator(zb_end_device_info_h handle, * @brief Gets device id of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -684,6 +646,8 @@ int zb_get_device_id(zb_end_device_info_h handle, unsigned char ep, unsigned sho * @brief Gets profile id of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -706,6 +670,8 @@ int zb_get_profile_id(zb_end_device_info_h handle, unsigned char ep, unsigned sh * @brief Gets power source type of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * @@ -727,6 +693,8 @@ int zb_get_power_source(zb_end_device_info_h handle, unsigned char *power_src); * @brief Gets security capability of a specific end-point * * @since_tizen 4.0 + * @privlevel public + * @privilege %http://tizen.org/privilege/zigbee * * @remarks This function should be called in zb_end_device_cb() * diff --git a/include/zigbee_internal.h b/include/zigbee_internal.h new file mode 100644 index 0000000..39bce1a --- /dev/null +++ b/include/zigbee_internal.h @@ -0,0 +1,141 @@ +/* + * 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 __CAPI_NETWORK_ZIGBEE_INTERNAL_H__ +#define __CAPI_NETWORK_ZIGBEE_INTERNAL_H__ + +/* For test */ +#define ZIGBEE_SUPPORT_ORDERED_SEQUENCE_DATA 0 + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#include +#include +#include +#include +#include +#include + +/** + * @file zigbee_internal.h + */ + +/** + * @ingroup CAPI_NETWORK_FRAMEWORK + * @addtogroup CAPI_NETWORK_ZIGBEE_MODULE ZigBee + * + * @{ + */ + +/** + * @brief Called after enabling zigbee service + * @details Response of enabling the zigbee service + * + * @since_tizen 4.0 + * + * @param[in] status #ZB_ZDP_SUCCESS \n + * #ZB_ZDP_NOT_SUPPORTED \n + * @param[in] user_data user data + * + * @see zb_enable() + */ +typedef void (*zb_enable_cb)(unsigned char status, void *user_data); + +/** + * @internal + * @brief Enables the zigbee service. + * @details All this function to start zigbee service + * + * @since_tizen 4.0 + * @privlevel platform + * @privilege %http://tizen.org/privilege/zigbee.admin + * + * @remarks You must free all resources of the zigbee by calling zb_destroy() + * if zigbee service is no longer needed. + * + * @param[in] handle The handle of zigbee + * @param[in] cb zb_enable_cb + * @param[in] user_data user data + * + * @return 0 on success, otherwise a negative error value. + * @retval #ZIGBEE_ERROR_NONE Successful + * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error + * + * @see zb_create() + * @see zb_destroy() + * + */ +int zb_enable(zigbee_h handle, zb_enable_cb cb, void *user_data); + +/** + * @internal + * @brief Disables the zigbee service. + * @details All this function to stop zigbee service + * + * @since_tizen 4.0 + * @privlevel platform + * @privilege %http://tizen.org/privilege/zigbee.admin + * + * @param[in] handle The handle of zigbee + * + * @remarks You must free all resources of the zigbee by calling zb_destroy() + * if zigbee service is no longer needed. + * + * + * @return 0 on success, otherwise a negative error value. + * @retval #ZIGBEE_ERROR_NONE Successful + * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error + * @retval #ZIGBEE_ERROR_NO_DATA No data available + * + * @see zb_create() + * @see zb_destroy() + * + */ +int zb_disable(zigbee_h handle); + +/** + * @internal + * @brief Resets chip for the zigbee transceiver. + * @details If the Zigbee transceiver works abnormally, this function do HW reset. + * + * @since_tizen 4.0 + * @privlevel platform + * @privilege %http://tizen.org/privilege/zigbee.admin + * + * @param[in] handle The handle of zigbee + * + * @return 0 on success, otherwise a negative error value. + * @retval #ZIGBEE_ERROR_NONE Successful + * @retval #ZIGBEE_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #ZIGBEE_ERROR_IO_ERROR Unexpected d-bus error + * + */ +int zb_hw_reset(zigbee_h handle); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif /* __CAPI_NETWORK_ZIGBEE_INTERNAL_H__ */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 1a50b5e..bd52a5e 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -11,8 +11,8 @@ FILE(GLOB CLIENT_SRCS *.c ${CMAKE_SOURCE_DIR}/common/*.c) pkg_check_modules(client_pkgs REQUIRED glib-2.0 gio-2.0 gio-unix-2.0 dlog capi-base-common capi-system-info) INCLUDE_DIRECTORIES(${client_pkgs_INCLUDE_DIRS}) -# Temporary debug info enable : -g -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -pthread -g") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -pthread") +SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -O0 -g") ADD_DEFINITIONS("-DZIGBEE_DBUS_INTERFACE=\"${DBUS_INTERFACE}\"") ADD_DEFINITIONS("-DZIGBEE_DBUS_OBJPATH=\"${DBUS_OBJECT_PATH}\"") diff --git a/lib/zbl.c b/lib/zbl.c index 630874c..8ea0fc8 100644 --- a/lib/zbl.c +++ b/lib/zbl.c @@ -24,6 +24,7 @@ #include "zbl.h" #include "zbl_dbus.h" #include "zigbee.h" +#include "zigbee_internal.h" API int zb_create(zigbee_h *handle) { diff --git a/lib/zbl_dbus.c b/lib/zbl_dbus.c index 99e217d..1e89500 100644 --- a/lib/zbl_dbus.c +++ b/lib/zbl_dbus.c @@ -2903,6 +2903,34 @@ SCENE_GET_SCENE_MEMBERSHIP_REQ_OUT: } } +static int _check_zigbee_privilege() +{ + int result = ZIGBEE_ERROR_NONE; + GVariant *variant = NULL; + GError *dbus_err = NULL; + + DBG("_check_zigbee_privilege()"); + RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR); + RETV_IF(NULL == service_gproxy, ZIGBEE_ERROR_IO_ERROR); + + variant = g_dbus_proxy_call_sync(service_gproxy, "check_privilege", + NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err); + if (!variant) { + ERR("Failed to check_zigbee_privilege [%s]", dbus_err->message); + if(g_strcmp0(dbus_err->message, "AccessDenied")) + result = ZIGBEE_ERROR_PERMISSION_DENIED; + else if(g_strcmp0(dbus_err->message, "PermissionDenied")) + result = ZIGBEE_ERROR_PERMISSION_DENIED; + else + result = ZIGBEE_ERROR_IO_ERROR; + + g_error_free(dbus_err); + } + g_variant_unref(variant); + + return result; +} + int zbl_set_event_cb(zigbee_h handle, zb_event_cb event_handler) { RETV_IF(NULL == handle, ZIGBEE_ERROR_INVALID_PARAMETER); @@ -7935,3 +7963,15 @@ int zbl_dbus_get_timeout(GDBusProxy *proxy) return timeout; } +int zbl_check_privilege() +{ + int ret = _check_zigbee_privilege(); + if (ret == ZIGBEE_ERROR_PERMISSION_DENIED) + return ret; + else if (ret != ZIGBEE_ERROR_NONE) { + ERR("Failed to check privilege"); + return ZIGBEE_ERROR_OPERATION_FAILED; + } + + return ZIGBEE_ERROR_NONE; +} diff --git a/lib/zbl_dbus.h b/lib/zbl_dbus.h index 90728ce..67edb1a 100644 --- a/lib/zbl_dbus.h +++ b/lib/zbl_dbus.h @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -26,6 +27,8 @@ int zbl_dbus_start(zigbee_h handle); void zbl_dbus_stop(zigbee_h handle); GDBusConnection* zbl_dbus_get_object(void); int zbl_dbus_get_timeout(GDBusProxy *proxy); +int zbl_check_privilege(); + int zbl_enable(zigbee_h handle, zb_enable_cb cb, void *user_data); int zbl_set_event_cb(zigbee_h handle, zb_event_cb event_handler); int zbl_disable(void); diff --git a/packaging/capi-network-zigbee.spec b/packaging/capi-network-zigbee.spec index 679e769..95061c1 100644 --- a/packaging/capi-network-zigbee.spec +++ b/packaging/capi-network-zigbee.spec @@ -1,47 +1,31 @@ -Name: capi-network-zigbee -Summary: Network Zigbee Service in Tizen CAPI -Version: 0.0.1 -Release: 0 -Group: Network & Connectivity/Other -License: Apache-2.0 -Source0: %{name}-%{version}.tar.gz -Source1001: %{name}.manifest -Source1003: lib%{name}-old.manifest -Source1004: test-%{name}-old.manifest +%define project_name zigbee + +Name: capi-network-zigbee +Summary: Network Zigbee Service in Tizen CAPI +Version: 0.0.1 +Release: 0 +Group: Network & Connectivity/Other +License: Apache-2.0 +Source0: %{name}-%{version}.tar.gz +Source1001: %{name}.manifest BuildRequires: cmake BuildRequires: pkgconfig(dbus-glib-1) BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(capi-system-info) -%if 0%{?tizen_version_major} >= 3 -BuildRequires: pkgconfig(cynara-client) -BuildRequires: pkgconfig(cynara-session) -BuildRequires: pkgconfig(cynara-creds-gdbus) -%endif + Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig -#%define _unitdir /usr/lib/systemd/system -%define project_name zigbee - %description -zigbee service library - -%package lib -Summary: Zigbee Library (Shared Library) -Group: Network & Connectivity/Other -Requires: %{name} = %{version} - -%description lib -Zigbee Library (Shared Library) +Zigbee service library This package aims to support the Zigbee service in Tizen platform. %package devel Summary: Zigbee Library (Shared Library) (development) Group: Network & Connectivity/Other Requires: %{name} = %{version}-%{release} -Requires: %{name}-lib %description devel Zigbee Library (Shared Library) (Development) @@ -50,7 +34,6 @@ This package aims to support the Zigbee developers. %package -n test-%{name} Summary: Test Application for Zigbee Group: Network & Connectivity/Other -Requires: %{name}-lib %description -n test-%{name} Zigbee Library test program(s) @@ -58,23 +41,9 @@ Zigbee Library test program(s) %prep %setup #-q chmod g-w %_sourcedir/* -%if 0%{?tizen_version_major} >= 3 cp %{SOURCE1001} ./%{name}.manifest -cp %{SOURCE1001} ./lib%{name}.manifest -cp %{SOURCE1004} ./test-%{name}.manifest -%else -cp %{SOURCE1001} ./%{name}.manifest -cp %{SOURCE1003} ./lib%{name}.manifest -cp %{SOURCE1004} ./test-%{name}.manifest -%endif %build -%if 0%{?tizen_version_major} >= 3 -TZ_VER_3=1 -%else -TZ_VER_3=0 -%endif - MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %cmake . -DMAJORVER=%{MAJORVER} -DFULLVER=%{version} \ @@ -85,43 +54,17 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` rm -rf %{buildroot}/BUILD/%{name} %make_install -%if 0%{?tizen_version_major} >= 3 -%else -mkdir -p %{buildroot}/%{_datadir}/license -cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name} -cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-lib -cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-test -%endif - %post +/sbin/ldconfig %postun /sbin/ldconfig # re-inialize shared library db -%post lib -/sbin/ldconfig - -%postun lib -/sbin/ldconfig - %files %manifest %{name}.manifest %defattr(-,root,root,-) -%if 0%{?tizen_version_major} < 3 -%{_datadir}/license/%{name} -%else %license LICENSE.APLv2 -%endif - -%files lib -%manifest lib%{name}.manifest -%defattr(-,root,root,-) %{_libdir}/lib%{project_name}.so.* -%if 0%{?tizen_version_major} >= 3 -%license LICENSE.APLv2 -%else -%{_datadir}/license/%{name}-lib -%endif %files devel %defattr(-,root,root,-) @@ -132,11 +75,7 @@ cp LICENSE.APLv2 %{buildroot}/%{_datadir}/license/%{name}-test %{_includedir}/%{project_name}/zcl/*.h %files -n test-%{name} -%manifest test-%{name}.manifest +%manifest %{name}.manifest %defattr(-,root,root,-) -%if 0%{?tizen_version_major} >= 3 %license LICENSE.APLv2 -%else -%{_datadir}/license/%{name}-test -%endif %{_bindir}/test-zigbee2 diff --git a/packaging/libcapi-network-zigbee-old.manifest b/packaging/libcapi-network-zigbee-old.manifest deleted file mode 100644 index 3919bd4..0000000 --- a/packaging/libcapi-network-zigbee-old.manifest +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/packaging/test-capi-network-zigbee-old.manifest b/packaging/test-capi-network-zigbee-old.manifest deleted file mode 100644 index 740b259..0000000 --- a/packaging/test-capi-network-zigbee-old.manifest +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/test/main.c b/test/main.c index 4ab5503..95ec2c2 100644 --- a/test/main.c +++ b/test/main.c @@ -24,6 +24,7 @@ #include #include +#include #include "main.h" #include "menu.h"