summaryrefslogtreecommitdiffstats
path: root/macosx/HBSecurityAccessToken.h
blob: 1ad0b3979548adf37adb31292465cd2e3570ebf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
//  HBSecurityAccessToken.h
//  HandBrake
//
//  Created by Damiano Galassi on 24/01/17.
//
//

#import <Foundation/Foundation.h>

@protocol HBSecurityScope <NSObject>

/*  Given an instance, make the resource referenced by the job accessible to the process.
 */
- (BOOL)startAccessingSecurityScopedResource;

/*  Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource.
 */
- (void)stopAccessingSecurityScopedResource;

@end

@interface NSURL (HBSecurityScope) <HBSecurityScope>

- (BOOL)startAccessingSecurityScopedResource;
- (void)stopAccessingSecurityScopedResource;

@end

@interface HBSecurityAccessToken : NSObject

+ (instancetype)tokenWithObject:(id<HBSecurityScope>)object;
- (instancetype)initWithObject:(id<HBSecurityScope>)object;

@end