include/dmlite/cpp/dummy/DummyCatalog.h

Go to the documentation of this file.
00001 /// @file    include/dmlite/cpp/dummy/DummyCatalog.h
00002 /// @brief   A dummy plugin that just delegates calls to a decorated one.
00003 /// @details It makes sense as a base for other decorator plug-ins.
00004 /// @author  Alejandro Álvarez Ayllón <aalvarez@cern.ch>
00005 #ifndef DMLITE_CPP_DUMMY_CATALOG_H
00006 #define DMLITE_CPP_DUMMY_CATALOG_H
00007 
00008 #include "../catalog.h"
00009 
00010 namespace dmlite {
00011 
00012   // Dummmy catalog implementation
00013   class DummyCatalog: public Catalog
00014   {
00015    public:
00016 
00017     /// Constructor
00018     /// @param decorated The underlying decorated catalog.
00019     DummyCatalog(Catalog* decorated) throw (DmException);
00020 
00021     /// Destructor
00022     virtual ~DummyCatalog();
00023 
00024     // Overloading
00025     virtual void setStackInstance(StackInstance*) throw (DmException);
00026     virtual void setSecurityContext(const SecurityContext*) throw (DmException);
00027 
00028     virtual void        changeDir     (const std::string&) throw (DmException);
00029     virtual std::string getWorkingDir (void)               throw (DmException);
00030 
00031     virtual ExtendedStat extendedStat(const std::string&, bool) throw (DmException);
00032     virtual ExtendedStat extendedStatByRFN(const std::string& rfn) throw (DmException);
00033 
00034     virtual bool access(const std::string& path, int mode) throw (DmException);
00035     virtual bool accessReplica(const std::string& replica, int mode) throw (DmException);
00036 
00037     virtual void addReplica   (const Replica&) throw (DmException);
00038     virtual void deleteReplica(const Replica&) throw (DmException);
00039     virtual std::vector<Replica> getReplicas(const std::string&) throw (DmException);
00040 
00041     virtual void symlink (const std::string&, const std::string&) throw (DmException);
00042     std::string  readLink(const std::string& path) throw (DmException);
00043     
00044     virtual void unlink(const std::string&)                     throw (DmException);
00045 
00046     virtual void create(const std::string&, mode_t) throw (DmException);
00047 
00048     virtual mode_t umask       (mode_t)                           throw ();
00049     virtual void   setMode     (const std::string&, mode_t)       throw (DmException);
00050     virtual void   setOwner    (const std::string&, uid_t, gid_t, bool) throw (DmException);
00051 
00052     virtual void setSize    (const std::string&, size_t) throw (DmException);
00053     virtual void setChecksum(const std::string&, const std::string&, const std::string&) throw (DmException);
00054 
00055     virtual void setAcl(const std::string&, const Acl&) throw (DmException);
00056 
00057     virtual void utime(const std::string&, const struct utimbuf*) throw (DmException);
00058 
00059     virtual std::string getComment(const std::string&)                     throw (DmException);
00060     virtual void        setComment(const std::string&,
00061                                    const std::string&) throw (DmException);
00062 
00063     virtual void setGuid(const std::string&,
00064                          const std::string&) throw (DmException);
00065     
00066     virtual void updateExtendedAttributes(const std::string&,
00067                                           const Extensible&) throw (DmException);
00068 
00069 
00070     virtual Directory* openDir (const std::string&) throw (DmException);
00071     virtual void       closeDir(Directory*)         throw (DmException);
00072 
00073     virtual struct dirent* readDir (Directory*) throw (DmException);
00074     virtual ExtendedStat*  readDirx(Directory*) throw (DmException);
00075 
00076     virtual void makeDir(const std::string&, mode_t) throw (DmException);
00077 
00078     virtual void rename     (const std::string&, const std::string&) throw (DmException);
00079     virtual void removeDir  (const std::string&)                     throw (DmException);
00080 
00081     virtual Replica getReplicaByRFN(const std::string& rfn) throw (DmException);
00082     virtual void    updateReplica(const Replica& replica) throw (DmException);
00083 
00084    protected:
00085     Catalog* decorated_;
00086   };
00087 
00088 };
00089 
00090 #endif // DMLITE_DUMMY_CATALOG_H

Generated on 4 May 2016 for dmlite by  doxygen 1.4.7