123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //
- // MessageViewModel.h
- // FirstLink
- //
- // Created by unicode on 14-11-6.
- // Copyright (c) 2014年 FirstLink. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- #import "FKAppMessage.h"
- typedef NS_ENUM(NSInteger, kMessageSectionType) {
- kMessageSectionTypeNone,
- kMessageSectionTypeToday,
- kMessageSectionTypeLast7Day,
- kMessageSectionTypeLast30Day,
- kMessageSectionTypeEarlier
- };
- @class FKBadgeMessage;
- @class FKPersonOrderBadgeItem;
- @interface MessageViewModel : NSObject
- @property (nonatomic, strong) PageHeader *pageHeader;
- @property (nonatomic, strong) NSMutableArray *appMessages;
- + (void)requestUsers:(NSArray*)userIDs
- success:(void (^)(MSGHeader *header, id responseObject))success
- failure:(void (^)(MSGHeader *header, NSError *error))failure;
- - (void)requestMessageWithIndex:(NSString*)index
- AnchorID:(NSString*)anchorID
- startRow:(NSString*)startRow
- pageSize:(NSString*)pageSize
- type:(NSString*)type
- success:(void (^)(MSGHeader *header, id responseObject, NSString *serverTime))success
- failure:(void (^)(MSGHeader *header, NSError *error))failure;
- + (void)requestBadgeSuccess:(void (^)(MSGHeader *header, FKBadgeMessage *badge, FKAppMessage *comment))success
- failure:(void (^)(MSGHeader *header, NSError *error))failure;
- + (void)requestOrderBadgeSuccess:(void (^)(MSGHeader *header, FKPersonOrderBadgeItem *badge))success
- failure:(void (^)(MSGHeader *header, NSError *error))failure;
- + (void)requestExpiredCouponSuccess:(void (^)(MSGHeader *header, NSInteger))success
- failure:(void (^)(MSGHeader *header, NSError *error))failure;
- + (void)markMessageRead:(NSString*)msgID
- msgType:(NSString*)type
- success:(void (^)(MSGHeader *header, id responseObject))success
- failure:(void (^)(MSGHeader *header, NSError *error))failure;
- - (void)removeAllMessages;
- - (void)addMessages:(NSArray*)messages;
- - (void)addTimelineMessages:(NSArray*)messages serverTime:(NSString *)serverTime;
- - (void)removeTimelineMessages;
- - (NSInteger)numberOfTimelineSectionsInTableView;
- - (NSInteger)numberOfRowsInTimelineSection:(NSInteger)section;
- - (FKAppMessage*)timelineItemAtIndex:(NSIndexPath *)indexPath;
- - (NSString *)timelineHeaderMessageAtIndexPath:(NSIndexPath *)indexPath;
- - (BOOL)hasTimelineMessage;
- @end
|