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