Re: Newbie Xover, getnewnews

Giganews Newsgroups
Subject: Re: Newbie Xover, getnewnews
Posted by:  Elmar Baumann (elmar-nospam@anywhere.net)
Date: Wed, 9 Mar 2005

>santaX <sant…@home.nl>
>wrote in Message: <opsf6b2wx8jow4…@cp683485-a.gelen1.lb.home.nl>
>with Subject: Newbie Xover, getnewnews

>Could someone please show me the proper way of getting the articles
>(headers) of a newsgroup.

1) Connect to a NNTP Server
2) Get the Newsgroup List
3) Select a Group (Note MessageLow MessageHigh and Posting-Status)

4) Create a Grouplist (for Example a Subject-List)

  a) IdNNTP->XHDR("Subject","1-",TStrings *lst); // all available Articles

  or

  b) IdNNTP->XOVER("1-",TStrings *lst); // all available Articles
      IdNNTP->ParseXOVER to create a Subject-List

4) Store the List in a TList/TreeView/ListView - make sure that
  you can indicate the Articlenumber by the ListIndex.

>I can actually download the grouplist, but I can't figure out howto
>download messages from a group :(

5) Select an Article in your ListBox by clicking the Subject - use
  the EventHandler (OnClick) - get the Articlenumber.

  You should have dropped an IdMessage-Object in your Form!

  bool IdNNTP->GetHeader(int articlenumber,TIdMessage *msg); // only Header

  or

  bool IdNNTP->GetArticle(int articlenumber,TIdMessage *msg); // complete Article

6) Display the IdMessage in a Form.

Best Regards

Elmar Baumann

Replies

None

In response to

Newbie Xover, getnewnews posted by santaX on Wed, 20 Oct 2004