00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _fbfs_STORAGE
00021 #define _fbfs_STORAGE 1
00022
00023 #include <omniORB3/CORBA.h>
00024
00025 #include "../idl/Storage.hh"
00026
00027 #include "../utils/Prefs.h"
00028 #include "../utils/ShareLock.h"
00029
00036 namespace fbfs {
00037 class Storage_i;
00038 };
00039
00040 using namespace fbfs;
00041 using namespace utils;
00042
00060 class fbfs::Storage_i : public POA_fbfs::Storage, public PortableServer::RefCountServantBase {
00061 public:
00066 Storage_i(Prefs &prefs, const CORBA::ORB_ptr &orb);
00067
00071 virtual ~Storage_i() {};
00072
00082 Obj *get(const Security &cert, const Obj_id &id)
00083 throw(NotFound, SecurityException, InternalError);
00084
00094 Obj_ts get_ts(const Security &cert, const Obj_id &id)
00095 throw(NotFound, SecurityException, InternalError);
00096
00106 Obj_prop get_prop(const Security &cert, const Obj_id &id)
00107 throw(NotFound, SecurityException, InternalError);
00108
00120 void put(const Security &cert,const Obj &obj,const Obj_id &id,const Obj_prop &prop,const Obj_ts &ts)
00121 throw(AlreadyPresent, SecurityException, InternalError);
00122
00130 Obj_infoList *list(const Security &cert)
00131 throw(SecurityException, InternalError);
00132
00144 void put_from_peer(const Security &cert, const Obj_id &id, const char *peer)
00145 throw(NotFound, PeerNotAvailable, AlreadyPresent, SecurityException, InternalError);
00146
00155 void remove(const Security &cert, const Obj_id &id)
00156 throw(NotFound, SecurityException, InternalError);
00157
00158 private:
00159 Prefs &prefs;
00160 CORBA::ORB_ptr orb;
00161 string dirname;
00162 string metadirname;
00163 utils::ShareLock lock;
00164 };
00165
00190 #endif