home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / MiscKit / Headers / misckit / ExtendedApp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-23  |  1.6 KB  |  53 lines

  1. //
  2. //    ExtendedApp.h -- a class to make extra information available via the
  3. //        application object.  You no longer need to link against ni_s!
  4. //        Written by Don Yacktman Copyright (c) 1993, 1994 by Don Yacktman.
  5. //                Version 1.2.  All rights reserved.
  6. //        This notice may not be removed from this source code.
  7. //
  8. //    This object is included in the MiscKit by permission from the author
  9. //    and its use is governed by the MiscKit license, found in the file
  10. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  11. //    for a list of all applicable permissions and restrictions.
  12. //    
  13.  
  14. #import <appkit/appkit.h>
  15.  
  16. int MiscOSVersion();    // returns a 0 or 1 (for 3.0 vs. 3.1) -1 on error
  17.  
  18. // This exists for compatability only.  You should wean away from using it.
  19. @interface ExtendedApp:Application
  20. {
  21.     char realHostName[MAXHOSTNAMELEN];    // host running the application
  22.     NXAtom userRealName;                // real name of user running the app
  23. }
  24.  
  25. @end
  26.  
  27. @interface Application(MiscAppExtensions)
  28.  
  29. - (const char *)appDirectory;
  30. - (int)osVersion;
  31. - (int)userIDNum;
  32. - (int)groupIDNum;
  33. - (int)effectiveUserIDNum;
  34. - (int)effectiveGroupIDNum;
  35. - (unsigned long int)hostID;
  36. - (NXAtom)userHomeDirectory;
  37. - (NXAtom)userLoginName;
  38. - (NXAtom)userRealName;
  39. - (NXAtom)realHostName;
  40. - (NXAtom)realNameFor:(NXAtom)userId;
  41. - (BOOL)groupMemberForID:(gid_t)anID;
  42. - (BOOL)groupMemberForString:(const char *)aString;
  43.  
  44. @end
  45.  
  46. // compatability header stuff has to be here on this one because of
  47. // it's location in the file tree for headers.  I wish IB didn't
  48. // require this to be at the top level!
  49. #ifndef DAYAPPCOMPAT_H
  50. #define DAYAPPCOMPAT_H
  51. #define DAYOSVersion MiscOSVersion
  52. #endif DAYAPPCOMPAT_H
  53.