sensitivity.io for iOS & macOS
1.1.4
|
#import <ScannerExecutor.h>
Instance Methods | |
(instancetype _Nullable) | - initWithError: |
(ThreadPool *_Nullable) | - threadPoolWithError: |
(ThreatHandlerFuture *_Nullable) | - scanString:withThreatHandler:withPriotiry:withError: |
(ThreatHandlerFuture *_Nullable) | - scanData:withThreatHandler:fileName:withPriotiry:withError: |
(ThreatHandlerFuture *_Nullable) | - scanFileAtPath:withThreatHandler:withPriotiry:withError: |
(ThreatInfosFuture *_Nullable) | - scanString:stopAtFirstThreat:withPriotiry:withError: |
(ThreatInfosFuture *_Nullable) | - scanData:stopAtFirstThreat:fileName:withPriotiry:withError: |
(ThreatInfosFuture *_Nullable) | - scanFileAtPath:stopAtFirstThreat:withPriotiry:withError: |
ScannerExecutor class provides the means to scan multiple texts, data and files simultaneously. Before performing any scans the scanner module needs to have its resources initialized, the license needs to be loaded, the scanner executor needs to be registered with a settings loader and the settings need to be loaded.
- (instancetype _Nullable) initWithError: | (NSError *_Nullable *_Nullable) | error |
Initializes a new object immediately after memory for it has been allocated
error | The error representing the reason for the failure |
- (ThreatInfosFuture* _Nullable) scanData: | (NSData *_Nonnull) | data | |
stopAtFirstThreat: | (BOOL) | stopAtFirst | |
fileName: | (NSString *_Nullable) | fileName | |
withPriotiry: | (NSInteger) | priority | |
withError: | (NSError *_Nullable *_Nullable) | error | |
Scans data for threats.
data | The data that needs to be scanned |
stopAtFirst | If true, the scan will stop on first found threat, otherwise it will scan the whole data |
fileName | If data is the content of a file, pass file name (otherwise it may be nil or empty string) |
priority | The priority of this scan. High priority scans execute before low priority ones. |
error | The error representing the reason for the failure |
- (ThreatHandlerFuture* _Nullable) scanData: | (NSData *_Nonnull) | data | |
withThreatHandler: | (ThreatHandler *_Nonnull) | threatHandler | |
fileName: | (NSString *_Nullable) | fileName | |
withPriotiry: | (NSInteger) | priority | |
withError: | (NSError *_Nullable *_Nullable) | error | |
Scans data for threats using threat handler.
data | The data that needs to be scanned |
threatHandler | The threat handler |
fileName | If data is the content of a file, pass file name (otherwise it may be nil or empty string) |
priority | The priority of this scan. High priority scans execute before low priority ones. |
error | The error representing the reason for the failure |
- (ThreatInfosFuture* _Nullable) scanFileAtPath: | (NSString *_Nonnull) | filePath | |
stopAtFirstThreat: | (BOOL) | stopAtFirst | |
withPriotiry: | (NSInteger) | priority | |
withError: | (NSError *_Nullable *_Nullable) | error | |
Scans file for threats.
filePath | The path of the file that needs to be scanned |
stopAtFirst | If true, the scan will stop on first found threat, otherwise it will scan the whole file |
priority | The priority of this scan. High priority scans execute before low priority ones. |
error | The error representing the reason for the failure |
- (ThreatHandlerFuture* _Nullable) scanFileAtPath: | (NSString *_Nonnull) | filePath | |
withThreatHandler: | (ThreatHandler *_Nonnull) | threatHandler | |
withPriotiry: | (NSInteger) | priority | |
withError: | (NSError *_Nullable *_Nullable) | error | |
Scans file for threats using threat handler.
filePath | The path of the file that needs to be scanned |
threatHandler | The threat handler |
priority | The priority of this scan. High priority scans execute before low priority ones. |
error | The error representing the reason for the failure |
- (ThreatInfosFuture* _Nullable) scanString: | (NSString *_Nonnull) | text | |
stopAtFirstThreat: | (BOOL) | stopAtFirst | |
withPriotiry: | (NSInteger) | priority | |
withError: | (NSError *_Nullable *_Nullable) | error | |
Scans provided text for threats.
text | The text to scan |
stopAtFirst | If true, the scan will stop on first found threat, otherwise it will scan the whole string |
priority | The priority of this scan. High priority scans execute before low priority ones. |
error | The error representing the reason for the failure |
- (ThreatHandlerFuture* _Nullable) scanString: | (NSString *_Nonnull) | text | |
withThreatHandler: | (ThreatHandler *_Nonnull) | threatHandler | |
withPriotiry: | (NSInteger) | priority | |
withError: | (NSError *_Nullable *_Nullable) | error | |
Scans provided text for threats using threat handler.
text | The text to scan |
threatHandler | The threat handler |
priority | The priority of this scan. High priority scans execute before low priority ones. |
error | The error representing the reason for the failure |
- (ThreadPool* _Nullable) threadPoolWithError: | (NSError *_Nullable *_Nullable) | error |
Returns the scanner executor thread pool
error | The error representing the reason for the failure |