ROOT logo
// $Id: XrdUser.h 2730 2012-04-17 00:31:19Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

#ifndef XrdMon_XrdUser_H
#define XrdMon_XrdUser_H

#include <Glasses/ZList.h>
#include <Gled/GTime.h>

class XrdServer;
class XrdFile;

class XrdUser : public ZList
{
  MAC_RNR_FRIENDS(XrdUser);
  friend class XrdServer;

private:
  Int_t             m_dict_id;       //!

  void _init();

protected:
  TString           mRealName;       // X{GR}   7 TextOut()
  TString           mDN;             // X{GR}   7 TextOut()
  TString           mVO;             // X{GR}   7 TextOut()
  TString           mRole;           // X{GR}   7 TextOut()
  TString           mGroup;          // X{GR}   7 TextOut()
  TString           mServerUsername; // X{GR}   7 TextOut()
  TString           mFromHost;       // X{GR}   7 TextOut()
  TString           mFromDomain;     // X{GR}   7 TextOut()
  Bool_t            bNumericHost;    // X{G}    7 BoolOut()
  TString           mAppInfo;        // X{GR}   7 TextOut()
  GTime             mLoginTime;      // X{GR}   7 TimeOut()
  GTime             mDisconnectTime; // X{GRSQ} 7 TimeOut()
  GTime             mLastMsgTime;    // X{GRSQ} 7 TimeOut()

  Bool_t            bTraceMon;       //!X{GS}  7 Bool()

  ZLink<XrdServer>  mServer;         // X{GS} L{}

public:
  XrdUser(const TString& n="XrdUser", const TString& t="");
  XrdUser(const TString& n, const TString& t, 
	  const TString& dn, const TString& vo, const TString& ro, const TString& gr,
          const TString& su, const TString& fh, const TString& fd, Bool_t num_host,
          const GTime& st);
  virtual ~XrdUser();

  TString GetFromFqhn() const;

  Bool_t IsConnected() const { return mDisconnectTime.IsNever() && ! mLoginTime.IsNever(); }

  void AddFile(XrdFile* file);

  void AppendAppInfo(const TString& app_info);

  static TString    ParseHumanName(const TString& dn);

#include "XrdUser.h7"
  ClassDef(XrdUser, 1);
}; // endclass XrdUser

#endif
 XrdUser.h:1
 XrdUser.h:2
 XrdUser.h:3
 XrdUser.h:4
 XrdUser.h:5
 XrdUser.h:6
 XrdUser.h:7
 XrdUser.h:8
 XrdUser.h:9
 XrdUser.h:10
 XrdUser.h:11
 XrdUser.h:12
 XrdUser.h:13
 XrdUser.h:14
 XrdUser.h:15
 XrdUser.h:16
 XrdUser.h:17
 XrdUser.h:18
 XrdUser.h:19
 XrdUser.h:20
 XrdUser.h:21
 XrdUser.h:22
 XrdUser.h:23
 XrdUser.h:24
 XrdUser.h:25
 XrdUser.h:26
 XrdUser.h:27
 XrdUser.h:28
 XrdUser.h:29
 XrdUser.h:30
 XrdUser.h:31
 XrdUser.h:32
 XrdUser.h:33
 XrdUser.h:34
 XrdUser.h:35
 XrdUser.h:36
 XrdUser.h:37
 XrdUser.h:38
 XrdUser.h:39
 XrdUser.h:40
 XrdUser.h:41
 XrdUser.h:42
 XrdUser.h:43
 XrdUser.h:44
 XrdUser.h:45
 XrdUser.h:46
 XrdUser.h:47
 XrdUser.h:48
 XrdUser.h:49
 XrdUser.h:50
 XrdUser.h:51
 XrdUser.h:52
 XrdUser.h:53
 XrdUser.h:54
 XrdUser.h:55
 XrdUser.h:56
 XrdUser.h:57
 XrdUser.h:58
 XrdUser.h:59
 XrdUser.h:60
 XrdUser.h:61
 XrdUser.h:62
 XrdUser.h:63
 XrdUser.h:64
 XrdUser.h:65
 XrdUser.h:66
 XrdUser.h:67