Skip to content

Commit 40f6836

Browse files
committed
[net] deprecate TNetSystem
1 parent 650a236 commit 40f6836

4 files changed

Lines changed: 21 additions & 15 deletions

File tree

net/net/inc/LinkDef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#pragma link C++ class TMonitor;
2626
#pragma link C++ class TNetFile;
2727
#pragma link C++ class ROOT::Deprecated::TNetFileStager;
28-
#pragma link C++ class TNetSystem;
28+
#pragma link C++ class ROOT::Deprecated::TNetSystem;
2929
#pragma link C++ class TWebFile;
3030
#pragma link C++ class TWebSystem;
3131
#pragma link C++ class TFTP;

net/net/inc/TNetFile.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class TNetFile : public TFile {
8181
ClassDefOverride(TNetFile,1) //A ROOT file that reads/writes via a rootd server
8282
};
8383

84+
namespace ROOT::Deprecated {
8485

8586
class TNetSystem : public TSystem {
8687

@@ -122,4 +123,8 @@ class TNetSystem : public TSystem {
122123
ClassDefOverride(TNetSystem,0) // Directory handler for NetSystem
123124
};
124125

126+
} // namespace ROOT::Deprecated
127+
128+
using TNetSystem R__DEPRECATED(6, 42, "TNetSystem is deprecated") = ROOT::Deprecated::TNetSystem;
129+
125130
#endif

net/net/inc/TNetFileStager.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@
2323
#include "TFileStager.h"
2424

2525
class TCollection;
26-
class TNetSystem;
2726

2827
namespace ROOT::Deprecated {
2928

29+
class TNetSystem;
30+
3031
class TNetFileStager : public TFileStager {
3132

3233
private:

net/net/src/TNetFile.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ Bool_t TNetFile::Matches(const char *url)
793793
/// for cleaning of the underlying TFTP connection; this allows
794794
/// to have control on the order of the final cleaning.
795795

796-
TNetSystem::TNetSystem(Bool_t ftpowner)
796+
ROOT::Deprecated::TNetSystem::TNetSystem(Bool_t ftpowner)
797797
: TSystem("-root", "Net file Helper System")
798798
{
799799
// name must start with '-' to bypass the TSystem singleton check
@@ -815,7 +815,7 @@ TNetSystem::TNetSystem(Bool_t ftpowner)
815815
/// for cleaning of the underlying TFTP connection; this allows
816816
/// to have control on the order of the final cleaning.
817817

818-
TNetSystem::TNetSystem(const char *url, Bool_t ftpowner)
818+
ROOT::Deprecated::TNetSystem::TNetSystem(const char *url, Bool_t ftpowner)
819819
: TSystem("-root", "Net file Helper System")
820820
{
821821
// name must start with '-' to bypass the TSystem singleton check
@@ -829,7 +829,7 @@ TNetSystem::TNetSystem(const char *url, Bool_t ftpowner)
829829
////////////////////////////////////////////////////////////////////////////////
830830
/// Parse and save coordinates of the remote entity (user, host, port, ...)
831831

832-
void TNetSystem::InitRemoteEntity(const char *url)
832+
void ROOT::Deprecated::TNetSystem::InitRemoteEntity(const char *url)
833833
{
834834
TUrl turl(url);
835835

@@ -853,7 +853,7 @@ void TNetSystem::InitRemoteEntity(const char *url)
853853
////////////////////////////////////////////////////////////////////////////////
854854
/// Create a TNetSystem object.
855855

856-
void TNetSystem::Create(const char *url, TSocket *sock)
856+
void ROOT::Deprecated::TNetSystem::Create(const char *url, TSocket *sock)
857857
{
858858
// If we got here protocol must be at least its short form "^root.*:" :
859859
// make sure that it is in the full form to avoid problems in TFTP
@@ -931,7 +931,7 @@ void TNetSystem::Create(const char *url, TSocket *sock)
931931
////////////////////////////////////////////////////////////////////////////////
932932
/// Destructor
933933

934-
TNetSystem::~TNetSystem()
934+
ROOT::Deprecated::TNetSystem::~TNetSystem()
935935
{
936936
// Close FTP connection
937937
if (fFTPOwner) {
@@ -955,7 +955,7 @@ TNetSystem::~TNetSystem()
955955
////////////////////////////////////////////////////////////////////////////////
956956
/// Make a directory via rootd.
957957

958-
Int_t TNetSystem::MakeDirectory(const char *dir)
958+
Int_t ROOT::Deprecated::TNetSystem::MakeDirectory(const char *dir)
959959
{
960960
// If local, use the local TSystem
961961
if (fIsLocal) {
@@ -977,7 +977,7 @@ Int_t TNetSystem::MakeDirectory(const char *dir)
977977
/// Open a directory and return an opaque pointer to a dir structure.
978978
/// Returns nullptr in case of error.
979979

980-
void *TNetSystem::OpenDirectory(const char *dir)
980+
void *ROOT::Deprecated::TNetSystem::OpenDirectory(const char *dir)
981981
{
982982
// If local, use the local TSystem
983983
if (fIsLocal) {
@@ -1011,7 +1011,7 @@ void *TNetSystem::OpenDirectory(const char *dir)
10111011
////////////////////////////////////////////////////////////////////////////////
10121012
/// Free directory via rootd.
10131013

1014-
void TNetSystem::FreeDirectory(void *dirp)
1014+
void ROOT::Deprecated::TNetSystem::FreeDirectory(void *dirp)
10151015
{
10161016
// If local, use the local TSystem
10171017
if (fIsLocal) {
@@ -1036,7 +1036,7 @@ void TNetSystem::FreeDirectory(void *dirp)
10361036
////////////////////////////////////////////////////////////////////////////////
10371037
/// Get directory entry via rootd. Returns 0 in case no more entries.
10381038

1039-
const char *TNetSystem::GetDirEntry(void *dirp)
1039+
const char *ROOT::Deprecated::TNetSystem::GetDirEntry(void *dirp)
10401040
{
10411041
// If local, use the local TSystem
10421042
if (fIsLocal) {
@@ -1060,7 +1060,7 @@ const char *TNetSystem::GetDirEntry(void *dirp)
10601060
/// The function returns 0 in case of success and 1 if the file could
10611061
/// not be stat'ed.
10621062

1063-
Int_t TNetSystem::GetPathInfo(const char *path, FileStat_t &buf)
1063+
Int_t ROOT::Deprecated::TNetSystem::GetPathInfo(const char *path, FileStat_t &buf)
10641064
{
10651065
// If local, use the local TSystem
10661066
if (fIsLocal) {
@@ -1084,7 +1084,7 @@ Int_t TNetSystem::GetPathInfo(const char *path, FileStat_t &buf)
10841084
/// Mode is the same as for the Unix access(2) function.
10851085
/// Attention, bizarre convention of return value!!
10861086

1087-
Bool_t TNetSystem::AccessPathName(const char *path, EAccessMode mode)
1087+
Bool_t ROOT::Deprecated::TNetSystem::AccessPathName(const char *path, EAccessMode mode)
10881088
{
10891089
// If local, use the local TSystem
10901090
if (fIsLocal) {
@@ -1106,7 +1106,7 @@ Bool_t TNetSystem::AccessPathName(const char *path, EAccessMode mode)
11061106
/// Check consistency of this helper with the one required
11071107
/// by 'path' or 'dirptr'.
11081108

1109-
Bool_t TNetSystem::ConsistentWith(const char *path, void *dirptr)
1109+
Bool_t ROOT::Deprecated::TNetSystem::ConsistentWith(const char *path, void *dirptr)
11101110
{
11111111
// Standard check: only the protocol part of 'path' is required to match
11121112
Bool_t checkstd = TSystem::ConsistentWith(path, dirptr);
@@ -1146,7 +1146,7 @@ Bool_t TNetSystem::ConsistentWith(const char *path, void *dirptr)
11461146
////////////////////////////////////////////////////////////////////////////////
11471147
/// Remove a path
11481148

1149-
Int_t TNetSystem::Unlink(const char *path)
1149+
Int_t ROOT::Deprecated::TNetSystem::Unlink(const char *path)
11501150
{
11511151
// If local, use the local TSystem
11521152
if (fIsLocal) {

0 commit comments

Comments
 (0)