This file is indexed.

/usr/include/root/TApplicationServer.h is in libroot-net-dev 5.34.30-0ubuntu8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// @(#)root/net:$Id$
// Author: G. Ganis  10/5/2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TApplicationServer
#define ROOT_TApplicationServer

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TApplicationServer                                                   //
//                                                                      //
// TApplicationServer is the remote application run by the roots main   //
// program. The input is taken from the socket connection to the client.//
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TApplication
#include "TApplication.h"
#endif
#ifndef ROOT_TString
#include "TString.h"
#endif
#ifndef ROOT_TSysEvtHandler
#include "TSysEvtHandler.h"
#endif
#ifndef ROOT_TUrl
#include "TUrl.h"
#endif

class TList;
class TMessage;
class TSocket;
class TRemoteObject;

class TApplicationServer : public TApplication {

private:
   Int_t         fProtocol;         //user protocol version number
   TUrl          fUrl;              //user's url
   TSocket      *fSocket;           //socket connection to user
   Bool_t        fIsValid;          //flag validity
   Bool_t        fInterrupt;        //flag interrupt state

   TString       fLogFilePath;      //Path to log file
   FILE         *fLogFile;          //log file
   Int_t         fLogFileDes;       //log file descriptor
   Bool_t        fRealTimeLog;      //TRUE if log messages should be send back in real-time

   TString       fSessId;           // Identifier for this session

   TString       fWorkDir;          // Working dir

   TList        *fSentCanvases;     // List of canvases already sent
   TRemoteObject *fWorkingDir;      // Working (remote) directory

   void          ExecLogon();
   Int_t         Setup();
   Int_t         SendCanvases();    // Send back to client any created canvas

protected:
   void          HandleCheckFile(TMessage *mess);

   static void   ErrorHandler(Int_t level, Bool_t abort, const char *location,
                              const char *msg);

public:
   TApplicationServer(Int_t *argc, char **argv, FILE *flog, const char *logfile);
   virtual ~TApplicationServer();

   void           GetOptions(Int_t *argc, char **argv);
   Int_t          GetProtocol() const   { return fProtocol; }
   Int_t          GetPort() const       { return fUrl.GetPort(); }
   const char    *GetUser() const       { return fUrl.GetUser(); }
   const char    *GetHost() const       { return fUrl.GetHost(); }
   TSocket       *GetSocket() const     { return fSocket; }

   void           HandleSocketInput();
   void           HandleUrgentData();
   void           HandleSigPipe();
   void           Interrupt() { fInterrupt = kTRUE; }
   Bool_t         IsValid() const { return fIsValid; }

   Long_t         ProcessLine(const char *line, Bool_t = kFALSE, Int_t *err = 0);

   void           Reset(const char *dir);
   Int_t          ReceiveFile(const char *file, Bool_t bin, Long64_t size);
   void           Run(Bool_t retrn = kFALSE);
   void           SendLogFile(Int_t status = 0, Int_t start = -1, Int_t end = -1);
   Int_t          BrowseDirectory(const char *dirname);
   Int_t          BrowseFile(const char *fname);
   Int_t          BrowseKey(const char *keyname);

   void           Terminate(Int_t status);

   ClassDef(TApplicationServer,0)  //Remote Application Interface
};


//----- Handles output from commands executed externally via a pipe. ---------//
//----- The output is redirected one level up (i.e., to master or client). ---//
//______________________________________________________________________________
class TASLogHandler : public TFileHandler {
private:
   TSocket     *fSocket; // Socket where to redirect the message
   FILE        *fFile;   // File connected with the open pipe
   TString      fPfx;    // Prefix to be prepended to messages

   static TString fgPfx; // Default prefix to be prepended to messages
public:
   enum EStatusBits { kFileIsPipe = BIT(23) };
   TASLogHandler(const char *cmd, TSocket *s, const char *pfx = "");
   TASLogHandler(FILE *f, TSocket *s, const char *pfx = "");
   virtual ~TASLogHandler();

   Bool_t IsValid() { return ((fFile && fSocket) ? kTRUE : kFALSE); }

   Bool_t Notify();
   Bool_t ReadNotify() { return Notify(); }

   static void SetDefaultPrefix(const char *pfx);
};

//--- Guard class: close pipe, deactivatethe related descriptor --------------//
//______________________________________________________________________________
class TASLogHandlerGuard {

private:
   TASLogHandler   *fExecHandler;

public:
   TASLogHandlerGuard(const char *cmd, TSocket *s,
                      const char *pfx = "", Bool_t on = kTRUE);
   TASLogHandlerGuard(FILE *f, TSocket *s,
                      const char *pfx = "", Bool_t on = kTRUE);
   virtual ~TASLogHandlerGuard();
};

#endif