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.

952 lines
23 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. Nntpapi.h
  5. Abstract:
  6. This file contains information about the MSN Replication Service Admin
  7. APIs.
  8. Author:
  9. Johnson Apacible (johnsona) 10-Sept-1995
  10. --*/
  11. #ifndef _NNTPAPI_
  12. #define _NNTPAPI_
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. #include <inetcom.h>
  17. #ifndef NET_API_FUNCTION
  18. #define NET_API_FUNCTION _stdcall
  19. #endif
  20. #pragma warning( disable:4200 ) // nonstandard ext. - zero sized array
  21. // (MIDL requires zero entries)
  22. //
  23. // 0 - Perfmon stats
  24. //
  25. typedef struct _NNTP_STATISTICS_0 {
  26. //
  27. // total bytes sent/received, including protocol msgs
  28. //
  29. LARGE_INTEGER TotalBytesSent;
  30. LARGE_INTEGER TotalBytesReceived;
  31. //
  32. // incoming connections (includes all connections including hubs)
  33. //
  34. DWORD TotalConnections; // total connects from Nntp clients
  35. DWORD TotalSSLConnections;
  36. DWORD CurrentConnections; // current number
  37. DWORD MaxConnections; // max simultaneous
  38. DWORD CurrentAnonymousUsers;
  39. DWORD CurrentNonAnonymousUsers;
  40. DWORD TotalAnonymousUsers;
  41. DWORD TotalNonAnonymousUsers;
  42. DWORD MaxAnonymousUsers;
  43. DWORD MaxNonAnonymousUsers;
  44. //
  45. // outgoing connections
  46. //
  47. DWORD TotalOutboundConnects; // total
  48. DWORD OutboundConnectsFailed;
  49. DWORD CurrentOutboundConnects; // current
  50. DWORD OutboundLogonFailed; // failed logon
  51. //
  52. // common
  53. //
  54. DWORD TotalPullFeeds;
  55. DWORD TotalPushFeeds;
  56. DWORD TotalPassiveFeeds;
  57. DWORD ArticlesSent; // articles sent by us
  58. DWORD ArticlesReceived; // articles received
  59. DWORD ArticlesPosted;
  60. DWORD ArticleMapEntries;
  61. DWORD HistoryMapEntries;
  62. DWORD XoverEntries;
  63. DWORD ControlMessagesIn; // number of control messages received
  64. DWORD ControlMessagesFailed; // number of control messages failed
  65. DWORD ModeratedPostingsSent; // number of moderated postings we attempt to send to an smtp server
  66. DWORD ModeratedPostingsFailed; // number of moderated postings we failed to send to an smtp server
  67. //
  68. // The number of sessions currently in a flow controlled state where
  69. // writes to disk are not keeping up with network reads.
  70. //
  71. DWORD SessionsFlowControlled;
  72. //
  73. // The number of articles expired since the service was started
  74. //
  75. DWORD ArticlesExpired;
  76. //
  77. // User command counters - one counter for each type of command
  78. //
  79. DWORD ArticleCommands;
  80. DWORD GroupCommands;
  81. DWORD HelpCommands;
  82. DWORD IHaveCommands;
  83. DWORD LastCommands;
  84. DWORD ListCommands;
  85. DWORD NewgroupsCommands;
  86. DWORD NewnewsCommands;
  87. DWORD NextCommands;
  88. DWORD PostCommands;
  89. DWORD QuitCommands;
  90. DWORD StatCommands;
  91. DWORD LogonAttempts; // validations
  92. DWORD LogonFailures; // validation failures
  93. DWORD CheckCommands;
  94. DWORD TakethisCommands;
  95. DWORD ModeCommands;
  96. DWORD SearchCommands;
  97. DWORD XHdrCommands;
  98. DWORD XOverCommands;
  99. DWORD XPatCommands;
  100. DWORD XReplicCommands;
  101. DWORD TimeOfLastClear; // statistics last cleared
  102. } NNTP_STATISTICS_0, *LPNNTP_STATISTICS_0;
  103. typedef struct _NNTP_STATISTICS_BLOCK {
  104. DWORD dwInstance;
  105. NNTP_STATISTICS_0 Stats_0;
  106. } NNTP_STATISTICS_BLOCK, *LPNNTP_STATISTICS_BLOCK;
  107. typedef struct _NNTP_STATISTICS_BLOCK_ARRAY {
  108. DWORD cEntries;
  109. #ifdef MIDL_PASS
  110. [size_is(cEntries)]
  111. #endif
  112. NNTP_STATISTICS_BLOCK aStatsBlock[];
  113. } NNTP_STATISTICS_BLOCK_ARRAY, *LPNNTP_STATISTICS_BLOCK_ARRAY;
  114. //
  115. // Information about the server
  116. //
  117. typedef struct _NNTP_CONFIG_INFO {
  118. //
  119. // Arcane Gibraltar field
  120. //
  121. FIELD_CONTROL FieldControl;
  122. #if 0
  123. // !!!newfields
  124. // Notes:
  125. // None of the old fields really need to be here. The ui doesn't
  126. // use them.
  127. // _INET_INFO_CONFIG_INFO must be fully supported by the nntpsvc.
  128. // The apis are defined in inetinfo.h
  129. // The virtual root structure must be extended to support retention
  130. // policy on directories. Retention policy is by posted date (days) or
  131. // by newsgroup size (megabytes).
  132. //
  133. // The new fields:
  134. //
  135. //
  136. // Connection Information
  137. //
  138. BOOL AllowClientConnections; // Allow clients to connect?
  139. BOOL AllowServerFeeds; // Allow servers to connect?
  140. DWORD MaximumFeedConnections; // Max Number of server feeds
  141. //
  142. // Organization & Path ID
  143. //
  144. LPWSTR Organization;
  145. LPWSTR PathID;
  146. #endif
  147. // Following 2 fields controlled by FC_NNTP_POSTINGMODES
  148. //
  149. // If TRUE then clients are allowed to post
  150. //
  151. BOOL AllowClientPosting ;
  152. //
  153. // If TRUE then we accept articles from feeds !
  154. //
  155. BOOL AllowFeedPosting ;
  156. // Following field controlled by FC_NNTP_ORGANIZATION
  157. //
  158. // For the organization header in postings !
  159. //
  160. LPSTR Organization ;
  161. // Following 2 fields controlled by FC_NNTP_POSTLIMITS
  162. //
  163. // Number of bytes a user can post into a file before we break the socket !
  164. //
  165. DWORD ServerPostHardLimit ;
  166. //
  167. // Maximum posting sizes the server will accept - if the user exceeds this
  168. // (without exceeding the hard limit) we will reject the post.
  169. //
  170. DWORD ServerPostSoftLimit ;
  171. //
  172. // Maximum size of articles from a feed - hard and soft limits
  173. //
  174. DWORD ServerFeedHardLimit ;
  175. DWORD ServerFeedSoftLimit ;
  176. //
  177. // Encryption Capabilities flags
  178. //
  179. DWORD dwEncCaps;
  180. //
  181. // SMTP address for moderated postings
  182. //
  183. LPWSTR SmtpServerAddress;
  184. //
  185. // server's UUCP name
  186. //
  187. LPWSTR UucpServerName;
  188. //
  189. // Control Messages allowed ?
  190. //
  191. BOOL AllowControlMessages;
  192. //
  193. // Default moderator for moderated postings
  194. //
  195. LPWSTR DefaultModerator;
  196. } NNTP_CONFIG_INFO, * LPNNTP_CONFIG_INFO;
  197. #define FC_NNTP_POSTINGMODES ((FIELD_CONTROL)BitFlag(0))
  198. #define FC_NNTP_ORGANIZATION ((FIELD_CONTROL)BitFlag(1))
  199. #define FC_NNTP_POSTLIMITS ((FIELD_CONTROL)BitFlag(2))
  200. #define FC_NNTP_FEEDLIMITS ((FIELD_CONTROL)BitFlag(3))
  201. #define FC_NNTP_ENCRYPTCAPS ((FIELD_CONTROL)BitFlag(4))
  202. #define FC_NNTP_SMTPADDRESS ((FIELD_CONTROL)BitFlag(5))
  203. #define FC_NNTP_UUCPNAME ((FIELD_CONTROL)BitFlag(6))
  204. #define FC_NNTP_CONTROLSMSGS ((FIELD_CONTROL)BitFlag(7))
  205. #define FC_NNTP_DEFAULTMODERATOR ((FIELD_CONTROL)BitFlag(8))
  206. #define FC_NNTP_AUTHORIZATION ((FIELD_CONTROL)BitFlag(9))
  207. #define FC_NNTP_DISABLE_NEWNEWS ((FIELD_CONTROL)BitFlag(10))
  208. #define FC_MD_SERVER_SS_AUTH_MAPPING ((FIELD_CONTROL)BitFlag(11))
  209. #define FC_NNTP_CLEARTEXT_AUTH_PROVIDER ((FIELD_CONTROL)BitFlag(12))
  210. #define FC_NTAUTHENTICATION_PROVIDERS ((FIELD_CONTROL)BitFlag(13))
  211. #define FC_NNTP_ALL ( \
  212. FC_NNTP_POSTINGMODES | \
  213. FC_NNTP_ORGANIZATION | \
  214. FC_NNTP_POSTLIMITS | \
  215. FC_NNTP_FEEDLIMITS | \
  216. FC_NNTP_ENCRYPTCAPS | \
  217. FC_NNTP_SMTPADDRESS | \
  218. FC_NNTP_UUCPNAME | \
  219. FC_NNTP_CONTROLSMSGS | \
  220. FC_NNTP_DEFAULTMODERATOR | \
  221. FC_NNTP_AUTHORIZATION | \
  222. FC_NNTP_DISABLE_NEWNEWS | \
  223. FC_MD_SERVER_SS_AUTH_MAPPING | \
  224. FC_NNTP_CLEARTEXT_AUTH_PROVIDER | \
  225. FC_NTAUTHENTICATION_PROVIDERS | \
  226. 0 )
  227. //
  228. // Feed Server information
  229. //
  230. typedef struct _NNTP_FEED_INFO {
  231. LPWSTR ServerName; // feed server
  232. FEED_TYPE FeedType;
  233. //
  234. // date/time specified when doing a NEWNEWS/NEWGROUP
  235. //
  236. FILETIME PullRequestTime;
  237. //
  238. // Date/Time scheduling is to start
  239. //
  240. FILETIME StartTime;
  241. //
  242. // Time the next feed is scheduled
  243. //
  244. FILETIME NextActiveTime;
  245. //
  246. // Interval in minutes between feeds. If 0, a one time feed
  247. // specified by StartTime
  248. //
  249. DWORD FeedInterval;
  250. //
  251. // Unique number assigned to this feed
  252. //
  253. DWORD FeedId;
  254. //
  255. // Create automatically?
  256. //
  257. BOOL AutoCreate;
  258. //
  259. // Disable the feed ?
  260. //
  261. BOOL Enabled ;
  262. DWORD cbNewsgroups;
  263. LPWSTR Newsgroups;
  264. DWORD cbDistribution;
  265. LPWSTR Distribution;
  266. DWORD cbUucpName ;
  267. LPWSTR UucpName ;
  268. DWORD cbFeedTempDirectory ;
  269. LPWSTR FeedTempDirectory ;
  270. //
  271. // For outgoing feeds - maximum number of connect attempts
  272. // before we disable the feed !
  273. //
  274. DWORD MaxConnectAttempts ;
  275. //
  276. // For outgoing feeds - the number of concurrent sessions
  277. // to start.
  278. //
  279. DWORD ConcurrentSessions ;
  280. //
  281. // Feed session security - do we use a protocol like SSL
  282. // or PCT to encrypt the session !
  283. //
  284. DWORD SessionSecurityType ;
  285. //
  286. // Feed Nntp security - do we do some variotion of a logon
  287. // protocol !!
  288. //
  289. DWORD AuthenticationSecurityType ;
  290. DWORD cbAccountName ;
  291. LPWSTR NntpAccountName ;
  292. DWORD cbPassword ;
  293. LPWSTR NntpPassword ;
  294. //
  295. // Allow control messages on this feed ?
  296. //
  297. BOOL fAllowControlMessages;
  298. //
  299. // Port to use for outgoing feeds
  300. //
  301. DWORD OutgoingPort;
  302. //
  303. // Associated feed pair id
  304. //
  305. DWORD FeedPairId;
  306. } NNTP_FEED_INFO, *LPNNTP_FEED_INFO;
  307. #define AUTH_PROTOCOL_NONE 0
  308. #define AUTH_PROTOCOL_MSN 1 // Sicily
  309. #define AUTH_PROTOCOL_NTLM 2 // NTLM
  310. #define AUTH_PROTOCOL_CLEAR 10 // clear text authinfo user/authinfo pass
  311. #define SESSION_PROTOCOL_SSL 3
  312. #define SESSION_PROTOCOL_PCT 4
  313. //
  314. // Flags for feed admin handshake
  315. //
  316. #define FEED_UPDATE_CONFIRM 0x00000000
  317. #define FEED_UPDATING 0x00000001
  318. #define FEED_UPDATE_COMPLETE 0x00000002
  319. //
  320. // Parameter mask. Used to indicate where the error was during a set.
  321. //
  322. #define FEED_PARM_FEEDTYPE 0x00000001
  323. #define FEED_PARM_STARTTIME 0x00000002
  324. #define FEED_PARM_FEEDID 0x00000004
  325. #define FEED_PARM_FEEDINTERVAL 0x00000008
  326. #define FEED_PARM_NEWSGROUPS 0x00000010
  327. #define FEED_PARM_DISTRIBUTION 0x00000020
  328. #define FEED_PARM_SERVERNAME 0x00000040
  329. #define FEED_PARM_AUTOCREATE 0x00000080
  330. #define FEED_PARM_ENABLED 0x00000100
  331. #define FEED_PARM_UUCPNAME 0x00000200
  332. #define FEED_PARM_TEMPDIR 0x00000400
  333. #define FEED_PARM_MAXCONNECT 0x00000800
  334. #define FEED_PARM_SESSIONSECURITY 0x00001000
  335. #define FEED_PARM_AUTHTYPE 0x00002000
  336. #define FEED_PARM_ACCOUNTNAME 0x00004000
  337. #define FEED_PARM_PASSWORD 0x00008000
  338. #define FEED_PARM_CONCURRENTSESSION 0x00010000
  339. #define FEED_PARM_ALLOW_CONTROL 0x00020000
  340. #define FEED_PARM_OUTGOING_PORT 0x00040000
  341. #define FEED_PARM_FEEDPAIR_ID 0x00080000
  342. #define FEED_PARM_PULLREQUESTTIME 0x00100000
  343. #define FEED_ALL_PARAMS 0xffffffff
  344. //
  345. // Indicates whether this field is to be changed
  346. //
  347. #define FEED_FEEDTYPE_NOCHANGE 0xffffffff
  348. #define FEED_AUTOCREATE_NOCHANGE 0xffffffff
  349. #define FEED_STARTTIME_NOCHANGE 0xffffffff
  350. #define FEED_PULLTIME_NOCHANGE 0xffffffff
  351. #define FEED_FEEDINTERVAL_NOCHANGE 0xffffffff
  352. #define FEED_MAXCONNECTS_NOCHANGE 0xffffffff
  353. #define FEED_STRINGS_NOCHANGE NULL
  354. //
  355. // Sessions
  356. //
  357. #define MAX_USER_NAME_LENGTH 64
  358. typedef struct _NNTP_SESSION_INFO {
  359. FILETIME SessionStartTime;
  360. DWORD IPAddress; // ipaddress
  361. DWORD AuthenticationType; // type of authentication
  362. DWORD PortConnected; // port connected to
  363. BOOL fAnonymous; // using anonymous?
  364. CHAR UserName[MAX_USER_NAME_LENGTH+1]; // logged on user
  365. } NNTP_SESSION_INFO, *LPNNTP_SESSION_INFO;
  366. typedef struct _NNTP_EXPIRE_INFO {
  367. //
  368. // Expiration policies are numbered
  369. //
  370. DWORD ExpireId ;
  371. //
  372. // Units of Megabytes
  373. //
  374. DWORD ExpireSizeHorizon ;
  375. //
  376. // In retail builds - units of hours, debug builds - units of ??
  377. //
  378. DWORD ExpireTime ;
  379. //
  380. // MULTISZ expiration pattern and size !
  381. //
  382. DWORD cbNewsgroups ;
  383. PUCHAR Newsgroups;
  384. //
  385. // Name of expire policy
  386. //
  387. LPWSTR ExpirePolicy ;
  388. } NNTP_EXPIRE_INFO, *LPNNTP_EXPIRE_INFO ;
  389. typedef struct _NNTP_NEWSGROUP_INFO {
  390. DWORD cbNewsgroup ;
  391. PUCHAR Newsgroup ;
  392. DWORD cbDescription ;
  393. PUCHAR Description ;
  394. DWORD cbModerator ;
  395. PUCHAR Moderator ;
  396. BOOL fIsModerated ;
  397. BOOL ReadOnly ;
  398. DWORD cbPrettyname ;
  399. PUCHAR Prettyname ;
  400. FILETIME ftCreationDate;
  401. } NNTP_NEWSGROUP_INFO, *LPNNTP_NEWSGROUP_INFO ;
  402. #pragma warning( disable:4200 ) // nonstandard ext. - zero sized array
  403. // (MIDL requires zero entries)
  404. //
  405. // Find RPC structs
  406. //
  407. typedef struct _NNTP_FIND_ENTRY
  408. {
  409. LPWSTR lpszName;
  410. } NNTP_FIND_ENTRY, *LPNNTP_FIND_ENTRY;
  411. typedef struct _NNTP_FIND_LIST
  412. {
  413. DWORD cEntries;
  414. #if defined(MIDL_PASS)
  415. [size_is(cEntries)]
  416. #endif
  417. NNTP_FIND_ENTRY aFindEntry[];
  418. } NNTP_FIND_LIST, *LPNNTP_FIND_LIST;
  419. //
  420. // Retention policy flags
  421. //
  422. #define NEWS_EXPIRE_BOTH 0x30000000
  423. #define NEWS_EXPIRE_TIME 0x10000000
  424. #define NEWS_EXPIRE_SIZE 0x20000000
  425. #define NEWS_EXPIRE_OLDEST 0x00000001
  426. #define NEWS_EXPIRE_BIGGEST 0x00000002
  427. #define NEWS_EXPIRE_SIZE_OLDEST (NEWS_EXPIRE_SIZE | NEWS_EXPIRE_OLDEST)
  428. #define NEWS_EXPIRE_SIZE_BIGGEST (NEWS_EXPIRE_SIZE | NEWS_EXPIRE_BIGGEST)
  429. #define NEWS_EXPIRE_BOTH_OLDEST (NEWS_EXPIRE_BOTH | NEWS_EXPIRE_OLDEST)
  430. #define NEWS_EXPIRE_BOTH_BIGGEST (NEWS_EXPIRE_BOTH | NEWS_EXPIRE_BIGGEST)
  431. //
  432. // Get Server Statistics
  433. //
  434. NET_API_STATUS
  435. NET_API_FUNCTION
  436. NntpQueryStatistics(
  437. IN LPWSTR ServerName OPTIONAL,
  438. IN DWORD Level,
  439. OUT LPBYTE * Buffer
  440. );
  441. //
  442. // Clear server statistics
  443. //
  444. NET_API_STATUS
  445. NET_API_FUNCTION
  446. NntpClearStatistics(
  447. IN LPWSTR ServerName OPTIONAL,
  448. IN DWORD InstanceId
  449. );
  450. //
  451. // Statistics clear flags
  452. //
  453. #define NNTP_STAT_CLEAR_OUTGOING 0x00000001
  454. #define NNTP_STAT_CLEAR_INGOING 0x00000002
  455. //
  456. // Getting and setting server Information
  457. //
  458. //
  459. NET_API_STATUS
  460. NET_API_FUNCTION
  461. NntpGetAdminInformation(
  462. IN LPWSTR pszServer OPTIONAL,
  463. IN DWORD InstanceId,
  464. OUT LPNNTP_CONFIG_INFO * pConfig
  465. );
  466. NET_API_STATUS
  467. NET_API_FUNCTION
  468. NntpSetAdminInformation(
  469. IN LPWSTR pszServer OPTIONAL,
  470. IN DWORD InstanceId,
  471. IN LPNNTP_CONFIG_INFO pConfig,
  472. OUT LPDWORD pParmError OPTIONAL
  473. );
  474. //
  475. // Sessions
  476. //
  477. NET_API_STATUS
  478. NET_API_FUNCTION
  479. NntpEnumerateSessions(
  480. IN LPWSTR ServerName OPTIONAL,
  481. IN DWORD InstanceId,
  482. OUT LPDWORD EntriesRead,
  483. OUT LPNNTP_SESSION_INFO *Buffer
  484. );
  485. NET_API_STATUS
  486. NET_API_FUNCTION
  487. NntpTerminateSession(
  488. IN LPWSTR ServerName OPTIONAL,
  489. IN DWORD InstanceId,
  490. IN LPSTR UserName OPTIONAL,
  491. IN LPSTR IPAddress OPTIONAL
  492. );
  493. //
  494. // Feeds
  495. //
  496. NET_API_STATUS
  497. NET_API_FUNCTION
  498. NntpEnumerateFeeds(
  499. IN LPWSTR ServerName OPTIONAL,
  500. IN DWORD InstanceId,
  501. OUT LPDWORD EntriesRead,
  502. OUT LPNNTP_FEED_INFO *FeedInfo
  503. );
  504. NET_API_STATUS
  505. NET_API_FUNCTION
  506. NntpGetFeedInformation(
  507. IN LPWSTR ServerName OPTIONAL,
  508. IN DWORD InstanceId,
  509. IN DWORD FeedId,
  510. OUT LPNNTP_FEED_INFO *FeedInfo
  511. );
  512. NET_API_STATUS
  513. NET_API_FUNCTION
  514. NntpSetFeedInformation(
  515. IN LPWSTR ServerName OPTIONAL,
  516. IN DWORD InstanceId,
  517. IN LPNNTP_FEED_INFO FeedInfo,
  518. OUT LPDWORD ParmErr OPTIONAL
  519. );
  520. NET_API_STATUS
  521. NET_API_FUNCTION
  522. NntpAddFeed(
  523. IN LPWSTR ServerName OPTIONAL,
  524. IN DWORD InstanceId,
  525. IN LPNNTP_FEED_INFO FeedInfo,
  526. OUT LPDWORD ParmErr OPTIONAL,
  527. OUT LPDWORD pdwFeedId
  528. );
  529. NET_API_STATUS
  530. NET_API_FUNCTION
  531. NntpDeleteFeed(
  532. IN LPWSTR ServerName OPTIONAL,
  533. IN DWORD InstanceId,
  534. IN DWORD FeedId
  535. );
  536. NET_API_STATUS
  537. NET_API_FUNCTION
  538. NntpEnableFeed(
  539. IN LPWSTR ServerName OPTIONAL,
  540. IN DWORD InstanceId,
  541. IN DWORD FeedId,
  542. IN BOOL Enable,
  543. IN BOOL Refill,
  544. IN FILETIME RefillTime
  545. ) ;
  546. NET_API_STATUS
  547. NET_API_FUNCTION
  548. NntpEnumerateExpires(
  549. IN LPWSTR ServerName,
  550. IN DWORD InstanceId,
  551. OUT LPDWORD EntriesRead,
  552. OUT LPNNTP_EXPIRE_INFO* Buffer
  553. ) ;
  554. NET_API_STATUS
  555. NET_API_FUNCTION
  556. NntpAddExpire(
  557. IN LPWSTR ServerName,
  558. IN DWORD InstanceId,
  559. IN LPNNTP_EXPIRE_INFO ExpireInfo,
  560. OUT LPDWORD ParmErr OPTIONAL,
  561. OUT LPDWORD pdwExpireId
  562. ) ;
  563. NET_API_STATUS
  564. NET_API_FUNCTION
  565. NntpDeleteExpire(
  566. IN LPWSTR ServerName,
  567. IN DWORD InstanceId,
  568. IN DWORD ExpireId
  569. ) ;
  570. NET_API_STATUS
  571. NET_API_FUNCTION
  572. NntpGetExpireInformation(
  573. IN LPWSTR ServerName,
  574. IN DWORD InstanceId,
  575. IN DWORD ExpireId,
  576. OUT LPNNTP_EXPIRE_INFO *Buffer
  577. ) ;
  578. NET_API_STATUS
  579. NET_API_FUNCTION
  580. NntpSetExpireInformation(
  581. IN LPWSTR ServerName OPTIONAL,
  582. IN DWORD InstanceId,
  583. IN LPNNTP_EXPIRE_INFO ExpireInfo,
  584. OUT LPDWORD ParmErr OPTIONAL
  585. ) ;
  586. NET_API_STATUS
  587. NET_API_FUNCTION
  588. NntpGetNewsgroup(
  589. IN LPWSTR ServerName OPTIONAL,
  590. IN DWORD InstanceId,
  591. IN OUT LPNNTP_NEWSGROUP_INFO *NewgroupInfo
  592. ) ;
  593. NET_API_STATUS
  594. NET_API_FUNCTION
  595. NntpSetNewsgroup(
  596. IN LPWSTR ServerName OPTIONAL,
  597. IN DWORD InstanceId,
  598. IN LPNNTP_NEWSGROUP_INFO NewgroupInfo
  599. ) ;
  600. NET_API_STATUS
  601. NET_API_FUNCTION
  602. NntpCreateNewsgroup(
  603. IN LPWSTR ServerName OPTIONAL,
  604. IN DWORD InstanceId,
  605. IN LPNNTP_NEWSGROUP_INFO NewsgroupInfo
  606. ) ;
  607. NET_API_STATUS
  608. NET_API_FUNCTION
  609. NntpDeleteNewsgroup(
  610. IN LPWSTR ServerName OPTIONAL,
  611. IN DWORD InstanceId,
  612. IN LPNNTP_NEWSGROUP_INFO NewsgroupInfo
  613. ) ;
  614. //
  615. // Find RPCs
  616. //
  617. NET_API_STATUS
  618. NET_API_FUNCTION
  619. NntpFindNewsgroup(
  620. IN LPWSTR ServerName,
  621. IN DWORD InstanceId,
  622. IN LPWSTR NewsgroupPrefix,
  623. IN DWORD MaxResults,
  624. OUT LPDWORD pdwResultsFound,
  625. OUT LPNNTP_FIND_LIST *ppFindList
  626. ) ;
  627. #define NNTPBLD_DEGREE_THOROUGH 0x00000000
  628. #define NNTPBLD_DEGREE_STANDARD 0x00000001
  629. #define NNTPBLD_DEGREE_MEDIUM 0x00000010
  630. //
  631. // Nntpbld structs and RPCs
  632. //
  633. typedef struct _NNTPBLD_INFO {
  634. //
  635. // Verbosity of reporting
  636. //
  637. BOOL Verbose ;
  638. //
  639. // Specify whether to blow away all old data structures
  640. //
  641. BOOL DoClean ;
  642. //
  643. // If TRUE then don't delete the history file regardless of other settings.
  644. //
  645. BOOL NoHistoryDelete ;
  646. //
  647. // 0x00000000 for thorough ie delete all index files
  648. // 0x00000001 for standard ie reuse all index files
  649. // 0x00000101 for standard with skip corrupt group enabled
  650. // 0x00000010 for medium ie validate index files
  651. //
  652. DWORD ReuseIndexFiles ;
  653. //
  654. // If TRUE, omit non-leaf dirs
  655. //
  656. BOOL OmitNonleafDirs ;
  657. //
  658. // Name of a file containing either an INN style 'Active' file or
  659. // a tool generated newsgroup list file. Either way, we will pull
  660. // newsgroups out of this file and use them to build a news tree.
  661. //
  662. DWORD cbGroupFile ;
  663. LPWSTR szGroupFile ;
  664. //
  665. // Name of report file
  666. //
  667. DWORD cbReportFile ;
  668. LPWSTR szReportFile ;
  669. //
  670. // If TRUE then szGroupFile specifies an INN style Active file,
  671. // otherwise it specifies a tool generated human edit newsgroup list.
  672. //
  673. BOOL IsActiveFile ;
  674. //
  675. // Number of rebuild threads
  676. //
  677. DWORD NumThreads;
  678. } NNTPBLD_INFO, *LPNNTPBLD_INFO ;
  679. //
  680. // Nntpbld RPCs
  681. //
  682. //
  683. NET_API_STATUS
  684. NET_API_FUNCTION
  685. NntpStartRebuild(
  686. IN LPWSTR pszServer OPTIONAL,
  687. IN DWORD InstanceId,
  688. IN LPNNTPBLD_INFO pBuildInfo,
  689. OUT LPDWORD pParmError OPTIONAL
  690. );
  691. NET_API_STATUS
  692. NET_API_FUNCTION
  693. NntpGetBuildStatus(
  694. IN LPWSTR pszServer OPTIONAL,
  695. IN DWORD InstanceId,
  696. IN BOOL fCancel,
  697. OUT LPDWORD pdwProgress
  698. );
  699. //
  700. // Nntp vroot PRCs
  701. //
  702. NET_API_STATUS
  703. NET_API_FUNCTION
  704. NntpGetVRootWin32Error(
  705. IN LPWSTR wszServer,
  706. IN DWORD dwInstanceId,
  707. IN LPWSTR wszVRootPath,
  708. OUT LPDWORD pdwWin32Error
  709. );
  710. #if 0
  711. NET_API_STATUS
  712. NET_API_FUNCTION
  713. NntpAddDropNewsgroup(
  714. IN LPWSTR pszServer OPTIONAL,
  715. IN DWORD InstanceId,
  716. IN LPCSTR szNewsgroup
  717. );
  718. NET_API_STATUS
  719. NET_API_FUNCTION
  720. NntpRemoveDropNewsgroup(
  721. IN LPWSTR pszServer OPTIONAL,
  722. IN DWORD InstanceId,
  723. IN LPCSTR szNewsgroup
  724. );
  725. #endif
  726. NET_API_STATUS
  727. NET_API_FUNCTION
  728. NntpCancelMessageID(
  729. IN LPWSTR pszServer OPTIONAL,
  730. IN DWORD InstanceId,
  731. IN LPCSTR szMessageID
  732. );
  733. //
  734. // Used to free buffers returned by APIs
  735. //
  736. VOID
  737. NntpFreeBuffer(
  738. LPVOID Buffer
  739. );
  740. #ifdef __cplusplus
  741. }
  742. #endif
  743. #endif _NNTPAPI_