]> git.saurik.com Git - apple/security.git/blob - KeychainCircle/KCError.h
Security-58286.41.2.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 } KCJoiningError;
22
23 @interface NSError(KCJoiningError)
24 + (instancetype) errorWithJoiningError:(KCJoiningError) code
25 format:(NSString *) format
26 arguments:(va_list) va NS_FORMAT_FUNCTION(2,0);;
27 + (instancetype) errorWithJoiningError:(KCJoiningError) code
28 format:(NSString *) format, ... NS_FORMAT_FUNCTION(2,3);;
29 - (instancetype) initWithJoiningError:(KCJoiningError) code
30 userInfo:(NSDictionary *)dict;
31 @end
32
33 void KCJoiningErrorCreate(KCJoiningError code, NSError* _Nullable * _Nullable error, NSString* _Nonnull format, ...) NS_FORMAT_FUNCTION(3,4);;
34
35 NS_ASSUME_NONNULL_END