]> git.saurik.com Git - apple/hfs.git/blob - core/CatalogPrivate.h
hfs-556.100.11.tar.gz
[apple/hfs.git] / core / CatalogPrivate.h
1 /*
2 * Copyright (c) 2000-2005, 2015 Apple Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28 /*
29 File: CatalogPrivate.h
30
31 Contains: Private Catalog Manager interfaces.
32
33 Version: HFS Plus 1.0
34
35 Copyright: (c) 1997-1998 by Apple Inc., all rights reserved.
36
37 File Ownership:
38
39 DRI: Don Brady
40
41 Other Contact: xxx put other contact here xxx
42
43 Technology: xxx put technology here xxx
44
45 Writers:
46
47 (JL) Jim Luther
48 (msd) Mark Day
49 (DSH) Deric Horn
50 (djb) Don Brady
51
52 Change History (most recent first):
53 <MacOSX> 11/10/98 djb Remove obsolete PrepareInputName prototype;
54 <MacOSX> 4/6/98 djb Added lock data stuctures and ReleaseCatalogIterator prototype;
55 <MacOSX> 4/6/98 djb Removed CatalogDataCache since its no longer used.
56 <MacOSX> 4/2/98 djb InvalidateCatalogNodeCache does nothing under MacOS X.
57 <MacOSX> 3/31/98 djb Sync up with final HFSVolumes.h header file.
58
59 <CS10> 11/20/97 djb Radar #2002357. Fixing retry mechanism.
60 <CS9> 11/17/97 djb PrepareInputName routine now returns an error.
61 <CS8> 11/13/97 djb Radar #1683572. Move CatalogIterator to this file from
62 FileMgrInternal.i. Double size of short unicode name.
63 <CS7> 10/31/97 JL #2000184 - Changed prototypes for CreateFileThreadID and
64 ExchangeFiles.
65 <CS6> 10/17/97 msd In CatalogCacheGlobals, add room for a single UniStr255 so
66 catalog iterators can step over long Unicode names.
67 <CS5> 10/17/97 djb Add ConvertInputNameToUnicode for Catalog Create/Rename.
68 <CS4> 10/1/97 djb Change catalog iterator implementation.
69 <CS3> 7/16/97 DSH FilesInternal.i renamed FileMgrInternal.i to avoid name
70 collision
71 <CS2> 6/24/97 djb Add LocateCatalogNodeByMangledName routine.
72 <CS1> 6/24/97 djb first checked in
73 */
74
75 #ifndef __CATALOGPRIVATE__
76 #define __CATALOGPRIVATE__
77
78 #include <sys/appleapiopts.h>
79
80 #ifdef KERNEL
81 #ifdef __APPLE_API_PRIVATE
82
83 #include "hfs_format.h"
84
85 #include "FileMgrInternal.h"
86 #include "BTreesInternal.h"
87
88 //
89 // Private Catalog Manager Routines (for use only by Catalog Manager, CatSearch and FileID Services)
90 //
91
92
93 extern OSErr LocateCatalogNodeByKey ( const ExtendedVCB *volume, u_int32_t hint, CatalogKey *keyPtr,
94 CatalogRecord *dataPtr, u_int32_t *newHint );
95
96 extern OSErr LocateCatalogRecord( const ExtendedVCB *volume, HFSCatalogNodeID folderID, const CatalogName *name,
97 u_int32_t hint, CatalogKey *keyPtr, CatalogRecord *dataPtr, u_int32_t *newHint);
98
99 extern OSErr LocateCatalogNodeWithRetry ( const ExtendedVCB *volume, HFSCatalogNodeID folderID, ConstStr31Param pascalName,
100 CatalogName *unicodeName, u_int32_t hint, CatalogKey *keyPtr, CatalogRecord *dataPtr,
101 u_int32_t *newHint );
102 extern OSErr FlushCatalog( ExtendedVCB *volume);
103
104
105 extern void ConvertInputNameToUnicode(ConstStr31Param name, TextEncoding encodingHint,
106 TextEncoding *actualEncoding, CatalogName *catalogName);
107
108 extern void BuildCatalogKey( HFSCatalogNodeID parentID, const CatalogName *name, Boolean isHFSPlus,
109 CatalogKey *key);
110
111 extern OSErr BuildCatalogKeyUTF8(ExtendedVCB *volume, HFSCatalogNodeID parentID, const unsigned char *name,
112 u_int32_t length, CatalogKey *key);
113
114 extern void CopyCatalogName( const CatalogName *srcName, CatalogName *dstName, Boolean isHFSPLus);
115
116 extern OSErr ResolveFileID( ExtendedVCB *vcb, HFSCatalogNodeID fileID, HFSCatalogNodeID *parentID, Str31 name );
117
118 #if 0
119 extern OSErr CreateFileThreadID( FIDParam *filePB, WDCBRecPtr *wdcbPtr );
120
121 extern OSErr ExchangeFiles( FIDParam *filePB, WDCBRecPtr *wdcbPtr );
122 #endif
123
124 extern void UpdateCatalogName( ConstStr31Param srcName, Str31 destName );
125
126
127 #endif /* __APPLE_API_PRIVATE */
128 #endif /* KERNEL */
129 #endif //__CATALOGPRIVATE__