2 * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
23 File: CatalogPrivate.h
25 Contains: Private Catalog Manager interfaces.
29 Copyright: © 1997-1998 by Apple Computer, Inc., all rights reserved.
35 Other Contact: xxx put other contact here xxx
37 Technology: xxx put technology here xxx
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.
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
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
65 <CS2> 6/24/97 djb Add LocateCatalogNodeByMangledName routine.
66 <CS1> 6/24/97 djb first checked in
69 #ifndef __CATALOGPRIVATE__
70 #define __CATALOGPRIVATE__
72 #include <sys/appleapiopts.h>
75 #ifdef __APPLE_API_PRIVATE
77 #include "../../hfs_format.h"
79 #include "FileMgrInternal.h"
80 #include "BTreesInternal.h"
83 // Private Catalog Manager Routines (for use only by Catalog Manager, CatSearch and FileID Services)
87 extern OSErr
LocateCatalogNode( const ExtendedVCB
*volume
, HFSCatalogNodeID folderID
, const CatalogName
*name
,
88 UInt32 hint
, CatalogKey
*key
, CatalogRecord
*data
, UInt32
*newHint
);
90 extern OSErr
LocateCatalogNodeByKey ( const ExtendedVCB
*volume
, UInt32 hint
, CatalogKey
*keyPtr
,
91 CatalogRecord
*dataPtr
, UInt32
*newHint
);
93 extern OSErr
LocateCatalogRecord( const ExtendedVCB
*volume
, HFSCatalogNodeID folderID
, const CatalogName
*name
,
94 UInt32 hint
, CatalogKey
*keyPtr
, CatalogRecord
*dataPtr
, UInt32
*newHint
);
96 extern OSErr
LocateCatalogNodeWithRetry ( const ExtendedVCB
*volume
, HFSCatalogNodeID folderID
, ConstStr31Param pascalName
,
97 CatalogName
*unicodeName
, UInt32 hint
, CatalogKey
*keyPtr
, CatalogRecord
*dataPtr
,
99 extern OSErr
FlushCatalog( ExtendedVCB
*volume
);
102 extern void ConvertInputNameToUnicode(ConstStr31Param name
, TextEncoding encodingHint
,
103 TextEncoding
*actualEncoding
, CatalogName
*catalogName
);
105 extern void BuildCatalogKey( HFSCatalogNodeID parentID
, const CatalogName
*name
, Boolean isHFSPlus
,
108 extern OSErr
BuildCatalogKeyUTF8(ExtendedVCB
*volume
, HFSCatalogNodeID parentID
, const char *name
,
109 UInt32 length
, CatalogKey
*key
, UInt32
*textEncoding
);
111 extern void CopyCatalogName( const CatalogName
*srcName
, CatalogName
*dstName
, Boolean isHFSPLus
);
113 extern OSErr
ResolveFileID( ExtendedVCB
*vcb
, HFSCatalogNodeID fileID
, HFSCatalogNodeID
*parentID
, Str31 name
);
116 extern OSErr
CreateFileThreadID( FIDParam
*filePB
, WDCBRecPtr
*wdcbPtr
);
118 extern OSErr
ExchangeFiles( FIDParam
*filePB
, WDCBRecPtr
*wdcbPtr
);
121 extern void UpdateCatalogName( ConstStr31Param srcName
, Str31 destName
);
124 #endif /* __APPLE_API_PRIVATE */
126 #endif //__CATALOGPRIVATE__