![]() | InDesign SDK 20.5 |
#include <FileTypeRegistry.h>
Public Types | |
| typedef K2Vector< FileTypeInfo > | FileTypeInfoList |
| typedef K2Vector< OSType > | OSTypeList |
| typedef K2Vector< PMString > | FileExtensionList |
| typedef K2Vector< PMString > | FileMimeTypeList |
Public Member Functions | |
| FileTypeRegistry () | |
| virtual | ~FileTypeRegistry () |
A global registry of file type information (file type, creator, file extension, and mime type) with a key of type FileTypeInfoID.
There may be more than one set of file type information associated with a single key. For example, for the "document" key, we could have different sets of information for different versions of the product. This could happen if we decide to change the PC file extension and/or Mac file type from one version to the next.
The last set of information added to each key is considered to be the "current" information. When you call FileTypeRegistry::GetFileTypeInfo(), for example, you are given the most-recently-added information. The moral: add historical info first and the current info last.
Does not rely on the object model (so it can be used at startup).
Data from all resources of type FileTypeTable in the application are added to the registry.
| FileTypeRegistry::FileTypeRegistry | ( | ) |
Default constructor. Constructs a FileTypeRegistry object.
| virtual |
Destructor. Destroys the FileTypeRegistry object.
| static |
Adds a set of file type information for the specified file type ID. \ The added entry is considered to be the "current" information and will be returned by the various GetCurrent...() methods.
| id | IN File type information ID. |
| fileInfo | IN File type information to add for the given ID. |
| static |
Checks if a file type information ID is registered.
| id | IN File type information ID to check. |
| static |
Returns all the Mac creators for the given file type information ID. \ Duplicate creators are not added to the list.
| id | IN File type information ID to return all the Mac creators for. |
| list | IN List to add the Mac creators to. |
| clearList | IN Denotes whether to clear the given list before adding the Mac creators for the given ID. |
| static |
Returns all the file extensions for the given file type information ID. \ The returned extensions are always in lowercase. \ Duplicate extensions are not added to the list.
| id | IN File type information ID to return all the extensions for. |
| list | IN List to add the extensions to. |
| clearList | IN Denotes whether to clear the given list before adding the extensions for the given ID. |
| static |
Returns all the file mimetypes for the given file type information ID. \ The returned mimetypes are always in lowercase. \ Duplicate mimetypes are not added to the list.
| id | IN File type information ID to return all the mimetypes for. |
| list | IN List to add the mimetypes to. |
| clearList | IN Denotes whether to clear the given list before adding the mimetypes for the given ID. |
| static |
Returns all the Mac file types for the given file type information ID. \ Duplicate file types are not added to the list.
| id | IN File type information ID to return all the Mac file types for. |
| list | IN List to add the Mac file types to. |
| clearList | IN Denotes whether to clear the given list before adding the Mac file types for the given ID. |
| static |
Returns all the file type information entries for the given file type information ID. \ Duplicate entries are not added to the list.
| id | IN File type information ID to return all the entries for. |
| list | IN List to add the file type information entries to. |
| clearList | IN Denotes whether to clear the given list before adding the file type information entries for the given ID. |
| static |
Returns the "current" Mac creator for the given file type information ID.
| id | IN File type information ID to return the current Mac creator for. |
| static |
Returns the "current" file extension for the given file type information ID. \ The returned extension is always in lowercase.
| id | IN File type information ID to return the current file extension for. |
| static |
Returns the "current" file mimetype for the given file type information ID. \ The returned mimetype is always in lowercase.
| id | IN File type information ID to return the current mimetype for. |
| static |
Returns the "current" Mac file type for the given file type information ID.
| id | IN File type information ID to return the current Mac file type for. |
| static |
Returns the "current" file type information entry for the given file type information ID.
| id | IN File type information ID to return the current entry for. |
| static |
Returns the "current" magic bytes for the given file type information ID.
| id | IN File type information ID to return the current magic bytes for. |
| magic | OUT Current magic bytes for the given ID. |
| static |
Returns the best matching FileTypteInfoID for the given file. \ On the mac, the file's finder filetype is compared first. If more than one match is found, then the file's creator is taken into account, followed by file's extension if necessary. \ On windows, only the file's extension is relevant.
| file | IN File to find the best matching FileTypteInfoID for. |
| static |
Un-registers a file type information ID. Removes all entries for the given ID.
| id | IN File type information ID to remove all entries for. |
| static |
Un-registers a file type information ID. Removes the current entry for the given ID.
| id | IN File type information ID to remove the current entry for. |