00001 /* 00002 * XrdClDlgEnv.hh 00003 * 00004 * Created on: Oct 17, 2018 00005 * Author: simonm 00006 */ 00007 00008 #ifndef SRC_XRDCL_XRDCLDLGENV_HH_ 00009 #define SRC_XRDCL_XRDCLDLGENV_HH_ 00010 00011 #include <stdlib.h> 00012 00013 00014 namespace XrdCl 00015 { 00016 00017 //---------------------------------------------------------------------------- 00020 //---------------------------------------------------------------------------- 00021 class DlgEnv 00022 { 00023 public: 00024 00025 //------------------------------------------------------------------------ 00027 //------------------------------------------------------------------------ 00028 static DlgEnv& Instance() 00029 { 00030 static DlgEnv instance; 00031 return instance; 00032 } 00033 00034 //------------------------------------------------------------------------ 00038 //------------------------------------------------------------------------ 00039 ~DlgEnv() 00040 { 00041 unsetenv( "XrdSecGSIDELEGPROXY" ); 00042 } 00043 00044 //------------------------------------------------------------------------ 00046 //------------------------------------------------------------------------ 00047 void Enable() 00048 { 00049 setenv( "XrdSecGSIDELEGPROXY", "1", 1 ); 00050 } 00051 00052 //------------------------------------------------------------------------ 00054 //------------------------------------------------------------------------ 00055 void Disable() 00056 { 00057 setenv( "XrdSecGSIDELEGPROXY", "0", 1 ); 00058 } 00059 00060 private: 00061 00062 //------------------------------------------------------------------------ 00064 //------------------------------------------------------------------------ 00065 DlgEnv() { } 00066 00067 //------------------------------------------------------------------------ 00069 //------------------------------------------------------------------------ 00070 DlgEnv( const DlgEnv& ); 00071 00072 //------------------------------------------------------------------------ 00074 //------------------------------------------------------------------------ 00075 DlgEnv& operator=( const DlgEnv& ); 00076 }; 00077 00078 } 00079 00080 #endif /* SRC_XRDCL_XRDCLDLGENV_HH_ */