Topic Path: Pending > TIdNNTP.GetNewNewsList@string@TDateTime@boolean@string@TStrings
ContentsIndexHome
PreviousUpNext
TIdNNTP.GetNewNewsList@string@TDateTime@boolean@string@TStrings

Retrieves a list of message identifiers for new articles.

Parameters 
Description 
ANewsgroups 
Name of the newsgroup to be examined.
 
ADate 
Previous data and time the newsgroup list was retrieved.
 
AGMT 
Time is expressed in GMT.
 
ADistributions 
Optional list of distribution patterns.
 
AList 
Destination for the new newsgroups from the NNTP server. 

GetNewNewsList is an overloaded procedure in TIdNNTP used to retrieve a list of message identifiers posted or received in a specified newsgroup since a given date and time. 

ANewsgroups can contain a value that identifies the name or search patterns used in locating newsgroups to be included in the list of new message identifiers. ANewsgroups can contain the '*' (asterisk) indicating that the search will match any newsgroup name matching fixed portions of the search value. Multiple newsgroup names or search patterns may be specified as a comma-delimited list. 

For instance, 'net.micro*' will match 'net.micro.wombat', 'net.micro.apple', etc. In addition, 'net.*.unix' would match newsgroups with names like 'net.wombat.unix' and 'net.whocares.unix'. 

If only an asterisk character is given in ANewsgroups, all newsgroups will be searched for new message identifiers. If no asterisk appears in a given newsgroup name, only the specified newsgroup will be searched for new articles. 

ANewsgroups may also contain an exclamation point ('!') character used to negate a match, and omit newsgroups matching the specified names or search patterns. For example, a newsgroups specification of 'net.*,mod.*,!mod.map.*' would specify that all groups starting with 'net.' or 'mod.' except newsgroups starting with 'mod.map.' would be matched. If used, the exclamation point must appear as the first character of the given newsgroup name or pattern. 

ADate represents the date and time to be used in determining which message identifiers are included in the list of new articles. 

When AGMT is True, the value in ADate is based on Greenwich Mean Time or Universal Time Coordinated (0 meridian). When AGMT is False, the value in ADate represents a value for the local time-zone. 

ADistributions is an optional string containing a comma-delimited list of newsgroups or prefixes to be used as a filter when retrieving the list new articles. Only those articles which have at least one newsgroup belonging to the list of distributions will be returned in the list of new articles. 

AList is a TStrings instance used to store the new message identifiers retrieved from the NNTP server. GetNewNewsList calls SendCmd using the NNTP NEWNEWS command with the arguments specified in ANewsgroups, ADate, AGMT, and ADistributions. 

GetNewNewsList calls the Capture method in the IOHandler for the NNTP client to store the server response lines in AList. Each line in AList will contain a single message identifier, or contain an empty list when there are no new articles for the specified criteria. 

Use GetNewGroupsList to process newsgroups added to the server since a specified date and time. 

Implementors are cautioned to adhere to the 512 character limit for the length of NNTP commands.

SendCmd GetNewNewsList OnNewNewsList TEventNewNewsList EIdNNTPNoOnNewNewsList

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.