Tizen Native API
Public Attributes
TCSScanParam_struct Struct Reference

Public Attributes

int iAction
int iDataType
int iCompressFlag
void * pPrivate
TCSOffset(* pfGetSize )(void *pPrivate)
int(* pfSetSize )(void *pPrivate, TCSOffset uSize)
unsigned int(* pfRead )(void *pPrivate, TCSOffset uOffset, void *pBuffer, unsigned int uCount)
unsigned int(* pfWrite )(void *pPrivate, TCSOffset uOffset, void const *pBuffer, unsigned int uCount)
int(* pfCallBack )(void *pPrivate, int iReason, void *pParam)

Detailed Description

The calling application specifies scan parameters using the TCSScanParam structure. The information contained in the structure provides the scan functions with:


Member Data Documentation

The scan-action specifies the type of scanning to be performed on supplied scan data.

0 - decompression disabled, 1 - decompression enabled.

The calling application specifies the data type/format of the data to be scanned using this variable.

int(* TCSScanParam_struct::pfCallBack)(void *pPrivate, int iReason, void *pParam)

This callback function is set by the caller to be notified to each detected malware while scanning is in process. If specified (not NULL), the scan functions call the specified function with the information (e.g. TCS_CB_DETECTED) for each malware detected in the content/data during scanning.

This is a synchronous API.

Parameters:
[in]pPrivatePointer (or handle) to an application object being scanned.
[in]iReasonReason of this callback.
[in]pParamThe data for specified callback reason respectively.
Returns:
Return Type (int) The scanning process continues if the callback function returns 0. If a negative value (e.g. -1) is returned, the scanning process is aborted and control is returned to the caller.

Used by the scan functions to obtain the scan target data size (in bytes) from the caller.

This is a synchronous API. [in] pPrivate Pointer (or handle) to an application object being scanned.

return - Return Type (int) The size (in bytes) of the data to be scanned.

unsigned int(* TCSScanParam_struct::pfRead)(void *pPrivate, TCSOffset uOffset, void *pBuffer, unsigned int uCount)

Used for reading a specified amount of application data during scanning/analysis.

This is a synchronous API.

Parameters:
[in]pPrivatePointer (or handle) to an application object being scanned.
[in]uOffsetRead from the offset in the application data.
[out]pBufferThe buffer used to store the read data.
[in]uCountThe size (in bytes) of the data to be read.
Returns:
Return Type (int) The size (in bytes) of the read data. Not equal to the value of uCount indicating this call fails.
int(* TCSScanParam_struct::pfSetSize)(void *pPrivate, TCSOffset uSize)

Called by the scan functions to resize the scanned data to a given size (in bytes) during repair/clean. The resize function pointer needs to be set if the scan-action (iAction) is set to TCS_SA_SCANREPAIR.

This is a synchronous API.

Parameters:
[in]pPrivatePointer (or handle) to an application object being scanned.
[in]uSizeThe size (in bytes) of the repaired data.
Returns:
Return Type (int) The size (in bytes) of the application data. Not equal to the value of uSize indicating this call fails.
unsigned int(* TCSScanParam_struct::pfWrite)(void *pPrivate, TCSOffset uOffset, void const *pBuffer, unsigned int uCount)

The scan functions use the given function to write a specified amount of data to the scanned object as a part of the repair process. The function pointer needs to be set if the scan action (iAction) is set to TCS_SA_SCANREPAIR.

This is a synchronous API.

Parameters:
[in]pPrivatePointer (or handle) to an application object being scanned.
[in]uOffsetWrite data from the offset in the application data.
[in]pBufferThe buffer hold the data to be written.
[in]uCountThe size (in bytes) of the data to be written.
Returns:
Return Type (int) The size (in bytes) of the written data. Not equal to the value of uCount indicating this call fails.

Pointer (or handle) to an application object being scanned. The scan functions do not perform direct memory I/O using this data pointer/handle. The data pointer/handle is simply passed back to the caller when performing data read/write using caller specified I/O functions. Also the private data is passed back to the caller using the pfCallback function if it is set.


Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause.
For details, see the Content License