Subversion Repositories TruePreview

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jhriggs
/*
2
 * Copyright (c) 2009, Jim Riggs, Christian Serving, L.L.C.
3
 * 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
 * @copyright Copyright (c) 2009 Jim Riggs, Christian Serving, L.L.C. All rights reserved.
37
 * @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 23 jhriggs
 * Invalidates this instance's timer and stops observing scroll changes.
108
 * @param inNotification
109
 *   The <code>NSNotification</code> describing the event.
110
 */
111
- (void)truePreviewMessageNoLongerDisplayedInTextView:(NSNotification*)inNotification;
112
 
113
/*!
114 14 jhriggs
 * Marks the displayed message as viewed, sets a timer to mark the displayed
115
 * message as viewed, and/or adds a notification observer to mark the message as
116
 * viewed when it is scrolled as appropriate.
117
 * @param inNotification
118
 *   The <code>NSNotification</code> describing the event.
119
 */
120
- (void)truePreviewMessageWasDisplayedInTextView:(id)inNotification;
121
 
122
/*!
123 23 jhriggs
 * Marks the currently-displayed message as read if configured to do so when
124
 * replying.
125
 * @param inSender
126
 *   Unused.
127 14 jhriggs
 */
128 23 jhriggs
- (void)truePreviewReplyAllMessage:(id)inSender;
129 14 jhriggs
 
130 23 jhriggs
/*!
131
 * Marks the currently-displayed message as read if configured to do so when
132
 * replying.
133
 * @param inSender
134
 *   Unused.
135
 */
136
- (void)truePreviewReplyMessage:(id)inSender;
137
 
138 14 jhriggs
#pragma mark Accessors
139
/*! @group Accessors */
140
 
141
/*!
142
 * Returns the timer for this instance.
143
 * @result
144
 *   The <code>NSTimer</code> for this instance.
145
 */
146
- (NSTimer*)truePreviewTimer;
147
 
148
/*!
149
 * Sets the timer for this instance.
150
 * @param inTimer
151
 *   The <code>NSTimer</code> for this instance.
152
 */
153
- (void)truePreviewSetTimer:(NSTimer*)inTimer;
154
 
155
#pragma mark Instance methods
156
/*! @group Instance methods */
157
 
158
/*!
159
 * Invalidates this instance's timer and stops observing scroll changes.
160
 */
161
- (void)truePreviewReset;
162
 
163
/*!
164
 * Marks the currently-displayed message as read.
165
 * @param inTimer
166
 *   Unused.
167
 */
168
- (void)truePreviewTimerFired:(NSTimer*)inTimer;
169
 
170
/*!
171
 * Marks the currently-displayed message as read.
172
 * @param inNotification
173
 *   Unused.
174
 */
175
- (void)truePreviewBoundsDidChange:(NSNotification*)inNotification;
176
 
177
@end