summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/foundation/NSError.inc
blob: a9d50f15a3acc62988f6f41540de62ccc693c65d (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{ Parsed from Foundation.framework NSError.h }
{ Version: 2.1.2 - Wed Dec 8 10:06:43 CET 2010 }


{$ifdef TYPES}
{$ifndef NSERROR_PAS_T}
{$define NSERROR_PAS_T}

{$endif}
{$endif}

{$ifdef RECORDS}
{$ifndef NSERROR_PAS_R}
{$define NSERROR_PAS_R}

{$endif}
{$endif}

{$ifdef FUNCTIONS}
{$ifndef NSERROR_PAS_F}
{$define NSERROR_PAS_F}

{$endif}
{$endif}

{$ifdef EXTERNAL_SYMBOLS}
{$ifndef NSERROR_PAS_S}
{$define NSERROR_PAS_S}

{ External string constants }
var
  NSCocoaErrorDomain: NSString; cvar; external;
  NSPOSIXErrorDomain: NSString; cvar; external;
  NSOSStatusErrorDomain: NSString; cvar; external;
  NSMachErrorDomain: NSString; cvar; external;
  NSUnderlyingErrorKey: NSString; cvar; external;
  NSLocalizedDescriptionKey: NSString; cvar; external;
  NSLocalizedFailureReasonErrorKey: NSString; cvar; external;
  NSLocalizedRecoverySuggestionErrorKey: NSString; cvar; external;
  NSLocalizedRecoveryOptionsErrorKey: NSString; cvar; external;
  NSRecoveryAttempterErrorKey: NSString; cvar; external;
  NSHelpAnchorErrorKey: NSString; cvar; external;
  NSStringEncodingErrorKey: NSString; cvar; external;
  NSURLErrorKey: NSString; cvar; external;
  NSFilePathErrorKey: NSString; cvar; external;

{$endif}
{$endif}

{$ifdef FORWARD}
  NSError = objcclass;
  NSErrorPointer = ^NSError;
  NSErrorPtr = NSErrorPointer;

{$endif}

{$ifdef CLASSES}
{$ifndef NSERROR_PAS_C}
{$define NSERROR_PAS_C}

{ NSError }
  NSError = objcclass(NSObject, NSCopyingProtocol, NSCodingProtocol)
  private
    _reserved: Pointer;
    _code: NSInteger;
    _domain: NSString;
    _userInfo: NSDictionary;
    
  public
    class function alloc: NSError; message 'alloc';

    function initWithDomain_code_userInfo(domain_: NSString; code_: NSInteger; dict: NSDictionary): id; message 'initWithDomain:code:userInfo:';
    class function errorWithDomain_code_userInfo(domain_: NSString; code_: NSInteger; dict: NSDictionary): id; message 'errorWithDomain:code:userInfo:';
    function domain: NSString; message 'domain';
    function code: NSInteger; message 'code';
    function userInfo: NSDictionary; message 'userInfo';
    function localizedDescription: NSString; message 'localizedDescription';
    function localizedFailureReason: NSString; message 'localizedFailureReason';
    function localizedRecoverySuggestion: NSString; message 'localizedRecoverySuggestion';
    function localizedRecoveryOptions: NSArray; message 'localizedRecoveryOptions';
    function recoveryAttempter: id; message 'recoveryAttempter';
    function helpAnchor: NSString; message 'helpAnchor';

    { Adopted Protocols }
    function copyWithZone(zone_: NSZonePtr): id;
    procedure encodeWithCoder(aCoder: NSCoder);
    function initWithCoder(aDecoder: NSCoder): id;
  end; external;

{ NSErrorRecoveryAttemptingCategory }
  NSErrorRecoveryAttemptingCategory = objccategory(NSObject)
    procedure attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo(error: NSError; recoveryOptionIndex: NSUInteger; delegate: id; didRecoverSelector: SEL; contextInfo: Pointer); message 'attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:';
    function attemptRecoveryFromError_optionIndex(error: NSError; recoveryOptionIndex: NSUInteger): Boolean; message 'attemptRecoveryFromError:optionIndex:';
  end; external;

{$endif}
{$endif}