13#ifndef ROOT_TWinNTSystem 
   14#define ROOT_TWinNTSystem 
   32 struct WIN32_FIND_DATA;
 
   33 typedef void* HIMAGELIST;
 
   40#define MAX_SID_SIZE   1024 
   42#define MAX_NAME_STRING   1024 
   93   Long_t            LookupSID (
const char *lpszAccountName, 
int what, 
int &groupIdx, 
int &memberIdx);
 
  153   int               Exec(
const char *shellcmd);
 
  154   FILE             *
OpenPipe(
const char *shellcmd, 
const char *mode);
 
  157   void              Abort(
int code = 0);
 
  162   void              Setenv(
const char *
name, 
const char *value);
 
  169   const char       *
DirName(
const char *pathname);
 
  191   const char        DriveName(
const char *pathname=
"/");
 
  199   int               Rename(
const char *from, 
const char *to);
 
  200   int               Link(
const char *from, 
const char *to);
 
  201   int               Symlink(
const char *from, 
const char *to);
 
  222   int               Load(
const char *module, 
const char *entry = 
"", 
Bool_t system = 
kFALSE);
 
  224                                  const char *option = 
"",
 
  236   int               ConnectService(
const char *servername, 
int port, 
int tcpwindowsize, 
const char *protocol = 
"tcp");
 
  242   int               OpenConnection(
const char *server, 
int port, 
int tcpwindowsize = -1, 
const char *protocol = 
"tcp");
 
  249   int               RecvRaw(
int sock, 
void *buffer, 
int length, 
int flag);
 
  250   int               SendRaw(
int sock, 
const void *buffer, 
int length, 
int flag);
 
  251   int               RecvBuf(
int sock, 
void *buffer, 
int length);
 
  252   int               SendBuf(
int sock, 
const void *buffer, 
int length);
 
#define ClassDef(name, id)
 
R__EXTERN ULong_t gConsoleWindow
 
This class represents an Internet Protocol (IP) address.
 
Abstract base class defining a generic interface to the underlying Operating System.
 
Basic time type with millisecond precision.
 
Handles synchronous and a-synchronous timer events.
 
void Setenv(const char *name, const char *value)
Set environment variable.
 
Bool_t HandleConsoleEvent()
 
const char * HomeDirectory(const char *userName=0)
Return the user's home directory.
 
int GetServiceByName(const char *service)
Get port # of internet service.
 
Int_t GetSysInfo(SysInfo_t *info) const
Returns static system info, like OS type, CPU type, number of CPUs RAM size, etc into the SysInfo_t s...
 
virtual ~TWinNTSystem()
dtor
 
UserGroup_t * GetGroupInfo(Int_t gid)
Returns all group info in the UserGroup_t structure.
 
FILE * TempFileName(TString &base, const char *dir=0)
Create a secure temporary file by appending a unique 6 letter string to base.
 
Int_t GetFPEMask()
Return the bitmap of conditions that trigger a floating point exception.
 
std::string GetHomeDirectory(const char *userName=0) const
Return the user's home directory.
 
int SetNonBlock(int fd)
Make descriptor fd non-blocking.
 
void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
 
void AddSignalHandler(TSignalHandler *sh)
Add a signal handler to list of system signal handlers.
 
int Link(const char *from, const char *to)
Create a link from file1 to file2.
 
TSignalHandler * RemoveSignalHandler(TSignalHandler *sh)
Remove a signal handler from list of signal handlers.
 
void SetGUIThreadMsgHandler(ThreadMsgFunc_t func)
Set the (static part of) the event handler func for GUI messages.
 
const char DriveName(const char *pathname="/")
Return the drive letter in pathname.
 
void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
 
int Exec(const char *shellcmd)
Execute a command.
 
TTime Now()
Get current time in milliseconds since 0:00 Jan 1 1995.
 
const char * GetDirEntry(void *dirp)
Returns the next directory entry.
 
Bool_t Init()
Initialize WinNT system interface.
 
const char * GetLinkedLibraries()
Get list of shared libraries loaded at the start of the executable.
 
FILE * OpenPipe(const char *shellcmd, const char *mode)
Open a pipe.
 
struct passwd * fPasswords
 
const char * HostName()
Return the system's host name.
 
const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
 
static void ThreadStub(void *Parameter)
 
static int WinNTUdpConnect(const char *hostname, int port)
Creates a UDP socket connection Is called via the TSocket constructor.
 
const char * Getenv(const char *name)
Get environment variable.
 
Int_t GetCpuInfo(CpuInfo_t *info, Int_t sampleTime=1000) const
Returns cpu load average and load info into the CpuInfo_t structure.
 
int SetSockOpt(int sock, int opt, int val)
Set socket option.
 
Bool_t IsPathLocal(const char *path)
Returns TRUE if the url in 'path' points to the local file system.
 
int ClosePipe(FILE *pipe)
Close the pipe.
 
const char * GetError()
Return system error string.
 
UserGroup_t * GetUserInfo(Int_t uid)
Returns all user info in the UserGroup_t structure.
 
void AddDynamicPath(const char *dir)
Add a new directory to the dynamic path.
 
int AnnounceTcpService(int port, Bool_t reuse, int backlog, int tcpwindowsize=-1)
Announce TCP/IP service.
 
void SetDynamicPath(const char *path)
Set the dynamic path to a new value.
 
Bool_t ChangeDirectory(const char *path)
Change directory.
 
void ExitLoop()
Exit from event loop.
 
int MakeDirectory(const char *name)
Make a WinNT file system directory.
 
int GetPid()
Get process id.
 
void TimerThread()
Special Thread to check asynchronous timers.
 
int GetPathInfo(const char *path, FileStat_t &buf)
Get info about a file.
 
void Abort(int code=0)
Abort the application.
 
TFileHandler * RemoveFileHandler(TFileHandler *fh)
Remove a file handler from the list of file handlers.
 
int ConnectService(const char *servername, int port, int tcpwindowsize, const char *protocol="tcp")
Connect to service servicename on server servername.
 
std::string GetWorkingDirectory() const
Return the working directory for the default drive.
 
TInetAddress GetSockName(int sock)
Get Internet Protocol (IP) address of host and port #.
 
const char * BaseName(const char *name)
Base name of a file name.
 
Int_t GetMemInfo(MemInfo_t *info) const
Returns ram and swap memory usage info into the MemInfo_t structure.
 
int Unlink(const char *name)
Unlink, i.e.
 
int GetSockOpt(int sock, int opt, int *val)
Get socket option.
 
void DispatchSignals(ESignals sig)
Handle and dispatch signals.
 
Long_t LookupSID(const char *lpszAccountName, int what, int &groupIdx, int &memberIdx)
Take the name and look up a SID so that we can get full domain/user information.
 
const char * WorkingDirectory()
Return the working directory for the default drive.
 
void IgnoreSignal(ESignals sig, Bool_t ignore=kTRUE)
If ignore is true ignore the specified signal, else restore previous behaviour.
 
Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
 
TList * GetVolumes(Option_t *opt="") const
Get list of volumes (drives) mounted on the system.
 
Int_t GetEffectiveGid()
Returns the effective group id.
 
Bool_t DispatchTimers(Bool_t mode)
Handle and dispatch timers.
 
void ResetSignal(ESignals sig, Bool_t reset=kTRUE)
If reset is true reset the signal handler for the specified signal to the default handler,...
 
int AnnounceUdpService(int port, int backlog)
Announce UDP service.
 
ULong_t GetGUIThreadId() const
 
void FreeDirectory(void *dirp)
Close a WinNT file system directory.
 
void ResetSignals()
Reset signals handlers to previous behaviour.
 
Bool_t ProcessEvents()
process pending events, i.e. DispatchOneEvent(kTRUE)
 
int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
 
Int_t RedirectOutput(const char *name, const char *mode="a", RedirectHandle_t *h=0)
Redirect standard output (stdout, stderr) to the specified file.
 
Bool_t CheckSignals(Bool_t sync)
Check if some signals were raised and call their Notify() member.
 
int OpenConnection(const char *server, int port, int tcpwindowsize=-1, const char *protocol="tcp")
Open a connection to a service on a server.
 
void DoBeep(Int_t freq=-1, Int_t duration=-1) const
Beep.
 
void SetProgname(const char *name)
Set the application name (from command line, argv[0]) and copy it in gProgName.
 
Int_t GetUid(const char *user=0)
Returns the user's id. If user = 0, returns current user's id.
 
Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
 
int Chmod(const char *file, UInt_t mode)
Set the file permission bits.
 
int SendRaw(int sock, const void *buffer, int length, int flag)
Send exactly length bytes from buffer.
 
void AddFileHandler(TFileHandler *fh)
Add a file handler to the list of system file handlers.
 
int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
 
const char * GetLibraries(const char *regexp="", const char *option="", Bool_t isRegexp=kTRUE)
Return a space separated list of loaded shared libraries.
 
int AcceptConnection(int sock)
Accept a connection.
 
Bool_t CheckDescriptors()
Check if there is activity on some file descriptors and call their Notify() member.
 
static int WinNTUnixConnect(int port)
Connect to a Unix domain socket.
 
const char * FindFile(const char *search, TString &file, EAccessMode mode=kFileExists)
Find location of file in a search path.
 
Bool_t ExpandPathName(TString &patbuf)
Expand a pathname getting rid of special shell characaters like ~.$, etc.
 
void CloseConnection(int sock, Bool_t force=kFALSE)
Close socket.
 
void NotifyApplicationCreated()
Hook to tell TSystem that the TApplication object has been created.
 
Bool_t(* ThreadMsgFunc_t)(MSG *)
 
WIN32_FIND_DATA fFindFileData
 
int Utime(const char *file, Long_t modtime, Long_t actime)
Set a files modification and access times.
 
int RecvBuf(int sock, void *buffer, int length)
Receive a buffer headed by a length indicator.
 
Int_t GetGid(const char *group=0)
Returns the group's id. If group = 0, returns current user's group.
 
int RecvRaw(int sock, void *buffer, int length, int flag)
Receive exactly length bytes into buffer.
 
Bool_t CollectMembers(const char *lpszGroupName, int &groupIdx, int &memberIdx)
 
const char * DirName(const char *pathname)
Return the directory name in pathname.
 
TInetAddress GetPeerName(int sock)
Get Internet Protocol (IP) address of remote host and port #.
 
Bool_t CountMembers(const char *lpszGroupName)
 
void FillWithHomeDirectory(const char *userName, char *mydir) const
Fill buffer with user's home directory.
 
TTimer * RemoveTimer(TTimer *ti)
Remove timer from list of system timers.
 
Bool_t InitUsersGroups()
Collect local users and groups accounts information.
 
const char * FindDynamicLibrary(TString &lib, Bool_t quiet=kFALSE)
Returns and updates sLib to the path of a dynamic library (searches for library in the dynamic librar...
 
int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree)
Get info about a file system: id, bsize, bfree, blocks.
 
const char * GetDynamicPath()
Return the dynamic path (used to find shared libraries).
 
char * GetServiceByPort(int port)
Get name of internet service.
 
int SendBuf(int sock, const void *buffer, int length)
Send a buffer headed by a length indicator.
 
int CopyFile(const char *from, const char *to, Bool_t overwrite=kFALSE)
Copy a file.
 
const char * PrependPathName(const char *dir, TString &name)
Concatenate a directory and a file name.
 
Int_t Select(TList *active, Long_t timeout)
Select on file descriptors. The timeout to is in millisec.
 
TInetAddress GetHostByName(const char *server)
Get Internet Protocol (IP) address of host.
 
Int_t GetProcInfo(ProcInfo_t *info) const
Returns cpu and memory used by this process into the ProcInfo_t structure.
 
int AnnounceUnixService(int port, int backlog)
Announce unix domain service.
 
HANDLE GetProcess()
Get current process handle.
 
void DispatchOneEvent(Bool_t pendingOnly=kFALSE)
Dispatch a single event in TApplication::Run() loop.
 
Int_t SetFPEMask(Int_t mask=kDefaultMask)
Set which conditions trigger a floating point exception.
 
Int_t GetEffectiveUid()
Returns the effective user id.
 
void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
 
const char * UnixPathName(const char *unixpathname)
Convert a pathname to a unix pathname.
 
void * GetGUIThreadHandle() const
 
int Symlink(const char *from, const char *to)
Create a symlink from file1 to file2.
 
void AddTimer(TTimer *ti)
Add timer to list of system timers.
 
int Rename(const char *from, const char *to)
Rename a file. Returns 0 when successful, -1 in case of failure.
 
int Umask(Int_t mask)
Set the process file creation mode mask.
 
void StackTrace()
Print a stack trace, if gEnv entry "Root.Stacktrace" is unset or 1, and if the image helper functions...