Internet Direct (Indy)
Home
PreviousUpNext
TIdNNTP.GetNewGroupsList Method (TDateTime, boolean, string)

Retrieves a list of new newsgroups from an NNTP server.

Pascal
procedure GetNewGroupsList(
    ADate: TDateTime; 
    AGMT: boolean; 
    ADistributions: string
); overload;
Parameters 
Description 
ADate 
Previous data and time the newsgroup list was retrieved.
 
AGMT 
Time is expressed in GMT.
 
ADistributions 
Optional list of distribution patterns. 

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'

 

Applications must assign a TEventNewsgroupList event handler to the property to allow responding to the notification. GetNewGroupsList can raise an EIdNNTPNoOnNewGroupsList exception when the OnNewGroupsList has not been assigned for the NNTP client. 

GetNewGroupsList processes response lines from the NNTP server to extract the newsgroup name, message number range, and posting status values passed to the OnNewGroupsList event handler. OnNewGroupsList is triggered once for each newsgroup received and parsed in the server response. 

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.