GNUstep CoreBase Library 0.2
CFBundle.h
1/* CFBundle.h
2
3 Copyright (C) 2011 Free Software Foundation, Inc.
4
5 Written by: David Chisnall
6 Date: April, 2011
7
8 This file is part of the 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_CFBUNDLE__
28#define __COREFOUNDATION_CFBUNDLE__ 1
29
30#include <CoreFoundation/CFBase.h>
31#include <CoreFoundation/CFURL.h>
32#include <CoreFoundation/CFDictionary.h>
33#include <CoreFoundation/CFError.h>
34
35CF_EXTERN_C_BEGIN
36
37typedef const struct __CFBundle *CFBundleRef;
38
39CFTypeID CFBundleGetTypeID (void);
40
41CFBundleRef CFBundleCreate(CFAllocatorRef allocator, CFURLRef bundleURL);
42
43void* CFBundleGetFunctionPointerForName(CFBundleRef bundle,
44 CFStringRef functionName);
45
46void* CFBundleGetDataPointerForName(CFBundleRef bundle,
47 CFStringRef functionName);
48
49CFBundleRef CFBundleGetMainBundle(void);
50CFBundleRef CFBundleGetBundleWithIdentifier(CFStringRef bundleID);
51
52Boolean CFBundleLoadExecutable(CFBundleRef bundle);
53Boolean CFBundleLoadExecutableAndReturnError(CFBundleRef bundle, CFErrorRef *error);
54Boolean CFBundlePreflightExecutable(CFBundleRef bundle, CFErrorRef *error);
55void CFBundleUnloadExecutable(CFBundleRef bundle);
56
57CFStringRef CFBundleGetIdentifier(CFBundleRef bundle);
58
59CFURLRef CFBundleCopyExecutableURL(CFBundleRef bundle);
60
61CFURLRef CFBundleCopyBuiltInPlugInsURL(CFBundleRef bundle);
62
63CFURLRef CFBundleCopyBundleURL(CFBundleRef bundle);
64
65CFURLRef CFBundleCopyResourcesDirectoryURL(CFBundleRef bundle);
66
67CFURLRef CFBundleCopyResourceURL(CFBundleRef bundle, CFStringRef resourceName,
68 CFStringRef resourceType,
69 CFStringRef subDirName);
70
71CFURLRef CFBundleCopyPrivateFrameworksURL(CFBundleRef bundle);
72
73CFURLRef CFBundleCopyAuxiliaryExecutableURL(CFBundleRef bundle,
74 CFStringRef executableName);
75
76CFURLRef CFBundleCopyResourceURLForLocalization(CFBundleRef bundle,
77 CFStringRef resourceName, CFStringRef resourceType,
78 CFStringRef subDirName, CFStringRef localizationName);
79
80CFDictionaryRef CFBundleGetInfoDictionary(CFBundleRef bundle);
81CFDictionaryRef CFBundleGetLocalInfoDictionary(CFBundleRef bundle);
82
83CFTypeRef CFBundleGetValueForInfoDictionaryKey(CFBundleRef bundle,
84 CFStringRef key);
85
86CF_EXPORT const CFStringRef kCFBundleInfoDictionaryVersionKey;
87CF_EXPORT const CFStringRef kCFBundleExecutableKey;
88CF_EXPORT const CFStringRef kCFBundleIdentifierKey;
89CF_EXPORT const CFStringRef kCFBundleVersionKey;
90CF_EXPORT const CFStringRef kCFBundleNameKey;
91CF_EXPORT const CFStringRef kCFBundleLocalizationsKey;
92
93CF_EXTERN_C_END
94
95#endif /* __COREFOUNDATION_CFBUNDLE__ */
96
const struct __CFAllocator * CFAllocatorRef
A reference to a CFAllocator object.
Definition CFBase.h:301