home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.Lib / DTS.Lib.headers / ATUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-06  |  3.1 KB  |  89 lines  |  [TEXT/KAHL]

  1. #ifndef __ATUTILS__
  2. #define __ATUTILS__
  3.  
  4. #ifndef __TYPES__
  5. #include <Types.h>
  6. #endif
  7.  
  8. #ifndef __APPLETALK__
  9. #include <AppleTalk.h>
  10. #endif
  11.  
  12. #ifndef __LISTS__
  13. #include <Lists.h>
  14. #endif
  15.  
  16. OSErr            ATInit(void);
  17.     /*
  18.     **    ¶ Initialize ATUtils.
  19.     **
  20.     **    Currently does nothing.  Calling it allows the AppleTalk.c.o file to be
  21.     **    needed by the link. */
  22.  
  23. OSErr            DoBuildZoneList(ListHandle listHndl);
  24.     /*
  25.     **    ¶ Build a zone list into a list handle.
  26.     **
  27.     **    OUTPUT:    listHndl
  28.     **    RESULT:    OSErr
  29.     **
  30.     **    Given a list record, this function places all of the zone names in
  31.     **    the list.  Prior to calling this function, you need to create a
  32.     **    list record that has zero rows and one column.  The zones are added
  33.     **    to the list in the column in alphabetical order.  The function
  34.     **    IUMagString is used to determine order. */
  35.  
  36. OSErr            HiliteUserZone(ListHandle listHndl);
  37.     /*
  38.     **    ¶ Hilite current zone in zone list.
  39.     **
  40.     **    OUTPUT:    listHndl
  41.     **    RESULT:    OSErr
  42.     **    
  43.     **    Given a list of zones (probably generated by DoBuildZoneList), this
  44.     **    function selects the zone the user is currently in.  The current zone
  45.     **    is selected and scrolled into view. */
  46.  
  47. OSErr            AddPPCNBPAlias(NamesTableEntry *theNTE, Str32 newNBPType, EntityName *newEntity);
  48.     /*
  49.     **    ¶ Register network PPC alias.
  50.     **
  51.     **    INPUT:    newNBPType    The alias to register for this process
  52.     **    OUTPUT:    theNTE        Receives the resultant NamesTableEntry
  53.     **            newEntity    Receives the resultalt EntityName for use by RemoveNBPAlias
  54.     **    RESULT:    OSErr        If an error is returned, RemoveNBPAlias should not be called.
  55.     **                        Usually, calls to AddPPCNBPAlias and Remove NBPAlias are
  56.     **                        balanced, but this depends on success by ADDPPCNBPAlias.
  57.     **
  58.     **    This function registers an alias for the application.  This allows PPCBrowser
  59.     **    to be used to display only machines registered with that alias, instead of
  60.     **    all machines that are PPCToolbox capable.  This function is called by 
  61.     **    the application at startup time, as the alias only needs to be registered once.
  62.     **    If there is more than one version of the application running on a single
  63.     **    machine, AddPPCNBPAlias will append a number to the application name.
  64.     **    This allows each copy of the application to be displayed by PPCBrowser.
  65.     **
  66.     **    A sample usage of this function can be found in DTS.StyleChat or Kibitz, in the
  67.     **    file Start.c. */
  68.  
  69. OSErr            RemoveNBPAlias(EntityPtr theEntity);
  70.     /*
  71.     **    ¶ Remove previously registered PPC alias.
  72.     **
  73.     **    INPUT:    theEntity    Pass in the output from AddPPCNBPAlias
  74.     **    RESULT:    OSErr
  75.     **
  76.     **    This function removes the designated alias.  This is executed by the application
  77.     **    at application quit time.  Note that it is very important to remove the NBPAlias,
  78.     **    as it will remain in the queue even after the application has quit.  So don't just
  79.     **    call ExitToShell to exit your application if you are using an NBPAlias.  Remove it
  80.     **    first.  (This presents a problem during development.  If your application crashes,
  81.     **    the application will have quit qithout removing the NBPAlias.  This will cause your
  82.     **    machine to crash shortly.)
  83.     **
  84.     **    A sample usage of this function can be found in DTS.StyleChat or Kibitz, in the
  85.     **    file Start.c. */
  86.  
  87.  
  88. #endif
  89.