RSSKit  0.6.1
RSSArticle.h
00001 /*  -*-objc-*-
00002  *
00003  *  GNUstep RSS Kit
00004  *  Copyright (C) 2010-2011 The Free Software Foundation, Inc.
00005  *                2006      Guenther Noack
00006  *
00007  *  This library is free software; you can redistribute it and/or
00008  *  modify it under the terms of the GNU Lesser General Public
00009  *  License as published by the Free Software Foundation, in version 2.1
00010  *  of the License
00011  * 
00012  *  This library is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015  *  Lesser General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU Lesser General Public
00018  *  License along with this library; if not, write to the Free Software
00019  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020  */
00021 
00022 
00023 #import <objc/objc.h>
00024 #import <Foundation/Foundation.h>
00025 
00026 @class RSSArticle;
00027 
00028 #import "RSSFeed.h"
00029 #import "RSSArticleProtocol.h"
00030 
00031 
00032 
00036 @interface RSSArticle : NSObject <RSSMutableArticle>
00037 {
00038   @protected
00039   NSString*  headline;
00040   NSString*  url;
00041   NSString*  description;
00042   NSDate*    date;
00043 
00044   @private
00045   NSURL*     enclosure;
00046   
00048   NSMutableArray* links;
00049   
00050   id<RSSFeed> feed;
00051 }
00052 
00059 -init;
00060 
00074 -initWithHeadline: (NSString*) myHeadline
00075               url: (NSString*) myUrl
00076       description: (NSString*) myDescription
00077              date: (NSDate*)   myDate;
00078 
00079 
00080 
00081 -(void) dealloc;
00082 
00083 
00084 // Accessor methods (conformance to RSSArticle protocol)
00085 -(NSString*)headline;
00086 -(NSString*)url;
00087 -(NSString*)content;
00088 -(NSString*)description;
00089 -(NSArray*) links;
00090 -(NSDate*) date;
00091 -(NSURL*)enclosure;
00092 
00093 // Mutability methods (conformance to RSSMutableArticle protocol)
00094 -(void)addLink:(NSURL*) anURL;
00095 -(void)setLinks: (NSArray*) someLinks;
00096 -(void)setFeed: (id<RSSMutableFeed>) aFeed;
00097 -(void)setDate: (NSDate*) aDate;
00098 
00103 -(void)notifyChange;
00104 
00105 
00106 // Equality and hash codes
00107 - (BOOL) isEqual: (id)anObject;
00108 
00115 -(void)willBeReplacedByArticle: (id<RSSMutableArticle>) newArticle;
00116 
00117 @end