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.

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