sensitivity.io for iOS & macOS  1.1.4
Scanner.h
1 //
2 // Scanner.h
3 //
4 // Created by Andreea ERDELYI <andreea.erdelyi@cososys.com>
5 //
6 // Copyright (C) 2017 CoSoSys Ltd team@sensitivity.io
7 // CoSoSys Ltd. All rights reserved.
8 // Please see the COPYING for more details.
9 //
10 
11 #import <Foundation/Foundation.h>
12 
13 @class ThreatInfo;
14 @class ThreatHandler;
15 
20 @interface Scanner : NSObject
21 
22 - (instancetype _Null_unspecified) init NS_UNAVAILABLE;
23 + (instancetype _Null_unspecified) new NS_UNAVAILABLE;
24 - (instancetype _Null_unspecified) copy NS_UNAVAILABLE;
33 - (instancetype _Nullable) initWithError:(NSError * _Nullable * _Nullable)error NS_DESIGNATED_INITIALIZER NS_SWIFT_NAME(init());
34 
35 // MARK: - Cancelable API
44 - (BOOL) cancelScanWithError:(NSError * _Nullable * _Nullable)error;
52 - (BOOL) isCanceled:(BOOL* _Nonnull)canceled withError:(NSError * _Nullable * _Nullable)error;
53 
54 // MARK: - Core scan API
66 - (BOOL) scanString:(NSString * _Nonnull)text withThreatHandler:(ThreatHandler * _Nonnull)threatHandler withError:(NSError * _Nullable * _Nullable)error NS_SWIFT_NAME(scanString(_:threatHandler:));
79 - (BOOL) scanData:(NSData * _Nonnull)data withThreatHandler:(ThreatHandler * _Nonnull)threatHandler fileName:(NSString * _Nullable)fileName withError:(NSError * _Nullable * _Nullable)error NS_SWIFT_NAME(scanData(_:threatHandler:fileName:));
91 - (BOOL) scanFileAtPath:(NSString * _Nonnull)filePath withThreatHandler:(ThreatHandler * _Nonnull)threatHandler withError:(NSError * _Nullable * _Nullable)error NS_SWIFT_NAME(scanFile(atPath:threatHandler:));
92 
93 // MARK: - Convenience scan API
105 - (NSArray<ThreatInfo *> * _Nullable) scanString:(NSString * _Nonnull)text stopAtFirstThreat:(BOOL)stopAtFirst withError:(NSError * _Nullable * _Nullable)error;
118 - (NSArray<ThreatInfo *> * _Nullable) scanData:(NSData * _Nonnull)data stopAtFirstThreat:(BOOL)stopAtFirst fileName:(NSString * _Nullable)fileName withError:(NSError * _Nullable * _Nullable)error;
130 - (NSArray<ThreatInfo *> * _Nullable) scanFileAtPath:(NSString * _Nonnull)filePath stopAtFirstThreat:(BOOL)stopAtFirst withError:(NSError * _Nullable * _Nullable)error;
131 
132 @end
Definition: Scanner.h:20
Definition: ThreatInfo.h:20
Definition: ThreatHandler.h:19