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

Requests a list of newsgroups found on the NNTP server.

procedure GetNewsgroupList(
    AStream: TIdStream
); overload;
Parameters 
Description 
AStream 
Destination for the newsgroup list. 

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 storing server response lines in the AStream argument. Newsgroup information is stored in AStream using the Capture method in IOHandler for the NNTP client. 

Newsgroup information returned in an NNTP server response may consist of multiple lines of text 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) 

OnNewsgroupList 

TEventNewsgroupList 

EIdNNTPNoOnNewsgroupList

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