headers/RegisterFileLibs.h

/*
    File:       RegisterFileLibs.h
 
    Contains:   Temporary, limited release header to let outside developers register import
                library files and folders with CFM.  Distributed via DTS.
 
    Written by: Alan W. Lillich, Erik L. Eidt
 
    Copyright:  © 11994-997 by Apple Computer, Inc., all rights reserved.
 
    Change History (most recent first):
 
         <1>    11/26/97    law     Inital Checkin
                11/26/97    law     Added to the project
 
    To Do:
*/
 
 
 
#include <Types.h>
#include <Files.h>
 
 
// -------------------------------------------------------------------------------------------
// RegisterFileLibs is public access to a private (SPI) routine for the Code Fragment Manager.
// It allows you to register files and folders that would not otherwise be considered as
// potential import libraries.  It does not cause anything to be actually loaded, just noted
// for later use when resolving imports.  This is intended be used only in cases where the
// import library cannot be in a file of type 'shlb' or cannot be kept in one of the folders
// normally searched for import libraries.  A common example is bundling an import library
// with an INIT, CDEV, etc.; having one file instead of two simplifies distribution.
//
// You may register both files and folders.  Other than location and file type, registered
// files must otherwise be normal import libraries.  In particular they must have a 'cfrg'
// resource of ID 0.  Registered folders will be searched in the normal manner, i.e. for files
// of type 'shlb'.  This folder search is dynamic, if you drag new libraries into the folder
// after it is registered they will be seen.  Alias files may be registered.  The alias will
// be resolved at the time of registration.  If the destination is offline the user will not
// be prompted for a name and password; guest mounts will work.  The file specification passed
// in must have the actual volume reference number, parent directory ID, and a simple name.
//
// *** This is being made available here as an interim measure.  The final API may differ,
// *** however existing binaries will continue to be supported.
 
 
pascal OSErr    RegisterFileLibs    ( FSSpecPtr fileSpec );
 
pascal OSErr    UnregisterFileLibs  ( FSSpecPtr fileSpec );
 
// The file specification in both cases must be direct, i.e. it must have proper volume and
// parent directory infromation and the name must be a simple file name (not a path).  One 
// way to ensure this is to have FSMakeFSSpec fill in the file specification for you.