hadoopwinutilsvc.idl 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. import "oaidl.idl";
  19. import "ocidl.idl";
  20. [
  21. uuid(0492311C-1718-4F53-A6EB-86AD7039988D),
  22. version(1.0),
  23. pointer_default(unique),
  24. //implicit_handle(handle_t hHadoopWinutilsSvcBinding),
  25. endpoint("ncalrpc:[hadoopwinutilsvc]"),
  26. #ifndef __midl
  27. explicit_handle
  28. #endif
  29. ]
  30. interface HadoopWinutilSvc
  31. {
  32. typedef struct {
  33. [string] const wchar_t* cwd;
  34. [string] const wchar_t* jobName;
  35. [string] const wchar_t* user;
  36. [string] const wchar_t* pidFile;
  37. [string] const wchar_t* cmdLine;
  38. } CREATE_PROCESS_REQUEST;
  39. typedef struct {
  40. LONG_PTR hProcess;
  41. LONG_PTR hThread;
  42. LONG_PTR hStdIn;
  43. LONG_PTR hStdOut;
  44. LONG_PTR hStdErr;
  45. } CREATE_PROCESS_RESPONSE;
  46. typedef struct {
  47. [string] const wchar_t* filePath;
  48. [string] const wchar_t* ownerName;
  49. [string] const wchar_t* groupName;
  50. } CHOWN_REQUEST;
  51. typedef struct {
  52. [string] const wchar_t* filePath;
  53. int mode;
  54. } CHMOD_REQUEST;
  55. typedef struct {
  56. [string] const wchar_t* filePath;
  57. } MKDIR_REQUEST;
  58. typedef enum { MOVE_FILE = 1, COPY_FILE = 2} MOVE_COPY_OPERATION;
  59. typedef struct {
  60. MOVE_COPY_OPERATION operation;
  61. [string] const wchar_t* sourcePath;
  62. [string] const wchar_t* destinationPath;
  63. boolean replaceExisting;
  64. } MOVEFILE_REQUEST;
  65. typedef struct {
  66. [string] const wchar_t* path;
  67. int desiredAccess;
  68. int shareMode;
  69. int creationDisposition;
  70. int flags;
  71. } CREATEFILE_REQUEST;
  72. typedef struct {
  73. LONG_PTR hFile;
  74. } CREATEFILE_RESPONSE;
  75. typedef enum {PATH_IS_DIR = 1, PATH_IS_FILE = 2} DELETEPATH_TYPE;
  76. typedef struct {
  77. DELETEPATH_TYPE type;
  78. [string] const wchar_t* path;
  79. } DELETEPATH_REQUEST;
  80. typedef struct {
  81. boolean deleted;
  82. } DELETEPATH_RESPONSE;
  83. typedef struct {
  84. [string] const wchar_t* taskName;
  85. } KILLTASK_REQUEST;
  86. error_status_t WinutilsKillTask(
  87. [in] KILLTASK_REQUEST *request);
  88. error_status_t WinutilsMkDir(
  89. [in] MKDIR_REQUEST *request);
  90. error_status_t WinutilsMoveFile(
  91. [in] MOVEFILE_REQUEST *request);
  92. error_status_t WinutilsChown(
  93. [in] CHOWN_REQUEST *request);
  94. error_status_t WinutilsChmod(
  95. [in] CHMOD_REQUEST *request);
  96. error_status_t WinutilsCreateFile(
  97. [in] int nmPid,
  98. [in] CREATEFILE_REQUEST *request,
  99. [out] CREATEFILE_RESPONSE **response);
  100. error_status_t WinutilsDeletePath(
  101. [in] DELETEPATH_REQUEST *request,
  102. [out] DELETEPATH_RESPONSE **response);
  103. error_status_t WinutilsCreateProcessAsUser(
  104. [in] int nmPid,
  105. [in] CREATE_PROCESS_REQUEST *request,
  106. [out] CREATE_PROCESS_RESPONSE **response);
  107. }