Public Member Functions | Static Public Member Functions | Properties

OFAnnouncement Class Reference

#import <OFAnnouncement.h>

List of all members.

Public Member Functions

(OFRequestHandle *) - getPosts
(void) - markAsRead
(NSComparisonResult) - compareByCreationDate:
(NSComparisonResult) - compareByUpdateDate:

Static Public Member Functions

(void) + setDelegate:
(OFRequestHandle *) + downloadAnnouncementsAndSortBy:

Properties

NSString * body
NSDate * originalPostDate
BOOL isUnread
BOOL isImportant
NSString * linkedClientApplicationId

Detailed Description

The public interface for OFAnnouncement allows you to get all new announcements and see information about them.


Member Function Documentation

- (NSComparisonResult) compareByCreationDate: (OFAnnouncement *)  announcement
- (NSComparisonResult) compareByUpdateDate: (OFAnnouncement *)  announcement
+ (OFRequestHandle*) downloadAnnouncementsAndSortBy: (EAnnouncementSortType sortType

Get all announcements

Returns:
OFRequestHandle* if a server call must be done. If the announcements are already cached on the device, this will be null.
Note:
Invokes - (void)didDownloadAnnouncementsAppAnnouncements:(NSArray*)appAnnouncements devAnnouncements:(NSArray*)devAnnouncements; on success and
  • (void)didFailDownloadAnnouncements; on failure
- (OFRequestHandle*) getPosts

Gets Posts for an announcement

Returns:
OFRequestHandle for the server request. Use this to cancel the request
Note:
Invokes - (void)didGetPosts:(NSArray*)posts OFAnnouncement:(OFAnnouncement*)announcement; on success and
  • (void)didFailGetPostsOFAnnouncement:(OFAnnouncement*)announcement; on failure.
- (void) markAsRead

mark this post as read.

Note:
this also affects the latest announcement read date if this announcement was created at a later date than the currently stashed latest announcement read date. If this is the case, next time announcements are requested, all announcements with a less present updated date will be considered read.
+ (void) setDelegate: (id< OFAnnouncementDelegate >)  delegate

Set a delegate for all OFAnnouncement related actions. Must adopt the OFAnnouncementDelegate protocol.

Note:
Defaults to nil. Weak reference

Property Documentation

- (NSString *) body [read, assign]

Body of the announcement as seen on the developer dashboard

- (BOOL) isImportant [read, assign]
- (BOOL) isUnread [read, assign]

Whether or not the announcement "has been read".

Note:
When downloading announcements we get the latest ceated date of all the announcements read by the current user. All announcements with a creation date before the date are considered read, even if the user has not physically opened them in the OpenFeint Dashboard or if the dev hasn't called markAsRead: on the announcement.
- (NSString *) linkedClientApplicationId [read, assign]
- (NSDate *) originalPostDate [read, assign]

The date of the posting of the announcement originally to the OpenFeint dashboard


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Enumerations Enumerator Properties