1 /** Interface for NSErrorRecoveryAttempting for GNUStep
2    Copyright (C) 2007 Free Software Foundation, Inc.
3 
4    Written by:  Fred Kiefer <fredkiefer@gmx.de>
5    Date: July 2007
6 
7    This file is part of the GNUstep Base Library.
8 
9    This library is free software; you can redistribute it and/or
10    modify it under the terms of the GNU Lesser General Public
11    License as published by the Free Software Foundation; either
12    version 2 of the License, or (at your option) any later version.
13 
14    This library is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17    Lesser General Public License for more details.
18 
19    You should have received a copy of the GNU Lesser General Public
20    License along with this library; if not, write to the Free
21    Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22    Boston, MA 02110 USA.
23 
24    */
25 
26 #ifndef __NSErrorRecoveryAttempting_h_GNUSTEP_BASE_INCLUDE
27 #define __NSErrorRecoveryAttempting_h_GNUSTEP_BASE_INCLUDE
28 #import	<GNUstepBase/GSVersionMacros.h>
29 
30 #if	OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
31 
32 #import	<Foundation/NSObject.h>
33 
34 #if	defined(__cplusplus)
35 extern "C" {
36 #endif
37 
38 /**
39  * These methods define the informal error recovery protocol
40  */
41 @interface NSObject (NSErrorRecoveryAttempting)
42 
43 - (BOOL) attemptRecoveryFromError: (NSError*)error
44                       optionIndex: (unsigned int)recoveryOptionIndex;
45 - (void) attemptRecoveryFromError: (NSError*)error
46                       optionIndex: (unsigned int)recoveryOptionIndex
47                          delegate: (id)delegate
48                didRecoverSelector: (SEL)didRecoverSelector
49                       contextInfo: (void*)contextInfo;
50 
51 @end
52 
53 #if	defined(__cplusplus)
54 }
55 #endif
56 
57 #endif
58 
59 #endif	/* __NSErrorRecoveryAttempting_h_GNUSTEP_BASE_INCLUDE*/
60