2 * Copyright (c) 2006 Apple Computer, Inc. All Rights Reserved.
4 * @APPLE_LICENSE_OSREFERENCE_HEADER_START@
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
10 * License may not be used to create, or enable the creation or
11 * redistribution of, unlawful or unlicensed copies of an Apple operating
12 * system, or to circumvent, violate, or enable the circumvention or
13 * violation of, any terms of an Apple operating system software license
16 * Please obtain a copy of the License at
17 * http://www.opensource.apple.com/apsl/ and read it before using this
20 * The Original Code and all software distributed under the License are
21 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
22 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
23 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
24 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
25 * Please see the License for the specific language governing rights and
26 * limitations under the License.
28 * @APPLE_LICENSE_OSREFERENCE_HEADER_END@
31 File: CatalogPrivate.h
33 Contains: Private Catalog Manager interfaces.
37 Copyright: © 1997-1998 by Apple Computer, Inc., all rights reserved.
43 Other Contact: xxx put other contact here xxx
45 Technology: xxx put technology here xxx
54 Change History (most recent first):
55 <MacOSX> 11/10/98 djb Remove obsolete PrepareInputName prototype;
56 <MacOSX> 4/6/98 djb Added lock data stuctures and ReleaseCatalogIterator prototype;
57 <MacOSX> 4/6/98 djb Removed CatalogDataCache since its no longer used.
58 <MacOSX> 4/2/98 djb InvalidateCatalogNodeCache does nothing under MacOS X.
59 <MacOSX> 3/31/98 djb Sync up with final HFSVolumes.h header file.
61 <CS10> 11/20/97 djb Radar #2002357. Fixing retry mechanism.
62 <CS9> 11/17/97 djb PrepareInputName routine now returns an error.
63 <CS8> 11/13/97 djb Radar #1683572. Move CatalogIterator to this file from
64 FileMgrInternal.i. Double size of short unicode name.
65 <CS7> 10/31/97 JL #2000184 - Changed prototypes for CreateFileThreadID and
67 <CS6> 10/17/97 msd In CatalogCacheGlobals, add room for a single UniStr255 so
68 catalog iterators can step over long Unicode names.
69 <CS5> 10/17/97 djb Add ConvertInputNameToUnicode for Catalog Create/Rename.
70 <CS4> 10/1/97 djb Change catalog iterator implementation.
71 <CS3> 7/16/97 DSH FilesInternal.i renamed FileMgrInternal.i to avoid name
73 <CS2> 6/24/97 djb Add LocateCatalogNodeByMangledName routine.
74 <CS1> 6/24/97 djb first checked in
77 #ifndef __CATALOGPRIVATE__
78 #define __CATALOGPRIVATE__
80 #include <sys/appleapiopts.h>
83 #ifdef __APPLE_API_PRIVATE
85 #include "../../hfs_format.h"
87 #include "FileMgrInternal.h"
88 #include "BTreesInternal.h"
91 // Private Catalog Manager Routines (for use only by Catalog Manager, CatSearch and FileID Services)
95 extern OSErr
LocateCatalogNode( const ExtendedVCB
*volume
, HFSCatalogNodeID folderID
, const CatalogName
*name
,
96 UInt32 hint
, CatalogKey
*key
, CatalogRecord
*data
, UInt32
*newHint
);
98 extern OSErr
LocateCatalogNodeByKey ( const ExtendedVCB
*volume
, UInt32 hint
, CatalogKey
*keyPtr
,
99 CatalogRecord
*dataPtr
, UInt32
*newHint
);
101 extern OSErr
LocateCatalogRecord( const ExtendedVCB
*volume
, HFSCatalogNodeID folderID
, const CatalogName
*name
,
102 UInt32 hint
, CatalogKey
*keyPtr
, CatalogRecord
*dataPtr
, UInt32
*newHint
);
104 extern OSErr
LocateCatalogNodeWithRetry ( const ExtendedVCB
*volume
, HFSCatalogNodeID folderID
, ConstStr31Param pascalName
,
105 CatalogName
*unicodeName
, UInt32 hint
, CatalogKey
*keyPtr
, CatalogRecord
*dataPtr
,
107 extern OSErr
FlushCatalog( ExtendedVCB
*volume
);
110 extern void ConvertInputNameToUnicode(ConstStr31Param name
, TextEncoding encodingHint
,
111 TextEncoding
*actualEncoding
, CatalogName
*catalogName
);
113 extern void BuildCatalogKey( HFSCatalogNodeID parentID
, const CatalogName
*name
, Boolean isHFSPlus
,
116 extern OSErr
BuildCatalogKeyUTF8(ExtendedVCB
*volume
, HFSCatalogNodeID parentID
, const char *name
,
117 UInt32 length
, CatalogKey
*key
, UInt32
*textEncoding
);
119 extern void CopyCatalogName( const CatalogName
*srcName
, CatalogName
*dstName
, Boolean isHFSPLus
);
121 extern OSErr
ResolveFileID( ExtendedVCB
*vcb
, HFSCatalogNodeID fileID
, HFSCatalogNodeID
*parentID
, Str31 name
);
124 extern OSErr
CreateFileThreadID( FIDParam
*filePB
, WDCBRecPtr
*wdcbPtr
);
126 extern OSErr
ExchangeFiles( FIDParam
*filePB
, WDCBRecPtr
*wdcbPtr
);
129 extern void UpdateCatalogName( ConstStr31Param srcName
, Str31 destName
);
132 #endif /* __APPLE_API_PRIVATE */
134 #endif //__CATALOGPRIVATE__