summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongsun Lee <ds73.lee@samsung.com>2016-12-16 13:30:20 +0900
committerDongsun Lee <ds73.lee@samsung.com>2016-12-16 13:30:20 +0900
commit1fec37cac1b01d21640a1287dde25fc735362687 (patch)
treecce92d3b443764c6d50264032d323a01d5dc5ac8
parent120967d18e94398e8c29ec19c8555f36c2350b17 (diff)
downloadcsr-framework-1fec37cac1b01d21640a1287dde25fc735362687.tar.gz
csr-framework-1fec37cac1b01d21640a1287dde25fc735362687.tar.bz2
csr-framework-1fec37cac1b01d21640a1287dde25fc735362687.zip
Change-Id: I67cb14c92c6b79720218f99bd80e4aa5b77b4002 Signed-off-by: Dongsun Lee <ds73.lee@samsung.com>
-rw-r--r--doc/csr-framework-admin_doc.h7
-rw-r--r--doc/csr-framework-cs_doc.h8
-rw-r--r--doc/csr-framework-wp_doc.h8
-rw-r--r--doc/csr-framework_doc.h8
-rw-r--r--src/include/csr/csr-content-screening-types.h117
-rw-r--r--src/include/csr/csr-content-screening.h1084
-rw-r--r--src/include/csr/csr-engine-manager.h286
-rw-r--r--src/include/csr/csr-error.h55
-rw-r--r--src/include/csr/csr-web-protection-types.h37
-rw-r--r--src/include/csr/csr-web-protection.h225
10 files changed, 802 insertions, 1033 deletions
diff --git a/doc/csr-framework-admin_doc.h b/doc/csr-framework-admin_doc.h
index 2ca1332..96a70ac 100644
--- a/doc/csr-framework-admin_doc.h
+++ b/doc/csr-framework-admin_doc.h
@@ -13,13 +13,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+
#ifndef __TIZEN_CORE_CSR_FRAMEWORK_ADMIN_DOC_H__
#define __TIZEN_CORE_CSR_FRAMEWORK_ADMIN_DOC_H__
+
/**
* @ingroup CAPI_CSR_FRAMEWORK_MODULE
* @defgroup CAPI_CSR_FRAMEWORK_ADMIN_MODULE Admin Module
- * @brief It provides APIs managing underlying anti malware engines.
- *
+ * @brief It provides APIs managing underlying anti malware engines.
* @section CAPI_CSR_FRAMEWORK_ADMIN_MODULE_HEADER Required Header
* \#include <csr-engine-manager.h>
*
@@ -27,4 +29,5 @@
* It provides APIs getting engine information and enabling or disabling underlying anti malware engines.
*/
+
#endif /* __TIZEN_CORE_CSR_FRAMEWORK_ADMIN_DOC_H__ */
diff --git a/doc/csr-framework-cs_doc.h b/doc/csr-framework-cs_doc.h
index 292c8ed..bb24c6f 100644
--- a/doc/csr-framework-cs_doc.h
+++ b/doc/csr-framework-cs_doc.h
@@ -13,13 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+
#ifndef __TIZEN_CORE_CSR_FRAMEWORK_CS_DOC_H__
#define __TIZEN_CORE_CSR_FRAMEWORK_CS_DOC_H__
+
+
/**
* @ingroup CAPI_CSR_FRAMEWORK_MODULE
* @defgroup CAPI_CSR_FRAMEWORK_CS_MODULE Content Screening Module
- * @brief It provides APIs scanning contents for data, files, and directories to detect malwares.
- *
+ * @brief It provides APIs scanning contents for data, files, and directories to detect malwares.
* @section CAPI_CSR_FRAMEWORK_CS_MODULE_HEADER Required Header
* \#include <csr-content-screening.h>
* \#include <csr-content-screening-types.h>
@@ -29,4 +32,5 @@
* It provides APIs scanning contents for data, files, and directories to detect malwares. Actual scanning is performed by underlying anti malware engines which will be provided by a device manufacturer.
*/
+
#endif /* __TIZEN_CORE_CSR_FRAMEWORK_CS_DOC_H__ */
diff --git a/doc/csr-framework-wp_doc.h b/doc/csr-framework-wp_doc.h
index 138d060..97ebe33 100644
--- a/doc/csr-framework-wp_doc.h
+++ b/doc/csr-framework-wp_doc.h
@@ -13,13 +13,16 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+
#ifndef __TIZEN_CORE_CSR_FRAMEWORK_WP_DOC_H__
#define __TIZEN_CORE_CSR_FRAMEWORK_WP_DOC_H__
+
+
/**
* @ingroup CAPI_CSR_FRAMEWORK_MODULE
* @defgroup CAPI_CSR_FRAMEWORK_WP_MODULE Web Protection Module
- * @brief It provides provides APIs checking URL reputation to see if the URL is risky or not.
- *
+ * @brief It provides provides APIs checking URL reputation to see if the URL is risky or not.
* @section CAPI_CSR_FRAMEWORK_WP_MODULE_HEADER Required Header
* \#include <csr-web-protection.h>
* \#include <csr-web-protection-types.h>
@@ -28,4 +31,5 @@
* It provides provides APIs checking URL reputation to see if the URL is risky or not. Actual operation is performed by an underlying anti malware engine which will be provided by a device manufacturer.
*/
+
#endif /* __TIZEN_CORE_CSR_FRAMEWORK_WP_DOC_H__ */
diff --git a/doc/csr-framework_doc.h b/doc/csr-framework_doc.h
index 6ba706f..ddaede4 100644
--- a/doc/csr-framework_doc.h
+++ b/doc/csr-framework_doc.h
@@ -15,11 +15,12 @@
*/
#ifndef __TIZEN_CORE_CSR_FRAMEWORK_DOC_H__
#define __TIZEN_CORE_CSR_FRAMEWORK_DOC_H__
+
+
/**
* @ingroup CAPI_SECURITY_FRAMEWORK
* @defgroup CAPI_CSR_FRAMEWORK_MODULE CSR
- * @brief The CSR (Content Screening & Reputation) is an anti malware module. It provides Content Screening Service and Web Protection Service to protect a device and an user.
- *
+ * @brief The CSR (Content Screening & Reputation) is an anti malware module. It provides Content Screening Service and Web Protection Service to protect a device and an user.
* @section CAPI_CSR_FRAMEWORK_MODULE_OVERVIEW Overview
* <table>
* <tr><th>API</th><th>Description</th></tr>
@@ -36,11 +37,8 @@
* <td> Provides APIs managing underlying anti malware engines.</td>
* </tr>
* </table>
- *
* The CSR (Content Screening & Reputation) is an anti malware moodule. It provides Content Screening Service and Web Protection Service to protect a device and an user
* The Content Screening Service enables caller modules and applications to scan the content for data, files, and directories.
* The Web Protection Service enables caller modules and applications to check if a URL they want to access is risky or not.
- *
*/
-
#endif /* __TIZEN_CORE_CSR_FRAMEWORK_DOC_H__ */
diff --git a/src/include/csr/csr-content-screening-types.h b/src/include/csr/csr-content-screening-types.h
index a834fee..be4125b 100644
--- a/src/include/csr/csr-content-screening-types.h
+++ b/src/include/csr/csr-content-screening-types.h
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -14,10 +14,10 @@
* limitations under the License
*/
/*
- * @file csr-content-screening-types.h
- * @author Dongsun Lee (ds73.lee@samsung.com)
- * @version 1.0
- * @brief Content screening CAPI enums, handles and callbacks
+ * @file csr-content-screening-types.h
+ * @author Dongsun Lee (ds73.lee@samsung.com)
+ * @version 1.0
+ * @brief Content screening CAPI enums, handles and callbacks
*/
#ifndef __CSR_CONTENT_SCREENING_TYPES_H_
#define __CSR_CONTENT_SCREENING_TYPES_H_
@@ -31,69 +31,76 @@ extern "C" {
* @{
*/
+
/**
* @partner
- * @brief Severity level of a detected malware
+ * @brief Enumeration for severity level of a detected malware.
* @since_tizen 3.0
*/
typedef enum {
- CSR_CS_SEVERITY_LOW = 0x01, /**< Low Severity. User can choose how to handle between skip, ignore and remove. */
- CSR_CS_SEVERITY_MEDIUM = 0x02, /**< Medium Severity. User can choose how to handle between skip, ignore and remove. */
- CSR_CS_SEVERITY_HIGH = 0x03 /**< High Severity. User can choose how to handle between skip and remove. */
+ CSR_CS_SEVERITY_LOW = 0x01, /**< Low Severity. User can choose how to handle between skip, ignore and remove. */
+ CSR_CS_SEVERITY_MEDIUM = 0x02, /**< Medium Severity. User can choose how to handle between skip, ignore and remove. */
+ CSR_CS_SEVERITY_HIGH = 0x03 /**< High Severity. User can choose how to handle between skip and remove. */
} csr_cs_severity_level_e;
+
/**
* @partner
- * @brief The option of asking user about handling a detected malware
+ * @brief Enumeration for the option of asking user about handling a detected malware.
* @since_tizen 3.0
*/
typedef enum {
- CSR_CS_ASK_USER_NO = 0x00, /**< Do not ask the user even if malicious contents were found.*/
- CSR_CS_ASK_USER_YES = 0x01 /**< Ask the user when malicious contents were found. */
+ CSR_CS_ASK_USER_NO = 0x00, /**< Do not ask the user even if malicious contents were found.*/
+ CSR_CS_ASK_USER_YES = 0x01 /**< Ask the user when malicious contents were found. */
} csr_cs_ask_user_e;
+
/**
* @partner
- * @brief The user response from popup
+ * @brief Enumeration for the user response from popup.
* @since_tizen 3.0
*/
typedef enum {
- CSR_CS_USER_RESPONSE_USER_NOT_ASKED = 0x00, /**< No response from user. */
- CSR_CS_USER_RESPONSE_REMOVE = 0x01, /**< A user decided to remove a detected malicious content and it was removed. */
- CSR_CS_USER_RESPONSE_PROCESSING_ALLOWED = 0x02, /**< A user decided to process a detected malware. */
- CSR_CS_USER_RESPONSE_PROCESSING_DISALLOWED = 0x03, /**< A user decided not to process a detected malware. */
+ CSR_CS_USER_RESPONSE_USER_NOT_ASKED = 0x00, /**< No response from user. */
+ CSR_CS_USER_RESPONSE_REMOVE = 0x01, /**< A user decided to remove a detected malicious content and it was removed. */
+ CSR_CS_USER_RESPONSE_PROCESSING_ALLOWED = 0x02, /**< A user decided to process a detected malware. */
+ CSR_CS_USER_RESPONSE_PROCESSING_DISALLOWED = 0x03, /**< A user decided not to process a detected malware. */
} csr_cs_user_response_e;
+
/**
* @partner
- * @brief The action types for the detected malware files
+ * @brief Enumeration for the action types for the detected malware files.
* @since_tizen 3.0
*/
typedef enum {
- CSR_CS_ACTION_REMOVE = 0x00, /**< Remove the detected malware file. */
- CSR_CS_ACTION_IGNORE = 0x01, /**< Ignore the detected malware file. */
- CSR_CS_ACTION_UNIGNORE = 0x02 /**< Unignore the previously ignored file. */
+ CSR_CS_ACTION_REMOVE = 0x00, /**< Remove the detected malware file. */
+ CSR_CS_ACTION_IGNORE = 0x01, /**< Ignore the detected malware file. */
+ CSR_CS_ACTION_UNIGNORE = 0x02 /**< Unignore the previously ignored file. */
} csr_cs_action_e;
+
/**
* @partner
- * @brief Maximum core usage during scanning
+ * @brief Enumeration for maximum core usage during scanning.
* @since_tizen 3.0
*/
typedef enum {
- CSR_CS_CORE_USAGE_DEFAULT = 0x00, /**< Use default setting value. */
- CSR_CS_CORE_USAGE_ALL = 0x01, /**< Use all cores during scanning. */
- CSR_CS_CORE_USAGE_HALF = 0x02, /**< Use half cores during scanning. */
- CSR_CS_CORE_USAGE_SINGLE = 0x03 /**< Use a single core during scanning. */
+ CSR_CS_CORE_USAGE_DEFAULT = 0x00, /**< Use default setting value. */
+ CSR_CS_CORE_USAGE_ALL = 0x01, /**< Use all cores during scanning. */
+ CSR_CS_CORE_USAGE_HALF = 0x02, /**< Use half cores during scanning. */
+ CSR_CS_CORE_USAGE_SINGLE = 0x03 /**< Use a single core during scanning. */
} csr_cs_core_usage_e;
+
/**
* @partner
- * @brief Context handle of content screening APIs.
+ * @brief Content screening APIs context handle.
* @since_tizen 3.0
*/
typedef struct __csr_cs_context_s *csr_cs_context_h;
+
/**
* @partner
* @brief Detected malware handle.
@@ -101,6 +108,7 @@ typedef struct __csr_cs_context_s *csr_cs_context_h;
*/
typedef struct __csr_cs_malware_s *csr_cs_malware_h;
+
/**
* @partner
* @brief Detected malware list handle.
@@ -108,6 +116,7 @@ typedef struct __csr_cs_malware_s *csr_cs_malware_h;
*/
typedef struct __csr_cs_malware_list_s *csr_cs_malware_list_h;
+
/**
* @partner
* @brief Engine info handle.
@@ -115,20 +124,15 @@ typedef struct __csr_cs_malware_list_s *csr_cs_malware_list_h;
*/
typedef struct __csr_cs_engine_s *csr_cs_engine_h;
+
/**
* @partner
* @brief Called when each file scanning is done without malware.
- *
* @since_tizen 3.0
- *
* @remarks Only for asynchronous scan functions.
* @remarks Called for each file or application which is not detected malware.
- *
- * @param[in] file_path A path of the file scanned. It would be package path if it's
- * in application.
- * @param[in] user_data A pointer of a user data. It's provided by client
- * when calling asyncronous scanning method.
- *
+ * @param[in] file_path A path of the file scanned. It would be package path if it's in application
+ * @param[in] user_data A pointer of a user data. It's provided by client when calling asyncronous scanning method
* @see csr_cs_set_file_scanned_cb()
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
@@ -136,21 +140,16 @@ typedef struct __csr_cs_engine_s *csr_cs_engine_h;
*/
typedef void (*csr_cs_file_scanned_cb)(const char *file_path, void *user_data);
+
/**
* @partner
* @brief Called when each file scanning is done with malware.
- *
* @since_tizen 3.0
- *
* @remarks Only for asynchronous scan functions.
* @remarks Called for each file or application which is detected malware.
- * @remarks @a malware will be released when a context is released using
- * csr_cs_context_destroy().
- *
- * @param[in] malware The detected malware handle.
- * @param[in] user_data A pointer of a user data. It's provided by client
- * when calling asyncronous scanning method.
- *
+ * @remarks @a malware will be released when a context is released using csr_cs_context_destroy().
+ * @param[in] malware The detected malware handle.
+ * @param[in] user_data A pointer of a user data. It's provided by client when calling asyncronous scanning method.
* @see csr_cs_set_detected_cb()
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
@@ -158,18 +157,14 @@ typedef void (*csr_cs_file_scanned_cb)(const char *file_path, void *user_data);
*/
typedef void (*csr_cs_detected_cb)(csr_cs_malware_h malware, void *user_data);
+
/**
* @partner
* @brief Called when scanning is finished successfully.
- *
* @since_tizen 3.0
- *
* @remarks Only for asynchronous scan functions.
* @remarks Called only once at the end of scanning when success.
- *
- * @param[in] user_data A pointer of a user data. It's provided by client
- * when calling asyncronous scanning method.
- *
+ * @param[in] user_data A pointer of a user data. It's provided by client when calling asyncronous scanning method
* @see csr_cs_set_completed_cb()
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
@@ -177,18 +172,14 @@ typedef void (*csr_cs_detected_cb)(csr_cs_malware_h malware, void *user_data);
*/
typedef void (*csr_cs_completed_cb)(void *user_data);
+
/**
* @partner
* @brief Called when scanning is cancelled by csr_cs_cancel_scanning().
- *
* @since_tizen 3.0
- *
* @remarks Only for asynchronous scan functions.
- * @remarks Called only once at the end of scanning by being cancelled.
- *
- * @param[in] user_data A pointer of a user data. It's provided by client
- * when calling asyncronous scanning method.
- *
+ * @remarks Called only once at the end of scanning by being canceled.
+ * @param[in] user_data A pointer of a user data. It's provided by client when calling asyncronous scanning method
* @see csr_cs_set_cancelled_cb()
* @see csr_cs_cancel_scanning()
* @see csr_cs_scan_files_async()
@@ -197,10 +188,10 @@ typedef void (*csr_cs_completed_cb)(void *user_data);
*/
typedef void (*csr_cs_cancelled_cb)(void *user_data);
+
/**
* @partner
* @brief Called when scanning is stopped with an error.
- *
* @details The following error codes can be delivered.\n
* #CSR_ERROR_FILE_DO_NOT_EXIST,\n
* #CSR_ERROR_SOCKET,\n
@@ -210,16 +201,11 @@ typedef void (*csr_cs_cancelled_cb)(void *user_data);
* #CSR_ERROR_ENGINE_NOT_ACTIVATED,\n
* #CSR_ERROR_ENGINE_PERMISSION,\n
* #CSR_ERROR_ENGINE_INTERNAL
- *
* @since_tizen 3.0
- *
* @remarks Only for asynchronous scan functions.
* @remarks Called only once at the end of scanning when failed with error.
- *
- * @param[in] error_code Error code of #csr_error_e defined in csr-error.h
- * @param[in] user_data A pointer of a user data. It's provided by client
- * when calling asynchronous scanning method.
- *
+ * @param[in] error_code Error code of #csr_error_e defined in csr-error.h
+ * @param[in] user_data A pointer of a user data. It's provided by client when calling asynchronous scanning method
* @see csr_cs_set_error_cb()
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
@@ -227,6 +213,7 @@ typedef void (*csr_cs_cancelled_cb)(void *user_data);
*/
typedef void (*csr_cs_error_cb)(int error_code, void *user_data);
+
/**
* @}
*/
diff --git a/src/include/csr/csr-content-screening.h b/src/include/csr/csr-content-screening.h
index f989ff4..b956d53 100644
--- a/src/include/csr/csr-content-screening.h
+++ b/src/include/csr/csr-content-screening.h
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -14,10 +14,10 @@
* limitations under the License
*/
/*
- * @file csr-content-screening.h
- * @author Dongsun Lee (ds73.lee@samsung.com)
- * @version 1.0
- * @brief Content screening to detect malware in files
+ * @file csr-content-screening.h
+ * @author Dongsun Lee (ds73.lee@samsung.com)
+ * @version 1.0
+ * @brief Content screening to detect malware in files
*/
#ifndef __CSR_CONTENT_SCREENING_API_H_
#define __CSR_CONTENT_SCREENING_API_H_
@@ -41,23 +41,18 @@ extern "C" {
/**
* @partner
* @brief Initializes and returns a Content Screening API handle.
- *
* @details A Content Screening API handle (or CSR CS handle) is obtained by this method.
- * The handle is required for subsequent CSR CS API calls.
- *
+ * The handle is required for subsequent CSR CS API calls.
* @since_tizen 3.0
- *
* @remarks @a handle should be released using csr_cs_context_destroy().
* @remarks Multiple handles can be obtained.
- *
- * @param[out] handle A pointer of CSR CS context handle.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE @a handle may be null
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[out] handle A pointer of CSR CS context handle
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE @a handle may be null
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_SYSTEM System error
*
* @see csr_cs_context_destroy()
*/
@@ -66,316 +61,255 @@ int csr_cs_context_create(csr_cs_context_h *handle);
/**
* @partner
* @brief Releases all system resources associated with a Content Screening API handle.
- *
* @since_tizen 3.0
- *
* @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_context_create()
*/
int csr_cs_context_destroy(csr_cs_context_h handle);
+
/**
* @partner
* @brief Sets a popup option for malware detected.
- *
- * @details If #CSR_CS_ASK_USER_YES is set, a popup will be prompted to a user when a malware
- * is detected. If #CSR_CS_ASK_USER_NO is set which is default value, no popup
- * will be prompted even if a malware is detected. User can allow, disallow and
- * remove detected malware by popup. Selection can be different between malware's
- * severity.
- *
+ * @details If #CSR_CS_ASK_USER_YES is set, a popup will be prompted to a user when a malware is detected.
+ * If #CSR_CS_ASK_USER_NO is set which is default value, no popup will be prompted even if a malware is detected.
+ * User can allow, disallow, and remove detected malware by popup.
+ * Selection can be different between malware's severity.
* @since_tizen 3.0
- *
* @remarks This option is disabled(#CSR_CS_ASK_USER_NO) as a default.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] ask_user Popup option to set or unset.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] ask_user Popup option to set or unset
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_context_create()
* @see csr_cs_context_destroy()
*/
int csr_cs_set_ask_user(csr_cs_context_h handle, csr_cs_ask_user_e ask_user);
+
/**
* @partner
* @brief Sets a popup message of a client in case that a malware is detected.
- *
- * @details Default message is "Malware which may harm your device is detected.".
- *
+ * @details Default message is "Malware which may harm your device is detected."
* @since_tizen 3.0
- *
* @remarks Meaningful only when ask user option is set by csr_cs_set_ask_user().
* @remarks The message will be printed on popup for user.
* @remarks Default popup message will be used if it isn't set.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] message A message to print on a popup.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size
- * is 64 bytes.
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] message A message to print on a popup
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size is 64 bytes
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_context_create()
* @see csr_cs_context_destroy()
*/
int csr_cs_set_popup_message(csr_cs_context_h handle, const char *message);
+
/**
* @partner
* @brief Sets a maximum core usage during scanning.
- *
* @since_tizen 3.0
- *
* @remarks If a core usage is not set, #CSR_CS_CORE_USAGE_DEFAULT will be used.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] usage A maximum core usage during scanning.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a usage is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] usage A maximum core usage during scanning
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a usage is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_context_create()
* @see csr_cs_context_destroy()
*/
int csr_cs_set_core_usage(csr_cs_context_h handle, csr_cs_core_usage_e usage);
+
/**
* @partner
* @brief Sets a scan on cloud option.
- *
* @since_tizen 3.0
- *
* @remarks Scan on cloud option is turned off as a default.
- * @remarks If an engine does not support "scanning on cloud", this option is silently
- * ignored.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] scan_on_cloud Flag of scanning on cloud option.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks If an engine does not support "scanning on cloud", this option is silently ignored.
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[int] scan_on_cloud Flag to turn on(#true) or off(#false) of scanning on cloud option
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_context_create()
* @see csr_cs_context_destroy()
*/
int csr_cs_set_scan_on_cloud(csr_cs_context_h handle, bool scan_on_cloud);
+
/**
* @partner
* @brief Scans a data buffer for malware.
- *
* @details @a malware result of this method is not available for being judged by
- * csr_cs_judge_detected_malware() because it's data, not file, so cannot being
- * removed or ignored.
- *
+ * csr_cs_judge_detected_malware() because it's data and not a file, so it cannot be removed or ignored.
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
* @remarks Scan data synchronously.
- * @remarks @a malware will be released when @a handle is released using
- * csr_cs_context_destroy().
- * @remarks If multiple malwares exists in @a data,
- * the malware with the highest severity will be returned.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] data A scan target data.
- * @param[in] length A size of a scan target data.
- * @param[out] malware A pointer of the detected malware handle. It can be null when
- * no malware detected.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a data or @a malware is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED No privilege to call
- * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed.
- * @a malware will be allocated on this error
- * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
- * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
- * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks @a malware will be released when @a handle is released using csr_cs_context_destroy().
+ * @remarks If multiple malwares exists in @a data, the malware with the highest severity will be returned.
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] data A scan target data.
+ * @param[in] length A size of a scan target data.
+ * @param[out] malware A pointer of the detected malware handle. It can be null when there is no malware detected
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a data or @a malware is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED No privilege to call
+ * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed.
+ * @a malware will be allocated on this error
+ * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
+ * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
+ * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_context_create()
* @see csr_cs_context_destroy()
*/
-int csr_cs_scan_data(csr_cs_context_h handle, const unsigned char *data, size_t length,
- csr_cs_malware_h *malware);
+int csr_cs_scan_data(csr_cs_context_h handle, const unsigned char *data, size_t length, csr_cs_malware_h *malware);
+
/**
* @partner
* @brief Scans a file specified by file path for malware.
- *
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
- * @remarks Scan file synchronously.
- * @remarks @a malware will be released when @a handle is released using
- * csr_cs_context_destroy().
- * @remarks If multiple malwares exists in a file,
- * the malware with the highest severity will be returned.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] file_path A path of scan target file.
- * @param[out] malware A pointer of the detected malware handle. It can be null when
- * no malware detected.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
- * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed when
- * malware exist and user select to remove by popup.
- * @a malware will be allocated on this error
- * @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed.
- * @a malware will be allocated on this error
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
- * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
- * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
- * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks Scan file synchronously.
+ * @remarks @a malware will be released when @a handle is released using csr_cs_context_destroy().
+ * @remarks If multiple malwares exists in a file, the malware with the highest severity will be returned.
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
+ * @param[in] file_path A path of scan target file.
+ * @param[out] malware A pointer of the detected malware handle. It can be null when there is no malware detected.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
+ * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed when
+ * malware exist and user select to remove by popup.
+ * @a malware will be allocated on this error
+ * @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed,
+ @a malware will be allocated on this error
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
+ * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
+ * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
+ * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_context_create()
* @see csr_cs_context_destroy()
*/
-int csr_cs_scan_file(csr_cs_context_h handle, const char *file_path,
- csr_cs_malware_h *malware);
+int csr_cs_scan_file(csr_cs_context_h handle, const char *file_path, csr_cs_malware_h *malware);
+
/**
* @partner
* @brief Sets a callback function for the case that a file scan is completed.
- *
* @since_tizen 3.0
- *
* @remarks Callback for asynchronous scan functions.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] callback A callback function for each file or application scanning
- * done without any malware.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
+ * @param[in] callback A callback function for each file or application scanning done without any malware.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
* @see csr_cs_scan_dirs_async()
*/
int csr_cs_set_file_scanned_cb(csr_cs_context_h handle, csr_cs_file_scanned_cb callback);
+
/**
* @partner
* @brief Sets a callback function for detection of a malware.
- *
* @since_tizen 3.0
- *
* @remarks Callback for asynchronous scan functions.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] callback A callback function for each file or application scanning done
- * with malware detected.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] callback A callback function for each file or application scanning done with malware detected
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
* @see csr_cs_scan_dirs_async()
*/
int csr_cs_set_detected_cb(csr_cs_context_h handle, csr_cs_detected_cb callback);
+
/**
* @partner
* @brief Sets a callback function for scanning completed without an error.
- *
* @since_tizen 3.0
- *
* @remarks Callback for asynchronous scan functions.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] callback A callback function for scanning completed successfully.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] callback A callback function for scanning completed successfully
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
* @see csr_cs_scan_dirs_async()
*/
int csr_cs_set_completed_cb(csr_cs_context_h handle, csr_cs_completed_cb callback);
+
/**
* @partner
- * @brief Sets a callback function for scanning cancelled.
- *
+ * @brief Sets a callback function for scanning canceled.
* @since_tizen 3.0
- *
* @remarks Callback for asynchronous scan functions.
* @remarks Client can cancel asynchronous scanning by csr_cs_cancel_scanning().
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] callback A callback function for scanning cancelled.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] callback A callback function for scanning cancelled
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
* @see csr_cs_scan_dirs_async()
@@ -383,84 +317,72 @@ int csr_cs_set_completed_cb(csr_cs_context_h handle, csr_cs_completed_cb callbac
*/
int csr_cs_set_cancelled_cb(csr_cs_context_h handle, csr_cs_cancelled_cb callback);
+
/**
* @partner
* @brief Sets a callback function for scanning stopped with an error.
- *
* @since_tizen 3.0
- *
* @remarks Callback for asynchronous scan functions.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] callback A callback function for scanning stopped with an error.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] callback A callback function for scanning stopped due to an error
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a callback is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
* @see csr_cs_scan_dirs_async()
*/
int csr_cs_set_error_cb(csr_cs_context_h handle, csr_cs_error_cb callback);
+
/**
* @partner
* @brief Scan files specified by an array of file paths for malware.
- *
* @details If scanning of the single file is done without detected malware,
- * csr_cs_file_scanned_cb() called and else if malware detected
- * csr_cs_detected_cb() called. If scanning is cancelled by
- * csr_cs_cancel_scanning(), csr_cs_cancelled_cb() called. If scanning is failed
+ * csr_cs_file_scanned_cb() is called and else if malware detected
+ * csr_cs_detected_cb() is called. If scanning is canceled by
+ * csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed
* with error, csr_cs_error_cb() is called. If scanning is completed without
* error, csr_cs_completed_cb(). Every callbacks are registered by callback
- * setter methods to @a handle and if callback is not registered, it will just
- * skipped to be called.
- *
+ * setter methods to @a handle and if callback is not registered, it will be just skipped to be called.
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
* @remarks Asynchronous function.
- * @remarks The caller should set callback functions before call this method.
+ * @remarks The caller should set callback functions before calling this method.
* @remarks Detected malware which is provided to the callback will be released when
* @a handle is released using csr_cs_context_destroy().
* @remarks If multiple malwares exists in a file, the malware with the highest
* severity will be returned for the file via csr_cs_set_detected_cb().
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] file_paths An array of scan target files.
- * @param[in] count A number of scan target files.
- * @param[in] user_data The pointer of a user data. It can be null.
- * It is delivered back to the client when a callback function
- * is called.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a file_paths is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
- * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
- * @retval #CSR_ERROR_BUSY Busy for processing another request
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
- * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
- * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
- * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
+ * @param[in] file_paths An array of scan target files.
+ * @param[in] count A number of scan target files.
+ * @param[in] user_data The pointer of a user data. It can be null
+ * It is delivered back to the client when a callback function is called.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a file_paths is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
+ * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
+ * @retval #CSR_ERROR_BUSY Busy for processing another request
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
+ * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
+ * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
+ * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error=
* @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(),
* csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb().
- *
* @see csr_cs_set_file_scanned_cb()
* @see csr_cs_set_detected_cb()
* @see csr_cs_set_completed_cb()
@@ -468,62 +390,55 @@ int csr_cs_set_error_cb(csr_cs_context_h handle, csr_cs_error_cb callback);
* @see csr_cs_set_error_cb()
* @see csr_cs_cancel_scanning()
*/
-int csr_cs_scan_files_async(csr_cs_context_h handle, const char *file_paths[],
- size_t count, void *user_data);
+int csr_cs_scan_files_async(csr_cs_context_h handle, const char *file_paths[], size_t count, void *user_data);
+
/**
* @partner
* @brief Scans a directory specified by directory path for malware.
*
* @details If scanning of the single file is done without detected malware,
- * csr_cs_file_scanned_cb() called and else if malware detected
- * csr_cs_detected_cb() called. If scanning is cancelled by
- * csr_cs_cancel_scanning(), csr_cs_cancelled_cb() called. If scanning is failed
+ * csr_cs_file_scanned_cb() is called and else if malware detected
+ * csr_cs_detected_cb() is called. If scanning is canceled by
+ * csr_cs_cancel_scanning(), csr_cs_cancelled_cb() is called. If scanning is failed
* with error, csr_cs_error_cb() is called. If scanning is completed without
* error, csr_cs_completed_cb(). Every callbacks are registered by callback
- * setter methods to @a handle and if callback is not registered, it will just
- * skipped to be called.
- *
+ * setter methods to @a handle and if callback is not registered, it will be just skipped to be called.
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
* @remarks Asynchronous function.
- * @remarks The caller should set callback functions before calls this method.
+ * @remarks The caller should set callback functions before calling this method.
* @remarks Detected malware which is provided to the callback will be released when
* @a handle is released using csr_cs_context_destroy().
* @remarks If multiple malwares exists in a file, the malware with the highest
* severity will be returned for the file via csr_cs_set_detected_cb().
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] dir_path A path of scan target directory.
- * @param[in] user_data The pointer of a user data. It can be null. It is used on
- * the callback functions which are registered to @a handle.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a dir_path is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
- * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
- * @retval #CSR_ERROR_BUSY Busy for processing another request
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
- * @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
- * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
- * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
- * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] dir_path A path of scan target directory
+ * @param[in] user_data The pointer of a user data. It can be null. It is used on
+ * the callback functions which are registered to @a handle
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORYNot enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a dir_path is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
+ * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
+ * @retval #CSR_ERROR_BUSY Busy for processing another request
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
+ * @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
+ * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
+ * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
+ * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(),
* csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb().
- *
* @see csr_cs_set_file_scanned_cb()
* @see csr_cs_set_detected_cb()
* @see csr_cs_set_completed_cb()
@@ -533,60 +448,53 @@ int csr_cs_scan_files_async(csr_cs_context_h handle, const char *file_paths[],
*/
int csr_cs_scan_dir_async(csr_cs_context_h handle, const char *dir_path, void *user_data);
+
/**
* @partner
* @brief Scan directories specified by an array of directory paths for malware.
- *
* @details If scanning of the single file is done without detected malware,
- * csr_cs_file_scanned_cb() called and else if malware detected
- * csr_cs_detected_cb() called. If scanning is cancelled by
- * csr_cs_cancel_scanning(), csr_cs_cancelled_cb() called. If scanning is failed
+ * csr_cs_file_scanned_cb() is called and else if malware detected
+ * csr_cs_detected_cb() is called. If scanning is canceled by
+ * csr_cs_cancel_scanning(), csr_cs_canceled_cb() is called. If scanning is failed
* with error, csr_cs_error_cb() is called. If scanning is completed without
* error, csr_cs_completed_cb(). Every callbacks are registered by callback
- * setter methods to @a handle and if callback is not registered, it will just
- * skipped to be called.
- *
+ * setter methods to @a handle and if callback is not registered, it will just be skipped to be called.
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
* @remarks Asynchronous function.
* @remarks The caller should set callback functions before calls this method.
* @remarks Detected malware which is provided to the callback will be released when
* @a handle is released using csr_cs_context_destroy().
* @remarks If multiple malwares exists in a file, the malware with the highest
* severity will be returned for the file via csr_cs_set_detected_cb().
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] dir_paths An array of scan target directories.
- * @param[in] count A number of scan target directories.
- * @param[in] user_data The pointer of a user data. It can be null. It is used on
- * the callback functions which are registered to @a handle.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
- * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
- * @retval #CSR_ERROR_BUSY Busy for processing another request
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
- * @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
- * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
- * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
- * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] dir_paths An array of scan target directories
+ * @param[in] count A number of scan target directories
+ * @param[in] user_data The pointer of a user data. It can be null. It is used on
+ * the callback functions which are registered to @a handle
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Access denied
+ * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
+ * @retval #CSR_ERROR_BUSY Busy for processing another request
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File not found
+ * @retval #CSR_ERROR_FILE_SYSTEM File type is invalid. It should be directory
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_ENGINE_PERMISSION Insufficient permission of engine
+ * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
+ * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
+ * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @pre It is required to set callbacks, csr_cs_completed_cb, csr_cs_error_cb(),
* csr_cs_cancel_scanning(), csr_cs_detected_cb(), and/or csr_cs_file_scanned_cb().
- *
* @see csr_cs_set_file_scanned_cb()
* @see csr_cs_set_detected_cb()
* @see csr_cs_set_completed_cb()
@@ -594,27 +502,21 @@ int csr_cs_scan_dir_async(csr_cs_context_h handle, const char *dir_path, void *u
* @see csr_cs_set_error_cb()
* @see csr_cs_cancel_scanning()
*/
-int csr_cs_scan_dirs_async(csr_cs_context_h handle, const char *dir_paths[], size_t count,
- void *user_data);
+int csr_cs_scan_dirs_async(csr_cs_context_h handle, const char *dir_paths[], size_t count, void *user_data);
/**
* @partner
* @brief Cancels a running scanning task, asynchronously.
- *
* @since_tizen 3.0
- *
* @remarks Only for asynchronous scan functions.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_NO_TASK No task to cancel
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_NO_TASK No task to cancel
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_scan_files_async()
* @see csr_cs_scan_dir_async()
* @see csr_cs_scan_dirs_async()
@@ -628,365 +530,301 @@ int csr_cs_cancel_scanning(csr_cs_context_h handle);
*
* @since_tizen 3.0
*
- * @param[in] malware A detected malware handle returned by csr_cs_scan_data(),
- * csr_cs_scan_file() or csr_cs_malware_list_get_malware().
- * @param[out] severity A pointer of the severity of a detected malware.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a severity is invalid
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[in] malware A detected malware handle returned by csr_cs_scan_data(),
+ * csr_cs_scan_file() or csr_cs_malware_list_get_malware()
+ * @param[out] severity A pointer of the severity of a detected malware
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a severity is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
*/
-int csr_cs_malware_get_severity(csr_cs_malware_h malware,
- csr_cs_severity_level_e *severity);
+int csr_cs_malware_get_severity(csr_cs_malware_h malware, csr_cs_severity_level_e *severity);
+
/**
* @partner
* @brief Extracts the name of a detected malware from the detected malware handle.
- *
* @since_tizen 3.0
- *
- * @remarks @a name must be released using free().
- *
- * @param[in] malware A detected malware handle.
- * @param[out] name A pointer of the name of a detected malware.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid
- * @retval #CSR_ERROR_SYSTEM System error
+ * @remarks @a name must be released using free().
+ * @param[in] malware A detected malware handle
+ * @param[out]name A pointer of the name of a detected malware
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
*/
int csr_cs_malware_get_name(csr_cs_malware_h malware, char **name);
+
/**
* @partner
- * @brief Extracts an url that contains detailed information on vendor's web site from
- * the detected malware handle.
- *
+ * @brief Extracts a url that contains detailed information on vendor's web site from the detected malware handle.
* @since_tizen 3.0
- *
- * @remarks @a detailed_url must be released using free().
- *
- * @param[in] malware A detected malware handle.
- * @param[out] detailed_url A pointer of an url that contains detailed information on
- * vendor's web site. It can be null if a vendor doesn't
- * provide this information.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid.
- * @retval #CSR_ERROR_SYSTEM System error
+ * @remarks @a detailed_url must be released using free().
+ * @param[in] malware A detected malware handle.
+ * @param[out] detailed_url A pointer of a url that contains detailed information on
+ * vendor's web site. It can be null if a vendor doesn't provide this information.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONES uccessful
+ * @retval #CSR_ERROR_INVALID_HANDLEInvalid detected malware handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid.
+ * @retval #CSR_ERROR_SYSTEM System error
*/
int csr_cs_malware_get_detailed_url(csr_cs_malware_h malware, char **detailed_url);
+
/**
* @partner
- * @brief Extracts the time stamp when a malware is detected from the detected malware
- * handle.
- *
+ * @brief Extracts the time stamp when a malware is detected from the detected malware handle.
* @since_tizen 3.0
- *
- * @param[in] malware A detected malware handle.
- * @param[out] timestamp A pointer of the time stamp in milli second when a malware is
- * detected.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a timestamp is invalid
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[in] malware A detected malware handle
+ * @param[out] timestamp A pointer of the time stamp in milliseconds when a malware is detected.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a timestamp is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
*/
int csr_cs_malware_get_timestamp(csr_cs_malware_h malware, time_t *timestamp);
+
/**
* @partner
- * @brief Extracts the file name where a malware is detected from the detected malware
- * handle.
- *
+ * @brief Extracts the file name where a malware is detected from the detected malware handle.
* @since_tizen 3.0
- *
* @remarks @a file_name must be released using free().
- *
- * @param[in] malware A detected malware handle.
- * @param[out] file_name A pointer of the file name where a malware is detected. The
- * file name is null for csr_cs_scan_data().
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a file_name is invalid
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[in] malware A detected malware handle.
+ * @param[out] file_name A pointer of the file name where a malware is detected. The
+ * file name is null for csr_cs_scan_data()
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a file_name is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
*/
int csr_cs_malware_get_file_name(csr_cs_malware_h malware, char **file_name);
+
/**
* @partner
* @brief Extracts a user response of a popup from the detected malware handle.
- *
* @since_tizen 3.0
- *
- * @param[in] malware A detected malware handle.
- * @param[out] response A pointer of the user response.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[in] malware A detected malware handle.
+ * @param[out] response A pointer of the user response.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
*/
-int csr_cs_malware_get_user_response(csr_cs_malware_h malware,
- csr_cs_user_response_e *response);
+int csr_cs_malware_get_user_response(csr_cs_malware_h malware, csr_cs_user_response_e *response);
+
/**
* @partner
* @brief Checks if a malware was detected in an application or in a file.
- *
* @since_tizen 3.0
- *
- * @param[in] malware A detected malware handle.
- * @param[out] is_app A pointer of a flag indicating the position a malware was detected.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a is_app is invalid
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[in] malware A detected malware handle.
+ * @param[out] is_app A pointer of a flag indicating the position where a malware was detected.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a is_app is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
*/
int csr_cs_malware_is_app(csr_cs_malware_h malware, bool *is_app);
+
/**
* @partner
- * @brief Extracts the package id of an application where a malware is detected from
- * detected malware handle.
- *
+ * @brief Extracts the package id of an application where a malware is detected from detected malware handle.
* @since_tizen 3.0
- *
* @remarks @a pkg_id must be released using free().
- *
- * @param[in] malware A detected malware handle.
- * @param[out] pkg_id A pointer of the package id where a malware is detected.
- * It is null when a malware was not detected in an application.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a pkg_id is invalid
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[in] malware A detected malware handle.
+ * @param[out] pkg_id A pointer of the package id where a malware is detected.
+ * It is null when a malware was not detected in an application
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid detected malware handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a pkg_id is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
*/
int csr_cs_malware_get_pkg_id(csr_cs_malware_h malware, char **pkg_id);
+
/**
* @platform
* @brief Judges how a detected malware file is handled.
- *
- * @details Detected malware will removed by #CSR_CS_ACTION_REMOVE action. File or
- * application which contains malware will be removed.
- * Detected malware will ignored by #CSR_CS_ACTION_IGNORE action. File or
- * application which contains malware will be ignored and will not be treated
- * as malware until this API called with #CSR_CS_ACTION_UNIGNORE action.
- *
+ * @details Detected malware will be removed by #CSR_CS_ACTION_REMOVE action.
+ * File or application which contains malware will be removed.
+ * Detected malware will be ignored by #CSR_CS_ACTION_IGNORE action.
+ * File or application which contains malware will be ignored and will not be treated
+ * as malware until this API is called with #CSR_CS_ACTION_UNIGNORE action.
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
* @remarks Detected malware can be removed or ignored.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] malware A handle of a detected malware.
- * @param[in] action An action to be taken.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a malware or @a action is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File to take action on not found
- * @retval #CSR_ERROR_FILE_CHANGED File to take action on changed after detection
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed
- * @retval #CSR_ERROR_SYSTEM System error
- */
-int csr_cs_judge_detected_malware(csr_cs_context_h handle, csr_cs_malware_h malware,
- csr_cs_action_e action);
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] malware A handle of a detected malwar
+ * @param[in] action An action to be taken
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a malware or @a action is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST File to take action on not found
+ * @retval #CSR_ERROR_FILE_CHANGED File to take action on changed after detection
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_REMOVE_FAILED Removing file or application is failed
+ * @retval #CSR_ERROR_SYSTEM System error
+ */
+int csr_cs_judge_detected_malware(csr_cs_context_h handle, csr_cs_malware_h malware, csr_cs_action_e action);
/**
* @partner
* @brief Gets information on a detected malware file specified by file path.
- *
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
* @remarks @a malware will be released when @a handle is destroyed.
* @remarks @a file_path will be null if it's result of csr_cs_scan_data().
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] file_path A path of a detected malware file.
- * @param[out] malware A pointer of the detected malware handle. It can be null when
- * no malware file.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST No malware file
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] file_path A path of a detected malware file
+ * @param[out] malware A pointer of the detected malware handle. It can be null when there is no malware file
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST No malware file
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_cs_scan_data()
* @see csr_cs_scan_file()
* @see csr_cs_detected_cb
*/
-int csr_cs_get_detected_malware(csr_cs_context_h handle, const char *file_path,
- csr_cs_malware_h *malware);
+int csr_cs_get_detected_malware(csr_cs_context_h handle, const char *file_path, csr_cs_malware_h *malware);
+
/**
* @partner
* @brief Gets information on a detected malware files specified by directory path.
- *
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
- * @remarks @a list will be released when @a handle is destroyed.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] dir_paths A directory path where detected malware files exists.
- * @param[in] count Count of array element of @a dir_paths
- * @param[out] list A pointer of the detected malware list handle. It can be null
- * when no malware file.
- * @param[out] list_count Count of detected malware files which existed in the specified
- * directory.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths, @a list, or @a count is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST No malware file
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_SYSTEM System error
- */
-int csr_cs_get_detected_malwares(csr_cs_context_h handle, const char *dir_paths[],
- size_t count, csr_cs_malware_list_h *list,
- size_t *list_count);
+ * @remarks @a list will be released when @a handle is destroyed.
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create()
+ * @param[in] dir_paths A directory path where detected malware files exists
+ * @param[in] count Count of array element of @a dir_paths
+ * @param[out] list A pointer of the detected malware list handle. It can be null when there is no malware file
+ * @param[out] list_count Count of detected malware files which existed in the specified directory
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER@a dir_paths, @a list, or @a count is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIEDNo permission to remove
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXISTNo malware file
+ * @retval #CSR_ERROR_SOCKETSocket error between client and server
+ * @retval #CSR_ERROR_SERVERServer has been failed for some reason
+ * @retval #CSR_ERROR_DBDB transaction error
+ * @retval #CSR_ERROR_SYSTEM System error
+ */
+int csr_cs_get_detected_malwares(csr_cs_context_h handle, const char *dir_paths[], size_t count, csr_cs_malware_list_h *list, size_t *list_count);
+
/**
* @partner
* @brief Gets information on a ignored malware file specified by file path.
- *
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
* @remarks @a malware will be released when @a handle is destroyed.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] file_path A path of a ignored malware file.
- * @param[out] malware A pointer of the detected malware handle. It can be null when
- * no ignored file.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_SYSTEM System error
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
+ * @param[in] file_path A path of a ignored malware file.
+ * @param[out] malware A pointer of the detected malware handle. It can be null when there is no ignored file
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a file_path or @a malware is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_SYSTEM System error
*/
-int csr_cs_get_ignored_malware(csr_cs_context_h handle, const char *file_path,
- csr_cs_malware_h *malware);
+int csr_cs_get_ignored_malware(csr_cs_context_h handle, const char *file_path, csr_cs_malware_h *malware);
+
/**
* @partner
- * @brief Gets information on a ignored malware files specified by directory path.
- *
+ * @brief Gets information on ignored malware files specified by directory path.
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.scan
- *
- * @remarks @a list will be released when @a handle is destroyed.
- *
- * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
- * @param[in] dir_paths A directory path where ignored malware files exists.
- * @param[in] count Count of array element of @a dir_paths
- * @param[out] list A pointer of the detected malware list handle. It can be null
- * when no ignored file.
- * @param[out] list_count Count of ignored malware files which existed in the specified
- * directory.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths, @a list, or @a count is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
- * @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_DB DB transaction error
- * @retval #CSR_ERROR_SYSTEM System error
- */
-int csr_cs_get_ignored_malwares(csr_cs_context_h handle, const char *dir_paths[],
- size_t count, csr_cs_malware_list_h *list,
- size_t *list_count);
+ * @remarks @a list will be released when @a handle is destroyed.
+ * @param[in] handle CSR CS context handle returned by csr_cs_context_create().
+ * @param[in] dir_paths A directory path where ignored malware files exists.
+ * @param[in] count Count of array element of @a dir_paths
+ * @param[out] list A pointer of the detected malware list handle. It can be null when there is no ignored file
+ * @param[out] list_count Count of ignored malware files which existed in the specified directory
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a dir_paths, @a list, or @a count is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED No permission to remove
+ * @retval #CSR_ERROR_FILE_DO_NOT_EXIST No ignored file
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_DB DB transaction error
+ * @retval #CSR_ERROR_SYSTEM System error
+ */
+int csr_cs_get_ignored_malwares(csr_cs_context_h handle, const char *dir_paths[], size_t count, csr_cs_malware_list_h *list, size_t *list_count);
+
/**
* @partner
* @brief Extracts the detected malware handle from the detected malware list handle.
- *
* @since_tizen 3.0
- *
- * @remarks @a malware will be released when a context is released using
- * csr_cs_context_destroy().
- *
- * @param[in] list A detected malware list handle returned by
- * csr_cs_get_detected_malwares() or
- * csr_cs_get_ignored_malwares().
- * @param[in] index An index of a target detected malware handle to get.
- * @param[out] malware A pointer of the detected malware handle. It can be null when
- * index is invalid.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid list
- * @retval #CSR_ERROR_INVALID_PARAMETER @a index or @a malware is invalid.
- * @retval #CSR_ERROR_SYSTEM System error
- */
-int csr_cs_malware_list_get_malware(csr_cs_malware_list_h list, size_t index,
- csr_cs_malware_h *malware);
+ * @remarks @a malware will be released when a context is released using csr_cs_context_destroy().
+ * @param[in] list A detected malware list handle returned by csr_cs_get_detected_malwares() or
+ * csr_cs_get_ignored_malwares()
+ * @param[in] index An index of a target detected malware handle to get
+ * @param[out] malware A pointer of the detected malware handle. It can be null when index is invalid
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid list
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a index or @a malware is invalid.
+ * @retval #CSR_ERROR_SYSTEM System error
+ */
+int csr_cs_malware_list_get_malware(csr_cs_malware_list_h list, size_t index, csr_cs_malware_h *malware);
+
/**
* @}
diff --git a/src/include/csr/csr-engine-manager.h b/src/include/csr/csr-engine-manager.h
index 2b6a994..b67f7cd 100644
--- a/src/include/csr/csr-engine-manager.h
+++ b/src/include/csr/csr-engine-manager.h
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -14,10 +14,10 @@
* limitations under the License
*/
/*
- * @file csr-engine-manager.h
- * @author Dongsun Lee (ds73.lee@samsung.com)
- * @version 1.0
- * @brief Engine management CAPI header
+ * @file csr-engine-manager.h
+ * @author Dongsun Lee (ds73.lee@samsung.com)
+ * @version 1.0
+ * @brief Engine management CAPI header
*/
#ifndef __CSR_ENGINE_MANAGER_H_
#define __CSR_ENGINE_MANAGER_H_
@@ -34,6 +34,7 @@ extern "C" {
* @{
*/
+
/**
* @platform
* @brief Engine handle
@@ -41,278 +42,247 @@ extern "C" {
*/
typedef struct __csr_engine_h *csr_engine_h;
+
/**
* @platform
- * @brief Engine identifier
+ * @brief Enumeration for engine identifier
* @since_tizen 3.0
*/
typedef enum {
- CSR_ENGINE_CS = 0x01, /**< Content screening engine id */
- CSR_ENGINE_WP = 0x02 /**< Web protection engine id */
+ CSR_ENGINE_CS = 0x01, /**< Content screening engine id */
+ CSR_ENGINE_WP = 0x02 /**< Web protection engine id */
} csr_engine_id_e;
+
/**
* @platform
- * @brief State of engine activation
+ * @brief Enumeration for state of engine activation
* @since_tizen 3.0
*/
typedef enum {
- CSR_NOT_ACTIVATED = 0x01, /**< Engine is not activated */
- CSR_ACTIVATED = 0x02 /**< Engine is activated */
+ CSR_NOT_ACTIVATED = 0x01, /**< Engine is not activated */
+ CSR_ACTIVATED = 0x02 /**< Engine is activated */
} csr_activated_e;
+
/**
* @platform
- * @brief State of engine
+ * @brief Enumeration for state of engine
* @since_tizen 3.0
*/
typedef enum {
- CSR_STATE_ENABLE = 0x01, /**< Enable engine */
- CSR_STATE_DISABLE = 0x02 /**< Disable engine */
+ CSR_STATE_ENABLE = 0x01, /**< Enable engine */
+ CSR_STATE_DISABLE = 0x02 /**< Disable engine */
} csr_state_e;
+
/**
* @platform
* @brief Gets the handle of a current engine information.
- *
* @since_tizen 3.0
- *
* @remarks @a engine should be released using csr_engine_destroy().
- *
- * @param[in] id Engine identifier to get handle.
- * @param[out] engine A pointer of the engine information handle.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_PARAMETER @a engine is invalid
- * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
+ * @param[in] id Engine identifier to get handle
+ * @param[out] engine A pointer of the engine information handle
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a engine is invalid
+ * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
* @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_engine_destroy()
*/
int csr_get_current_engine(csr_engine_id_e id, csr_engine_h *engine);
+
/**
* @platform
- * @brief Extracts an vendor name from the engine information handle.
- *
+ * @brief Extracts a vendor name from the engine information handle.
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
- * @remarks @a vendor must be released using free().
- *
- * @param[in] engine The engine information handle.
- * @param[out] vendor A pointer of the engine's vendor name.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a vendor is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks @a vendor must be released using free().
+ * @param[in] engine The engine information handle.
+ * @param[out] vendor A pointer of the engine's vendor name
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a vendor is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_get_vendor(csr_engine_h engine, char **vendor);
+
/**
* @platform
* @brief Extracts an engine name from the engine information handle.
- *
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
- * @remarks @a name must be released using free().
- *
- * @param[in] engine The engine information handle.
- * @param[out] name A pointer of the engine's name.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks @a name must be released using free().
+ * @param[in] engine The engine information handle
+ * @param[out] name A pointer of the engine's name
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a name is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_get_name(csr_engine_h engine, char **name);
+
/**
* @platform
* @brief Extracts an engine version from the engine information handle.
- *
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
- * @remarks @a version must be released using free().
- *
- * @param[in] engine An engine information handle.
- * @param[out] version A pointer of the engine's version.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks @a version must be released using free().
+ * @param[in] engine An engine information handle
+ * @param[out] version A pointer of the engine's version
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_get_version(csr_engine_h engine, char **version);
+
/**
* @platform
* @brief Extracts an engine's data version from the engine information handle.
- *
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
- * @remarks @a version must be released using free().
- *
- * @param[in] engine The engine information handle.
- * @param[out] version A pointer of the data version. It can be null.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks @a version must be released using free().
+ * @param[in] engine The engine information handle.
+ * @param[out] version A pointer of the data version. It can be null
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a version is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_get_data_version(csr_engine_h engine, char **version);
+
/**
* @platform
* @brief Extracts the latest update time of an engine from the engine information handle.
- *
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
- * @param[in] engine The engine information handle.
- * @param[out] time A pointer of lasted update time.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a time is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] engine The engine information handle
+ * @param[out] time A pointer of lasted update time
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a time is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_get_latest_update_time(csr_engine_h engine, time_t *time);
+
/**
* @platform
* @brief Extracts the state of engine activation from the engine information handle.
- *
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
- * @param[in] engine The engine information handle.
- * @param[out] activated A pointer of the engine activation state.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a activated is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] engine The engine information handle
+ * @param[out] activated A pointer of the engine activation state
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a activated is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_get_activated(csr_engine_h engine, csr_activated_e *activated);
+
/**
* @platform
* @brief Enable or disable an engine.
- *
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
* @remarks If an engine is disabled, all major operations would be failed with
* #CSR_ERROR_ENGINE_DISABLED error code.
- *
- * @param[in] engine The engine information handle.
- * @param[in] state The engine state.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a state is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] engine The engine information handle
+ * @param[in] state The engine state
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a state is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_set_state(csr_engine_h engine, csr_state_e state);
+
/**
* @platform
* @brief Gets the engine state.
- *
* @since_tizen 3.0
* @privlevel platform
* @privilege %http://tizen.org/privilege/antivirus.admin
- *
- * @param[in] engine The engine information handle.
- * @param[out] state A pointer of the engine state.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a state is invalid
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] engine The engine information handle
+ * @param[out] state A pointer of the engine state
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @retval #CSR_ERROR_INVALID__PARAMETER @a state is invalid
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_get_current_engine()
*/
int csr_engine_get_state(csr_engine_h engine, csr_state_e *state);
+
/**
* @platform
* @brief Releases all system resources associated with a engine information handle.
- *
* @since_tizen 3.0
- *
- * @param[in] engine The engine information handle.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
+ * @param[in] engine The engine information handle.
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid engine information handle
*/
int csr_engine_destroy(csr_engine_h engine);
+
/**
* @}
*/
diff --git a/src/include/csr/csr-error.h b/src/include/csr/csr-error.h
index 798c4b9..f1c1582 100644
--- a/src/include/csr/csr-error.h
+++ b/src/include/csr/csr-error.h
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -14,10 +14,10 @@
* limitations under the License
*/
/*
- * @file csr-error.h
- * @author Dongsun Lee (ds73.lee@samsung.com)
- * @version 1.0
- * @brief Error defining header
+ * @file csr-error.h
+ * @author Dongsun Lee (ds73.lee@samsung.com)
+ * @version 1.0
+ * @brief Error defining header
*/
#ifndef __CSR_ERROR_H_
#define __CSR_ERROR_H_
@@ -28,7 +28,6 @@
extern "C" {
#endif
-
/**
* @addtogroup CAPI_CSR_FRAMEWORK_CS_MODULE
* @{
@@ -46,28 +45,28 @@ extern "C" {
* @since_tizen 3.0
*/
typedef enum {
- CSR_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
- CSR_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */
- CSR_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- CSR_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- CSR_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Device needed to run API is not supported */
- CSR_ERROR_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Busy for processing another request */
- CSR_ERROR_SOCKET = TIZEN_ERROR_CSR | 0x01, /**< Socket error between client and server */
- CSR_ERROR_INVALID_HANDLE = TIZEN_ERROR_CSR | 0x02, /**< The given handle is invalid */
- CSR_ERROR_SERVER = TIZEN_ERROR_CSR | 0x03, /**< Server has been failed for some reason */
- CSR_ERROR_NO_TASK = TIZEN_ERROR_CSR | 0x04, /**< No Task exists*/
- CSR_ERROR_DB = TIZEN_ERROR_CSR | 0x05, /**< DB transaction error */
- CSR_ERROR_REMOVE_FAILED = TIZEN_ERROR_CSR | 0x06, /**< Removing file or application is failed */
- CSR_ERROR_USER_RESPONSE_FAILED = TIZEN_ERROR_CSR | 0x07, /**< Getting user response is failed */
- CSR_ERROR_FILE_DO_NOT_EXIST = TIZEN_ERROR_CSR | 0x08, /**< File not exist */
- CSR_ERROR_FILE_CHANGED = TIZEN_ERROR_CSR | 0x09, /**< File changed after detection */
- CSR_ERROR_FILE_SYSTEM = TIZEN_ERROR_CSR | 0x10, /**< File type is invalid */
- CSR_ERROR_ENGINE_PERMISSION = TIZEN_ERROR_CSR | 0x11, /**< Insufficient permission of engine */
- CSR_ERROR_ENGINE_NOT_EXIST = TIZEN_ERROR_CSR | 0x12, /**< No engine exists*/
- CSR_ERROR_ENGINE_DISABLED = TIZEN_ERROR_CSR | 0x13, /**< Engine is in disabled state*/
- CSR_ERROR_ENGINE_NOT_ACTIVATED = TIZEN_ERROR_CSR | 0x14, /**< Engine is not activated*/
- CSR_ERROR_ENGINE_INTERNAL = TIZEN_ERROR_CSR | 0x19, /**< Engine internal error*/
- CSR_ERROR_SYSTEM = TIZEN_ERROR_CSR | 0xFF, /**< System error*/
+ CSR_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
+ CSR_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid function parameter */
+ CSR_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
+ CSR_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ CSR_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Device needed to run API is not supported */
+ CSR_ERROR_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Busy for processing another request */
+ CSR_ERROR_SOCKET = TIZEN_ERROR_CSR | 0x01, /**< Socket error between client and server */
+ CSR_ERROR_INVALID_HANDLE = TIZEN_ERROR_CSR | 0x02, /**< The given handle is invalid */
+ CSR_ERROR_SERVER = TIZEN_ERROR_CSR | 0x03, /**< Server has been failed for some reason */
+ CSR_ERROR_NO_TASK = TIZEN_ERROR_CSR | 0x04, /**< No Task exists*/
+ CSR_ERROR_DB = TIZEN_ERROR_CSR | 0x05, /**< DB transaction error */
+ CSR_ERROR_REMOVE_FAILED = TIZEN_ERROR_CSR | 0x06, /**< Removing file or application is failed */
+ CSR_ERROR_USER_RESPONSE_FAILED = TIZEN_ERROR_CSR | 0x07, /**< Getting user response is failed */
+ CSR_ERROR_FILE_DO_NOT_EXIST = TIZEN_ERROR_CSR | 0x08, /**< File not exist */
+ CSR_ERROR_FILE_CHANGED = TIZEN_ERROR_CSR | 0x09, /**< File changed after detection */
+ CSR_ERROR_FILE_SYSTEM = TIZEN_ERROR_CSR | 0x10, /**< File type is invalid */
+ CSR_ERROR_ENGINE_PERMISSION = TIZEN_ERROR_CSR | 0x11, /**< Insufficient permission of engine */
+ CSR_ERROR_ENGINE_NOT_EXIST = TIZEN_ERROR_CSR | 0x12, /**< No engine exists*/
+ CSR_ERROR_ENGINE_DISABLED = TIZEN_ERROR_CSR | 0x13, /**< Engine is in disabled state*/
+ CSR_ERROR_ENGINE_NOT_ACTIVATED = TIZEN_ERROR_CSR | 0x14, /**< Engine is not activated*/
+ CSR_ERROR_ENGINE_INTERNAL = TIZEN_ERROR_CSR | 0x19, /**< Engine internal error*/
+ CSR_ERROR_SYSTEM = TIZEN_ERROR_CSR | 0xFF, /**< System error*/
} csr_error_e;
diff --git a/src/include/csr/csr-web-protection-types.h b/src/include/csr/csr-web-protection-types.h
index 11ab2e5..2fb9ebd 100644
--- a/src/include/csr/csr-web-protection-types.h
+++ b/src/include/csr/csr-web-protection-types.h
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -14,10 +14,10 @@
* limitations under the License
*/
/*
- * @file csr-web-protection-types.h
- * @author Dongsun Lee (ds73.lee@samsung.com)
- * @version 1.0
- * @brief Type defining header for web protection
+ * @file csr-web-protection-types.h
+ * @author Dongsun Lee (ds73.lee@samsung.com)
+ * @version 1.0
+ * @brief Type defining header for web protection
*/
#ifndef __CSR_WEB_PROTECTION_TYPES_H_
#define __CSR_WEB_PROTECTION_TYPES_H_
@@ -38,6 +38,7 @@ extern "C" {
*/
typedef struct __csr_wp_context_s *csr_wp_context_h;
+
/**
* @partner
* @brief CSR WP scan result handle.
@@ -45,39 +46,43 @@ typedef struct __csr_wp_context_s *csr_wp_context_h;
*/
typedef struct __csr_wp_check_result_h *csr_wp_check_result_h;
+
/**
* @partner
- * @brief The options about prompting a popup to a user.
+ * @brief Enumeration for the options about prompting a popup to a user.
* @since_tizen 3.0
*/
typedef enum {
- CSR_WP_ASK_USER_NO = 0x00, /**< Do not ask the user even if a URL turns out risky.*/
- CSR_WP_ASK_USER_YES = 0x01 /**< Ask the user when a URL turns out risky */
+ CSR_WP_ASK_USER_NO = 0x00, /**< Do not ask the user even if a URL turns out risky.*/
+ CSR_WP_ASK_USER_YES = 0x01 /**< Ask the user when a URL turns out risky */
} csr_wp_ask_user_e;
+
/**
* @partner
- * @brief The user response for a popup.
+ * @brief Enumeration for the user response for a popup.
* @since_tizen 3.0
*/
typedef enum {
- CSR_WP_USER_RESPONSE_USER_NOT_ASKED = 0x00, /**< There was no popup for asking the user. */
- CSR_WP_USER_RESPONSE_PROCESSING_ALLOWED = 0x01, /**< A user allowed to process the url. */
+ CSR_WP_USER_RESPONSE_USER_NOT_ASKED = 0x00, /**< There was no popup for asking the user. */
+ CSR_WP_USER_RESPONSE_PROCESSING_ALLOWED = 0x01, /**< A user allowed to process the url. */
CSR_WP_USER_RESPONSE_PROCESSING_DISALLOWED = 0x02 /**< A user disallowed to process the url. */
} csr_wp_user_response_e;
+
/**
* @partner
- * @brief Risk level of a url
+ * @brief Enumeration for risk level of a url.
* @since_tizen 3.0
*/
typedef enum {
- CSR_WP_RISK_LOW = 0x01, /**< Risk Low. */
- CSR_WP_RISK_UNVERIFIED = 0x02, /**< Risk Unverified. There is no information about the url.*/
- CSR_WP_RISK_MEDIUM = 0x03, /**< Risk Medium. Prompt the user before processing. Ask the user if they want the application to process the url. */
- CSR_WP_RISK_HIGH = 0x04 /**< High Risk.Do not process the url and just notify the user */
+ CSR_WP_RISK_LOW = 0x01, /**< Risk Low. */
+ CSR_WP_RISK_UNVERIFIED = 0x02, /**< Risk Unverified. There is no information about the url.*/
+ CSR_WP_RISK_MEDIUM = 0x03, /**< Risk Medium. Prompt the user before processing. Ask the user if they want the application to process the url. */
+ CSR_WP_RISK_HIGH = 0x04 /**< High Risk.Do not process the url and just notify the user */
} csr_wp_risk_level_e;
+
/**
* @}
*/
diff --git a/src/include/csr/csr-web-protection.h b/src/include/csr/csr-web-protection.h
index b1ff268..7947a0b 100644
--- a/src/include/csr/csr-web-protection.h
+++ b/src/include/csr/csr-web-protection.h
@@ -5,7 +5,7 @@
* 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
+ * 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,
@@ -14,10 +14,10 @@
* limitations under the License
*/
/*
- * @file csr-web-protection.h
- * @author Dongsun Lee (ds73.lee@samsung.com)
- * @version 1.0
- * @brief Web Protection CAPI Header
+ * @file csr-web-protection.h
+ * @author Dongsun Lee (ds73.lee@samsung.com)
+ * @version 1.0
+ * @brief Web Protection CAPI Header
*/
#ifndef __CSR_WEB_PROTECTION_API_H_
#define __CSR_WEB_PROTECTION_API_H_
@@ -35,216 +35,177 @@ extern "C" {
* @{
*/
+
/**
* @partner
* @brief Initializes and returns a CSR Web Protection API handle.
- *
* @details A Web Protection API handle (or CSR WP handle) is obtained by this method.
* The handle is required for subsequent CSR WP API calls.
- *
* @since_tizen 3.0
- *
* @remarks @a handle should be released using csr_wp_context_destroy().
* @remarks Multiple handles can be obtained.
- *
- * @param[out] handle A pointer of CSR WP context handle.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_INVALID_PARAMETER @a handle is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[out] handle A pointer of CSR WP context handle
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a handle is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_context_destroy()
*/
int csr_wp_context_create(csr_wp_context_h *handle);
+
/**
* @partner
* @brief Releases all system resources associated with a Web Protection API handle.
- *
* @since_tizen 3.0
- *
- * @param[in] handle CSR WP context handle returned by csr_wp_context_create().
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR WP context handle returned by csr_wp_context_create()
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_context_create()
*/
int csr_wp_context_destroy(csr_wp_context_h handle);
+
/**
* @partner
* @brief Sets a popup option for risky URL checked.
- *
* @details If #CSR_WP_ASK_USER_YES is set, a popup will be prompted to a user when a URL
* turns out risky. If #CSR_WP_ASK_USER_NO is set, no popup will be prompted
* even when a URL turns out risky.
- *
* @since_tizen 3.0
- *
* @remarks This option is disabled(#CSR_WP_ASK_USER_NO) as a default.
- *
- * @param[in] handle CSR WP context handle returned by csr_wp_context_create().
- * @param[in] ask_user A popup option in case for a risky URL.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR WP context handle returned by csr_wp_context_create()
+ * @param[in] ask_user A popup option in case for a risky URL
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a ask_user is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_context_create()
*/
int csr_wp_set_ask_user(csr_wp_context_h handle, csr_wp_ask_user_e ask_user);
+
/**
* @partner
* @brief Sets a popup message of a client in case for a risky URL.
- *
* @details Default message is "Risky URL which may harm your device is detected".
- *
* @since_tizen 3.0
- *
* @remarks Meaningful only when ask user option is set by csr_wp_set_ask_user().
* @remarks The message will be printed on popup for user.
* @remarks Default popup message will be used if it isn't set.
- *
- * @param[in] handle CSR WP context handle returned by csr_wp_context_create().
- * @param[in] message A message to print on a popup.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size
- * is 64 bytes.
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] handle CSR WP context handle returned by csr_wp_context_create()
+ * @param[in] message A message to print on a popup
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a message is too long or empty. Max size is 64 bytes
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_context_create()
*/
int csr_wp_set_popup_message(csr_wp_context_h handle, const char *message);
+
/**
* @partner
* @brief Checks URL reputation against the engine vendor's database.
- *
* @details Checks whether accessing the URL is risky or not and returns a result handle
* with the risk level for the URL.
- *
* @since_tizen 3.0
* @privlevel partner
* @privilege %http://tizen.org/privilege/antivirus.webprotect
- *
- * @remarks @a result will be released when @a handle is released using
- * csr_wp_context_destroy().
- *
- * @param[in] handle CSR WP context handle returned by csr_wp_context_create().
- * @param[in] url URL to check.
- * @param[out] result A pointer of the result handle with the Risk level for the URL.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
- * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
- * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
- * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
- * @retval #CSR_ERROR_INVALID_PARAMETER @a url or @a result is invalid
- * @retval #CSR_ERROR_SOCKET Socket error between client and server
- * @retval #CSR_ERROR_SERVER Server has been failed for some reason
+ * @remarks @a result will be released when @a handle is released using csr_wp_context_destroy().
+ * @param[in] handle CSR WP context handle returned by csr_wp_context_create()
+ * @param[in] url URL to check
+ * @param[out] result A pointer of the result handle with the Risk level for the URL
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid handle
+ * @retval #CSR_ERROR_OUT_OF_MEMORY Not enough memory
+ * @retval #CSR_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #CSR_ERROR_NOT_SUPPORTED Device needed to run API is not supported
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a url or @a result is invalid
+ * @retval #CSR_ERROR_SOCKET Socket error between client and server
+ * @retval #CSR_ERROR_SERVER Server has been failed for some reason
* @retval #CSR_ERROR_USER_RESPONSE_FAILED Getting user response is failed.
* @a result will be allocated on this error
- * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
- * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
- * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
- * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @retval #CSR_ERROR_ENGINE_NOT_EXIST No engine exists
+ * @retval #CSR_ERROR_ENGINE_DISABLED Engine is in disabled state
+ * @retval #CSR_ERROR_ENGINE_NOT_ACTIVATED Engine is not activated
+ * @retval #CSR_ERROR_ENGINE_INTERNAL Engine Internal error
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_context_create()
* @see csr_wp_set_ask_user()
* @see csr_wp_set_popup_message()
*/
-int csr_wp_check_url(csr_wp_context_h handle, const char *url,
- csr_wp_check_result_h *result);
+int csr_wp_check_url(csr_wp_context_h handle, const char *url, csr_wp_check_result_h *result);
/**
* @partner
* @brief Extracts a risk level of the url from the result handle.
- *
* @since_tizen 3.0
- *
- * @param[in] result A result handle returned by csr_wp_check_url().
- * @param[out] level A pointer of the risk level for the given URL.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a level is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] result A result handle returned by csr_wp_check_url()
+ * @param[out] level A pointer of the risk level for the given URL
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a level is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_check_url()
*/
int csr_wp_result_get_risk_level(csr_wp_check_result_h result, csr_wp_risk_level_e *level);
+
/**
* @partner
- * @brief Extracts an url of vendor's web site that contains detailed information about
+ * @brief Extracts a url of vendor's web site that contains detailed information about
* the risk from the result handle.
- *
* @since_tizen 3.0
- *
- * @remarks @a detailed_url must be released using free().
- *
- * @param[in] result A result handle returned by csr_wp_check_url().
- * @param[out] detailed_url A pointer of an url that contains detailed information about
- * the risk.
- * If the risk level is #CSR_WP_RISK_MEDIUM or #CSR_WP_RISK_HIGH,
- * this url should be provided by the engine.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @remarks @a detailed_url must be released using free().
+ * @param[in] result A result handle returned by csr_wp_check_url()
+ * @param[out] detailed_url A pointer of an url that contains detailed information about the risk
+ * If the risk level is #CSR_WP_RISK_MEDIUM or #CSR_WP_RISK_HIGH,
+ * this url should be provided by the engine
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a detailed_url is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_check_url()
*/
int csr_wp_result_get_detailed_url(csr_wp_check_result_h result, char **detailed_url);
+
/**
* @partner
* @brief Extracts a user response of a popup from the result handle.
- *
* @since_tizen 3.0
- *
- * @param[in] result A result handle returned by csr_wp_check_url().
- * @param[out] response A pointer of the user response.
- *
- * @return #CSR_ERROR_NONE on success, otherwise a negative error value
- *
- * @retval #CSR_ERROR_NONE Successful
- * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
- * @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid
- * @retval #CSR_ERROR_SYSTEM System error
- *
+ * @param[in] result A result handle returned by csr_wp_check_url()
+ * @param[out] response A pointer of the user response
+ * @return #CSR_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #CSR_ERROR_NONE Successful
+ * @retval #CSR_ERROR_INVALID_HANDLE Invalid result handle
+ * @retval #CSR_ERROR_INVALID_PARAMETER @a response is invalid
+ * @retval #CSR_ERROR_SYSTEM System error
* @see csr_wp_check_url()
* @see #csr_wp_user_response_e
*/
-int csr_wp_result_get_user_response(csr_wp_check_result_h result,
- csr_wp_user_response_e *response);
+int csr_wp_result_get_user_response(csr_wp_check_result_h result, csr_wp_user_response_e *response);
/**