Topic Path: Symbol Reference > Classes > TIdNNTP Class > TIdNNTP Methods > GetNewsgroupList Method > GetNewsgroupList Method ()
ContentsIndexHome
PreviousUpNext
TIdNNTP.GetNewsgroupList Method ()

Requests a list of newsgroups found on the NNTP server.

procedure GetNewsgroupList; overload;

GetNewsgroupList is an overloaded procedure in TIdNNTP that retrieves a list of valid newsgroups on the NNTP server. GetNewsgroupList sends the NNTP LIST command to retrieve newsgroup information returned in the NNTP server response. 

The overloaded GetNewsgroupList procedures provide for handling NNTP server response lines using the OnNewsgroupList event handler. 

When GetNewsgroupList is called with no parameters, the OnNewsgroupList event handler is used to process receipt of individual response lines containing newsgroup information. 

Newsgroup information returned in an NNTP server response may consist of multiple lines of text, where each line is in the form: 

 

  groupname last first p

 

Tokens in the response line 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) 

 

Applications must assign a TEventNewsgroupList event handler to the OnNewsgroupList property to allow responding to the notification. An EIdNNTPNoOnNewsgroupList will be raised if the event handler is unassigned.

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