00001 #if !defined(__ENVIRONMENT_HPP)
00002 #define __ENVIRONMENT_HPP
00003
00004 /*
00005 CoreLinux++
00006 Copyright (C) 1999,2000 CoreLinux Consortium
00007
00008 The CoreLinux++ Library is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU Library General Public License as
00010 published by the Free Software Foundation; either version 2 of the
00011 License, or (at your option) any later version.
00012
00013 The CoreLinux++ Library Library is distributed in the hope that it will
00014 be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016 Library General Public License for more details.
00017
00018 You should have received a copy of the GNU Library General Public
00019 License along with the GNU C Library; see the file COPYING.LIB. If not,
00020 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00021 Boston, MA 02111-1307, USA.
00022 */
00023
00024 #if !defined IN_COMMON_HPP
00025 #error Environment.hpp is included by Common.hpp only.
00026 #endif
00027
00028
00029 namespace corelinux
00030 {
00031 DECLARE_CLASS(Environment);
00032
00037 class Environment
00038 {
00039 public:
00040
00042
00043 inline bool operator==( EnvironmentCref ) const
00044 {
00045 return true;
00046 }
00047
00048 //
00049 // Accessors
00050 //
00052
00053 static UserIdentifier getUserId( void );
00054
00056
00057 static UserIdentifier getEffectiveUserId( void );
00058
00060
00061 static GroupIdentifier getGroupId( void );
00062
00064
00065 static GroupIdentifier getEffectiveGroupId( void );
00066
00068
00069 static ProcessIdentifier getProcessGroupId( void );
00070
00072
00073 static ProcessIdentifier getProcessGroupId( ProcessIdentifierRef );
00074
00075
00076 //
00077 // Functions for library
00078 //
00079
00088 static Int setupCommonAccess( CharCptr, const CreateDisposition & );
00089
00096 static Int removeCommonAccess( CharCptr );
00097
00098 protected:
00099
00100 Environment( void ) throw (Assertion)
00101 {
00102 NEVER_GET_HERE;
00103 }
00104
00105 Environment( EnvironmentCref )
00106 throw (Assertion)
00107 {
00108 NEVER_GET_HERE;
00109 }
00110
00111 EnvironmentRef operator=( EnvironmentCref )
00112 throw (Assertion)
00113 {
00114 NEVER_GET_HERE;
00115 return (*this);
00116 }
00117 private:
00118
00119
00120 };
00121 }
00122
00123 #endif
00124
00125 /*
00126 Common rcs information do not modify
00127 $Author: frankc $
00128 $Revision: 1.2 $
00129 $Date: 2000/06/04 22:16:32 $
00130 $Locker: $
00131 */
00132