00001
00002
00003
00004
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
00013 class DummyCatalog: public Catalog
00014 {
00015 public:
00016
00017
00018
00019 DummyCatalog(Catalog* decorated) throw (DmException);
00020
00021
00022 virtual ~DummyCatalog();
00023
00024
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 DmStatus extendedStat(ExtendedStat &xstat, const std::string&, bool) throw (DmException);
00033 virtual ExtendedStat extendedStatByRFN(const std::string& rfn) throw (DmException);
00034
00035 virtual bool access(const std::string& path, int mode) throw (DmException);
00036 virtual bool accessReplica(const std::string& replica, int mode) throw (DmException);
00037
00038 virtual void addReplica (const Replica&) throw (DmException);
00039 virtual void deleteReplica(const Replica&) throw (DmException);
00040 virtual std::vector<Replica> getReplicas(const std::string&) throw (DmException);
00041
00042 virtual void symlink (const std::string&, const std::string&) throw (DmException);
00043 std::string readLink(const std::string& path) throw (DmException);
00044
00045 virtual void unlink(const std::string&) throw (DmException);
00046
00047 virtual void create(const std::string&, mode_t) throw (DmException);
00048
00049 virtual mode_t umask (mode_t) throw ();
00050 virtual void setMode (const std::string&, mode_t) throw (DmException);
00051 virtual void setOwner (const std::string&, uid_t, gid_t, bool) throw (DmException);
00052
00053 virtual void setSize (const std::string&, size_t) throw (DmException);
00054 virtual void setChecksum(const std::string&, const std::string&, const std::string&) throw (DmException);
00055 virtual void getChecksum(const std::string& path,
00056 const std::string& csumtype,
00057 std::string& csumvalue,
00058 const std::string& pfn, const bool forcerecalc = false, const int waitsecs = 0) throw (DmException);
00059
00060
00061 virtual void setAcl(const std::string&, const Acl&) throw (DmException);
00062
00063 virtual void utime(const std::string&, const struct utimbuf*) throw (DmException);
00064
00065 virtual std::string getComment(const std::string&) throw (DmException);
00066 virtual void setComment(const std::string&,
00067 const std::string&) throw (DmException);
00068
00069 virtual void setGuid(const std::string&,
00070 const std::string&) throw (DmException);
00071
00072 virtual void updateExtendedAttributes(const std::string&,
00073 const Extensible&) throw (DmException);
00074
00075
00076 virtual Directory* openDir (const std::string&) throw (DmException);
00077 virtual void closeDir(Directory*) throw (DmException);
00078
00079 virtual struct dirent* readDir (Directory*) throw (DmException);
00080 virtual ExtendedStat* readDirx(Directory*) throw (DmException);
00081
00082 virtual void makeDir(const std::string&, mode_t) throw (DmException);
00083
00084 virtual void rename (const std::string&, const std::string&) throw (DmException);
00085 virtual void removeDir (const std::string&) throw (DmException);
00086
00087 virtual Replica getReplicaByRFN(const std::string& rfn) throw (DmException);
00088 virtual void updateReplica(const Replica& replica) throw (DmException);
00089
00090 protected:
00091 Catalog* decorated_;
00092 };
00093
00094 };
00095
00096 #endif // DMLITE_DUMMY_CATALOG_H