ftp.nice.ch/pub/next/connectivity/news/NewsBase.3.02.s.tar.gz#/NewsBase302.source/NNTP/INewsGroupTreeControl.h

This is INewsGroupTreeControl.h in view mode; [Download] [Up]

/*$Copyright:
 * Copyright (C) 1992.5.22. Recruit Co.,Ltd. 
 * Institute for Supercomputing Research
 * All rights reserved.
 * NewsBase  by ISR, Kazuto MIYAI, Gary ARAKAKI, Katsunori SUZUKI, Kok-meng Lue
 *
 * You may freely copy, distribute and reuse the code in this program under 
 * following conditions.
 * - to include this notice in the source code, if it is to be distributed 
 *   with source code.
 * - to add the file named "COPYING" within the code, which shall include 
 *   GNU GENERAL PUBLIC LICENSE(*).
 * - to display an acknowledgement in binary code as follows: "This product
 *   includes software developed by Recruit Co.,Ltd., ISR."
 * - to display a notice which shall state that the users may freely copy,
 *   distribute and reuse the code in this program under GNU GENERAL PUBLIC
 *   LICENSE(*)
 * - to indicate the way to access the copy of GNU GENERAL PUBLIC LICENSE(*)
 *
 *   (*)GNU GENERAL PUBLIC LICENSE is stored in the file named COPYING
 * 
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
$*/
/*
 *    INewsGroupTreeControl is a subclass of the INNTP class.
 *    It initializes and maintains the newsgroup tree.
 *     It also handles the posting of articles.
 *    It handles all communication with the NNTP server.
 */
 
#import "INNTP.h"
#import <appkit/Panel.h>
#import "InfoD.h"
#import "IPercentageView.h"

typedef enum {ALL, UNMARKEDONLY, MARKEDONLY} ReadFlag;

@interface INewsGroupTreeControl:INNTP
{
    id iNewsGroupTreeRoot;
    NXZone *newsgroupTreeZone;
    NXZone *headersZone;
    id iCurrentNewsgroup;
    id iCurrentArticleItem;
    id iNewsRc;
    BOOL iAllNewsFlag;
    id		oGetArticleNumField;
    Panel	*oGetArticleNumWindow;
    IPercentageView	*iPercentageView;
}

- initServer:(char *)nntpHost allNews:(BOOL)allNewsFlag;

/*
 *  Generates the newsgroup tree.  Sends the "LIST" command to the NNTP
 *  server.  Reads the list of valid newsgroups returned from the NNTP
 *  server and generates a tree of INewsGroups objects.  If the tree is
 *  generated returns the root of the generated tree else returns nil.
 */

- listAndMakeNewsgroupTree;

- initNewsGroup:newsGroup readFlag:(ReadFlag)rflag;
/*
 *  Initializes all the headers for a newsgroup.
 *
 *  Allocates an IGroupD for the newsgroup.  Sends the "GROUP" command for
 *  this newsgroup to the NNTP server.  Then for each article in this
 *  newsgroup sends the "HEAD" command to the NNTP server and creates an
 *  header InfoD and an article IGroupD.  The header InfoD is added to the
 *  article IGroupD and the article IGroupD is added to the newsgroup
 *  IGroupD.  If the newsgroup IGroupD is intialized returns the allocated
 *  and initialized newsgroup IGroupD else returns nil.
 */

- (BOOL)sendArticle:(const char *)messageId;
/*
 *  Initializes the body of an article.
 *
 *  Sends the "BODY" command to the NNTP server for this article.  
 *  The article stream from the NNTP server is sent to the MMEditor.
 */
 
- newsGroupTreeRoot;

- (const char *)currentNewsgroupName;
/*
 * Returns the name of the newsgroup last selected by the newsgroup browser.
 */
 
- (BOOL)canPost;
/*
 * Returns YES if posting is allowed in the newsgroup last selected by the newsgroup browser.
 */

- (void)saveNewsRcFile;
- (InfoD *)commandHead:(int)knum articleDB:karticleDB;
- (InfoD *)getHeader:(const char *)articleTag zone:(NXZone *)zone;
- readNewsRcFile;
- okArticleNumWindow:sender;
- cancelArticleNumWindow:sender;

// set window when read articles
- setOGetArticleNumWindow:kwindow;
- setOGetArticleNumField:kfield;
- setIPercentageView:kview;

// set timed entry for reconnecting to nntp server
// it will be set when start
- setTimedEntryForReconnect;
- reconnectServer:sender;
- cancelArticleMessageID:(const char *)messageID from:(const char *)fromValue;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.