Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
5.9 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1996 - 1999
  6. //
  7. // File: datatran.idl
  8. //
  9. //--------------------------------------------------------------------------
  10. [
  11. uuid(67c43840-74be-11cf-b64d-00aa0044fb89),
  12. version(1.0)
  13. ]
  14. interface DataTranPerf
  15. {
  16. //
  17. // Context Handles
  18. //
  19. typedef [context_handle] void * DT_FILE_HANDLE;
  20. typedef [context_handle] void * DT_MEM_HANDLE;
  21. //
  22. // Test cases.
  23. //
  24. [v1_enum]
  25. typedef enum {
  26. SEND_BUFFER_RPC,
  27. RECV_BUFFER_RPC,
  28. SEND_BUFFER_PIPES,
  29. RECV_BUFFER_PIPES,
  30. SEND_BUFFER_FTP1,
  31. RECV_BUFFER_FTP1,
  32. SEND_BUFFER_HTTP,
  33. RECV_BUFFER_HTTP,
  34. SEND_FILE_RPC,
  35. RECV_FILE_RPC,
  36. SEND_FILE_PIPES,
  37. RECV_FILE_PIPES,
  38. SEND_FILE_FTP,
  39. RECV_FILE_FTP,
  40. SEND_FILE_FTP1,
  41. RECV_FILE_FTP1,
  42. SEND_FILE_HTTP,
  43. RECV_FILE_HTTP
  44. } TEST_TYPE;
  45. const unsigned long TEST_MAX = 18;
  46. //
  47. // Client test case control functions follow
  48. //
  49. const unsigned long PERF_TOO_MANY_CLIENTS = 20001;
  50. const unsigned long PERF_TESTS_DONE = 20002;
  51. // non-blocking
  52. error_status_t BeginTest( [in] handle_t Binding,
  53. [out] long *ClientId
  54. );
  55. // blocking
  56. error_status_t NextTest( [in] handle_t Binding,
  57. [out] TEST_TYPE *Test,
  58. [out] long *Iterations,
  59. [out] long *Length,
  60. [out] long *ChunkSize
  61. );
  62. // blocking
  63. error_status_t EndTest( [in] handle_t Binding,
  64. [in] unsigned long mseconds
  65. );
  66. //
  67. // Remote memory stuff
  68. //
  69. DT_MEM_HANDLE RemoteAllocate( [in] handle_t Binding,
  70. [in] unsigned long Length);
  71. void RemoteFree ([in] DT_MEM_HANDLE *MemHandle);
  72. //
  73. // Opens temporary file on server w/ optional length
  74. // Set Length to zero to just open the file.
  75. //
  76. DT_FILE_HANDLE RemoteOpen([in] handle_t Binding,
  77. [in] unsigned long int ulLength);
  78. //
  79. // Opens a temporary file in the FTP directory
  80. //
  81. DT_FILE_HANDLE RemoteCreateFtpFile ([in] handle_t Binding,
  82. [in] boolean f_StoC,
  83. [in] unsigned long int ulLength,
  84. [in] unsigned long int ulBufferSize,
  85. [string,
  86. out,
  87. size_is(ulBufferSize)] byte szRemotePath[]
  88. );
  89. //
  90. // Opens a temporary file in the WWW directory
  91. //
  92. DT_FILE_HANDLE RemoteCreateHttpFile ([in] handle_t Binding,
  93. [in] boolean f_StoC,
  94. [in] unsigned long int ulLength,
  95. [in] unsigned long int ulBufferSize,
  96. [string,
  97. out,
  98. size_is(ulBufferSize)] byte szRemotePath[]
  99. );
  100. //
  101. // Closes a file on the server and optionally delete it
  102. //
  103. void RemoteClose([in,out] DT_FILE_HANDLE *ppContext,
  104. [in] boolean fDelete);
  105. //
  106. // Resets the FilePointer of specified file to zero
  107. //
  108. void RemoteResetFile([in] DT_FILE_HANDLE pContext);
  109. //
  110. // Gets the server's machine name
  111. //
  112. void GetServerName ([in] handle_t Binding,
  113. [in] unsigned long int BufferSize,
  114. [out, size_is(BufferSize)] byte Buffer[]);
  115. //
  116. // Test APIs
  117. //
  118. //===================================================================
  119. // RPC only
  120. //===================================================================
  121. void C_to_S_Buffer ([in] handle_t Binding,
  122. [in] unsigned long int BufferSize,
  123. [in, size_is(BufferSize)] byte Buffer[]);
  124. void S_to_C_Buffer ([in] handle_t Binding,
  125. [in] unsigned long int BufferSize,
  126. [out, size_is(BufferSize)] byte Buffer[]);
  127. long S_to_C_BufferWithFile ([in] handle_t Binding,
  128. [in] DT_FILE_HANDLE phContext,
  129. [in] unsigned long int BufferSize,
  130. [out, size_is(BufferSize)] byte Buffer[]);
  131. void C_to_S_BufferWithFile ([in] handle_t Binding,
  132. [in] DT_FILE_HANDLE phContext,
  133. [in] unsigned long int BufferSize,
  134. [in, size_is(BufferSize)] byte Buffer[]);
  135. //===================================================================
  136. // RPC pipes
  137. //===================================================================
  138. typedef pipe unsigned char UCHAR_PIPE;
  139. void S_to_C_Pipe ([in] handle_t Binding,
  140. [out] UCHAR_PIPE data,
  141. [in] unsigned long Length,
  142. [in] DT_MEM_HANDLE MemHandle);
  143. void C_to_S_Pipe ([in] handle_t Binding,
  144. [in] UCHAR_PIPE data,
  145. [in] DT_MEM_HANDLE MemHandle);
  146. void S_to_C_PipeWithFile ([in] handle_t Binding,
  147. [out] UCHAR_PIPE data,
  148. [in] DT_FILE_HANDLE FileHandle,
  149. [in] DT_MEM_HANDLE MemHandle);
  150. void C_to_S_PipeWithFile ([in] handle_t Binding,
  151. [in] UCHAR_PIPE data,
  152. [in] DT_FILE_HANDLE FileHandle,
  153. [in] DT_MEM_HANDLE MemHandle);
  154. //
  155. // Used for fixed binding test.
  156. //
  157. [string] char * GetFixedEp(handle_t Binding);
  158. }