Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Examples

Environment.hpp

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 00074 static CharPtr getEnvironmentValue( CharCptr ); 00075 00076 // 00077 // Mutators 00078 // 00079 00087 static Int setEnvironmentNameValue( CharPtr ); 00088 00089 // 00090 // Functions for library 00091 // 00092 00101 static Int setupCommonAccess( CharCptr, const CreateDisposition & ); 00102 00109 static Int removeCommonAccess( CharCptr ); 00110 00112 00113 static ProcessIdentifier getProcessGroupId( void ); 00114 00116 00117 static ProcessIdentifier getProcessGroupId( ProcessIdentifierRef ); 00118 00120 00121 static void setThreadPriority( ProcessIdentifier, Int ); 00122 00124 00125 static Int getThreadPriority( ProcessIdentifier ); 00126 00127 protected: 00128 00129 Environment( void ) throw (Assertion) 00130 { 00131 NEVER_GET_HERE; 00132 } 00133 00134 Environment( EnvironmentCref ) 00135 throw (Assertion) 00136 { 00137 NEVER_GET_HERE; 00138 } 00139 00140 EnvironmentRef operator=( EnvironmentCref ) 00141 throw (Assertion) 00142 { 00143 NEVER_GET_HERE; 00144 return (*this); 00145 } 00146 private: 00147 00148 00149 }; 00150 } 00151 00152 #endif 00153 00154 /* 00155 Common rcs information do not modify 00156 $Author: dulimart $ 00157 $Revision: 1.4 $ 00158 $Date: 2001/03/20 04:06:00 $ 00159 $Locker: $ 00160 */ 00161

This is the CoreLinux++ reference manual
Provided by The CoreLinux Consortium