GNUstep CoreBase Library 0.2
CFError.h
1/* CFError.h
2
3 Copyright (C) 2010 Free Software Foundation, Inc.
4
5 Written by: Stefan Bidigaray
6 Date: January, 2010
7
8 This file is part of GNUstep CoreBase Library.
9
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
14
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; see the file COPYING.LIB.
22 If not, see <http://www.gnu.org/licenses/> or write to the
23 Free Software Foundation, 51 Franklin Street, Fifth Floor,
24 Boston, MA 02110-1301, USA.
25*/
26
27#ifndef __COREFOUNDATION_CFERROR_H__
28#define __COREFOUNDATION_CFERROR_H__
29
30#include <CoreFoundation/CFBase.h>
31#include <CoreFoundation/CFDictionary.h>
32
33CF_EXTERN_C_BEGIN
34
35#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
36
38typedef const struct __CFError * CFErrorRef;
39
43CF_EXPORT const CFStringRef kCFErrorDomainPOSIX;
44CF_EXPORT const CFStringRef kCFErrorDomainOSStatus;
45CF_EXPORT const CFStringRef kCFErrorDomainMach;
46CF_EXPORT const CFStringRef kCFErrorDomainCocoa;
47
48CF_EXPORT const CFStringRef kCFErrorLocalizedDescriptionKey;
49CF_EXPORT const CFStringRef kCFErrorLocalizedFailureReasonKey;
50CF_EXPORT const CFStringRef kCFErrorLocalizedRecoverySuggestionKey;
51CF_EXPORT const CFStringRef kCFErrorDescriptionKey;
52CF_EXPORT const CFStringRef kCFErrorUnderlyingErrorKey;
53
54
55
59CF_EXPORT CFErrorRef
60CFErrorCreate (CFAllocatorRef allocator, CFStringRef domain, CFIndex code,
61 CFDictionaryRef userInfo);
62
63CF_EXPORT CFErrorRef
64CFErrorCreateWithUserInfoKeysAndValues (CFAllocatorRef allocator,
65 CFStringRef domain, CFIndex code, const void *const *userInfoKeys,
66 const void *const *userInfoValues, CFIndex numUserInfoValues);
72CF_EXPORT CFStringRef
73CFErrorGetDomain (CFErrorRef err);
74
75CF_EXPORT CFIndex
76CFErrorGetCode (CFErrorRef err);
77
78CF_EXPORT CFDictionaryRef
79CFErrorCopyUserInfo (CFErrorRef err);
80
81CF_EXPORT CFStringRef
82CFErrorCopyDescription (CFErrorRef err);
83
84CF_EXPORT CFStringRef
85CFErrorCopyFailureReason (CFErrorRef err);
86
87CF_EXPORT CFStringRef
88CFErrorCopyRecoverySuggestion (CFErrorRef err);
94CF_EXPORT CFTypeID
95CFErrorGetTypeID (void);
99#endif /* MAC_OS_X_VERSION_10_5 */
100
101CF_EXTERN_C_END
102
103#endif /* __COREFOUNDATION_CFERROR_H__ */
104
signed long CFIndex
Definition CFBase.h:165
const struct __CFAllocator * CFAllocatorRef
A reference to a CFAllocator object.
Definition CFBase.h:301