Mac OS 9
Dictionary.h
Go to the documentation of this file.
1 
19 #ifndef __DICTIONARY__
20 #define __DICTIONARY__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __FILES__
27 #include <Files.h>
28 #endif
29 
30 #ifndef __AEREGISTRY__
31 #include <AERegistry.h>
32 #endif
33 
34 #ifndef __CODEFRAGMENTS__
35 #include <CodeFragments.h>
36 #endif
37 
38 #ifndef __MACERRORS__
39 #include <MacErrors.h>
40 #endif
41 
42 #if PRAGMA_ONCE
43 #pragma once
44 #endif
45 
46 #ifdef __cplusplus
47 extern "C"
48 {
49 #endif
50 
51 #if PRAGMA_IMPORT
52 #pragma import on
53 #endif
54 
55 #if PRAGMA_STRUCT_ALIGN
56 #pragma options align = power
57 #elif PRAGMA_STRUCT_PACKPUSH
58 #pragma pack(push, 2)
59 #elif PRAGMA_STRUCT_PACK
60 #pragma pack(2)
61 #endif
62 
71  enum
72  {
73  kDictionaryFileType = FOUR_CHAR_CODE('dict'),
74  kDCMDictionaryHeaderSignature = FOUR_CHAR_CODE('dict'),
75  kDCMDictionaryHeaderVersion = 2
76  };
77 
78  enum
79  {
80  kDCMAnyFieldTag = typeWildCard,
81  kDCMAnyFieldType = typeWildCard
82  };
83 
87  enum
88  {
89  keyDCMFieldTag = FOUR_CHAR_CODE('ftag'), /* typeEnumeration */
90  keyDCMFieldType = FOUR_CHAR_CODE('ftyp'), /* typeEnumeration */
91  keyDCMMaxRecordSize = FOUR_CHAR_CODE('mrsz'), /* typeMagnitude */
92  keyDCMFieldAttributes = FOUR_CHAR_CODE('fatr'),
93  keyDCMFieldDefaultData = FOUR_CHAR_CODE('fdef'),
94  keyDCMFieldName = FOUR_CHAR_CODE('fnam'), /* typeChar */
95  keyDCMFieldFindMethods =
96  FOUR_CHAR_CODE('ffnd') /* typeAEList of typeDCMFindMethod */
97  };
98 
102  enum
103  {
104  typeDCMFieldAttributes = FOUR_CHAR_CODE('fatr'),
105  typeDCMFindMethod = FOUR_CHAR_CODE('fmth')
106  };
107 
111  enum
112  {
113  kDCMIndexedFieldMask = 0x00000001,
114  kDCMRequiredFieldMask = 0x00000002,
115  kDCMIdentifyFieldMask = 0x00000004,
116  kDCMFixedSizeFieldMask = 0x00000008,
117  kDCMHiddenFieldMask = (long)0x80000000
118  };
119 
120  typedef OptionBits DCMFieldAttributes;
124  enum
125  {
126  pDCMAccessMethod = FOUR_CHAR_CODE('amtd'), /* data type: typeChar ReadOnly */
127  pDCMPermission = FOUR_CHAR_CODE('perm'), /* data type: typeUInt16 */
128  pDCMListing = FOUR_CHAR_CODE('list'), /* data type: typeUInt16 */
129  pDCMMaintenance = FOUR_CHAR_CODE('mtnc'), /* data type: typeUInt16 */
130  pDCMLocale = FOUR_CHAR_CODE('locl'), /* data type: typeUInt32. Optional;
131  default = kLocaleIdentifierWildCard */
132  pDCMClass = pClass, /* data type: typeUInt16 */
133  pDCMCopyright = FOUR_CHAR_CODE('info') /* data type: typeChar */
134  };
135 
139  enum
140  {
141  kDCMReadOnlyDictionary = 0,
142  kDCMReadWriteDictionary = 1
143  };
144 
148  enum
149  {
150  kDCMAllowListing = 0,
151  kDCMProhibitListing = 1
152  };
153 
157  enum
158  {
159  kDCMUserDictionaryClass = 0,
160  kDCMSpecificDictionaryClass = 1,
161  kDCMBasicDictionaryClass = 2
162  };
163 
167  enum
168  {
169  kDCMFindMethodExactMatch = kAEEquals,
170  kDCMFindMethodBeginningMatch = kAEBeginsWith,
171  kDCMFindMethodContainsMatch = kAEContains,
172  kDCMFindMethodEndingMatch = kAEEndsWith,
173  kDCMFindMethodForwardTrie =
174  FOUR_CHAR_CODE('ftri'), /* used for morphological analysis*/
175  kDCMFindMethodBackwardTrie =
176  FOUR_CHAR_CODE('btri') /* used for morphological analysis*/
177  };
178 
179  typedef OSType DCMFindMethod;
183  enum
184  {
185  kDCMCanUseFileDictionaryMask = 0x00000001,
186  kDCMCanUseMemoryDictionaryMask = 0x00000002,
187  kDCMCanStreamDictionaryMask = 0x00000004,
188  kDCMCanHaveMultipleIndexMask = 0x00000008,
189  kDCMCanModifyDictionaryMask = 0x00000010,
190  kDCMCanCreateDictionaryMask = 0x00000020,
191  kDCMCanAddDictionaryFieldMask = 0x00000040,
192  kDCMCanUseTransactionMask = 0x00000080
193  };
194 
195  typedef OptionBits DCMAccessMethodFeature;
196  typedef UInt32 DCMUniqueID;
197  typedef struct OpaqueDCMObjectID *DCMObjectID;
198  typedef DCMObjectID DCMAccessMethodID;
199  typedef DCMObjectID DCMDictionaryID;
200 #define kDCMInvalidObjectID ((DCMObjectID)kInvalidID)
201  typedef struct OpaqueDCMObjectRef *DCMObjectRef;
202  typedef DCMObjectRef DCMDictionaryRef;
203  typedef DCMObjectRef DCMDictionaryStreamRef;
204 #define kDCMInvalidObjectRef ((DCMObjectRef)kInvalidID)
205  typedef struct OpaqueDCMObjectIterator *DCMObjectIterator;
206  typedef DCMObjectIterator DCMAccessMethodIterator;
207  typedef DCMObjectIterator DCMDictionaryIterator;
208  typedef struct OpaqueDCMFoundRecordIterator *DCMFoundRecordIterator;
213  typedef DescType DCMFieldType;
218  {
219  FourCharCode headerSignature;
220  UInt32 headerVersion;
221  ByteCount headerSize;
222  Str63 accessMethod;
223  };
229  DCMProgressFilterProcPtr)(Boolean determinateProcess,
230  UInt16 percentageComplete,
231  UInt32 callbackUD);
232  typedef STACK_UPP_TYPE(DCMProgressFilterProcPtr) DCMProgressFilterUPP;
233 #if CALL_NOT_IN_CARBON
242  DCMProgressFilterUPP
243  NewDCMProgressFilterUPP(DCMProgressFilterProcPtr userRoutine);
244 #if !OPAQUE_UPP_TYPES
245  enum
246  {
247  uppDCMProgressFilterProcInfo = 0x00000E50
248  }; /* pascal 1_byte Func(1_byte, 2_bytes, 4_bytes) */
249 #ifdef __cplusplus
250  inline DCMProgressFilterUPP
251  NewDCMProgressFilterUPP(DCMProgressFilterProcPtr userRoutine)
252  {
253  return (DCMProgressFilterUPP)NewRoutineDescriptor(
254  (ProcPtr)(userRoutine), uppDCMProgressFilterProcInfo,
255  GetCurrentArchitecture());
256  }
257 #else
258 #define NewDCMProgressFilterUPP(userRoutine) \
259  (DCMProgressFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
260  uppDCMProgressFilterProcInfo, \
261  GetCurrentArchitecture())
262 #endif
263 #endif
264 
273  void
274  DisposeDCMProgressFilterUPP(DCMProgressFilterUPP userUPP);
275 #if !OPAQUE_UPP_TYPES
276 #ifdef __cplusplus
277  inline void DisposeDCMProgressFilterUPP(DCMProgressFilterUPP userUPP)
278  {
279  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
280  }
281 #else
282 #define DisposeDCMProgressFilterUPP(userUPP) DisposeRoutineDescriptor(userUPP)
283 #endif
284 #endif
285 
294  Boolean
296  UInt16 percentageComplete, UInt32 callbackUD,
297  DCMProgressFilterUPP userUPP);
298 #if !OPAQUE_UPP_TYPES
299 #ifdef __cplusplus
300  inline Boolean InvokeDCMProgressFilterUPP(Boolean determinateProcess,
301  UInt16 percentageComplete,
302  UInt32 callbackUD,
303  DCMProgressFilterUPP userUPP)
304  {
305  return (Boolean)CALL_THREE_PARAMETER_UPP(
306  userUPP, uppDCMProgressFilterProcInfo, determinateProcess,
307  percentageComplete, callbackUD);
308  }
309 #else
310 #define InvokeDCMProgressFilterUPP(determinateProcess, percentageComplete, \
311  callbackUD, userUPP) \
312  (Boolean) CALL_THREE_PARAMETER_UPP((userUPP), uppDCMProgressFilterProcInfo, \
313  (determinateProcess), \
314  (percentageComplete), (callbackUD))
315 #endif
316 #endif
317 
318 #endif /* CALL_NOT_IN_CARBON */
319 
320 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
321 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
322 #define NewDCMProgressFilterProc(userRoutine) \
323  NewDCMProgressFilterUPP(userRoutine)
324 #define CallDCMProgressFilterProc(userRoutine, determinateProcess, \
325  percentageComplete, callbackUD) \
326  InvokeDCMProgressFilterUPP(determinateProcess, percentageComplete, \
327  callbackUD, userRoutine)
328 #endif /* CALL_NOT_IN_CARBON */
329 
341  UInt32
343 
355  OSStatus
356  DCMNewDictionary(DCMAccessMethodID accessMethodID,
357  const FSSpec *newDictionaryFile, ScriptCode scriptTag,
358  const AEDesc *listOfFieldInfoRecords, Boolean invisible,
359  ItemCount recordCapacity, DCMDictionaryID *newDictionary);
360 
369  OSStatus
370  DCMDeriveNewDictionary(DCMDictionaryID srcDictionary,
371  const FSSpec *newDictionaryFile, ScriptCode scriptTag,
372  Boolean invisible, ItemCount recordCapacity,
373  DCMDictionaryID *newDictionary);
374 
383  OSStatus
384  DCMDeleteDictionary(DCMDictionaryID dictionaryID);
385 
397  OSStatus
398  DCMRegisterDictionaryFile(const FSSpec *dictionaryFile,
399  DCMDictionaryID *dictionaryID);
400 
409  OSStatus
410  DCMUnregisterDictionary(DCMDictionaryID dictionaryID);
411 
423  OSStatus
424  DCMOpenDictionary(DCMDictionaryID dictionaryID, ByteCount protectKeySize,
425  ConstLogicalAddress protectKey,
426  DCMDictionaryRef *dictionaryRef);
427 
436  OSStatus
437  DCMCloseDictionary(DCMDictionaryRef dictionaryRef);
438 
450  OSStatus
451  DCMGetDictionaryWriteAccess(DCMDictionaryRef dictionaryRef,
452  Duration timeOutDuration);
453 
462  OSStatus
463  DCMReleaseDictionaryWriteAccess(DCMDictionaryRef dictionaryRef,
464  Boolean commitTransaction);
465 
477  OSStatus
478  DCMFindRecords(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
479  ByteCount keySize, ConstLogicalAddress keyData,
480  DCMFindMethod findMethod, ItemCount preFetchedDataNum,
481  DCMFieldTag preFetchedData[], ItemCount skipCount,
482  ItemCount maxRecordCount,
483  DCMFoundRecordIterator *recordIterator);
484 
493  ItemCount
494  DCMCountRecordIterator(DCMFoundRecordIterator recordIterator);
495 
504  OSStatus
505  DCMIterateFoundRecord(DCMFoundRecordIterator recordIterator,
506  ByteCount maxKeySize, ByteCount *actualKeySize,
507  LogicalAddress keyData, DCMUniqueID *uniqueID,
508  AEDesc *dataList);
509 
518  OSStatus
519  DCMDisposeRecordIterator(DCMFoundRecordIterator recordIterator);
520 
532  OSStatus
533  DCMCountRecord(DCMDictionaryID dictionaryID, ItemCount *count);
534 
543  OSStatus
544  DCMGetRecordSequenceNumber(DCMDictionaryRef dictionaryRef,
545  DCMFieldTag keyFieldTag, ByteCount keySize,
546  ConstLogicalAddress keyData, DCMUniqueID uniqueID,
547  ItemCount *sequenceNum);
548 
557  OSStatus
558  DCMGetNthRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
559  ItemCount serialNum, ByteCount maxKeySize, ByteCount *keySize,
560  LogicalAddress keyData, DCMUniqueID *uniqueID);
561 
570  OSStatus
571  DCMGetNextRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
572  ByteCount keySize, ConstLogicalAddress keyData,
573  DCMUniqueID uniqueID, ByteCount maxKeySize,
574  ByteCount *nextKeySize, LogicalAddress nextKeyData,
575  DCMUniqueID *nextUniqueID);
576 
585  OSStatus
586  DCMGetPrevRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
587  ByteCount keySize, ConstLogicalAddress keyData,
588  DCMUniqueID uniqueID, ByteCount maxKeySize,
589  ByteCount *prevKeySize, LogicalAddress prevKeyData,
590  DCMUniqueID *prevUniqueID);
591 
603  OSStatus
604  DCMGetFieldData(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
605  ByteCount keySize, ConstLogicalAddress keyData,
606  DCMUniqueID uniqueID, ItemCount numOfData,
607  const DCMFieldTag dataTag[], AEDesc *dataList);
608 
617  OSStatus
618  DCMSetFieldData(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
619  ByteCount keySize, ConstLogicalAddress keyData,
620  DCMUniqueID uniqueID, const AEDesc *dataList);
621 
633  OSStatus
634  DCMAddRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
635  ByteCount keySize, ConstLogicalAddress keyData, Boolean checkOnly,
636  const AEDesc *dataList, DCMUniqueID *newUniqueID);
637 
646  OSStatus
647  DCMDeleteRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag,
648  ByteCount keySize, ConstLogicalAddress keyData,
649  DCMUniqueID uniqueID);
650 
662  OSStatus
663  DCMReorganizeDictionary(DCMDictionaryID dictionaryID, ItemCount extraCapacity,
664  DCMProgressFilterUPP progressProc, UInt32 userData);
665 
674  OSStatus
675  DCMCompactDictionary(DCMDictionaryID dictionaryID,
676  DCMProgressFilterUPP progressProc, UInt32 userData);
677 
689  OSStatus
690  DCMGetFileFromDictionaryID(DCMDictionaryID dictionaryID, FSSpec *fileRef);
691 
700  OSStatus
701  DCMGetDictionaryIDFromFile(const FSSpec *fileRef,
702  DCMDictionaryID *dictionaryID);
703 
712  DCMDictionaryID
713  DCMGetDictionaryIDFromRef(DCMDictionaryRef dictionaryRef);
714 
726  OSStatus
727  DCMGetDictionaryFieldInfo(DCMDictionaryID dictionaryID, DCMFieldTag fieldTag,
728  AEDesc *fieldInfoRecord);
729 
741  OSStatus
742  DCMGetDictionaryProperty(DCMDictionaryID dictionaryID, DCMFieldTag propertyTag,
743  ByteCount maxPropertySize, ByteCount *actualSize,
744  LogicalAddress propertyValue);
745 
754  OSStatus
755  DCMSetDictionaryProperty(DCMDictionaryID dictionaryID, DCMFieldTag propertyTag,
756  ByteCount propertySize,
757  ConstLogicalAddress propertyValue);
758 
767  OSStatus
768  DCMGetDictionaryPropertyList(DCMDictionaryID dictionaryID,
769  ItemCount maxPropertyNum, ItemCount *numProperties,
770  DCMFieldTag propertyTag[]);
771 
783  OSStatus
784  DCMCreateDictionaryIterator(DCMDictionaryIterator *dictionaryIterator);
785 
797  OSStatus
798  DCMCreateAccessMethodIterator(DCMAccessMethodIterator *accessMethodIterator);
799 
811  ItemCount
812  DCMCountObjectIterator(DCMObjectIterator iterator);
813 
822  OSStatus
823  DCMIterateObject(DCMObjectIterator iterator, DCMObjectID *objectID);
824 
833  OSStatus
834  DCMResetObjectIterator(DCMObjectIterator iterator);
835 
844  OSStatus
845  DCMDisposeObjectIterator(DCMObjectIterator iterator);
846 
858  OSStatus
859  DCMGetAccessMethodIDFromName(ConstStr63Param accessMethodName,
860  DCMAccessMethodID *accessMethodID);
861 
873  OSStatus
875  ByteCount maxRecordSize,
876  DCMFieldAttributes fieldAttributes,
877  AEDesc *fieldDefaultData,
878  ItemCount numberOfFindMethods,
879  DCMFindMethod findMethods[], AEDesc *fieldInfoRecord);
880 
889  OSStatus
890  DCMGetFieldTagAndType(const AEDesc *fieldInfoRecord, DCMFieldTag *fieldTag,
891  DCMFieldType *fieldType);
892 
901  OSStatus
902  DCMGetFieldMaxRecordSize(const AEDesc *fieldInfoRecord,
903  ByteCount *maxRecordSize);
904 
913  OSStatus
914  DCMGetFieldAttributes(const AEDesc *fieldInfoRecord,
915  DCMFieldAttributes *attributes);
916 
925  OSStatus
926  DCMGetFieldDefaultData(const AEDesc *fieldInfoRecord, DescType desiredType,
927  AEDesc *fieldDefaultData);
928 
937  OSStatus
938  DCMGetFieldFindMethods(const AEDesc *fieldInfoRecord,
939  ItemCount findMethodsArrayMaxSize,
940  DCMFindMethod findMethods[],
941  ItemCount *actualNumberOfFindMethods);
942 
946 #if TARGET_RT_MAC_CFM
947 #ifdef __cplusplus
948  inline pascal Boolean DCMDictionaryManagerAvailable()
949  {
950  return (DCMLibraryVersion != (void *)kUnresolvedCFragSymbolAddress);
951  }
952 #else
953 #define DCMDictionaryManagerAvailable() ((DCMLibraryVersion != (void*)kUnresolvedCFragSymbolAddress)
954 #endif
955 #elif TARGET_RT_MAC_MACHO
956 /* Dictionary Manager is always available on OS X */
957 #ifdef __cplusplus
958 inline pascal Boolean DCMDictionaryManagerAvailable() { return true; }
959 #else
960 #define DCMDictionaryManagerAvailable() (true)
961 #endif
962 #endif /* */
963 
972 #define kAppleJapaneseDefaultAccessMethodName \
973  "\pDAM:Apple Backward Trie Access Method"
977  enum
978  {
979  kMaxYomiLengthInAppleJapaneseDictionary = 40,
980  kMaxKanjiLengthInAppleJapaneseDictionary = 64
981  };
982 
986  enum
987  {
988  kDCMJapaneseYomiTag = FOUR_CHAR_CODE('yomi'),
989  kDCMJapaneseHyokiTag = FOUR_CHAR_CODE('hyok'),
990  kDCMJapaneseHinshiTag = FOUR_CHAR_CODE('hins'),
991  kDCMJapaneseWeightTag = FOUR_CHAR_CODE('hind'),
992  kDCMJapanesePhoneticTag = FOUR_CHAR_CODE('hton'),
993  kDCMJapaneseAccentTag = FOUR_CHAR_CODE('acnt'),
994  kDCMJapaneseOnKunReadingTag = FOUR_CHAR_CODE('OnKn'),
995  kDCMJapaneseFukugouInfoTag = FOUR_CHAR_CODE('fuku')
996  };
997 
998  enum
999  {
1000  kDCMJapaneseYomiType = typeUnicodeText,
1001  kDCMJapaneseHyokiType = typeUnicodeText,
1002  kDCMJapaneseHinshiType = FOUR_CHAR_CODE('hins'),
1003  kDCMJapaneseWeightType = typeShortInteger,
1004  kDCMJapanesePhoneticType = typeUnicodeText,
1005  kDCMJapaneseAccentType = FOUR_CHAR_CODE('byte'),
1006  kDCMJapaneseOnKunReadingType = typeUnicodeText,
1007  kDCMJapaneseFukugouInfoType = FOUR_CHAR_CODE('fuku')
1008  };
1009 
1016 #if PRAGMA_STRUCT_ALIGN
1017 #pragma options align = reset
1018 #pragma options align = mac68k
1019 #endif
1020 
1021  enum
1022  {
1023  /* Dictionary data insertion modes */
1024  kInsert = 0, /* Only insert the input entry if there is nothing in the
1025  dictionary that matches the key. */
1026  kReplace = 1, /* Only replace the entries which match the key with the input
1027  entry. */
1028  kInsertOrReplace = 2 /* Insert the entry if there is nothing in the dictionary
1029  which matches the key, otherwise replaces the existing
1030  matched entries with the input entry. */
1031  };
1032 
1033  /* This Was InsertMode */
1034 
1035  typedef short DictionaryDataInsertMode;
1036  enum
1037  {
1038  /* Key attribute constants */
1039  kIsCaseSensitive = 0x10, /* case sensitive = 16 */
1040  kIsNotDiacriticalSensitive = 0x20 /* diac not sensitive = 32 */
1041  };
1042 
1043  enum
1044  {
1045  /* Registered attribute type constants. */
1046  kNoun = -1,
1047  kVerb = -2,
1048  kAdjective = -3,
1049  kAdverb = -4
1050  };
1051 
1052  /* This Was AttributeType */
1053  typedef SInt8 DictionaryEntryAttribute;
1054  /* Dictionary information record */
1056  {
1057  FSSpec dictionaryFSSpec;
1058  SInt32 numberOfRecords;
1059  SInt32 currentGarbageSize;
1060  ScriptCode script;
1061  SInt16 maximumKeyLength;
1062  SInt8 keyAttributes;
1063  };
1066  {
1067  UInt8 datSize;
1068  DictionaryEntryAttribute datTable[1];
1069  };
1072 #if CALL_NOT_IN_CARBON
1081  OSErr
1082  InitializeDictionary(const FSSpec *theFsspecPtr, SInt16 maximumKeyLength,
1083  SInt8 keyAttributes, ScriptCode script);
1084 
1093  OSErr
1094  OpenDictionary(const FSSpec *theFsspecPtr, SInt8 accessPermission,
1095  SInt32 *dictionaryReference);
1096 
1105  OSErr
1106  CloseDictionary(SInt32 dictionaryReference);
1107 
1116  OSErr
1117  InsertRecordToDictionary(SInt32 dictionaryReference, ConstStr255Param key,
1118  Handle recordDataHandle,
1119  DictionaryDataInsertMode whichMode);
1120 
1129  OSErr
1130  DeleteRecordFromDictionary(SInt32 dictionaryReference, ConstStr255Param key);
1131 
1140  OSErr
1142  SInt32 dictionaryReference, ConstStr255Param key,
1143  DictionaryAttributeTablePtr requestedAttributeTablePointer,
1144  Handle recordDataHandle);
1145 
1154  OSErr
1156  SInt32 dictionaryReference, SInt32 recordIndex,
1157  DictionaryAttributeTablePtr requestedAttributeTablePointer,
1158  Str255 recordKey, Handle recordDataHandle);
1159 
1168  OSErr
1169  GetDictionaryInformation(SInt32 dictionaryReference,
1170  DictionaryInformation *theDictionaryInformation);
1171 
1180  OSErr
1181  CompactDictionary(SInt32 dictionaryReference);
1182 
1183 #endif /* CALL_NOT_IN_CARBON */
1184 
1185 #if PRAGMA_STRUCT_ALIGN
1186 #pragma options align = reset
1187 #elif PRAGMA_STRUCT_PACKPUSH
1188 #pragma pack(pop)
1189 #elif PRAGMA_STRUCT_PACK
1190 #pragma pack()
1191 #endif
1192 
1193 #ifdef PRAGMA_IMPORT_OFF
1194 #pragma import off
1195 #elif PRAGMA_IMPORT
1196 #pragma import reset
1197 #endif
1198 
1199 #ifdef __cplusplus
1200 }
1201 #endif
1202 
1203 #endif /* __DICTIONARY__ */
ResType DescType
Definition: AEDataModel.h:165
AppleEvents Registry Interface.
@ kAEBeginsWith
Definition: AERegistry.h:150
@ kAEContains
Definition: AERegistry.h:159
@ typeUnicodeText
Definition: AERegistry.h:765
@ kAEEndsWith
Definition: AERegistry.h:177
@ kAEEquals
Definition: AERegistry.h:179
@ pClass
Definition: AERegistry.h:450
Public Code Fragment Manager Interfaces.
OSStatus DCMGetDictionaryPropertyList(DCMDictionaryID dictionaryID, ItemCount maxPropertyNum, ItemCount *numProperties, DCMFieldTag propertyTag[])
OSStatus DCMCompactDictionary(DCMDictionaryID dictionaryID, DCMProgressFilterUPP progressProc, UInt32 userData)
OSStatus DCMGetFieldData(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, DCMUniqueID uniqueID, ItemCount numOfData, const DCMFieldTag dataTag[], AEDesc *dataList)
OSErr InitializeDictionary(const FSSpec *theFsspecPtr, SInt16 maximumKeyLength, SInt8 keyAttributes, ScriptCode script)
OSErr GetDictionaryInformation(SInt32 dictionaryReference, DictionaryInformation *theDictionaryInformation)
DescType DCMFieldTag
Definition: Dictionary.h:212
OSStatus DCMSetFieldData(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, DCMUniqueID uniqueID, const AEDesc *dataList)
OSStatus DCMResetObjectIterator(DCMObjectIterator iterator)
OSStatus DCMGetDictionaryFieldInfo(DCMDictionaryID dictionaryID, DCMFieldTag fieldTag, AEDesc *fieldInfoRecord)
OSStatus DCMRegisterDictionaryFile(const FSSpec *dictionaryFile, DCMDictionaryID *dictionaryID)
OSStatus DCMGetFieldFindMethods(const AEDesc *fieldInfoRecord, ItemCount findMethodsArrayMaxSize, DCMFindMethod findMethods[], ItemCount *actualNumberOfFindMethods)
OSErr OpenDictionary(const FSSpec *theFsspecPtr, SInt8 accessPermission, SInt32 *dictionaryReference)
OSStatus DCMCloseDictionary(DCMDictionaryRef dictionaryRef)
ItemCount DCMCountRecordIterator(DCMFoundRecordIterator recordIterator)
OSStatus DCMFindRecords(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, DCMFindMethod findMethod, ItemCount preFetchedDataNum, DCMFieldTag preFetchedData[], ItemCount skipCount, ItemCount maxRecordCount, DCMFoundRecordIterator *recordIterator)
OSStatus DCMSetDictionaryProperty(DCMDictionaryID dictionaryID, DCMFieldTag propertyTag, ByteCount propertySize, ConstLogicalAddress propertyValue)
OSStatus DCMNewDictionary(DCMAccessMethodID accessMethodID, const FSSpec *newDictionaryFile, ScriptCode scriptTag, const AEDesc *listOfFieldInfoRecords, Boolean invisible, ItemCount recordCapacity, DCMDictionaryID *newDictionary)
OSStatus DCMGetAccessMethodIDFromName(ConstStr63Param accessMethodName, DCMAccessMethodID *accessMethodID)
void DisposeDCMProgressFilterUPP(DCMProgressFilterUPP userUPP)
OSStatus DCMGetPrevRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, DCMUniqueID uniqueID, ByteCount maxKeySize, ByteCount *prevKeySize, LogicalAddress prevKeyData, DCMUniqueID *prevUniqueID)
OSStatus DCMOpenDictionary(DCMDictionaryID dictionaryID, ByteCount protectKeySize, ConstLogicalAddress protectKey, DCMDictionaryRef *dictionaryRef)
OSStatus DCMGetRecordSequenceNumber(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, DCMUniqueID uniqueID, ItemCount *sequenceNum)
OSErr CloseDictionary(SInt32 dictionaryReference)
OSStatus DCMGetFieldDefaultData(const AEDesc *fieldInfoRecord, DescType desiredType, AEDesc *fieldDefaultData)
OSStatus DCMUnregisterDictionary(DCMDictionaryID dictionaryID)
OSStatus DCMDeleteDictionary(DCMDictionaryID dictionaryID)
OSStatus DCMGetFieldAttributes(const AEDesc *fieldInfoRecord, DCMFieldAttributes *attributes)
OSStatus DCMCountRecord(DCMDictionaryID dictionaryID, ItemCount *count)
OSErr FindRecordInDictionary(SInt32 dictionaryReference, ConstStr255Param key, DictionaryAttributeTablePtr requestedAttributeTablePointer, Handle recordDataHandle)
OSStatus DCMReorganizeDictionary(DCMDictionaryID dictionaryID, ItemCount extraCapacity, DCMProgressFilterUPP progressProc, UInt32 userData)
OSStatus DCMGetNthRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ItemCount serialNum, ByteCount maxKeySize, ByteCount *keySize, LogicalAddress keyData, DCMUniqueID *uniqueID)
OSStatus DCMIterateObject(DCMObjectIterator iterator, DCMObjectID *objectID)
OSErr FindRecordByIndexInDictionary(SInt32 dictionaryReference, SInt32 recordIndex, DictionaryAttributeTablePtr requestedAttributeTablePointer, Str255 recordKey, Handle recordDataHandle)
OSStatus DCMGetFileFromDictionaryID(DCMDictionaryID dictionaryID, FSSpec *fileRef)
ItemCount DCMCountObjectIterator(DCMObjectIterator iterator)
OSStatus DCMCreateDictionaryIterator(DCMDictionaryIterator *dictionaryIterator)
DCMProgressFilterUPP NewDCMProgressFilterUPP(DCMProgressFilterProcPtr userRoutine)
OSStatus DCMDeriveNewDictionary(DCMDictionaryID srcDictionary, const FSSpec *newDictionaryFile, ScriptCode scriptTag, Boolean invisible, ItemCount recordCapacity, DCMDictionaryID *newDictionary)
Boolean InvokeDCMProgressFilterUPP(Boolean determinateProcess, UInt16 percentageComplete, UInt32 callbackUD, DCMProgressFilterUPP userUPP)
OSErr InsertRecordToDictionary(SInt32 dictionaryReference, ConstStr255Param key, Handle recordDataHandle, DictionaryDataInsertMode whichMode)
OSStatus DCMGetDictionaryWriteAccess(DCMDictionaryRef dictionaryRef, Duration timeOutDuration)
typedef CALLBACK_API(Boolean, DCMProgressFilterProcPtr)(Boolean determinateProcess
OSStatus DCMDeleteRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, DCMUniqueID uniqueID)
OSStatus DCMGetDictionaryIDFromFile(const FSSpec *fileRef, DCMDictionaryID *dictionaryID)
OSStatus DCMGetNextRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, DCMUniqueID uniqueID, ByteCount maxKeySize, ByteCount *nextKeySize, LogicalAddress nextKeyData, DCMUniqueID *nextUniqueID)
OSStatus DCMGetDictionaryProperty(DCMDictionaryID dictionaryID, DCMFieldTag propertyTag, ByteCount maxPropertySize, ByteCount *actualSize, LogicalAddress propertyValue)
OSStatus DCMDisposeObjectIterator(DCMObjectIterator iterator)
OSErr CompactDictionary(SInt32 dictionaryReference)
OSStatus DCMCreateFieldInfoRecord(DescType fieldTag, DescType fieldType, ByteCount maxRecordSize, DCMFieldAttributes fieldAttributes, AEDesc *fieldDefaultData, ItemCount numberOfFindMethods, DCMFindMethod findMethods[], AEDesc *fieldInfoRecord)
OSStatus DCMGetFieldTagAndType(const AEDesc *fieldInfoRecord, DCMFieldTag *fieldTag, DCMFieldType *fieldType)
DCMDictionaryID DCMGetDictionaryIDFromRef(DCMDictionaryRef dictionaryRef)
OSErr DeleteRecordFromDictionary(SInt32 dictionaryReference, ConstStr255Param key)
UInt32 DCMLibraryVersion(void)
OSStatus DCMIterateFoundRecord(DCMFoundRecordIterator recordIterator, ByteCount maxKeySize, ByteCount *actualKeySize, LogicalAddress keyData, DCMUniqueID *uniqueID, AEDesc *dataList)
OSStatus DCMAddRecord(DCMDictionaryRef dictionaryRef, DCMFieldTag keyFieldTag, ByteCount keySize, ConstLogicalAddress keyData, Boolean checkOnly, const AEDesc *dataList, DCMUniqueID *newUniqueID)
OSStatus DCMReleaseDictionaryWriteAccess(DCMDictionaryRef dictionaryRef, Boolean commitTransaction)
OSStatus DCMGetFieldMaxRecordSize(const AEDesc *fieldInfoRecord, ByteCount *maxRecordSize)
OSStatus DCMCreateAccessMethodIterator(DCMAccessMethodIterator *accessMethodIterator)
OSStatus DCMDisposeRecordIterator(DCMFoundRecordIterator recordIterator)
File Manager (MFS, HFS, and HFS+) Interfaces.
OSErr codes.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
@ serialNum
Definition: ROMDefs.h:264
Definition: AEDataModel.h:175
Definition: Dictionary.h:218
Definition: Dictionary.h:1066
Definition: Dictionary.h:1056