From: Yunjin Lee Date: Mon, 9 Jan 2017 04:49:36 +0000 (+0900) Subject: Update API documentation X-Git-Tag: accepted/tizen/3.0/wearable/20170110.055849 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Ftags%2Faccepted%2Ftizen%2F3.0%2Fwearable%2F20170110.055849;p=platform%2Fcore%2Fsecurity%2Fprivilege-info.git Update API documentation Change-Id: Ib08d47a37662e52de0abcad9b30abf2cb2929b08 Signed-off-by: Yunjin Lee --- diff --git a/doc/privilege-info_doc.h b/doc/privilege-info_doc.h index abf4284..d65741a 100755 --- a/doc/privilege-info_doc.h +++ b/doc/privilege-info_doc.h @@ -13,21 +13,23 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + + #ifndef PRIVILEGE_INFO_DOC_H_ #define PRIVILEGE_INFO_DOC_H_ + /** * @ingroup CAPI_SECURITY_FRAMEWORK * @defgroup CAPI_SECURITY_FRAMEWORK_PRIVILEGE_INFO_MODULE Privilege Info - * - * * @section CAPI_SECURITY_FRAMEWORK_PRIVILEGE_INFO_MODULE_HEADER Requires Header - * \#include + * \#include * * @section CAPI_SECURITY_FRAMEWORK_PRIVILEGE_INFO_MODULE_OVERVIEW Overview * A library for reading privilege information of the given privilege and API issue version. - * It provides the display name or description of privileges + * It provides the display name or description of privileges. * If there's no matching privilege then it shows last token of given privilege or description string for undefined privileges. */ + #endif /* PRIVILEEGE_INFO_DOC_H_ */ diff --git a/src/include/privilege_information.h b/src/include/privilege_information.h index 6b115ba..b1c9ab9 100755 --- a/src/include/privilege_information.h +++ b/src/include/privilege_information.h @@ -14,29 +14,34 @@ * limitations under the License. */ + #ifndef __TIZEN_SECURITY_PRIVILEGE_INFORMAION_H #define __TIZEN_SECURITY_PRIVILEGE_INFORMAION_H + #include + #ifdef __cplusplus extern "C" { #endif + /** * @addtogroup CAPI_SECURITY_FRAMEWORK_PRIVILEGE_INFO_MODULE * @{ */ + /** - * @brief Enumerations of error code for Privilege Information. + * @brief Enumeration for error code for Privilege Information. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif */ typedef enum { - PRVINFO_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - PRVINFO_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */ - PRVINFO_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - PRVINFO_ERROR_INTERNAL_ERROR = TIZEN_ERROR_UNKNOWN, /**< Unknown error */ + PRVINFO_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + PRVINFO_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */ + PRVINFO_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ + PRVINFO_ERROR_INTERNAL_ERROR = TIZEN_ERROR_UNKNOWN, /**< Unknown error */ } privilege_info_error_e; @@ -44,10 +49,11 @@ typedef enum { * @brief Gets the display name of the given privilege. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks @a display_name must be released using free(). - * @param [in] api_version The version of API - * @param [in] privilege The privilege - * @param [out] display_name The display name of the privilege - * @return 0 on success, otherwise a negative error value. + * @param[in] api_version The version of API + * @param[in] privilege The privilege + * @param[out] display_name The display name of the privilege + * @return @c 0 on success, + * otherwise a negative error value * @retval #PRVINFO_ERROR_NONE Successful * @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter @@ -55,16 +61,18 @@ typedef enum { */ int privilege_info_get_display_name(const char *api_version, const char *privilege, char **display_name); + /** * @brief Gets the display name of the given privilege. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks @a display_name must be released using free(). * @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB - * @param [in] package_type The type of application package - * @param [in] api_version The version of API - * @param [in] privilege The privilege - * @param [out] display_name The display name of the privilege - * @return 0 on success, otherwise a negative error value. + * @param[in] package_type The type of application package + * @param[in] api_version The version of API + * @param[in] privilege The privilege + * @param[out] display_name The display name of the privilege + * @return @c 0 on success, + * otherwise a negative error value * @retval #PRVINFO_ERROR_NONE Successful * @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter @@ -72,14 +80,16 @@ int privilege_info_get_display_name(const char *api_version, const char *privile */ int privilege_info_get_display_name_by_pkgtype(const char *package_type, const char *api_version, const char *privilege, char **display_name); + /** * @brief Gets the description of the given privilege. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks @a description must be released using free(). - * @param [in] api_version The version of API - * @param [in] privilege The privilege - * @param [out] description The description of the privilege - * @return 0 on success, otherwise a negative error value. + * @param[in] api_version The version of API + * @param[in] privilege The privilege + * @param[out] description The description of the privilege + * @return @c 0 on success, + * otherwise a negative error value * @retval #PRVINFO_ERROR_NONE Successful * @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter @@ -87,16 +97,18 @@ int privilege_info_get_display_name_by_pkgtype(const char *package_type, const c */ int privilege_info_get_description(const char *api_version, const char *privilege, char **description); + /** * @brief Gets the description of the given privilege. * @since_tizen @if WEARABLE 2.3.1 @elseif MOBILE 2.3 @endif * @remarks @a description must be released using free(). * @remarks package_type must be one of followings: PRVINFO_PACKAGE_TYPE_NATIVE, PRVINFO_PACKAGE_TYPE_WEB - * @param [in] package_type The type of application package - * @param [in] api_version The version of API - * @param [in] privilege The privilege - * @param [out] description The description of the privilege - * @return 0 on success, otherwise a negative error value. + * @param[in] package_type The type of application package + * @param[in] api_version The version of API + * @param[in] privilege The privilege + * @param[out] description The description of the privilege + * @return @c 0 on success, + * otherwise a negative error value * @retval #PRVINFO_ERROR_NONE Successful * @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter @@ -104,14 +116,16 @@ int privilege_info_get_description(const char *api_version, const char *privileg */ int privilege_info_get_description_by_pkgtype(const char *package_type, const char *api_version, const char *privilege, char **description); + /** * @brief Gets the display name of the privacy group in which the given privilege is included. * @since_tizen 3.0 * @remarks @a privacy_name must be released using free(). * @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned. - * @param [in] privilege The privilege - * @param [out] privacy_name The privacy group's display name that the given privilege is included in - * @return 0 on success, otherwise a negative error value. + * @param[in] privilege The privilege + * @param[out] privacy_name The privacy group's display name that the given privilege is included in + * @return @c 0 on success, + * otherwise a negative error value * @retval #PRVINFO_ERROR_NONE Successful * @retval #PRVINFO_ERROR_OUT_OF_MEMORY Out of memory * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter @@ -119,25 +133,32 @@ int privilege_info_get_description_by_pkgtype(const char *package_type, const ch */ int privilege_info_get_privacy_display_name(const char *privilege, char **privacy_name); + /** * @brief Gets the status of the given privacy related privilege. * @since_tizen 3.0 * @remarks @a privilege must be privacy related, otherwise #PRVINFO_ERROR_INVALID_PARAMETER is returned. - * @remarks In case of errors, @a status is set to true. - * @param [in] privilege The privilege - * @param [out] status true if the privilege is on and false if the privilege is off. - * @return 0 on success, otherwise a negative error value. + * In case of errors, @a status is set to @c true. + * @param[in] privilege The privilege + * @param[out] status @c true if the privilege is on, + * and @c false if the privilege is off + * @return @c 0 on success, + * otherwise a negative error value * @retval #PRVINFO_ERROR_NONE Successful * @retval #PRVINFO_ERROR_INVALID_PARAMETER Invalid function parameter * @retval #PRVINFO_ERROR_INTERNAL_ERROR Unknown error */ int privilege_info_get_privacy_privilege_status(const char *privilege, bool *status); + + /** * @} */ + #ifdef __cplusplus } #endif + #endif /* __TIZEN_SECURITY_PRIVILEGE_INFORMAION_H */