Tizen Native API  4.0
Admin Module

It provides APIs managing underlying anti malware engines.

Required Header

#include <csr-engine-manager.h>

Overview

It provides APIs getting engine information and enabling or disabling underlying anti malware engines.

Functions

int csr_get_current_engine (csr_engine_id_e id, csr_engine_h *engine)
 Gets the handle of a current engine information.
int csr_engine_get_vendor (csr_engine_h engine, char **vendor)
 Extracts a vendor name from the engine information handle.
int csr_engine_get_name (csr_engine_h engine, char **name)
 Extracts an engine name from the engine information handle.
int csr_engine_get_version (csr_engine_h engine, char **version)
 Extracts an engine version from the engine information handle.
int csr_engine_get_data_version (csr_engine_h engine, char **version)
 Extracts an engine's data version from the engine information handle.
int csr_engine_get_latest_update_time (csr_engine_h engine, time_t *time)
 Extracts the latest update time of an engine from the engine information handle.
int csr_engine_get_activated (csr_engine_h engine, csr_activated_e *activated)
 Extracts the state of engine activation from the engine information handle.
int csr_engine_set_state (csr_engine_h engine, csr_state_e state)
 Enable or disable an engine.
int csr_engine_get_state (csr_engine_h engine, csr_state_e *state)
 Gets the engine state.
int csr_engine_destroy (csr_engine_h engine)
 Releases all system resources associated with a engine information handle.

Typedefs

typedef struct __csr_engine_h * csr_engine_h
 Engine handle.

Typedef Documentation

typedef struct __csr_engine_h* csr_engine_h

Engine handle.

Warning:
This is not for use by third-party applications.
Since :
3.0

Enumeration Type Documentation

Enumeration for state of engine activation.

Warning:
This is not for use by third-party applications.
Since :
3.0
Enumerator:
CSR_NOT_ACTIVATED 

Engine is not activated

CSR_ACTIVATED 

Engine is activated

Enumeration for engine identifier.

Warning:
This is not for use by third-party applications.
Since :
3.0
Enumerator:
CSR_ENGINE_CS 

Content screening engine id

CSR_ENGINE_WP 

Web protection engine id

Enumeration for state of engine.

Warning:
This is not for use by third-party applications.
Since :
3.0
Enumerator:
CSR_STATE_ENABLE 

Enable engine

CSR_STATE_DISABLE 

Disable engine


Function Documentation

Releases all system resources associated with a engine information handle.

Warning:
This is not for use by third-party applications.
Since :
3.0
Parameters:
[in]engineThe engine information handle
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
int csr_engine_get_activated ( csr_engine_h  engine,
csr_activated_e activated 
)

Extracts the state of engine activation from the engine information handle.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/antivirus.admin
Parameters:
[in]engineThe engine information handle
[out]activatedA pointer of the engine activation state
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERactivated is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()
int csr_engine_get_data_version ( csr_engine_h  engine,
char **  version 
)

Extracts an engine's data version from the engine information handle.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/antivirus.admin
Remarks:
version must be released using free().
Parameters:
[in]engineThe engine information handle
[out]versionA pointer of the data version. It can be null
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERversion is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()
int csr_engine_get_latest_update_time ( csr_engine_h  engine,
time_t *  time 
)

Extracts the latest update time of an engine from the engine information handle.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/antivirus.admin
Parameters:
[in]engineThe engine information handle
[out]timeA pointer of lasted update time
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERtime is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()
int csr_engine_get_name ( csr_engine_h  engine,
char **  name 
)

Extracts an engine name from the engine information handle.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/antivirus.admin
Remarks:
name must be released using free().
Parameters:
[in]engineThe engine information handle
[out]nameA pointer of the engine's name
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERname is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()
int csr_engine_get_state ( csr_engine_h  engine,
csr_state_e state 
)

Gets the engine state.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/antivirus.admin
Parameters:
[in]engineThe engine information handle
[out]stateA pointer of the engine state
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERstate is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()
int csr_engine_get_vendor ( csr_engine_h  engine,
char **  vendor 
)

Extracts a vendor name from the engine information handle.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/antivirus.admin
Remarks:
vendor must be released using free().
Parameters:
[in]engineThe engine information handle
[out]vendorA pointer of the engine's vendor name
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERvendor is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()
int csr_engine_get_version ( csr_engine_h  engine,
char **  version 
)

Extracts an engine version from the engine information handle.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/antivirus.admin
Remarks:
version must be released using free().
Parameters:
[in]engineAn engine information handle
[out]versionA pointer of the engine's version
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERversion is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()
int csr_engine_set_state ( csr_engine_h  engine,
csr_state_e  state 
)

Enable or disable an engine.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
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.
Parameters:
[in]engineThe engine information handle
[in]stateThe engine state
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_HANDLEInvalid engine information handle
CSR_ERROR_INVALID_PARAMETERstate is invalid
CSR_ERROR_PERMISSION_DENIEDPermission denied
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_get_current_engine()

Gets the handle of a current engine information.

Warning:
This is not for use by third-party applications.
Since :
3.0
Remarks:
engine should be released using csr_engine_destroy().
Parameters:
[in]idEngine identifier to get handle
[out]engineA pointer of the engine information handle
Returns:
CSR_ERROR_NONE on success, otherwise a negative error value
Return values:
CSR_ERROR_NONESuccessful
CSR_ERROR_INVALID_PARAMETERengine is invalid
CSR_ERROR_ENGINE_NOT_EXISTNo engine exists
CSR_ERROR_ENGINE_NOT_ACTIVATEDEngine is not activated
CSR_ERROR_ENGINE_INTERNALEngine Internal error
CSR_ERROR_SYSTEMSystem error
See also:
csr_engine_destroy()