import cyrus-sasl-2.1.23
[cyrus-sasl.git] / mac / CommonKClient / mac_kclient3 / Headers / KerberosManager / KerberosManagerLib.h
1 /* $Copyright:\r *\r * Copyright 1998-2000 by the Massachusetts Institute of Technology.\r * \r * All rights reserved.\r * \r * Export of this software from the United States of America may require a\r * specific license from the United States Government.  It is the\r * responsibility of any person or organization contemplating export to\r * obtain such a license before exporting.\r * \r * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute\r * this software and its documentation for any purpose and without fee is\r * hereby granted, provided that the above copyright notice appear in all\r * copies and that both that copyright notice and this permission notice\r * appear in supporting documentation, and that the name of M.I.T. not be\r * used in advertising or publicity pertaining to distribution of the\r * software without specific, written prior permission.  Furthermore if you\r * modify this software you must label your software as modified software\r * and not distribute it in such a fashion that it might be confused with\r * the original MIT software. M.I.T. makes no representations about the\r * suitability of this software for any purpose.  It is provided "as is"\r * without express or implied warranty.\r * \r * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED\r * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF\r * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\r * \r * Individual source code files are copyright MIT, Cygnus Support,\r * OpenVision, Oracle, Sun Soft, FundsXpress, and others.\r * \r * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,\r * and Zephyr are trademarks of the Massachusetts Institute of Technology\r * (MIT).  No commercial use of these trademarks may be made without prior\r * written permission of MIT.\r * \r * "Commercial use" means use of a name in a product or other for-profit\r * manner.  It does NOT prevent a commercial firm from referring to the MIT\r * trademarks in order to convey information (although in doing so,\r * recognition of their trademark status should be given).\r * $\r */\r\r/* $Header: /afs/andrew/system/cvs/src/sasl/mac/CommonKClient/mac_kclient3/Headers/KerberosManager/KerberosManagerLib.h,v 1.2 2001/12/04 02:05:53 rjs3 Exp $ */\r\r#pragma once\r\r#include <KerberosSupport/KerberosConditionalMacros.h>\r\r#if TARGET_API_MAC_OSX && TARGET_API_MAC_CARBON\r    #include <Carbon/Carbon.h>\r#elif TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON\r    #include <MacTypes.h>\r    #include <Files.h>\r    #include <Processes.h>\r#else\r    #error "Unknown OS"\r#endif\r\r#ifdef __cplusplus\rextern "C" {\r#endif\r\r#if PRAGMA_IMPORT\r#pragma import on\r#endif\r\r/*\r * KMAE_SendQuitApplication\r *\r * Send quit event to Kerberos Manager.\r *\r */\r\rOSStatus\rKMAE_SendQuitApplication (Boolean waitForAEReply);\r\r/*\r * KMAE_SendOpenApplication\r *\r * Send open event to Kerberos Manager. This will launch Kerberos Manager.  Kerberos\r * Manager could display an error dialog that requires the user's response if Kerb for\r * the Mac isn't installed properly, but no AE reply is sent about this.\r */\r \rOSStatus\rKMAE_SendOpenApplication (Boolean waitForAEReply);\r\r/*\r * KMAE_SendOpenApplicationFSSpec\r *\r * Send open event to Kerberos Manager specified by inKMFileSpec.\r * This will launch Kerberos Manager.  Kerberos Manager could display\r * an error dialog that requires the user's response if Kerb for\r * the Mac isn't installed properly, but no AE reply is sent about this.\r */\r \rOSStatus\rKMAE_SendOpenApplicationFSSpec (FSSpec *inKMFileSpec, Boolean waitForAEReply);\r\r/*\r * KMAE_SendLogin\r *\r * Tell Kerberos Manager to display login dialog (no AE replies right now).\r * Kerberos Manager will be launched if necessary.\r */\r\rOSStatus\rKMAE_SendLogin (Boolean waitForAEReply);\r\r/*\r * IsKerberosManagerRunning\r *\r * Determine if Kerberos Manager is running\r */\r\r/*\r * KMAE_SendLoginFSSpec\r *\r * Tell Kerberos Manager specified by inKmFileSpec to display login dialog \r * (no AE replies right now) Kerberos Manager will be launched if necessary.\r *\r */\r\rOSStatus\rKMAE_SendLoginFSSpec (FSSpec *inKMFileSpec, Boolean waitForAEReply);\r\r/*\r   IsKerberosManagerRunning()\r\r   Return true if KM is running, and fills out outPSN if the pointer is non-null.\r   Return false if KM is not running, and outPSN is unchanged.\r*/\r\rBoolean\rIsKerberosManagerRunning (ProcessSerialNumber *outPSN);\r\r/*\r   FindKerberosManagerInControlPanels()\r   \r   Uses IterateDirectory from MoreFiles to search the Control\r   Panels folder for copies of Kerberos Manager.  If it finds one, returns true and\r   fills out *kmSpec.  If it doesn't find one or an error occurs, returns false\r   and *kmSpec is unchanged.\r\r */\r\rBoolean\rFindKerberosManagerInControlPanels(FSSpec *kmSpec);\r\r/*\r   KMAE_FindTargetKerberosManager()\r   \r   Searches the startup volume to find the Kerberos Manager that would receive\r   AppleEvents if any of the KerberosManagerLib functions that send AEs were called.\r   First checks to see if KM is running, and returns the FSSpec of that one if it is.\r   Next looks in the Control Panels Folder.  Finally it searches the drive for\r   a copy.\r   \r   If a Kerberos Manager is found, returns true and fills out *kmSpec. \r   If it doesn't find one or an error occurs, returns false and *kmSpec is unchanged.\r   \r   If the hard drive catalog changes during the search, continues anyway.\r*/\r\rBoolean\rKMAE_FindTargetKerberosManager(FSSpec *kmSpec);\r\r#ifdef PRAGMA_IMPORT_OFF\r#pragma import off\r#elif PRAGMA_IMPORT\r#pragma import reset\r#endif\r\r#ifdef __cplusplus\r}\r#endif\r\r/*\r * Constants\r */\r\renum {\r      kKerberosManagerClass           = FOUR_CHAR_CODE ('KrbM')\r};\r\renum {\r   kKerberosManagerSignature       = FOUR_CHAR_CODE ('KrbM')\r};\r\renum {\r   kAELogin                        = FOUR_CHAR_CODE ('Lgin')\r};\r