// @(#)root/netxng:$Id$
/*************************************************************************
 * Copyright (C) 1995-2013, 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_TNetXNGSystem
#define ROOT_TNetXNGSystem

////////////////////////////////////////////////////////////////////////////////
//                                                                            //
// TNetXNGSystem                                                              //
//                                                                            //
// Authors: Justin Salmon, Lukasz Janyst                                      //
//          CERN, 2013                                                        //
//                                                                            //
// Enables access to XRootD filesystem interface using the new client.        //
//                                                                            //
////////////////////////////////////////////////////////////////////////////////

#include "TSystem.h"
#include "TCollection.h"
#include <set>

#ifndef __CINT__
#include <XrdCl/XrdClXRootDResponses.hh>
#include <XrdCl/XrdClURL.hh>
#endif

namespace XrdCl {
   class FileSystem;
   class URL;
   class DirectoryList;
}

class TNetXNGSystem: public TSystem {

private:
   std::set<void*>    fDirPtrs;
#ifndef __CINT__
private:
   XrdCl::URL        *fUrl;        // URL of this TSystem
   XrdCl::FileSystem *fFileSystem; // Cached for convenience

#endif

public:
   TNetXNGSystem(Bool_t owner = kTRUE);
   TNetXNGSystem(const char *url, Bool_t owner = kTRUE);
   virtual ~TNetXNGSystem();

   virtual void*       OpenDirectory(const char* dir);
   virtual Int_t       MakeDirectory(const char* dir);
   virtual void        FreeDirectory(void *dirp);
   virtual const char* GetDirEntry(void *dirp);
   virtual Int_t       GetPathInfo(const char* path, FileStat_t &buf);
   virtual Bool_t      ConsistentWith(const char *path, void *dirptr);
   virtual int         Unlink(const char *path);
   virtual Bool_t      IsPathLocal(const char *path);
   virtual Int_t       Locate(const char* path, TString &endurl);
   virtual Int_t       Stage(const char* path, UChar_t priority);
   virtual Int_t       Stage(TCollection *files, UChar_t priority);

   ClassDef(TNetXNGSystem, 0 ) // ROOT class definition
};

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