source: trunk/macosx/Growl.framework/Versions/A/Headers/GrowlApplicationBridge.h @ 13469

Last change on this file since 13469 was 13469, checked in by livings124, 10 years ago

Revert r13468 for now.

File size: 26.6 KB
Line 
1//
2//  GrowlApplicationBridge.h
3//  Growl
4//
5//  Created by Evan Schoenberg on Wed Jun 16 2004.
6//  Copyright 2004-2006 The Growl Project. All rights reserved.
7//
8
9/*!
10 *      @header         GrowlApplicationBridge.h
11 *      @abstract   Defines the GrowlApplicationBridge class.
12 *      @discussion This header defines the GrowlApplicationBridge class as well as
13 *       the GROWL_PREFPANE_BUNDLE_IDENTIFIER constant.
14 */
15
16#ifndef __GrowlApplicationBridge_h__
17#define __GrowlApplicationBridge_h__
18
19#import <Foundation/Foundation.h>
20#import <AppKit/AppKit.h>
21#import <Growl/GrowlDefines.h>
22
23//Forward declarations
24@protocol GrowlApplicationBridgeDelegate;
25
26//------------------------------------------------------------------------------
27#pragma mark -
28
29/*!
30 *      @class      GrowlApplicationBridge
31 *      @abstract   A class used to interface with Growl.
32 *      @discussion This class provides a means to interface with Growl.
33 *
34 *       Currently it provides a way to detect if Growl is installed and launch the
35 *       GrowlHelperApp if it's not already running.
36 */
37@interface GrowlApplicationBridge : NSObject {
38
39}
40
41/*!
42 *      @method isGrowlInstalled
43 *      @abstract Detects whether Growl is installed.
44 *      @discussion Determines if the Growl prefpane and its helper app are installed.
45 *      @result this method will forever return YES.
46 */
47+ (BOOL) isGrowlInstalled __attribute__((deprecated));
48
49/*!
50 *      @method isGrowlRunning
51 *      @abstract Detects whether GrowlHelperApp is currently running.
52 *      @discussion Cycles through the process list to find whether GrowlHelperApp is running and returns its findings.
53 *      @result Returns YES if GrowlHelperApp is running, NO otherwise.
54 */
55+ (BOOL) isGrowlRunning;
56
57
58/*!
59 *      @method isMistEnabled
60 *      @abstract Gives the caller a fairly good indication of whether or not built-in notifications(Mist) will be used.
61 *      @discussion since this call makes use of isGrowlRunning it is entirely possible for this value to change between call and
62 *    executing a notification dispatch
63 *      @result Returns YES if Growl isn't reachable and the developer has not opted-out of
64 *    Mist and the user hasn't set the global mist enable key to false.
65 */
66+ (BOOL)isMistEnabled;
67
68/*!
69 *      @method setShouldUseBuiltInNotifications
70 *      @abstract opt-out mechanism for the mist notification style in the event growl can't be reached.
71 *      @discussion if growl is unavailable due to not being installed or as a result of being turned off then
72 *    this option can enable/disable a built-in fire and forget display style
73 *      @param should Specifies whether or not the developer wants to opt-in (default) or opt out
74 *    of the built-in Mist style in the event Growl is unreachable.
75 */
76+ (void)setShouldUseBuiltInNotifications:(BOOL)should;
77
78/*!
79 *      @method shouldUseBuiltInNotifications
80 *      @abstract returns the current opt-in state of the framework's use of the Mist display style.
81 *      @result Returns NO if the developer opt-ed out of Mist, the default value is YES.
82 */
83+ (BOOL)shouldUseBuiltInNotifications;
84
85#pragma mark -
86
87/*!
88 *      @method setGrowlDelegate:
89 *      @abstract Set the object which will be responsible for providing and receiving Growl information.
90 *      @discussion This must be called before using GrowlApplicationBridge.
91 *
92 *       The methods in the GrowlApplicationBridgeDelegate protocol are required
93 *       and return the basic information needed to register with Growl.
94 *
95 *       The methods in the GrowlApplicationBridgeDelegate_InformalProtocol
96 *       informal protocol are individually optional.  They provide a greater
97 *       degree of interaction between the application and growl such as informing
98 *       the application when one of its Growl notifications is clicked by the user.
99 *
100 *       The methods in the GrowlApplicationBridgeDelegate_Installation_InformalProtocol
101 *       informal protocol are individually optional and are only applicable when
102 *       using the Growl-WithInstaller.framework which allows for automated Growl
103 *       installation.
104 *
105 *       When this method is called, data will be collected from inDelegate, Growl
106 *       will be launched if it is not already running, and the application will be
107 *       registered with Growl.
108 *
109 *       If using the Growl-WithInstaller framework, if Growl is already installed
110 *       but this copy of the framework has an updated version of Growl, the user
111 *       will be prompted to update automatically.
112 *
113 *      @param inDelegate The delegate for the GrowlApplicationBridge. It must conform to the GrowlApplicationBridgeDelegate protocol.
114 */
115+ (void) setGrowlDelegate:(id<GrowlApplicationBridgeDelegate>)inDelegate;
116
117/*!
118 *      @method growlDelegate
119 *      @abstract Return the object responsible for providing and receiving Growl information.
120 *      @discussion See setGrowlDelegate: for details.
121 *      @result The Growl delegate.
122 */
123+ (id<GrowlApplicationBridgeDelegate>) growlDelegate;
124
125#pragma mark -
126
127/*!
128 *      @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:
129 *      @abstract Send a Growl notification.
130 *      @discussion This is the preferred means for sending a Growl notification.
131 *       The notification name and at least one of the title and description are
132 *       required (all three are preferred).  All other parameters may be
133 *       <code>nil</code> (or 0 or NO as appropriate) to accept default values.
134 *
135 *       If using the Growl-WithInstaller framework, if Growl is not installed the
136 *       user will be prompted to install Growl. If the user cancels, this method
137 *       will have no effect until the next application session, at which time when
138 *       it is called the user will be prompted again. The user is also given the
139 *       option to not be prompted again.  If the user does choose to install Growl,
140 *       the requested notification will be displayed once Growl is installed and
141 *       running.
142 *
143 *      @param title            The title of the notification displayed to the user.
144 *      @param description      The full description of the notification displayed to the user.
145 *      @param notifName        The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
146 *      @param iconData         <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
147 *      @param priority         The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
148 *      @param isSticky         If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
149 *      @param clickContext     A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
150 */
151+ (void) notifyWithTitle:(NSString *)title
152                         description:(NSString *)description
153                notificationName:(NSString *)notifName
154                                iconData:(NSData *)iconData
155                                priority:(signed int)priority
156                                isSticky:(BOOL)isSticky
157                        clickContext:(id)clickContext;
158
159/*!
160 *      @method notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:identifier:
161 *      @abstract Send a Growl notification.
162 *      @discussion This is the preferred means for sending a Growl notification.
163 *       The notification name and at least one of the title and description are
164 *       required (all three are preferred).  All other parameters may be
165 *       <code>nil</code> (or 0 or NO as appropriate) to accept default values.
166 *
167 *       If using the Growl-WithInstaller framework, if Growl is not installed the
168 *       user will be prompted to install Growl. If the user cancels, this method
169 *       will have no effect until the next application session, at which time when
170 *       it is called the user will be prompted again. The user is also given the
171 *       option to not be prompted again.  If the user does choose to install Growl,
172 *       the requested notification will be displayed once Growl is installed and
173 *       running.
174 *
175 *      @param title            The title of the notification displayed to the user.
176 *      @param description      The full description of the notification displayed to the user.
177 *      @param notifName        The internal name of the notification. Should be human-readable, as it will be displayed in the Growl preference pane.
178 *      @param iconData         <code>NSData</code> object to show with the notification as its icon. If <code>nil</code>, the application's icon will be used instead.
179 *      @param priority         The priority of the notification. The default value is 0; positive values are higher priority and negative values are lower priority. Not all Growl displays support priority.
180 *      @param isSticky         If YES, the notification will remain on screen until clicked. Not all Growl displays support sticky notifications.
181 *      @param clickContext     A context passed back to the Growl delegate if it implements -(void)growlNotificationWasClicked: and the notification is clicked. Not all display plugins support clicking. The clickContext must be plist-encodable (completely of <code>NSString</code>, <code>NSArray</code>, <code>NSNumber</code>, <code>NSDictionary</code>, and <code>NSData</code> types).
182 *      @param identifier       An identifier for this notification. Notifications with equal identifiers are coalesced.
183 */
184+ (void) notifyWithTitle:(NSString *)title
185                         description:(NSString *)description
186                notificationName:(NSString *)notifName
187                                iconData:(NSData *)iconData
188                                priority:(signed int)priority
189                                isSticky:(BOOL)isSticky
190                        clickContext:(id)clickContext
191                          identifier:(NSString *)identifier;
192
193/*!     @method notifyWithDictionary:
194 *      @abstract       Notifies using a userInfo dictionary suitable for passing to
195 *       <code>NSDistributedNotificationCenter</code>.
196 *      @param  userInfo        The dictionary to notify with.
197 *      @discussion     Before Growl 0.6, your application would have posted
198 *       notifications using <code>NSDistributedNotificationCenter</code> by
199 *       creating a userInfo dictionary with the notification data. This had the
200 *       advantage of allowing you to add other data to the dictionary for programs
201 *       besides Growl that might be listening.
202 *
203 *       This method allows you to use such dictionaries without being restricted
204 *       to using <code>NSDistributedNotificationCenter</code>. The keys for this dictionary
205 *       can be found in GrowlDefines.h.
206 */
207+ (void) notifyWithDictionary:(NSDictionary *)userInfo;
208
209#pragma mark -
210
211/*!     @method registerWithDictionary:
212 *      @abstract       Register your application with Growl without setting a delegate.
213 *      @discussion     When you call this method with a dictionary,
214 *       GrowlApplicationBridge registers your application using that dictionary.
215 *       If you pass <code>nil</code>, GrowlApplicationBridge will ask the delegate
216 *       (if there is one) for a dictionary, and if that doesn't work, it will look
217 *       in your application's bundle for an auto-discoverable plist.
218 *       (XXX refer to more information on that)
219 *
220 *       If you pass a dictionary to this method, it must include the
221 *       <code>GROWL_APP_NAME</code> key, unless a delegate is set.
222 *
223 *       This method is mainly an alternative to the delegate system introduced
224 *       with Growl 0.6. Without a delegate, you cannot receive callbacks such as
225 *       <code>-growlIsReady</code> (since they are sent to the delegate). You can,
226 *       however, set a delegate after registering without one.
227 *
228 *       This method was introduced in Growl.framework 0.7.
229 */
230+ (BOOL) registerWithDictionary:(NSDictionary *)regDict;
231
232/*!     @method reregisterGrowlNotifications
233 *      @abstract       Reregister the notifications for this application.
234 *      @discussion     This method does not normally need to be called.  If your
235 *       application changes what notifications it is registering with Growl, call
236 *       this method to have the Growl delegate's
237 *       <code>-registrationDictionaryForGrowl</code> method called again and the
238 *       Growl registration information updated.
239 *
240 *       This method is now implemented using <code>-registerWithDictionary:</code>.
241 */
242+ (void) reregisterGrowlNotifications;
243
244#pragma mark -
245
246/*!     @method setWillRegisterWhenGrowlIsReady:
247 *      @abstract       Tells GrowlApplicationBridge to register with Growl when Growl
248 *       launches (or not).
249 *      @discussion     When Growl has started listening for notifications, it posts a
250 *       <code>GROWL_IS_READY</code> notification on the Distributed Notification
251 *       Center. GrowlApplicationBridge listens for this notification, using it to
252 *       perform various tasks (such as calling your delegate's
253 *       <code>-growlIsReady</code> method, if it has one). If this method is
254 *       called with <code>YES</code>, one of those tasks will be to reregister
255 *       with Growl (in the manner of <code>-reregisterGrowlNotifications</code>).
256 *
257 *       This attribute is automatically set back to <code>NO</code> (the default)
258 *       after every <code>GROWL_IS_READY</code> notification.
259 *      @param  flag    <code>YES</code> if you want GrowlApplicationBridge to register with
260 *       Growl when next it is ready; <code>NO</code> if not.
261 */
262+ (void) setWillRegisterWhenGrowlIsReady:(BOOL)flag;
263
264/*!     @method willRegisterWhenGrowlIsReady
265 *      @abstract       Reports whether GrowlApplicationBridge will register with Growl
266 *       when Growl next launches.
267 *      @result <code>YES</code> if GrowlApplicationBridge will register with Growl
268 *       when next it posts GROWL_IS_READY; <code>NO</code> if not.
269 */
270+ (BOOL) willRegisterWhenGrowlIsReady;
271
272#pragma mark -
273
274/*!     @method registrationDictionaryFromDelegate
275 *      @abstract       Asks the delegate for a registration dictionary.
276 *      @discussion     If no delegate is set, or if the delegate's
277 *       <code>-registrationDictionaryForGrowl</code> method returns
278 *       <code>nil</code>, this method returns <code>nil</code>.
279 *
280 *       This method does not attempt to clean up the dictionary in any way - for
281 *       example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
282 *       will be missing it too. Use <code>+[GrowlApplicationBridge
283 *       registrationDictionaryByFillingInDictionary:]</code> or
284 *       <code>+[GrowlApplicationBridge
285 *       registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
286 *       to fill in missing keys.
287 *
288 *       This method was introduced in Growl.framework 0.7.
289 *      @result A registration dictionary.
290 */
291+ (NSDictionary *) registrationDictionaryFromDelegate;
292
293/*!     @method registrationDictionaryFromBundle:
294 *      @abstract       Looks in a bundle for a registration dictionary.
295 *      @discussion     This method looks in a bundle for an auto-discoverable
296 *       registration dictionary file using <code>-[NSBundle
297 *       pathForResource:ofType:]</code>. If it finds one, it loads the file using
298 *       <code>+[NSDictionary dictionaryWithContentsOfFile:]</code> and returns the
299 *       result.
300 *
301 *       If you pass <code>nil</code> as the bundle, the main bundle is examined.
302 *
303 *       This method does not attempt to clean up the dictionary in any way - for
304 *       example, if it is missing the <code>GROWL_APP_NAME</code> key, the result
305 *       will be missing it too. Use <code>+[GrowlApplicationBridge
306 *       registrationDictionaryByFillingInDictionary:]</code> or
307 *       <code>+[GrowlApplicationBridge
308 *       registrationDictionaryByFillingInDictionary:restrictToKeys:]</code> to try
309 *       to fill in missing keys.
310 *
311 *       This method was introduced in Growl.framework 0.7.
312 *      @result A registration dictionary.
313 */
314+ (NSDictionary *) registrationDictionaryFromBundle:(NSBundle *)bundle;
315
316/*!     @method bestRegistrationDictionary
317 *      @abstract       Obtains a registration dictionary, filled out to the best of
318 *       GrowlApplicationBridge's knowledge.
319 *      @discussion     This method creates a registration dictionary as best
320 *       GrowlApplicationBridge knows how.
321 *
322 *       First, GrowlApplicationBridge contacts the Growl delegate (if there is
323 *       one) and gets the registration dictionary from that. If no such dictionary
324 *       was obtained, GrowlApplicationBridge looks in your application's main
325 *       bundle for an auto-discoverable registration dictionary file. If that
326 *       doesn't exist either, this method returns <code>nil</code>.
327 *
328 *       Second, GrowlApplicationBridge calls
329 *       <code>+registrationDictionaryByFillingInDictionary:</code> with whatever
330 *       dictionary was obtained. The result of that method is the result of this
331 *       method.
332 *
333 *       GrowlApplicationBridge uses this method when you call
334 *       <code>+setGrowlDelegate:</code>, or when you call
335 *       <code>+registerWithDictionary:</code> with <code>nil</code>.
336 *
337 *       This method was introduced in Growl.framework 0.7.
338 *      @result A registration dictionary.
339 */
340+ (NSDictionary *) bestRegistrationDictionary;
341
342#pragma mark -
343
344/*!     @method registrationDictionaryByFillingInDictionary:
345 *      @abstract       Tries to fill in missing keys in a registration dictionary.
346 *      @discussion     This method examines the passed-in dictionary for missing keys,
347 *       and tries to work out correct values for them. As of 0.7, it uses:
348 *
349 *       Key                                                                 Value
350 *       ---                                                                 -----
351 *       <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
352 *       <code>GROWL_APP_ICON_DATA</code>            The data of the icon of the application.
353 *       <code>GROWL_APP_LOCATION</code>             The location of the application.
354 *       <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
355 *
356 *       Keys are only filled in if missing; if a key is present in the dictionary,
357 *       its value will not be changed.
358 *
359 *       This method was introduced in Growl.framework 0.7.
360 *      @param  regDict The dictionary to fill in.
361 *      @result The dictionary with the keys filled in. This is an autoreleased
362 *       copy of <code>regDict</code>.
363 */
364+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
365
366/*!     @method registrationDictionaryByFillingInDictionary:restrictToKeys:
367 *      @abstract       Tries to fill in missing keys in a registration dictionary.
368 *      @discussion     This method examines the passed-in dictionary for missing keys,
369 *       and tries to work out correct values for them. As of 0.7, it uses:
370 *
371 *       Key                                                                 Value
372 *       ---                                                                 -----
373 *       <code>GROWL_APP_NAME</code>                 <code>CFBundleExecutableName</code>
374 *       <code>GROWL_APP_ICON_DATA</code>            The data of the icon of the application.
375 *       <code>GROWL_APP_LOCATION</code>             The location of the application.
376 *       <code>GROWL_NOTIFICATIONS_DEFAULT</code>    <code>GROWL_NOTIFICATIONS_ALL</code>
377 *
378 *       Only those keys that are listed in <code>keys</code> will be filled in.
379 *       Other missing keys are ignored. Also, keys are only filled in if missing;
380 *       if a key is present in the dictionary, its value will not be changed.
381 *
382 *       This method was introduced in Growl.framework 0.7.
383 *      @param  regDict The dictionary to fill in.
384 *      @param  keys    The keys to fill in. If <code>nil</code>, any missing keys are filled in.
385 *      @result The dictionary with the keys filled in. This is an autoreleased
386 *       copy of <code>regDict</code>.
387 */
388+ (NSDictionary *) registrationDictionaryByFillingInDictionary:(NSDictionary *)regDict restrictToKeys:(NSSet *)keys;
389
390/*!     @brief  Tries to fill in missing keys in a notification dictionary.
391 *      @param  notifDict       The dictionary to fill in.
392 *      @return The dictionary with the keys filled in. This will be a separate instance from \a notifDict.
393 *      @discussion     This function examines the \a notifDict for missing keys, and
394 *       tries to get them from the last known registration dictionary. As of 1.1,
395 *       the keys that it will look for are:
396 *
397 *       \li <code>GROWL_APP_NAME</code>
398 *       \li <code>GROWL_APP_ICON_DATA</code>
399 *
400 *      @since Growl.framework 1.1
401 */
402+ (NSDictionary *) notificationDictionaryByFillingInDictionary:(NSDictionary *)regDict;
403
404+ (NSDictionary *) frameworkInfoDictionary;
405
406#pragma mark -
407
408/*!
409 *@method growlURLSchemeAvailable
410 *@abstract Lets the app know whether growl:// is registered on the system, used for certain methods below this
411 *@return Returns whether growl:// is registered on the system
412 *@discussion Methods such as openGrowlPreferences rely on the growl:// URL scheme to function
413 * Further, this method can provide a check on whether Growl is installed,
414 * however, the framework will not be relying on this method for choosing when/how to notify,
415 * and it is not recommended that the app rely on it for other than whether to use growl:// methods
416 *@since Growl.framework 1.4
417 */
418+ (BOOL) isGrowlURLSchemeAvailable;
419
420/*!
421 * @method openGrowlPreferences:
422 * @abstract Open Growl preferences, optionally to this app's settings, growl:// method
423 * @param showApp Whether to show the application's settings, otherwise just opens to the last position
424 * @return Return's whether opening the URL was succesfull or not. 
425 * @discussion Will launch if Growl is installed, but not running, and open the preferences window
426 * Uses growl:// URL scheme
427 * @since Growl.framework 1.4
428 */
429+ (BOOL) openGrowlPreferences:(BOOL)showApp;
430
431@end
432
433//------------------------------------------------------------------------------
434#pragma mark -
435
436/*!
437 *      @protocol GrowlApplicationBridgeDelegate
438 *      @abstract Required protocol for the Growl delegate.
439 *      @discussion The methods in this protocol are optional and are called
440 *       automatically as needed by GrowlApplicationBridge. See
441 *       <code>+[GrowlApplicationBridge setGrowlDelegate:]</code>.
442 *       See also <code>GrowlApplicationBridgeDelegate_InformalProtocol</code>.
443 */
444
445@protocol GrowlApplicationBridgeDelegate <NSObject>
446
447@optional
448
449/*!
450 *      @method registrationDictionaryForGrowl
451 *      @abstract Return the dictionary used to register this application with Growl.
452 *      @discussion The returned dictionary gives Growl the complete list of
453 *       notifications this application will ever send, and it also specifies which
454 *       notifications should be enabled by default.  Each is specified by an array
455 *       of <code>NSString</code> objects.
456 *
457 *       For most applications, these two arrays can be the same (if all sent
458 *       notifications should be displayed by default).
459 *
460 *       The <code>NSString</code> objects of these arrays will correspond to the
461 *       <code>notificationName:</code> parameter passed in
462 *       <code>+[GrowlApplicationBridge
463 *       notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:]</code> calls.
464 *
465 *       The dictionary should have the required key object pairs:
466 *       key: GROWL_NOTIFICATIONS_ALL           object: <code>NSArray</code> of <code>NSString</code> objects
467 *       key: GROWL_NOTIFICATIONS_DEFAULT       object: <code>NSArray</code> of <code>NSString</code> objects
468 *
469 *   The dictionary may have the following key object pairs:
470 *   key: GROWL_NOTIFICATIONS_HUMAN_READABLE_NAMES      object: <code>NSDictionary</code> of key: notification name             object: human-readable notification name
471 *
472 *       You do not need to implement this method if you have an auto-discoverable
473 *       plist file in your app bundle. (XXX refer to more information on that)
474 *
475 *      @result The <code>NSDictionary</code> to use for registration.
476 */
477- (NSDictionary *) registrationDictionaryForGrowl;
478
479/*!
480 *      @method applicationNameForGrowl
481 *      @abstract Return the name of this application which will be used for Growl bookkeeping.
482 *      @discussion This name is used both internally and in the Growl preferences.
483 *
484 *       This should remain stable between different versions and incarnations of
485 *       your application.
486 *       For example, "SurfWriter" is a good app name, whereas "SurfWriter 2.0" and
487 *       "SurfWriter Lite" are not.
488 *
489 *       You do not need to implement this method if you are providing the
490 *       application name elsewhere, meaning in an auto-discoverable plist file in
491 *       your app bundle (XXX refer to more information on that) or in the result
492 *       of -registrationDictionaryForGrowl.
493 *
494 *      @result The name of the application using Growl.
495 */
496- (NSString *) applicationNameForGrowl;
497
498/*!
499 *      @method applicationIconForGrowl
500 *      @abstract Return the <code>NSImage</code> to treat as the application icon.
501 *      @discussion The delegate may optionally return an <code>NSImage</code>
502 *       object to use as the application icon. If this method is not implemented,
503 *       {{{-applicationIconDataForGrowl}}} is tried. If that method is not
504 *       implemented, the application's own icon is used. Neither method is
505 *       generally needed.
506 *      @result The <code>NSImage</code> to treat as the application icon.
507 */
508- (NSImage *) applicationIconForGrowl;
509
510/*!
511 *      @method applicationIconDataForGrowl
512 *      @abstract Return the <code>NSData</code> to treat as the application icon.
513 *      @discussion The delegate may optionally return an <code>NSData</code>
514 *       object to use as the application icon; if this is not implemented, the
515 *       application's own icon is used.  This is not generally needed.
516 *      @result The <code>NSData</code> to treat as the application icon.
517 *      @deprecated In version 1.1, in favor of {{{-applicationIconForGrowl}}}.
518 */
519- (NSData *) applicationIconDataForGrowl;
520
521/*!
522 *      @method growlIsReady
523 *      @abstract Informs the delegate that Growl has launched.
524 *      @discussion Informs the delegate that Growl (specifically, the
525 *       GrowlHelperApp) was launched successfully. The application can take actions
526 *   with the knowledge that Growl is installed and functional.
527 */
528- (void) growlIsReady;
529
530/*!
531 *      @method growlNotificationWasClicked:
532 *      @abstract Informs the delegate that a Growl notification was clicked.
533 *      @discussion Informs the delegate that a Growl notification was clicked.  It
534 *       is only sent for notifications sent with a non-<code>nil</code>
535 *       clickContext, so if you want to receive a message when a notification is
536 *       clicked, clickContext must not be <code>nil</code> when calling
537 *       <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
538 *      @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
539 */
540- (void) growlNotificationWasClicked:(id)clickContext;
541
542/*!
543 *      @method growlNotificationTimedOut:
544 *      @abstract Informs the delegate that a Growl notification timed out.
545 *      @discussion Informs the delegate that a Growl notification timed out. It
546 *       is only sent for notifications sent with a non-<code>nil</code>
547 *       clickContext, so if you want to receive a message when a notification is
548 *       clicked, clickContext must not be <code>nil</code> when calling
549 *       <code>+[GrowlApplicationBridge notifyWithTitle: description:notificationName:iconData:priority:isSticky:clickContext:]</code>.
550 *      @param clickContext The clickContext passed when displaying the notification originally via +[GrowlApplicationBridge notifyWithTitle:description:notificationName:iconData:priority:isSticky:clickContext:].
551 */
552- (void) growlNotificationTimedOut:(id)clickContext;
553
554
555/*!
556 * @method hasNetworkClientEntitlement
557 * @abstract Used only in sandboxed situations since we don't know whether the app has com.apple.security.network.client entitlement
558 * @discussion GrowlDelegate calls to find out if we have the com.apple.security.network.client entitlement,
559 *  since we can't find this out without hitting the sandbox.  We only call it if we detect that the application is sandboxed.
560 */
561- (BOOL) hasNetworkClientEntitlement;
562
563@end
564
565#pragma mark -
566
567#endif /* __GrowlApplicationBridge_h__ */
Note: See TracBrowser for help on using the repository browser.