ws_fileio.ecm 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #include "xslprocessor.hpp"
  14. ESPrequest CreateFileRequest
  15. {
  16. string DestDropZone; //name or IP address;
  17. string DestRelativePath; //file name and/or path; related to the predefined directory of the dropzone
  18. bool Overwrite(false);
  19. };
  20. ESPresponse [nil_remove, exceptions_inline]
  21. CreateFileResponse
  22. {
  23. string DestDropZone; //echo back from request
  24. string DestRelativePath; //echo back from request
  25. bool Overwrite; //echo back from request
  26. string Result;
  27. };
  28. ESPrequest WriteFileDataRequest
  29. {
  30. binary Data;
  31. string DestDropZone; //name or IP address;
  32. string DestRelativePath; //file name and/or path;
  33. int64 Offset(0);
  34. bool Append(false);
  35. };
  36. ESPresponse [nil_remove, exceptions_inline]
  37. WriteFileDataResponse
  38. {
  39. string DestDropZone; //echo back from request
  40. string DestRelativePath; //echo back from request
  41. int64 Offset; //echo back from request
  42. bool Append; //echo back from request
  43. string Result;
  44. };
  45. ESPrequest ReadFileDataRequest
  46. {
  47. string DestDropZone; //name or IP address;
  48. string DestRelativePath; //file name and/or path;
  49. int64 Offset(0);
  50. int64 DataSize;
  51. };
  52. ESPresponse [nil_remove, exceptions_inline]
  53. ReadFileDataResponse
  54. {
  55. binary Data;
  56. string DestDropZone; //echo back from request
  57. string DestRelativePath; //echo back from request
  58. int64 Offset; //echo back from request
  59. int64 DataSize; //echo back from request
  60. string Result;
  61. };
  62. ESPservice [auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsFileIO
  63. {
  64. //ESPuses ESPstruct DFUException;
  65. ESPmethod CreateFile(CreateFileRequest, CreateFileResponse);
  66. ESPmethod WriteFileData(WriteFileDataRequest, WriteFileDataResponse);
  67. ESPmethod ReadFileData(ReadFileDataRequest, ReadFileDataResponse);
  68. };
  69. SCMexportdef(WsFileIO);
  70. SCMapi(WsFileIO) IClientWsFileIO *createWsFileIOClient();