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.

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