00001
#if !defined(__ENVIRONMENT_HPP)
00002
#define __ENVIRONMENT_HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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
00078
00079
00087
static Int setEnvironmentNameValue( CharPtr );
00088
00089
00090
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
00156
00157
00158
00159
00160
00161