]> git.saurik.com Git - apple/security.git/blob - KeychainCircle/KCError.h
Security-59754.41.1.tar.gz
[apple/security.git] / KeychainCircle / KCError.h
1 //
2 // KCError.h
3 // Security
4 //
5 //
6
7 #import <Foundation/Foundation.h>
8
9 NS_ASSUME_NONNULL_BEGIN
10
11 typedef enum {
12 kAllocationFailure,
13 kDERUnknownEncoding,
14 kDERStringEncodingFailed,
15 kDEREncodingFailed,
16 kDERSpaceExhausted,
17 kKCTagMismatch,
18 kUnexpectedMessage,
19 kInternalError,
20 kDERUnknownVersion,
21 kProcessApplicationFailure,
22 kUnsupportedTrustPlatform,
23 } KCJoiningError;
24
25 @interface NSError(KCJoiningError)
26 + (instancetype) errorWithJoiningError:(KCJoiningError) code
27 format:(NSString *) format
28 arguments:(va_list) va NS_FORMAT_FUNCTION(2,0);;
29 + (instancetype) errorWithJoiningError:(KCJoiningError) code
30 format:(NSString *) format, ... NS_FORMAT_FUNCTION(2,3);;
31 - (instancetype) initWithJoiningError:(KCJoiningError) code
32 userInfo:(NSDictionary *)dict;
33 @end
34
35 void KCJoiningErrorCreate(KCJoiningError code, NSError* _Nullable * _Nullable error, NSString* _Nonnull format, ...) NS_FORMAT_FUNCTION(3,4);;
36
37 NS_ASSUME_NONNULL_END