Topic Path: Pending > TIdNNTP.GetNewGroupsList@TDateTime@boolean@string@TStrings

Retrieves a list of new newsgroups from an NNTP server.

Previous data and time the newsgroup list was retrieved.
Time is expressed in GMT.
Optional list of distribution patterns.
Destination for the new newsgroups from the NNTP server. 

GetNewGroupsList is an overloaded procedure in TIdNNTP that requests a list of newsgroups from the NNTP server which were added after a specific date and time. GetNewGroupsList is normally used to update a stored list of newsgroups on an NNTP client. 

ADate represents the date and time that the newsgroup list on the NNTP client was last updated, and is used to determine which groups in list have been added since that update. 

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 newsgroup prefixes to be used as a filter when retrieving the list of news newsgroups. 

For example, the following would limit newsgroup retrieval to the public Delphi and C++ Builder hierarchy: 




AList is a TStrings instance to be used as the destination for new newsgroups retrieved from the NNTP server. GetNewGroupsList calls SendCmd using the NNTP NEWGROUPS command with the arguments specified. GetNewGroupsList calls Capture to store the server response lines in AList. 

Each line in AList is in the form: 


groupname last first p


Where the tokens in the response lines have the following meanings: 


newsgroup name. 
number of the last known article currently in the newsgroup. 
number of the first article currently in the newsgroup. 
posting status for the newsgroup. ('y'=allowed, 'n'=prohibited) 


Use GetNewsgroupList to retrieve a list of all valid newsgroups on the NNTP server.

SendCmd OnNewGroupsList GetNewGroupsList TEventNewsgroupList EIdNNTPNoOnNewGroupsList

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