It provides provides APIs checking URL reputation to see if the URL is risky or not.
Required Header
#include <csr-web-protection.h> #include <csr-web-protection-types.h>
Overview
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.
Typedef Documentation
CSR WP scan result handle.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
CSR WP context handle.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
Enumeration Type Documentation
Enumeration for the options about prompting a popup to a user.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Enumerator:
CSR_WP_ASK_USER_NO |
Do not ask the user even if a URL turns out risky.
|
CSR_WP_ASK_USER_YES |
Ask the user when a URL turns out risky
|
Enumeration for risk level of a url.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Enumerator:
CSR_WP_RISK_LOW |
Risk Low.
|
CSR_WP_RISK_UNVERIFIED |
Risk Unverified. There is no information about the url.
|
CSR_WP_RISK_MEDIUM |
Risk Medium. Prompt the user before processing. Ask the user if they want the application to process the url.
|
CSR_WP_RISK_HIGH |
High Risk.Do not process the url and just notify the user
|
Enumeration for the user response for a popup.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Enumerator:
CSR_WP_USER_RESPONSE_USER_NOT_ASKED |
There was no popup for asking the user.
|
CSR_WP_USER_RESPONSE_PROCESSING_ALLOWED |
A user allowed to process the url.
|
CSR_WP_USER_RESPONSE_PROCESSING_DISALLOWED |
A user disallowed to process the url.
|
Function Documentation
Checks URL reputation against the engine vendor's database.
- Warning:
- This is not for use by third-party applications.
Checks whether accessing the URL is risky or not and returns a result handle with the risk level for the URL.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/antivirus.webprotect
- Parameters:
-
[in] | handle | CSR WP context handle returned by csr_wp_context_create() |
[in] | url | URL to check |
[out] | result | A pointer of the result handle with the Risk level for the URL |
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_context_create()
-
csr_wp_set_ask_user()
-
csr_wp_set_popup_message()
Initializes and returns a CSR Web Protection API handle.
- Warning:
- This is not for use by third-party applications.
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 :
- 3.0
- Parameters:
-
[out] | handle | A pointer of CSR WP context handle |
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_context_destroy()
Releases all system resources associated with a Web Protection API handle.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Parameters:
-
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_context_create()
Extracts an url of vendor's web site that contains detailed information about the risk from the result handle.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Parameters:
-
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_check_url()
Extracts a risk level of the url from the result handle.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Parameters:
-
[in] | result | A result handle returned by csr_wp_check_url() |
[out] | level | A pointer of the risk level for the given URL |
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_check_url()
Extracts a user response of a popup from the result handle.
- Warning:
- This is not for use by third-party applications.
- Since :
- 3.0
- Parameters:
-
[in] | result | A result handle returned by csr_wp_check_url() |
[out] | response | A pointer of the user response |
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_check_url()
-
csr_wp_user_response_e
Sets a popup option for risky URL checked.
- Warning:
- This is not for use by third-party applications.
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 :
- 3.0
- Parameters:
-
[in] | handle | CSR WP context handle returned by csr_wp_context_create() |
[in] | ask_user | A popup option in case for a risky URL |
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_context_create()
Sets a popup message of a client in case for a risky URL.
- Warning:
- This is not for use by third-party applications.
Default message is "Risky URL which may harm your device is detected".
- Since :
- 3.0
- Parameters:
-
- Returns:
- CSR_ERROR_NONE on success, otherwise a negative error value
- Return values:
-
- See also:
- csr_wp_context_create()