Subversion Repositories TruePreview

[/] [trunk/] [Source/] [TruePreviewMessageViewer.h] - Blame information for rev 51

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jhriggs
/*
2 42 jhriggs
 * Copyright (c) 2009-2011, Jim Riggs, Christian Serving, L.L.C.
3 14 jhriggs
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are
7
 * met:
8
 *     * Redistributions of source code must retain the above copyright
9
 *       notice, this list of conditions and the following disclaimer.
10
 *     * Redistributions in binary form must reproduce the above
11
 *       copyright notice, this list of conditions and the following
12
 *       disclaimer in the documentation and/or other materials provided
13
 *       with the distribution.
14
 *     * Neither the name of Christian Serving, L.L.C. nor the names of
15
 *       its contributors may be used to endorse or promote products
16
 *       derived from this software without specific prior written
17
 *       permission.
18
 *
19
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
 */
31
 
32
/*!
33
 * @header
34
 * Defines the <code>TruePreviewMessageViewer</code> category for
35
 * <code>MessageViewer</code>.
36 42 jhriggs
 * @copyright Copyright (c) 2009-2011 Jim Riggs, Christian Serving, L.L.C. All rights reserved.
37 14 jhriggs
 * @version \@(#) $Id: TruePreviewLibraryMessage.h 2 2009-06-27 07:02:45Z jhriggs $
38
 * @updated $Date: 2009-06-27 02:02:45 -0500 (Sat, 27 Jun 2009) $
39
 */
40
 
41
#import "TruePreviewLibraryMessage.h"
42
 
43
/*!
44
 * @class
45
 * Adds a method for overriding the "mark as viewed" behavior of
46
 * <code>MessageViewer</code>.
47
 * @version \@(#) $Id: TruePreviewLibraryMessage.h 2 2009-06-27 07:02:45Z jhriggs $
48
 * @updated $Date: 2009-06-27 02:02:45 -0500 (Sat, 27 Jun 2009) $
49
 */
50
@interface TruePreviewMessageViewer : NSObject {
51
}
52
 
53
#pragma mark Class methods
54
/*! @group Class methods */
55
 
56
/*!
57
 * Returns the timers for instances of this class.
58
 * @result
59
 *   The <code>NSMutableDictionary</code> containing the <code>NSTimer</code>
60
 *   for each instance of this class.  The key is an <code>NSNumber</code>
61
 *   (unsigned long) of the address of each instance.
62
 */
63
+ (NSMutableDictionary*)truePreviewTimers;
64
 
65
#pragma mark Swizzled instance methods
66
/*! @group Swizzled instance methods */
67
 
68
/*!
69
 * Invalidates this instance's timer and stops observing scroll changes before
70
 * deallocating.
71
 */
72
- (void)truePreviewDealloc;
73
 
74
/*!
75 23 jhriggs
 * Marks the currently-displayed message as read if configured to do so when
76
 * forwarding.
77
 * @param inSender
78
 *   Unused.
79
 */
80
- (void)truePreviewForwardAsAttachment:(id)inSender;
81
 
82
/*!
83
 * Marks the currently-displayed message as read if configured to do so when
84
 * forwarding.
85
 * @param inSender
86
 *   Unused.
87
 */
88
- (void)truePreviewForwardMessage:(id)inSender;
89
 
90
/*!
91 14 jhriggs
 * Invalidates this instance's timer and stops observing scroll changes when a
92
 * message is explicitly marked as read.
93
 * @param inSender
94
 *   Unused.
95
 */
96
- (void)truePreviewMarkAsRead:(id)inSender;
97
 
98
/*!
99
 * Invalidates this instance's timer and stops observing scroll changes when a
100
 * message is explicitly marked as unread.
101
 * @param inSender
102
 *   Unused.
103
 */
104
- (void)truePreviewMarkAsUnread:(id)inSender;
105
 
106
/*!
107 51 jhriggs
 * Calls <code>truePreviewCreateTimer:</code> to mark the provided message as
108
 * read based on the current preferences.
109
 * @param inMessage
110
 *   The message being marked as read.
111 23 jhriggs
 */
112 51 jhriggs
- (void)truePreviewMarkMessageAsViewed:(id)inMessage;
113 23 jhriggs
 
114
/*!
115 51 jhriggs
 * Calls <code>truePreviewCreateTimer:</code> to mark the provided messages as
116
 * read based on the current preferences.
117
 * @param inMessage
118
 *   The <code>NSArray</code> of messages being marked as read.
119
 */
120
- (void)truePreviewMarkMessagesAsViewed:(NSArray*)inMessages;
121
 
122
/*!
123
 * Adds a notification observer to mark the message as viewed when it is
124
 * scrolled as appropriate.
125 14 jhriggs
 * @param inNotification
126
 *   The <code>NSNotification</code> describing the event.
127
 */
128
- (void)truePreviewMessageWasDisplayedInTextView:(id)inNotification;
129
 
130
/*!
131 23 jhriggs
 * Marks the currently-displayed message as read if configured to do so when
132
 * replying.
133
 * @param inSender
134
 *   Unused.
135 14 jhriggs
 */
136 23 jhriggs
- (void)truePreviewReplyAllMessage:(id)inSender;
137 14 jhriggs
 
138 23 jhriggs
/*!
139
 * Marks the currently-displayed message as read if configured to do so when
140
 * replying.
141
 * @param inSender
142
 *   Unused.
143
 */
144
- (void)truePreviewReplyMessage:(id)inSender;
145
 
146 51 jhriggs
/*!
147
 * Invalidates this instance's timer.
148
 */
149
- (void)truePreviewSelectedMessagesDidChangeInMessageList;
150
 
151 14 jhriggs
#pragma mark Accessors
152
/*! @group Accessors */
153
 
154
/*!
155
 * Returns the timer for this instance.
156
 * @result
157
 *   The <code>NSTimer</code> for this instance.
158
 */
159
- (NSTimer*)truePreviewTimer;
160
 
161
/*!
162
 * Sets the timer for this instance.
163
 * @param inTimer
164
 *   The <code>NSTimer</code> for this instance.
165
 */
166
- (void)truePreviewSetTimer:(NSTimer*)inTimer;
167
 
168
#pragma mark Instance methods
169
/*! @group Instance methods */
170
 
171
/*!
172 51 jhriggs
 * Creates and sets a timer for this instance based on its settings.
173
 * @param inMessages
174
 *   The <code>LibraryMessage</code> or <code>NSArray</code> of messages for
175
 *   which the timer is being created.
176
 */
177
- (void)truePreviewCreateTimer:(id)inMessages;
178
 
179
/*!
180 14 jhriggs
 * Invalidates this instance's timer and stops observing scroll changes.
181
 */
182
- (void)truePreviewReset;
183
 
184
/*!
185
 * Marks the currently-displayed message as read.
186
 * @param inTimer
187
 *   Unused.
188
 */
189
- (void)truePreviewTimerFired:(NSTimer*)inTimer;
190
 
191
/*!
192
 * Marks the currently-displayed message as read.
193
 * @param inNotification
194
 *   Unused.
195
 */
196 33 jhriggs
- (void)truePreviewMessageClickedOrScrolled:(NSNotification*)inNotification;
197 14 jhriggs
 
198
@end