API  1.0.0
CPUserNotification.j
Go to the documentation of this file.
1 /*
2  * CPUserNotification.j
3  * Foundation
4  *
5  * Created by Alexandre Wilhelm.
6  * Copyright 2015, 280 North, Inc.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 
24 // We need something from the AppKit in Foundation ???
25 
26 @typedef CPUserNotificationAction
27 @typedef CPUserNotificationActivationType
28 
35 
42 
49 
56 
63 
69 @implementation CPUserNotification : CPObject
70 {
71  BOOL _presented;
72  BOOL _remote;
73  CPDate _actualDeliveryDate;
74  CPDate _deliveryDate;
75  CPDictionary _userInfo;
76  CPImage _contentImage;
77  CPString _identifier;
78  CPString _informativeText;
79  CPString _title;
80  CPTimeInterval _deliveryRepeatInterval;
81  CPTimeZone _deliveryTimeZone;
82  CPUserNotificationActivationType _activationType;
83 }
84 
85 
86 #pragma mark -
87 #pragma mark Creating an user notification
88 
89 - (id)init
90 {
91  self = [super init];
92 
93  if (self)
94  {
95  _identifier = [self UID];
96  }
97 
98  return self
99 }
100 
101 @end
102 
104 
108 - (BOOL)isPresented
109 {
110  return _presented;
111 }
112 
116 - (BOOL)isRemote
117 {
118  return _remote;
119 }
120 
124 - (CPDate)actualDeliveryDate
125 {
126  return _actualDeliveryDate;
127 }
128 
132 - (CPDate)deliveryDate
133 {
134  return _deliveryDate;
135 }
136 
140 - (void)setDeliveryDate:(CPDate)aValue
141 {
142  _deliveryDate = aValue;
143 }
144 
148 - (CPDictionary)userInfo
149 {
150  return _userInfo;
151 }
152 
156 - (void)setUserInfo:(CPDictionary)aValue
157 {
158  _userInfo = aValue;
159 }
160 
164 - (CPImage)contentImage
165 {
166  return _contentImage;
167 }
168 
172 - (void)setContentImage:(CPImage)aValue
173 {
174  _contentImage = aValue;
175 }
176 
181 {
182  return _identifier;
183 }
184 
188 - (void)setIdentifier:(CPString)aValue
189 {
190  _identifier = aValue;
191 }
192 
196 - (CPString)informativeText
197 {
198  return _informativeText;
199 }
200 
204 - (void)setInformativeText:(CPString)aValue
205 {
206  _informativeText = aValue;
207 }
208 
212 - (CPString)title
213 {
214  return _title;
215 }
216 
220 - (void)setTitle:(CPString)aValue
221 {
222  _title = aValue;
223 }
224 
228 - (CPTimeInterval)deliveryRepeatInterval
229 {
230  return _deliveryRepeatInterval;
231 }
232 
236 - (void)setDeliveryRepeatInterval:(CPTimeInterval)aValue
237 {
238  _deliveryRepeatInterval = aValue;
239 }
240 
244 - (CPTimeZone)deliveryTimeZone
245 {
246  return _deliveryTimeZone;
247 }
248 
252 - (void)setDeliveryTimeZone:(CPTimeZone)aValue
253 {
254  _deliveryTimeZone = aValue;
255 }
256 
260 - (CPUserNotificationActivationType)activationType
261 {
262  return _activationType;
263 }
264 
265 @end
id init()
Definition: CALayer.j:126
FrameUpdater prototype identifier
A representation of a single point in time.
Definition: CPDate.h:2
A mutable key-value pair collection.
Definition: CPDictionary.h:2
An immutable string (collection of characters).
Definition: CPString.h:2
Definition: CPImage.h:2
CPUserNotificationActivationTypeReplied
CPUserNotificationActivationTypeActionButtonClicked
CPTimeZone is a class to define the behvior of time zone object (like CPDatePicker) ...
Definition: CPTimeZone.h:2
CPUserNotificationActivationTypeAdditionalActionClicked
id init()
Definition: CPObject.j:145
CPUserNotificationActivationTypeContentsClicked
CPUserNotificationAction typedef CPUserNotificationActivationType CPUserNotificationActivationTypeNone
The CPUserNotification class is used to configure a notification that is scheduled for display by the...
CPString UID()
Definition: CPObject.j:552