Leaked source code of windows server 2003
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.

558 lines
12 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. nntp.idl
  5. Abstract:
  6. Contains the Nntp RPC interface specification for the NNTP server.
  7. This includes API from the following catagories:
  8. Also contains the RPC specific data structures for these API.
  9. Author:
  10. Johnson Apacible (johnsona) 13-Oct-1995
  11. Based on srvsvc.idl code from DanL and JohnsonA
  12. Environment:
  13. User Mode - Win32 - MIDL
  14. Revision History:
  15. --*/
  16. //
  17. // Interface Attributes
  18. //
  19. [
  20. uuid(4f82f460-0e21-11cf-909e-00805f48a135),
  21. version(4.0),
  22. #ifdef __midl
  23. ms_union,
  24. #endif // __midl
  25. pointer_default(unique)
  26. ]
  27. interface nntp
  28. {
  29. import "import.idl";
  30. #include <lmcons.h>
  31. //
  32. // BUGBUG - take this definition out when midl understands LPWSTR etc
  33. //
  34. typedef [handle] LPWSTR NNTP_HANDLE;
  35. typedef [handle] LPWSTR NNTP_IMPERSONATE_HANDLE;
  36. //
  37. // Structures - Nntp
  38. //
  39. NET_API_STATUS
  40. NntprQueryStatistics(
  41. [in,string,unique] NNTP_HANDLE ServerName,
  42. [in] DWORD Level,
  43. [out] LPNNTP_STATISTICS_BLOCK_ARRAY *StatInfo
  44. );
  45. NET_API_STATUS
  46. NntprClearStatistics(
  47. [in,string,unique] NNTP_HANDLE ServerName,
  48. [in] DWORD InstanceId
  49. );
  50. //
  51. // Feed information
  52. //
  53. typedef struct _I_FEED_INFO {
  54. [string] LPWSTR ServerName;
  55. FEED_TYPE FeedType;
  56. FILETIME PullRequestTime;
  57. FILETIME StartTime;
  58. FILETIME NextActiveTimeHigh;
  59. DWORD FeedInterval;
  60. DWORD FeedId;
  61. BOOL AutoCreate;
  62. BOOL Enabled ;
  63. DWORD cbNewsgroups;
  64. [size_is(cbNewsgroups)] PUCHAR Newsgroups;
  65. DWORD cbDistribution;
  66. [size_is(cbDistribution)] PUCHAR Distribution;
  67. DWORD cbUucpName ;
  68. [size_is(cbUucpName),unique] PUCHAR UucpName ;
  69. DWORD cbFeedTempDirectory ;
  70. [size_is(cbFeedTempDirectory),unique] PUCHAR FeedTempDirectory ;
  71. DWORD MaxConnectAttempts ;
  72. DWORD ConcurrentSessions ;
  73. //
  74. // Feed security settings - for outgoing feeds only !
  75. //
  76. DWORD SessionSecurityType ;
  77. DWORD AuthenticationSecurityType ;
  78. DWORD cbAccountName ;
  79. [size_is(cbAccountName),unique] PUCHAR NntpAccountName ;
  80. DWORD cbPassword ;
  81. [size_is(cbPassword),unique] PUCHAR NntpPassword ;
  82. BOOL fAllowControlMessages;
  83. DWORD OutgoingPort;
  84. DWORD FeedPairId;
  85. } I_FEED_INFO, *LPI_FEED_INFO;
  86. typedef struct _NNTP_FEED_ENUM_STRUCT {
  87. DWORD EntriesRead;
  88. [size_is(EntriesRead)] LPI_FEED_INFO Buffer;
  89. } NNTP_FEED_ENUM_STRUCT, *LPNNTP_FEED_ENUM_STRUCT;
  90. //
  91. // Feed APIs
  92. //
  93. NET_API_STATUS
  94. NET_API_FUNCTION
  95. NntprEnumerateFeeds(
  96. [in,string,unique] NNTP_HANDLE ServerName,
  97. [in] DWORD InstanceId,
  98. [out] LPNNTP_FEED_ENUM_STRUCT Buffer
  99. );
  100. NET_API_STATUS
  101. NET_API_FUNCTION
  102. NntprGetFeedInformation(
  103. [in,string,unique] NNTP_HANDLE ServerName,
  104. [in] DWORD InstanceId,
  105. [in] DWORD FileId,
  106. [out] LPI_FEED_INFO *Buffer
  107. );
  108. NET_API_STATUS
  109. NET_API_FUNCTION
  110. NntprSetFeedInformation(
  111. [in,string,unique] NNTP_HANDLE ServerName,
  112. [in] DWORD InstanceId,
  113. [in] LPI_FEED_INFO FeedInfo,
  114. [in,out,unique] LPDWORD ParmErr
  115. );
  116. NET_API_STATUS
  117. NET_API_FUNCTION
  118. NntprAddFeed(
  119. [in,string,unique] NNTP_HANDLE ServerName,
  120. [in] DWORD InstanceId,
  121. [in] LPI_FEED_INFO FeedInfo,
  122. [in,out,unique] LPDWORD ParmErr,
  123. [out] LPDWORD pdwFeedId
  124. );
  125. NET_API_STATUS
  126. NET_API_FUNCTION
  127. NntprDeleteFeed(
  128. [in,string,unique] NNTP_HANDLE ServerName,
  129. [in] DWORD InstanceId,
  130. [in] DWORD FeedId
  131. );
  132. NET_API_STATUS
  133. NET_API_FUNCTION
  134. NntprEnableFeed(
  135. [in,string,unique] NNTP_HANDLE ServerName,
  136. [in] DWORD InstanceId,
  137. [in] DWORD FeedId,
  138. [in] BOOL Enable,
  139. [in] BOOL Refill,
  140. [in] FILETIME RefillTime
  141. ) ;
  142. typedef struct _NNTP_SESS_ENUM_STRUCT {
  143. DWORD EntriesRead;
  144. [size_is(EntriesRead)] LPNNTP_SESSION_INFO Buffer;
  145. } NNTP_SESS_ENUM_STRUCT, *LPNNTP_SESS_ENUM_STRUCT;
  146. //
  147. // Session APIs
  148. //
  149. NET_API_STATUS
  150. NET_API_FUNCTION
  151. NntprEnumerateSessions(
  152. [in,string,unique] NNTP_HANDLE ServerName,
  153. [in] DWORD InstanceId,
  154. [out] LPNNTP_SESS_ENUM_STRUCT Buffer
  155. );
  156. NET_API_STATUS
  157. NET_API_FUNCTION
  158. NntprTerminateSession(
  159. [in,string,unique] NNTP_HANDLE ServerName,
  160. [in] DWORD InstanceId,
  161. [in,string,unique] LPSTR UserName,
  162. [in,string,unique] LPSTR IPAddress
  163. );
  164. //
  165. // Expiration structures and APIs
  166. //
  167. typedef struct _I_EXPIRE_INFO {
  168. //
  169. // Expiration policies are numbered
  170. //
  171. DWORD ExpireId ;
  172. //
  173. // Units of Megabytes
  174. //
  175. DWORD ExpireSizeHorizon ;
  176. //
  177. // In retail builds - units of hours, debug builds - units of ??
  178. //
  179. DWORD ExpireTime ;
  180. DWORD cbNewsgroups ;
  181. [size_is(cbNewsgroups)] PUCHAR Newsgroups;
  182. //
  183. // Expire policy name
  184. //
  185. [string] LPWSTR ExpirePolicy;
  186. } I_EXPIRE_INFO, *LPI_EXPIRE_INFO ;
  187. typedef struct _NNTP_EXPIRE_ENUM_STRUCT {
  188. DWORD EntriesRead;
  189. [size_is(EntriesRead)] LPI_EXPIRE_INFO Buffer;
  190. } NNTP_EXPIRE_ENUM_STRUCT, *LPNNTP_EXPIRE_ENUM_STRUCT ;
  191. NET_API_STATUS
  192. NET_API_FUNCTION
  193. NntprEnumerateExpires(
  194. [in,string,unique] NNTP_HANDLE ServerName,
  195. [in] DWORD InstanceId,
  196. [out] LPNNTP_EXPIRE_ENUM_STRUCT Buffer
  197. ) ;
  198. NET_API_STATUS
  199. NET_API_FUNCTION
  200. NntprAddExpire(
  201. [in,string,unique] NNTP_HANDLE ServerName,
  202. [in] DWORD InstanceId,
  203. [in] LPI_EXPIRE_INFO ExpireInfo,
  204. [in,out,unique] LPDWORD ParmErr,
  205. [out] LPDWORD pdwExpireId
  206. ) ;
  207. NET_API_STATUS
  208. NET_API_FUNCTION
  209. NntprDeleteExpire(
  210. [in,string,unique] NNTP_HANDLE ServerName,
  211. [in] DWORD InstanceId,
  212. [in] DWORD ExpireId
  213. ) ;
  214. //
  215. // For some reason this approach generates bad stubs - try another !
  216. //
  217. //NET_API_STATUS
  218. //NET_API_FUNCTION
  219. //NntprGetExpireInformation(
  220. // [in,string,unique] NNTP_HANDLE ServerName,
  221. // [in] DWORD ExpireId,
  222. // [out] LPI_EXPIRE_INFO *Buffer
  223. // ) ;
  224. NET_API_STATUS
  225. NET_API_FUNCTION
  226. NntprGetExpireInformation(
  227. [in,string,unique] NNTP_HANDLE ServerName,
  228. [in] DWORD InstanceId,
  229. [in] DWORD ExpireId,
  230. [out] LPNNTP_EXPIRE_ENUM_STRUCT Buffer
  231. ) ;
  232. NET_API_STATUS
  233. NET_API_FUNCTION
  234. NntprSetExpireInformation(
  235. [in,string,unique] NNTP_HANDLE ServerName,
  236. [in] DWORD InstanceId,
  237. [in] LPI_EXPIRE_INFO ExpireInfo,
  238. [in,out,unique] LPDWORD ParmErr
  239. ) ;
  240. typedef struct _I_NEWSGROUP_INFO {
  241. //
  242. // Name of the newsgroup - must always be provided
  243. //
  244. DWORD cbNewsgroup ;
  245. [size_is(cbNewsgroup)] PUCHAR Newsgroup ;
  246. DWORD cbDescription ;
  247. [size_is(cbDescription),unique] PUCHAR Description ;
  248. DWORD cbModerator ;
  249. [size_is(cbModerator),unique] PUCHAR Moderator ;
  250. BOOL fIsModerated ;
  251. BOOL ReadOnly ;
  252. DWORD cbPrettyname ;
  253. [size_is(cbPrettyname),unique] PUCHAR Prettyname ;
  254. FILETIME ftCreationDate;
  255. } I_NEWSGROUP_INFO, *LPI_NEWSGROUP_INFO ;
  256. NET_API_STATUS
  257. NET_API_FUNCTION
  258. NntprGetNewsgroup(
  259. [in,string,unique] NNTP_HANDLE ServerName,
  260. [in] DWORD InstanceId,
  261. [in,out] LPI_NEWSGROUP_INFO *NewsgroupInfo
  262. ) ;
  263. NET_API_STATUS
  264. NET_API_FUNCTION
  265. NntprSetNewsgroup(
  266. [in,string,unique] NNTP_HANDLE ServerName,
  267. [in] DWORD InstanceId,
  268. [in] LPI_NEWSGROUP_INFO NewsgroupInfo
  269. ) ;
  270. NET_API_STATUS
  271. NET_API_FUNCTION
  272. NntprCreateNewsgroup(
  273. [in,string,unique] NNTP_HANDLE ServerName,
  274. [in] DWORD InstanceId,
  275. [in] LPI_NEWSGROUP_INFO NewsgroupInfo
  276. ) ;
  277. NET_API_STATUS
  278. NET_API_FUNCTION
  279. NntprDeleteNewsgroup(
  280. [in,string,unique] NNTP_HANDLE ServerName,
  281. [in] DWORD InstanceId,
  282. [in] LPI_NEWSGROUP_INFO NewsgroupInfo
  283. ) ;
  284. //
  285. // Find APIs
  286. //
  287. NET_API_STATUS
  288. NntprFindNewsgroup(
  289. [in,string,unique] NNTP_HANDLE ServerName,
  290. [in] DWORD InstanceId,
  291. [in,string,unique] NNTP_HANDLE NewsgroupPrefix,
  292. [in] DWORD MaxResults,
  293. [out] LPDWORD pdwResultsFound,
  294. [out] LPNNTP_FIND_LIST *ppFindList
  295. );
  296. //
  297. // Admin APIs
  298. //
  299. typedef struct _I_NNTP_CONFIG_INFO {
  300. DWORD FieldControl;
  301. BOOL AllowClientPosting ;
  302. BOOL AllowFeedPosting ;
  303. [string] LPSTR Organization ;
  304. DWORD ServerPostHardLimit ;
  305. DWORD ServerPostSoftLimit ;
  306. DWORD ServerFeedHardLimit ;
  307. DWORD ServerFeedSoftLimit ;
  308. DWORD dwEncCaps;
  309. [string] LPWSTR SmtpServerAddress;
  310. [string] LPWSTR UucpServerName;
  311. BOOL AllowControlMessages;
  312. [string] LPWSTR DefaultModerator;
  313. } I_NNTP_CONFIG_INFO, *LPI_NNTP_CONFIG_INFO ;
  314. NET_API_STATUS
  315. NET_API_FUNCTION
  316. NntprGetAdminInformation(
  317. [in,string,unique] NNTP_HANDLE ServerName,
  318. [in] DWORD InstanceId,
  319. [out] LPI_NNTP_CONFIG_INFO* ConfigInfo
  320. );
  321. NET_API_STATUS
  322. NET_API_FUNCTION
  323. NntprSetAdminInformation(
  324. [in,string,unique] NNTP_HANDLE ServerName,
  325. [in] DWORD InstanceId,
  326. [in] LPI_NNTP_CONFIG_INFO ConfigInfo,
  327. [in,out,unique] LPDWORD ParmErr
  328. );
  329. //
  330. // Nntpbld structs and RPCs
  331. //
  332. typedef struct _I_NNTPBLD_INFO {
  333. //
  334. // Verbosity of reporting
  335. //
  336. BOOL Verbose ;
  337. //
  338. // Specify whether to blow away all old data structures
  339. //
  340. BOOL DoClean ;
  341. //
  342. // If TRUE then don't delete the history file regardless of other settings.
  343. //
  344. BOOL NoHistoryDelete ;
  345. //
  346. // 0x00000000 for thorough ie delete all index files
  347. // 0x00000001 for standard ie reuse all index files
  348. // 0x00000010 for medium ie validate index files
  349. //
  350. DWORD ReuseIndexFiles ;
  351. //
  352. // If TRUE, omit non-leaf dirs
  353. //
  354. BOOL OmitNonleafDirs ;
  355. //
  356. // Name of a file containing either an INN style 'Active' file or
  357. // a tool generated newsgroup list file. Either way, we will suck
  358. // newsgroups out of this file and use them to build a news tree.
  359. //
  360. DWORD cbGroupFile ;
  361. [string] LPWSTR szGroupFile ;
  362. //
  363. // Name of report file
  364. //
  365. DWORD cbReportFile ;
  366. [string] LPWSTR szReportFile ;
  367. //
  368. // If TRUE then szGroupFile specifies an INN style Active file,
  369. // otherwise it specifies a tool generated human edit newsgroup list.
  370. //
  371. BOOL IsActiveFile ;
  372. //
  373. // Number of rebuild threads
  374. //
  375. DWORD NumThreads ;
  376. } I_NNTPBLD_INFO, *LPI_NNTPBLD_INFO ;
  377. //
  378. // Nntpbld RPCs
  379. //
  380. //
  381. NET_API_STATUS
  382. NET_API_FUNCTION
  383. NntprStartRebuild(
  384. [in,string,unique] NNTP_HANDLE ServerName,
  385. [in] DWORD InstanceId,
  386. [in] LPI_NNTPBLD_INFO pBuildInfo,
  387. [in,out,unique] LPDWORD ParmErr
  388. );
  389. NET_API_STATUS
  390. NET_API_FUNCTION
  391. NntprGetBuildStatus(
  392. [in,string,unique] NNTP_HANDLE ServerName,
  393. [in] DWORD InstanceId,
  394. [in] BOOL fCancel,
  395. [out] LPDWORD pdwProgress
  396. );
  397. #if 0
  398. //
  399. // Directory Drop APIs
  400. //
  401. NET_API_STATUS
  402. NET_API_FUNCTION
  403. NntprAddDropNewsgroup(
  404. [in,string,unique] NNTP_HANDLE ServerName,
  405. [in] DWORD InstanceId,
  406. [in,string] LPCSTR szNewsgroup);
  407. NET_API_STATUS
  408. NET_API_FUNCTION
  409. NntprRemoveDropNewsgroup(
  410. [in,string,unique] NNTP_HANDLE ServerName,
  411. [in] DWORD InstanceId,
  412. [in,string] LPCSTR szNewsgroup);
  413. #endif
  414. //
  415. // CancelMessage API
  416. //
  417. NET_API_STATUS
  418. NET_API_FUNCTION
  419. NntprCancelMessageID(
  420. [in,string,unique] NNTP_HANDLE ServerName,
  421. [in] DWORD InstanceId,
  422. [in,string] LPCSTR szMessageID);
  423. //
  424. // VRoot status API
  425. NET_API_STATUS
  426. NET_API_FUNCTION
  427. NntprGetVRootWin32Error(
  428. [in,string,unique] NNTP_HANDLE ServerName,
  429. [in] DWORD InstanceId,
  430. [in,string] LPWSTR wszVRootPath,
  431. [out] DWORD* pdwWin32Error );
  432. }