DEPRECATED: Diffusion iOS Classic API  5.9.4
 All Data Structures Files Functions Variables Enumerations Enumerator Properties Macros Pages
DFPagedTopicDelegate.h
1 //
2 // DFPagedTopicDelegate.h
3 // DiffusionTransport
4 //
5 // Created by Martin Cowie on 05/01/2012 - Diffusion 5.9.4_01
6 // Copyright (c) 2013 Push Technology Ltd. All rights reserved.
7 //
8 
10 
11 /**
12  * Delegate for events from a Paged Topic
13  *
14  * @author Martin Cowie - created 6 Jan 2012
15  * @since 4.1
16  */
17 @protocol DFPagedTopicDelegate <NSObject>
18 
19 /**
20  * Notifies receipt of a page from the server.
21  * <P>
22  * This may be received in response to
23  * [DFPagedTopicHandler openLinesPerPage:linesPerPage] or
24  * [DFPagedTopicHandler page] requests.
25  *
26  * @param handler the handler
27  *
28  * @param status the current status of the Topic.
29  *
30  * @param lines the lines of data on the page. Contains either NSString or NSArray objects for string or record based topics, respectively.
31  */
32 -(void)pageWithLines:(NSArray*)lines status:(DFPageStatus*)status handler:(DFPagedTopicHandler*)handler;
33 
34 /**
35  * Notifies lines added to the end of the current page.
36  * <P>
37  * @param handler the handler
38  *
39  * @param status the current status of the Topic.
40  *
41  * @param lines the lines of data to be added to the end of the current
42  * page. There may be less than or equal to the number of lines required to
43  * fill the page and the status would indicate whether there is now more
44  * following the current page.
45  */
46 -(void)addedLines:(NSArray*)lines status:(DFPageStatus*)status handler:(DFPagedTopicHandler*)handler;
47 
48 
49 
50 /**
51  * Notifies a status change.
52  * <P>
53  * This will happen if lines have been added or removed which affect the
54  * pagination (e.g. the current page number of the total number of pages
55  * has changed). If lines have been added or removed on or before the
56  * current page then the status will indicate that the page is 'dirty',
57  * meaning that what is currently displayed is out of date and should be
58  * refreshed (using [DFPagedTopicHandler page]) .
59  * <P>
60  * @param handler the handler
61  * @param status the current status in relation to the current page.
62  */
63 -(void)statusChanged:(DFPageStatus*)status handler:(DFPagedTopicHandler*)handler;
64 
65 @optional
66 /**
67  * Notifies an update to the data of a line on the current page.
68  * <P>
69  * @param handler the handler
70  *
71  * @param index the relative index of the line within the current page
72  * (where the index of the first line is 0).
73  *
74  * @param lines an NSArray containing a single line of data
75  * which may be used to replace the current line.
76  * @deprecated in favor of [updatedLines:status:index:handler:]
77  */
78 -(void)updatedLines:(NSArray*)lines index:(int)index handler:(DFPagedTopicHandler*)handler __attribute__((deprecated));
79 
80 /**
81  * Notifies an update to the data of a line on the current page.
82  * <P>
83  * @param handler the handler
84  *
85  * @param status the current status of the Topic
86  *
87  * @param index the relative index of the line within the current page
88  * (where the index of the first line is 0).
89  *
90  * @param lines an NSArray containing a single line of data
91  * which may be used to replace the current line.
92  */
93 -(void)updatedLines:(NSArray*)lines status:(DFPageStatus*)status index:(int)index handler:(DFPagedTopicHandler*)handler;
94 
95 @end