sensitivity.io for iOS & macOS  1.1.4
Instance Methods | List of all members
ThreatLocation Class Reference

#import <ThreatLocation.h>

Inheritance diagram for ThreatLocation:

Instance Methods

(instancetype _Nullable) - initWithError:
 
(BOOL) - setFileName:withError:
 
(BOOL) - setArchiveMember:withError:
 
(BOOL) - setOffset:withError:
 
(BOOL) - setLineNumber:withError:
 
(BOOL) - setSurroundingText:withError:
 
(BOOL) - setInMetadata:withError:
 
(NSString *_Nullable) - fileNameWithError:
 
(NSString *_Nullable) - archiveMemberWithError:
 
(NSNumber *_Nullable) - offsetWithError:
 
(BOOL) - lineNumber:withError:
 
(NSString *_Nullable) - surroundingTextWithError:
 
(BOOL) - inMetadata:withError:
 
(NSString *_Nonnull) - description
 

Detailed Description

The ThreatLocation class contains the information about the location of a found threat

Method Documentation

◆ archiveMemberWithError:()

- (NSString* _Nullable) archiveMemberWithError: (NSError *_Nullable *_Nullable)  error

Get location archive member. It represents the name of the file where the threat was found inside the scanned archive. Missing if fileName is not an archive

Parameters
errorThe error representing the reason for the failure
Returns
The archive member of the location

◆ description()

- (NSString* _Nonnull) description

Returns threat location description

Returns
The threat location description

◆ fileNameWithError:()

- (NSString* _Nullable) fileNameWithError: (NSError *_Nullable *_Nullable)  error

Get location file name. It represents the name of the file that was scanned. Nonnull only when scanning files

Parameters
errorThe error representing the reason for the failure
Returns
The file name of the location

◆ initWithError:()

- (instancetype _Nullable) initWithError: (NSError *_Nullable *_Nullable)  error

Initializes a new object immediately after memory for it has been allocated

Note
The designated initializer
Parameters
errorThe error representing the reason for the failure
Returns
The initialized object

◆ inMetadata:withError:()

- (BOOL) inMetadata: (BOOL *_Nonnull)  inMetadata
withError: (NSError *_Nullable *_Nullable)  error 

Get in metadata status. If true, the threat was found in the metadata of the scanned item, false otherwise.

Parameters
errorThe error representing the reason for the failure
Returns
The in metadata status

◆ lineNumber:withError:()

- (BOOL) lineNumber: (NSInteger *_Nonnull)  lineNumber
withError: (NSError *_Nullable *_Nullable)  error 

Get location line number. It represents the line number where the threat was found, -1 means this information is not available

Parameters
lineNumberWill be set to location line number on success
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ offsetWithError:()

- (NSNumber* _Nullable) offsetWithError: (NSError *_Nullable *_Nullable)  error

Get location offset. It represents the offset where the threat was found, -1 means this information is not available

Parameters
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setArchiveMember:withError:()

- (BOOL) setArchiveMember: (NSString *_Nonnull)  archiveMember
withError: (NSError *_Nullable *_Nullable)  error 

Set location archive member

Parameters
archiveMemberThe new location archive member
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setFileName:withError:()

- (BOOL) setFileName: (NSString *_Nonnull)  fileName
withError: (NSError *_Nullable *_Nullable)  error 

Set location file name

Parameters
fileNameThe new location file name
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setInMetadata:withError:()

- (BOOL) setInMetadata: (BOOL)  inMetadata
withError: (NSError *_Nullable *_Nullable)  error 

Set the in metadata status of the threat location

Parameters
inMetadataThe new in metadata status
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setLineNumber:withError:()

- (BOOL) setLineNumber: (NSInteger)  lineNumber
withError: (NSError *_Nullable *_Nullable)  error 

Set location line number

Parameters
lineNumberThe new location line number
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setOffset:withError:()

- (BOOL) setOffset: (NSNumber *_Nonnull)  offset
withError: (NSError *_Nullable *_Nullable)  error 

Set location offset

Parameters
offsetThe new location offset
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setSurroundingText:withError:()

- (BOOL) setSurroundingText: (NSString *_Nonnull)  surroundingText
withError: (NSError *_Nullable *_Nullable)  error 

Set location surrounding text

Parameters
surroundingTextThe new location surrounding text
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ surroundingTextWithError:()

- (NSString* _Nullable) surroundingTextWithError: (NSError *_Nullable *_Nullable)  error

Get location surrounding text. It represents the surrounding text of the found threat

Parameters
errorThe error representing the reason for the failure
Returns
The surrounding text of the location

The documentation for this class was generated from the following file: