referencedfilelist.hpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*##############################################################################
  2. Copyright (C) 2012 HPCC Systems.
  3. All rights reserved. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU Affero General Public License as
  5. published by the Free Software Foundation, either version 3 of the
  6. License, or (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Affero General Public License for more details.
  11. You should have received a copy of the GNU Affero General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. ############################################################################## */
  14. #ifndef REFFILE_LIST_HPP
  15. #define REFFILE_LIST_HPP
  16. #include "jlib.hpp"
  17. #include "workunit.hpp"
  18. #include "dadfs.hpp"
  19. #include "dfuutil.hpp"
  20. #define RefFileNone 0x000
  21. #define RefFileIndex 0x001
  22. #define RefFileNotOnCluster 0x002
  23. #define RefFileNotFound 0x004
  24. #define RefFileRemote 0x008
  25. #define RefFileForeign 0x010
  26. #define RefFileSuper 0x020
  27. #define RefSubFile 0x040
  28. #define RefFileCopyInfoFailed 0x080
  29. interface IReferencedFile : extends IInterface
  30. {
  31. virtual const char *getLogicalName() const =0;
  32. virtual unsigned getFlags() const =0;
  33. virtual const SocketEndpoint &getForeignIP() const =0;
  34. };
  35. interface IReferencedFileIterator : extends IIteratorOf<IReferencedFile> { };
  36. interface IReferencedFileList : extends IInterface
  37. {
  38. virtual void addFilesFromWorkUnit(IConstWorkUnit *cw)=0;
  39. virtual void addFile(const char *ln)=0;
  40. virtual void addFiles(StringArray &files)=0;
  41. virtual IReferencedFileIterator *getFiles()=0;
  42. virtual void resolveFiles(const char *process, const char *remoteIP, bool checkLocalFirst, bool addSubFiles)=0;
  43. virtual void cloneAllInfo(bool overwrite, bool cloneSuperInfo)=0;
  44. virtual void cloneFileInfo(bool overwrite, bool cloneSuperInfo)=0;
  45. virtual void cloneRelationships()=0;
  46. };
  47. IReferencedFileList *createReferencedFileList(const char *user, const char *pw);
  48. #endif //REFFILE_LIST_HPP