/source/otp_src_R14B02/lib/cosFileTransfer/src/CosFileTransfer.idl

https://github.com/cparedes/omnibus · IDL · 157 lines · 109 code · 44 blank · 4 comment · 0 complexity · 913b9081bf50f8b71449e3115511ca43 MD5 · raw file

  1. //File: CosFileTransfer.idl
  2. #ifndef _COS_FILE_TRANSFER_IDL_
  3. #define _COS_FILE_TRANSFER_IDL_
  4. #include <CosProperty.idl>
  5. #pragma prefix "omg.org"
  6. module CosFileTransfer {
  7. typedef string Istring;
  8. typedef Istring ProtocolAddress;
  9. typedef long ContentType;
  10. const ContentType FTAM_1 = 1;
  11. const ContentType FTAM_2 = 2;
  12. const ContentType FTAM_3 = 3;
  13. const ContentType FTAM_4 = 4;
  14. const ContentType FTAM_5 = 5;
  15. const ContentType NBS_9 = 6;
  16. const ContentType INTAP_1 = 7;
  17. exception CommandNotImplementedException { Istring reason; };
  18. exception SessionException { Istring reason; };
  19. exception TransferException { Istring reason; };
  20. exception FileNotFoundException { Istring reason; };
  21. exception RequestFailureException { Istring reason; };
  22. exception IllegalOperationException { Istring reason; };
  23. interface VirtualFileSystem;
  24. struct AccessLevel {
  25. boolean read;
  26. boolean insert;
  27. boolean replace;
  28. boolean extend;
  29. boolean erase;
  30. boolean read_attr;
  31. boolean change_attr;
  32. boolean delete;
  33. };
  34. typedef sequence<ProtocolAddress> ProtocolAddressList;
  35. struct ProtocolSupport {
  36. Istring protocol_name;
  37. ProtocolAddressList addresses;
  38. };
  39. typedef sequence<ProtocolSupport> SupportedProtocolAddresses;
  40. interface Directory;
  41. interface FileTransferSession;
  42. typedef Istring FileName;
  43. typedef sequence<FileName> FileNameList;
  44. interface File:CosPropertyService::PropertySetDef {
  45. readonly attribute FileName name;
  46. readonly attribute FileNameList complete_file_name;
  47. readonly attribute Directory parent;
  48. readonly attribute FileTransferSession associated_session;
  49. };
  50. enum FileType {nfile, ndirectory};
  51. struct FileWrapper {
  52. File the_file;
  53. FileType file_type;
  54. };
  55. typedef sequence<FileWrapper> FileList;
  56. interface FileIterator;
  57. interface Directory : File {
  58. void list(in unsigned long how_many, out FileList fl, out FileIterator fi);
  59. };
  60. interface FileIterator {
  61. boolean next_one(out FileWrapper f);
  62. boolean next_n(in unsigned long how_many, out FileList fl);
  63. void destroy();
  64. };
  65. interface FileTransferSession {
  66. readonly attribute SupportedProtocolAddresses protocols_supported;
  67. void set_directory(in Directory new_directory)
  68. raises(SessionException, FileNotFoundException, RequestFailureException,
  69. IllegalOperationException);
  70. File create_file(in FileNameList name)
  71. raises(SessionException, FileNotFoundException, RequestFailureException,
  72. IllegalOperationException);
  73. Directory create_directory(in FileNameList name)
  74. raises(SessionException, FileNotFoundException, RequestFailureException,
  75. IllegalOperationException);
  76. FileWrapper get_file(in FileNameList complete_file_name)
  77. raises(SessionException, FileNotFoundException, RequestFailureException,
  78. IllegalOperationException);
  79. void delete(in File file)
  80. raises(SessionException, FileNotFoundException, RequestFailureException,
  81. IllegalOperationException);
  82. void transfer(in File src, in File dest)
  83. raises(SessionException, TransferException, FileNotFoundException,
  84. RequestFailureException, IllegalOperationException);
  85. void append(in File src, in File dest)
  86. raises(CommandNotImplementedException, SessionException, TransferException,
  87. FileNotFoundException, RequestFailureException,
  88. IllegalOperationException);
  89. void insert(in File src, in File dest, in long offset)
  90. raises(CommandNotImplementedException, SessionException, TransferException,
  91. FileNotFoundException, RequestFailureException,
  92. IllegalOperationException);
  93. void logout();
  94. // WARNING!!!
  95. // Theses are Orber specific operations and may only be used internally!!
  96. // Maybe removed, altered and changed in any way without warning!!
  97. Directory oe_orber_create_directory_current()
  98. raises(SessionException, FileNotFoundException, IllegalOperationException);
  99. FileList oe_orber_get_content(in FileNameList complete_file_name,
  100. in Directory parent);
  101. long oe_orber_count_children(in FileNameList complete_file_name);
  102. };
  103. interface VirtualFileSystem {
  104. enum NativeFileSystemType { FTAM, FTP, NATIVE };
  105. readonly attribute NativeFileSystemType file_system_type;
  106. typedef sequence<ContentType> ContentList;
  107. readonly attribute ContentList supported_content_types;
  108. FileTransferSession login(in Istring username, in Istring password,
  109. in Istring account, out Directory root)
  110. raises(SessionException, FileNotFoundException, IllegalOperationException);
  111. };
  112. };
  113. #endif //_COS_FILE_TRANSFER_IDL_