Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

VDirSurrogate.H

Go to the documentation of this file.
00001 // Copyright (C) 2001, Compaq Computer Corporation
00002 // 
00003 // This file is part of Vesta.
00004 // 
00005 // Vesta is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 // 
00010 // Vesta is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with Vesta; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 //
00020 // VDirSurrogate.H
00021 //
00022 // Remote surrogate for a VestaSource of any type.
00023 //
00024 
00025 #include "VestaSource.H"
00026 #include "SRPC.H"
00027 
00028 extern "C" void VDirSurrogate_init();
00029 extern "C" void VDirSurrogate_init2();
00030 
00031 class VDirSurrogate : public VestaSource {
00032     // Warning!  The following fields of the VestaSource parent class are
00033     // not set in a VDirSurrogate:  ac, rep, nextPseudoInode.
00034   private:
00035     time_t timestampCache;
00036     ShortId sidCache;
00037     int executableCache;
00038     Basics::uint64 sizeCache;
00039     // Which repository to use
00040     /*const*/ Text host_, port_;
00041   public:
00042     static Text defaultHost() throw();
00043     static Text defaultPort() throw();
00044     Text host() throw() { return host_; };
00045     Text port() throw() { return port_; };
00046 
00047     VDirSurrogate(time_t timestamp, ShortId sid,
00048                   const Text host_ = "", const Text port_ = "",
00049                   int executable = -1,
00050                   Basics::uint64 size = (Basics::uint64) -1)
00051       throw (SRPC::failure);
00052 
00053     // Create a volatile directory based on a Vesta language binding.
00054     // The new directory is volatile in the sense that it does not
00055     // survive a crash and restart of the repository server.  It is
00056     // "based" on the binding in the sense that its initial contents
00057     // are the contents of the binding, interpreted as a directory.
00058     // The new directory can be mutated, and a list of changes to it
00059     // can be obtained by calling its list method with deltaOnly=true.
00060     //
00061     // If readOnlyExisting is true, existing files in the directory
00062     // and its subdirectories are read-only; if false, they can be
00063     // mutated (via copy-on-write).  When readOnlyExisting is true, an
00064     // existing file's longid is based on its shortid and fingerprint;
00065     // when false, a new unique longid is chosen for each file.  The
00066     // true case gives a much better file block cache hit rate on the
00067     // machines where the tools run.  It should be used whenever
00068     // possible. 
00069     //
00070     // The base binding is specified by (host, handle), where
00071     // (host, port) is an SRPC socket on which the evaluator
00072     // holding the binding can be contacted, and handle identifies the
00073     // binding to the evaluator.  The timestamp parameter gives the
00074     // initial timestamp (modified time) that should be attributed to
00075     // the directory; if it is defaulted, the current time is used.
00076     // The caller is responsible for freeing the object returned.
00077     //
00078     // The repository to use is specified by (reposHost, reposPort).
00079     // If these arguments are omitted, the default values are taken from
00080     // VestaConfig entries [Repository]VestaSourceSRPC_host and
00081     // [Repository]VestaSourceSRPC_port.
00082     //
00083     static VestaSource::errorCode
00084       createVolatileDirectory(const char* host, const char* port,
00085                               Bit64 handle,  VestaSource*& result,
00086                               time_t timestamp =0,
00087                               bool readOnlyExisting =true,
00088                               Text reposHost ="",
00089                               Text reposPort ="")
00090         throw (SRPC::failure);
00091 
00092     // Backward compatibility: get the port from vesta.cfg.
00093     static VestaSource::errorCode
00094       createVolatileDirectory(const char* host, Bit64 handle,
00095                               VestaSource*& result, time_t timestamp =0,
00096                               bool readOnlyExisting =true,
00097                               Text reposHost ="",
00098                               Text reposPort ="")
00099         throw (SRPC::failure);    
00100 
00101     // Delete a volatile directory, freeing the repository server
00102     // resources that were required to store it.  Does not free the
00103     // local pointer dir.
00104     static VestaSource::errorCode
00105       deleteVolatileDirectory(VestaSource* dir)
00106         throw (SRPC::failure);
00107 
00108     // Obtain the UDP socket of the default repository's NFS server,
00109     // in the SRPC-style hostName:portNumber format.  Also returns the
00110     // LongIds (NFS file handles) for the repository root directory
00111     // and mutable root directory.  (Note: All this information is
00112     // either constant or obtainable from the Vesta config file, so
00113     // this method is not strictly necessary.)  The caller is
00114     // responsible for freeing the char* socket returned.
00115     //
00116     static void
00117       getNFSInfo(char*& socket, LongId& root, LongId& muRoot)
00118         throw (SRPC::failure);
00119 
00120     // ShortId lookup from fingerprint for immutable files.
00121     static ShortId fpToShortId(const FP::Tag& fptag, Text host, Text port)
00122       throw (SRPC::failure);
00123 
00124     // Special constructor methods to enable dealing with more than
00125     // one repository in the same process.  The corresponding methods
00126     // in VestaSource and LongId always access the default repository
00127     // (host, port) obtained from VestaConfig; these methods let the
00128     // caller specify the host and port.  These methods (unlike those
00129     // in VestaSource) return dynamic storage that the caller is
00130     // responsible for freeing.
00131     //
00132     static VestaSource* repositoryRoot(Text host, Text port,
00133                                        AccessControl::Identity who =NULL)
00134       throw (SRPC::failure);
00135     static VestaSource* mutableRoot(Text host, Text port,
00136                                     AccessControl::Identity who =NULL)
00137       throw (SRPC::failure);
00138     static VestaSource* volatileRoot(Text host, Text port,
00139                                      AccessControl::Identity who =NULL)
00140       throw (SRPC::failure);
00141     static VestaSource* LongIdLookup(LongId longid, Text host, Text port,
00142                                      AccessControl::Identity who =NULL)
00143       throw (SRPC::failure);
00144     static bool LongIdValid(LongId longid, Text host, Text port,
00145                             AccessControl::Identity who =NULL)
00146       throw (SRPC::failure);
00147 
00148     // Request the specified dst repository (by default, the local one)
00149     // to acquire mastership of the specified object from the specified
00150     // src repository.  Defaulting the src repository is no longer supported.
00151     //
00152     // The given pathname must be relative to "/vesta"; it must not
00153     // start with "/vesta" or "/".
00154     //
00155     // The src repository must grant ownership permission to the user
00156     // swho and be willing to cede mastership to the dst repository.
00157     // The dst repository must grant ownership permission to the user
00158     // dwho and be willing to accept mastership from the src
00159     // repository.  A repository will agree to cede (or accept)
00160     // mastership on a pathname from another repository if, when
00161     // searching upward in its copy of the namespace, the first object
00162     // it finds that has a #mastership-to (or respectively
00163     // #mastership-from) attribute includes the other repository's
00164     // host:port name (or "*") in its value.  If no objects with the
00165     // appropriate attribute are found, permission is denied.
00166     //
00167     // Possible errors:
00168     //  ok              Transfer succeeded, or dst was already master.
00169     //  notFound        Name not found on dst.  (Name not found on src
00170     //                   is reported as notMaster.)
00171     //  noPermission    Permission to change either dst or src denied.
00172     //  nameInUse       Impossible.
00173     //  inappropriateOp Type error: transfer to stub from non-stub, to
00174     //                   appendable directory from ghost, to ghost from non-
00175     //                   ghost (technically legal but disallowed as probably
00176     //                   a mistake), or between types that should not occur
00177     //                   together because they violate the replica agreement
00178     //                   invariant (e.g., to file from immutable directory).
00179     //  nameTooLong     Overly long arc in pathname.
00180     //  rpcFailure      Call from dst to src repository failed.  If the first
00181     //                   call to src fails, the object is unchanged.  If a
00182     //                   later call fails, the transfer protocol has been
00183     //                   partially carried out, the object is left
00184     //                   with a "#master-request" attribute set, and
00185     //                   dst forks a recovery thread to try to complete
00186     //                   or abort the transfer.  This thread runs
00187     //                   periodically, persisting even after reboots,
00188     //                   until src can be contacted.  If necessary,
00189     //                   you can force the destination to give up
00190     //                   by manually removing its "#master-request"
00191     //                   attribute; however, the source may have
00192     //                   already ceded mastership, which would leave
00193     //                   the object with no master.
00194     //  notADirectory   Pathname has arcs beyond a leaf.
00195     //  isADirectory    Impossible.
00196     //  invalidArgs     Returned for implementation errors where
00197     //                   dst supplies invalid data to src or vice
00198     //                   versa; these should never occur.
00199     //  outOfSpace      Impossible.
00200     //  notMaster       src is not the master for this object.
00201     //
00202     // If the method throws SRPC::failure, the call to dst failed.  As
00203     // with all other methods in this interface, the operation
00204     // probably was not started, but possibly could have succeeded or
00205     // have failed with any of the possible error codes.
00206     //
00207     // Currently, separate identities can be supplied to use at the
00208     // destination and source.  The source identity defaults to be the
00209     // same as the destination identity, and the ability to specify it
00210     // separately may be removed in the future.
00211     //
00212     static VestaSource::errorCode
00213       acquireMastership(const char* pathname,
00214                         Text dstHost ="", Text dstPort ="",
00215                         Text srcHost ="", Text srcPort ="",
00216                         char pathnameSep =PathnameSep,
00217                         AccessControl::Identity dwho =NULL,
00218                         AccessControl::Identity swho =NULL)
00219       throw (SRPC::failure);
00220 
00221     // Request the specified dst repository (by default, the local
00222     // one) to make a replica of the specified object from the
00223     // specified src repository.  Defaulting the src repository is not
00224     // supported.  The replication is not recursive except where it
00225     // must be: an appendable directory is replicated as an empty
00226     // directory, but an immutable directory tree is copied in full.
00227     // The caller should check that the destination object's parent
00228     // directory exists and that the object does not already exist
00229     // (other than as a ghost or nonmaster stub), as this routine will
00230     // make an unneeded mutable copy in such cases before returning an
00231     // error.
00232     //
00233     // The given pathname must be relative to "/vesta"; it must not
00234     // start with "/vesta" or "/".  The asStub flag creates a stub
00235     // instead of the complete object; the asGhost flag creates a
00236     // ghost.  
00237     //
00238     // The user swho must have read permission in the src repository,
00239     // the user dwho must have search permission in the dst
00240     // repository, and the src repository must have permission from
00241     // the dst repository to supply a replica.  The latter permission
00242     // is granted if, when searching upward from pathname in dst,
00243     // either the first object found that has a #replicate-from
00244     // attribute or the first object found that has a
00245     // #replicate-from-noac attribute includes srcHost:srcPort (or
00246     // "*") in its value.  If no objects with such attributes are
00247     // found, permission is denied.
00248     //
00249     // Possible errors:
00250     //  ok              Replication succeeded.
00251     //  notFound        Pathname not found in src repository, or its
00252     //                   parent not found in dst repository.
00253     //  noPermission    The src repository denied read permission to 
00254     //                   swho, the dst repository denied search
00255     //                   permission to dwho, or the dst repository
00256     //                   denied the src repository permission to
00257     //                   supply a replica (i.e., dst did not trust src to
00258     //                   provide a correct copy).
00259     //  nameInUse       If !asStub and !asGhost, this error means there
00260     //                   is already a non-ghost, non-stub object named
00261     //                   pathname in dst.  If asStub or asGhost, it
00262     //                   means there is already some object (not
00263     //                   necessarily of the type requested) named pathname
00264     //                   in dst.  In both cases the src repository has
00265     //                   probably not been examined yet.
00266     // inappropriateOp  Attempt to replicate between types that
00267     //                   should not occur together because they violate
00268     //                   the replica agreement invariant (e.g., to file
00269     //                   from immutable directory), or attempt to
00270     //                   do something that doesn't make sense (e.g.,
00271     //                   replicate a child into an immutable directory).
00272     //  nameTooLong     Overly long arc in pathname.
00273     //  rpcFailure      Call from dst to src repository failed.  The
00274     //                   pathname has not been created in dst.
00275     //  notADirectory   Pathname has arcs beyond a leaf.
00276     //  isADirectory    Impossible.
00277     //  invalidArgs     Bad syntax for a host or port, or both asStub
00278     //                   and asGhost are true.
00279     //  outOfSpace      dst does not enough disk space to hold the replica.
00280     //  notMaster       Impossible.
00281     //
00282     // If the method throws SRPC::failure, the call to dst failed.  As
00283     // with all other methods in this interface, the operation
00284     // probably was not started, but possibly could have succeeded or
00285     // have failed with any of the possible error codes.
00286     //
00287     // Currently, separate identities can be supplied to use at the
00288     // destination and source.  The source identity defaults to be the
00289     // same as the destination identity, and the ability to specify it
00290     // separately may be removed in the future.
00291     //
00292     static VestaSource::errorCode
00293       replicate(const char* pathname,
00294                 bool asStub =false, bool asGhost =false,
00295                 Text dstHost ="", Text dstPort ="",
00296                 Text srcHost ="", Text srcPort ="",
00297                 char pathnameSep =PathnameSep,
00298                 AccessControl::Identity dwho =NULL,
00299                 AccessControl::Identity swho =NULL)
00300       throw (SRPC::failure);
00301 
00302     // Request the specified dst repository (by default, the local
00303     // one) to merge the attribute history of the specified object in
00304     // the src repository into the corresponding object in the
00305     // destination repository.  Defaulting the src repository is not
00306     // supported.  The destination object must already exist, and must
00307     // be of the same type as the source object.
00308     //
00309     // The given pathname must be relative to "/vesta"; it must not
00310     // start with "/vesta" or "/".  If includeAccess is true, access
00311     // control attributes (that is, attributes whose names begin with
00312     // "#" are included; otherwise they are excluded).
00313     //
00314     // The user swho must have read permission in the src repository,
00315     // the user dwho must have search permission in the dst
00316     // repository, and the src repository must have permission from
00317     // the dst repository to supply a replica.  The latter permission
00318     // is granted if, when searching upward from pathname in dst, the
00319     // first object found that has a #replicate-from attribute, or
00320     // (provided that includeAccess is not set) the first object found
00321     // that has a #replicate-from-noac attribute, includes
00322     // srcHost:srcPort (or "*") in its value.  If no objects with such
00323     // attributes are found, permission is denied.
00324     //
00325     // Possible errors:
00326     //  ok              Replication succeeded.
00327     //  notFound        Pathname not found in src or dst repository.
00328     //  noPermission    The src repository denied search permission to 
00329     //                   swho, the dst repository denied search
00330     //                   permission to dwho, or the dst repository
00331     //                   denied the src repository permission to
00332     //                   supply a replica (i.e., dst did not trust src to
00333     //                   provide a correct copy).
00334     //  nameInUse       Impossible.
00335     //  inappropriateOp Attempt to replicate between types that
00336     //                   do not match.
00337     //  nameTooLong     Overly long arc in pathname.
00338     //  rpcFailure      Call from dst to src repository failed.  The
00339     //                   pathname has not been created in dst.
00340     //  notADirectory   Pathname has arcs beyond a leaf.
00341     //  isADirectory    Impossible.
00342     //  invalidArgs     Bad syntax for a host or port.
00343     //  outOfSpace      Impossible.
00344     //  notMaster       Impossible.
00345     //
00346     // If the method throws SRPC::failure, the call to dst failed.  As
00347     // with all other methods in this interface, the operation
00348     // probably was not started, but possibly could have succeeded or
00349     // have failed with any of the possible error codes.
00350     //
00351     // Currently, separate identities can be supplied to use at the
00352     // destination and source.  The source identity defaults to be the
00353     // same as the destination identity, and the ability to specify it
00354     // separately may be removed in the future.
00355     //
00356     static VestaSource::errorCode
00357       replicateAttribs(const char* pathname,
00358                        bool includeAccess = true,
00359                        Text dstHost ="", Text dstPort ="",
00360                        Text srcHost ="", Text srcPort ="",
00361                        char pathnameSep =PathnameSep,
00362                        AccessControl::Identity dwho =NULL,
00363                        AccessControl::Identity swho =NULL)
00364       throw (SRPC::failure);
00365 
00366     // Request information about a repository user.  The result is
00367     // returned into the AccessControl::IdInfo structure passed by
00368     // reference.  This is primarily intended as a diagnostic tool for
00369     // permissions problems.
00370     //
00371     // The user "who" is the one making the inquiry, and must be
00372     // allowed access to the repository (although any level of access
00373     // is enough).
00374     //
00375     // The user "subject" is the one about whom the inquiry is being
00376     // made.
00377     static void
00378       getUserInfo(AccessControl::IdInfo &result /*OUT*/,
00379                   AccessControl::Identity who =NULL,
00380                   AccessControl::Identity subject =NULL,
00381                   Text reposHost ="",
00382                   Text reposPort ="")
00383       throw (SRPC::failure);
00384 
00385     // Ask the respository to refresh its access control tables.  This
00386     // includes information derived from the host OS user and group
00387     // tables as well as that from the repository-specific alias,
00388     // group, and export files.  Note that this can fail if there are
00389     // errors parsing any of the repository-specific access control
00390     // files, in which case the access control tables will not be
00391     // changed by this call.
00392     //
00393     // The user "who" is the requestor, and must have administrative
00394     // access for the call to succeed.
00395     static void
00396       refreshAccessTables(AccessControl::Identity who =NULL,
00397                           Text reposHost ="",
00398                           Text reposPort ="")
00399       throw (SRPC::failure);
00400 
00401     // Our versions of virtual methods from base class.  These
00402     // methods can operate on virtual directories created with the
00403     // methods above, or on actual source directories in the
00404     // repository.  To do the latter, start at
00405     // VestaSource::repositoryRoot() or VestaSource::mutableRoot().
00406     // (VestaSource::volatileRoot() is not supported.)
00407     //
00408     // Atomicity and concurrency control for this subclass are
00409     // handled differently than for the subclasses of VestaSource that
00410     // are provided inside the repository server's address space.  The
00411     // latter classes use a readers/writers lock to control
00412     // concurrency, and they allow failure-atomic start/commit
00413     // brackets around any set of write operations.  In the
00414     // VDirSurrogate class, however, each method internally acquires
00415     // and releases the readers/writers lock as needed, and
00416     // failure-atomic brackets are not available.  Each write
00417     // operation is failure-atomic by itself, but they cannot be
00418     // grouped into larger units.  Therefore, additional methods are
00419     // provided for commonly needed atomic groups (checkout, advance,
00420     // and checkin).  The server implementation makes it
00421     // straightforward to add more such methods if needed.
00422     //
00423     // See VestaSource.H for detailed comments on each method below.
00424     // 
00425 
00426     // Read methods
00427     void resync(AccessControl::Identity who =NULL) throw (SRPC::failure);
00428 
00429     VestaSource::errorCode
00430       read(void* buffer, /*INOUT*/int* nbytes, Basics::uint64 offset,
00431            AccessControl::Identity who =NULL) throw (SRPC::failure);
00432     VestaSource::errorCode
00433       readWhole(std::ostream &out, AccessControl::Identity who =NULL)
00434       throw (SRPC::failure);
00435 
00436     // Note that the timestamp, executable, or size cache may be out
00437     // of date unless lookup, resync, or the corresponding set method
00438     // was just called.
00439     time_t timestamp() throw(SRPC::failure);
00440     bool executable() throw (SRPC::failure);
00441     Basics::uint64 size() throw (SRPC::failure);
00442 
00443     ShortId shortId() throw (SRPC::failure) { return sidCache; };
00444 
00445     VestaSource::errorCode lookup(Arc arc, VestaSource*& result,
00446                  AccessControl::Identity who =NULL,
00447                  unsigned int indexOffset =0) throw (SRPC::failure);
00448     VestaSource::errorCode lookupIndex(unsigned int index,
00449                  VestaSource*& result,
00450                  char* arcbuf =NULL) throw(SRPC::failure);
00451     VestaSource::errorCode lookupPathname(const char* pathname,
00452                  VestaSource*& result,
00453                  AccessControl::Identity who =NULL,
00454                  char pathnameSep =PathnameSep) throw (SRPC::failure);
00455 
00456     VestaSource::errorCode
00457       getBase(VestaSource*& result, AccessControl::Identity who =NULL)
00458       throw (SRPC::failure);
00459     VestaSource::errorCode
00460       list(unsigned int firstIndex,
00461            VestaSource::listCallback callback, void* closure,
00462            AccessControl::Identity who =NULL,
00463            bool deltaOnly =false, unsigned int indexOffset =0)
00464         /*throw (SRPC::failure or anything thrown by the callback)*/;
00465 
00466     // Write methods
00467     VestaSource::errorCode
00468       write(const void* buffer, /*INOUT*/int* nbytes, Basics::uint64 offset,
00469             AccessControl::Identity who =NULL) throw (SRPC::failure);
00470     VestaSource::errorCode
00471       setExecutable(bool x, AccessControl::Identity who =NULL)
00472         throw (SRPC::failure);
00473     VestaSource::errorCode
00474       setSize(Basics::uint64 s, AccessControl::Identity who =NULL)
00475         throw (SRPC::failure);
00476     VestaSource::errorCode
00477       setTimestamp(time_t ts, AccessControl::Identity who =NULL)
00478         throw (SRPC::failure);
00479     VestaSource::errorCode 
00480       reallyDelete(Arc arc, AccessControl::Identity who =NULL, 
00481                  bool existCheck =true,
00482                  time_t timestamp =0) throw (SRPC::failure);
00483     VestaSource::errorCode
00484       insertFile(Arc arc, ShortId sid, bool master,
00485                  AccessControl::Identity who =NULL,
00486                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00487                  VestaSource** newvs =NULL, time_t timestamp =0,
00488                  FP::Tag* fptag =NULL) 
00489        throw (SRPC::failure);
00490     VestaSource::errorCode
00491       insertMutableFile(Arc arc, ShortId sid, bool master,
00492                  AccessControl::Identity who =NULL,
00493                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00494                  VestaSource** newvs =NULL, time_t timestamp =0)
00495         throw (SRPC::failure);
00496     VestaSource::errorCode
00497       insertImmutableDirectory(Arc arc, VestaSource* dir, bool master,
00498                  AccessControl::Identity who =NULL,
00499                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00500                  VestaSource** newvs =NULL, time_t timestamp =0,
00501                  FP::Tag* fptag =NULL)
00502        throw (SRPC::failure);
00503     VestaSource::errorCode
00504       insertAppendableDirectory(Arc arc, bool master, 
00505                  AccessControl::Identity who =NULL,
00506                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00507                  VestaSource** newvs =NULL, time_t timestamp =0)
00508        throw (SRPC::failure);
00509     VestaSource::errorCode
00510       insertMutableDirectory(Arc arc, VestaSource* dir, bool master, 
00511                  AccessControl::Identity who =NULL,
00512                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00513                  VestaSource** newvs =NULL, time_t timestamp =0)
00514        throw (SRPC::failure);
00515     VestaSource::errorCode
00516       insertGhost(Arc arc, bool master, 
00517                  AccessControl::Identity who =NULL,
00518                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00519                  VestaSource** newvs =NULL, time_t timestamp =0)
00520        throw (SRPC::failure);
00521     VestaSource::errorCode
00522       insertStub(Arc arc, bool master, 
00523                  AccessControl::Identity who =NULL,
00524                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00525                  VestaSource** newvs =NULL, time_t timestamp =0)
00526        throw (SRPC::failure);
00527     VestaSource::errorCode
00528       renameTo(Arc arc, VestaSource* fromDir, Arc fromArc,
00529                  AccessControl::Identity who =NULL,
00530                  VestaSource::dupeCheck chk =VestaSource::dontReplace,
00531                  time_t timestamp =0)
00532         throw (SRPC::failure);
00533     VestaSource::errorCode
00534       makeMutable(VestaSource*& result, ShortId sid =NullShortId,
00535                   Basics::uint64 copyMax = (Basics::uint64) -1,           
00536                   AccessControl::Identity who =NULL)
00537         throw (SRPC::failure);
00538     VestaSource::errorCode
00539       makeFilesImmutable(unsigned int threshold,
00540                          AccessControl::Identity who =NULL)
00541         throw (SRPC::failure);
00542     VestaSource::errorCode
00543       setIndexMaster(unsigned int index, bool state,
00544                      AccessControl::Identity who =NULL) throw (SRPC::failure);
00545     VestaSource::errorCode
00546       setMaster(bool state, AccessControl::Identity who =NULL)
00547         throw (SRPC::failure);
00548     VestaSource::errorCode
00549       cedeMastership(const char* requestid, const char** grantidOut,
00550                      AccessControl::Identity who =NULL) throw (SRPC::failure);
00551 
00552     // Attribute operations
00553     bool inAttribs(const char* name, const char* value) throw (SRPC::failure);
00554     char* getAttrib(const char* name) throw (SRPC::failure);
00555     void getAttrib(const char* name, VestaSource::valueCallback cb, void* cl)
00556       /*throw (SRPC::failure or anything thrown by the callback)*/;
00557     void listAttribs(VestaSource::valueCallback cb, void* cl)
00558       /*throw (SRPC::failure or anything thrown by the callback)*/;
00559     void getAttribHistory(VestaSource::historyCallback cb, void* cl)
00560       /*throw (SRPC::failure or anything thrown by the callback)*/;
00561     VestaSource::errorCode
00562       writeAttrib(VestaSource::attribOp op,
00563                   const char* name, const char* value,
00564                   AccessControl::Identity who =NULL, time_t timestamp =0)
00565         throw(SRPC::failure);
00566 
00567     VestaSource::errorCode
00568       measureDirectory(/*OUT*/VestaSource::directoryStats &result,
00569                        AccessControl::Identity who =NULL)
00570       throw (SRPC::failure);
00571 
00572     VestaSource::errorCode
00573       collapseBase(AccessControl::Identity who =NULL)
00574       throw (SRPC::failure);
00575 
00576     virtual VestaSource *copy() throw();
00577 
00578     friend void VDirSurrogate_init();
00579     friend void VDirSurrogate_init2();
00580 };

Generated on Mon May 8 00:48:49 2006 for Vesta by  doxygen 1.4.2