2 * Copyright (c) 2000-2005, 2015 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_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 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.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
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.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
29 File: CatalogPrivate.h
31 Contains: Private Catalog Manager interfaces.
35 Copyright: (c) 1997-1998 by Apple Inc., all rights reserved.
41 Other Contact: xxx put other contact here xxx
43 Technology: xxx put technology here xxx
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.
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
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
71 <CS2> 6/24/97 djb Add LocateCatalogNodeByMangledName routine.
72 <CS1> 6/24/97 djb first checked in
75 #ifndef __CATALOGPRIVATE__
76 #define __CATALOGPRIVATE__
78 #include <sys/appleapiopts.h>
81 #ifdef __APPLE_API_PRIVATE
83 #include "hfs_format.h"
85 #include "FileMgrInternal.h"
86 #include "BTreesInternal.h"
89 // Private Catalog Manager Routines (for use only by Catalog Manager, CatSearch and FileID Services)
93 extern OSErr
LocateCatalogNodeByKey ( const ExtendedVCB
*volume
, u_int32_t hint
, CatalogKey
*keyPtr
,
94 CatalogRecord
*dataPtr
, u_int32_t
*newHint
);
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
);
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
);
105 extern void ConvertInputNameToUnicode(ConstStr31Param name
, TextEncoding encodingHint
,
106 TextEncoding
*actualEncoding
, CatalogName
*catalogName
);
108 extern void BuildCatalogKey( HFSCatalogNodeID parentID
, const CatalogName
*name
, Boolean isHFSPlus
,
111 extern OSErr
BuildCatalogKeyUTF8(ExtendedVCB
*volume
, HFSCatalogNodeID parentID
, const unsigned char *name
,
112 u_int32_t length
, CatalogKey
*key
);
114 extern void CopyCatalogName( const CatalogName
*srcName
, CatalogName
*dstName
, Boolean isHFSPLus
);
116 extern OSErr
ResolveFileID( ExtendedVCB
*vcb
, HFSCatalogNodeID fileID
, HFSCatalogNodeID
*parentID
, Str31 name
);
119 extern OSErr
CreateFileThreadID( FIDParam
*filePB
, WDCBRecPtr
*wdcbPtr
);
121 extern OSErr
ExchangeFiles( FIDParam
*filePB
, WDCBRecPtr
*wdcbPtr
);
124 extern void UpdateCatalogName( ConstStr31Param srcName
, Str31 destName
);
127 #endif /* __APPLE_API_PRIVATE */
129 #endif //__CATALOGPRIVATE__