Internet Direct (Indy)
Home
PreviousUpNext
TIdNNTP.GetNewGroupsList@TDateTime@boolean@string@TStrings

Retrieves a list of new newsgroups from an NNTP server.

Parameters 
Description 
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. 

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: 

 

'borland.public.delphi,borland.public.cppbuilder'

 

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: 

 

Token 
Meaning 
groupname 
newsgroup name. 
last 
number of the last known article currently in the newsgroup. 
first 
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

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.