[CAPI description changed] The @a -> @a
[platform/upstream/csr-framework.git] / src / include / csr / csr-content-screening.h
index e2e7fb5..593d451 100644 (file)
@@ -39,6 +39,7 @@ 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.
@@ -46,7 +47,7 @@ extern "C" {
  *
  * @since_tizen 3.0
  *
- * @remarks The @a handle should be released using csr_cs_context_destroy().
+ * @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.
@@ -63,6 +64,7 @@ extern "C" {
 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
@@ -81,17 +83,18 @@ int csr_cs_context_create(csr_cs_context_h *handle);
 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 is set, a popup will be prompted to a user when a malware
- *          is detected. If #CSR_CS_NOT_ASK_USER is set which is default value, no popup
+ * @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_NOT_ASK_USER) as a default.
+ * @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.
@@ -109,6 +112,7 @@ int csr_cs_context_destroy(csr_cs_context_h handle);
 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.".
@@ -136,11 +140,12 @@ int csr_cs_set_ask_user(csr_cs_context_h handle, csr_cs_ask_user_e ask_user);
 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_USE_CORE_DEFAULT will be used.
+ * @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.
@@ -158,14 +163,17 @@ int csr_cs_set_popup_message(csr_cs_context_h handle, const char *message);
 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]  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
  *
@@ -176,9 +184,10 @@ int csr_cs_set_core_usage(csr_cs_context_h handle, csr_cs_core_usage_e usage);
  * @see csr_cs_context_create()
  * @see csr_cs_context_destroy()
  */
-int csr_cs_set_scan_on_cloud(csr_cs_context_h handle);
+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
@@ -190,8 +199,10 @@ int csr_cs_set_scan_on_cloud(csr_cs_context_h handle);
  * @privilege %http://tizen.org/privilege/antivirus.scan
  *
  * @remarks Scan data synchronously.
- * @remarks The @a malware will be released when @a handle is released using
+ * @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.
@@ -222,6 +233,7 @@ int csr_cs_scan_data(csr_cs_context_h handle, const unsigned char *data, size_t
                                         csr_cs_malware_h *malware);
 
 /**
+ * @partner
  * @brief Scans a file specified by file path for malware.
  *
  * @since_tizen 3.0
@@ -229,8 +241,10 @@ int csr_cs_scan_data(csr_cs_context_h handle, const unsigned char *data, size_t
  * @privilege %http://tizen.org/privilege/antivirus.scan
  *
  * @remarks  Scan file synchronously.
- * @remarks  The @a malware will be released when @a handle is released using
+ * @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.
@@ -266,6 +280,7 @@ 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
@@ -290,6 +305,7 @@ int csr_cs_scan_file(csr_cs_context_h handle, const char *file_path,
 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
@@ -314,6 +330,7 @@ int csr_cs_set_file_scanned_cb(csr_cs_context_h handle, csr_cs_file_scanned_cb c
 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
@@ -337,6 +354,7 @@ int csr_cs_set_detected_cb(csr_cs_context_h handle, csr_cs_detected_cb callback)
 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.
  *
  * @since_tizen 3.0
@@ -362,6 +380,7 @@ 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
@@ -385,6 +404,7 @@ int csr_cs_set_cancelled_cb(csr_cs_context_h handle, csr_cs_cancelled_cb callbac
 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,
@@ -404,6 +424,8 @@ int csr_cs_set_error_cb(csr_cs_context_h handle, csr_cs_error_cb callback);
  * @remarks The caller should set callback functions before call 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.
@@ -446,6 +468,7 @@ 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,
@@ -465,6 +488,8 @@ int csr_cs_scan_files_async(csr_cs_context_h handle, const char *file_paths[],
  * @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_path   A path of scan target directory.
@@ -505,6 +530,7 @@ 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,
@@ -524,6 +550,8 @@ int csr_cs_scan_dir_async(csr_cs_context_h handle, const char *dir_path, void *u
  * @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.
@@ -567,6 +595,7 @@ int csr_cs_scan_dirs_async(csr_cs_context_h handle, const char *dir_paths[], siz
 
 
 /**
+ * @partner
  * @brief Cancels a running scanning task, asynchronously.
  *
  * @since_tizen 3.0
@@ -590,6 +619,7 @@ int csr_cs_cancel_scanning(csr_cs_context_h handle);
 
 
 /**
+ * @partner
  * @brief Extracts the severity of a detected malware from the detected malware handle.
  *
  * @since_tizen 3.0
@@ -609,11 +639,12 @@ 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  The @a name must be released using free().
+ * @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.
@@ -628,12 +659,13 @@ int csr_cs_malware_get_severity(csr_cs_malware_h malware,
 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.
  *
  * @since_tizen 3.0
  *
- * @remarks  The @a detailed_url must be released using free().
+ * @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
@@ -650,6 +682,7 @@ int csr_cs_malware_get_name(csr_cs_malware_h malware, char **name);
 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.
  *
@@ -669,12 +702,13 @@ int csr_cs_malware_get_detailed_url(csr_cs_malware_h malware, char **detailed_ur
 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.
  *
  * @since_tizen 3.0
  *
- * @remarks The @a file_name must be released using free().
+ * @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
@@ -690,6 +724,7 @@ int csr_cs_malware_get_timestamp(csr_cs_malware_h malware, time_t *timestamp);
 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
@@ -708,6 +743,7 @@ 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
@@ -725,12 +761,13 @@ int csr_cs_malware_get_user_response(csr_cs_malware_h malware,
 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.
  *
  * @since_tizen 3.0
  *
- * @remarks  The @a pkg_id must be released using free().
+ * @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.
@@ -746,6 +783,7 @@ int csr_cs_malware_is_app(csr_cs_malware_h malware, bool *is_app);
 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
@@ -783,13 +821,14 @@ int csr_cs_judge_detected_malware(csr_cs_context_h handle, csr_cs_malware_h malw
 
 
 /**
+ * @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 The @a malware will be released when @a handle is destroyed.
+ * @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().
@@ -818,13 +857,14 @@ 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  The @a list will be released when @a handle is destroyed.
+ * @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.
@@ -852,13 +892,14 @@ int csr_cs_get_detected_malwares(csr_cs_context_h handle, const char *dir_paths[
                                                                 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  The @a malware will be released when @a handle is destroyed.
+ * @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.
@@ -882,13 +923,14 @@ 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.
  *
  * @since_tizen 3.0
  * @privlevel partner
  * @privilege %http://tizen.org/privilege/antivirus.scan
  *
- * @remarks  The @a list will be released when @a handle is destroyed.
+ * @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.
@@ -916,10 +958,14 @@ int csr_cs_get_ignored_malwares(csr_cs_context_h handle, const char *dir_paths[]
                                                                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().