home *** CD-ROM | disk | FTP | other *** search
- //
- // ExtendedApp.h -- a class to make extra information available via the
- // application object. You no longer need to link against ni_s!
- // Written by Don Yacktman Copyright (c) 1993, 1994 by Don Yacktman.
- // Version 1.2. All rights reserved.
- // This notice may not be removed from this source code.
- //
- // This object is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- #import <appkit/appkit.h>
-
- int MiscOSVersion(); // returns a 0 or 1 (for 3.0 vs. 3.1) -1 on error
-
- // This exists for compatability only. You should wean away from using it.
- @interface ExtendedApp:Application
- {
- char realHostName[MAXHOSTNAMELEN]; // host running the application
- NXAtom userRealName; // real name of user running the app
- }
-
- @end
-
- @interface Application(MiscAppExtensions)
-
- - (const char *)appDirectory;
- - (int)osVersion;
- - (int)userIDNum;
- - (int)groupIDNum;
- - (int)effectiveUserIDNum;
- - (int)effectiveGroupIDNum;
- - (unsigned long int)hostID;
- - (NXAtom)userHomeDirectory;
- - (NXAtom)userLoginName;
- - (NXAtom)userRealName;
- - (NXAtom)realHostName;
- - (NXAtom)realNameFor:(NXAtom)userId;
- - (BOOL)groupMemberForID:(gid_t)anID;
- - (BOOL)groupMemberForString:(const char *)aString;
-
- @end
-
- // compatability header stuff has to be here on this one because of
- // it's location in the file tree for headers. I wish IB didn't
- // require this to be at the top level!
- #ifndef DAYAPPCOMPAT_H
- #define DAYAPPCOMPAT_H
- #define DAYOSVersion MiscOSVersion
- #endif DAYAPPCOMPAT_H
-