3
*************************************************************************
5
ArmageTron -- Just another Tron Lightcycle Game in 3D.
7
and the AA DevTeam (see the file AUTHORS(.txt) in the main source directory)
9
**************************************************************************
11
This program is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License
13
as published by the Free Software Foundation; either version 2
14
of the License, or (at your option) any later version.
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License for more details.
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, write to the Free Software
23
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
***************************************************************************
29
#include <Growl-WithInstaller/GrowlApplicationBridge.h>
30
#include <Growl-WithInstaller/GrowlDefines.h>
31
#include "AAGrowlPlugin.h"
34
#define PLAYER_LEFT @"Player left"
35
#define PLAYER_ENTERED @"Player entered"
36
#define PLAYER_RENAMED @"Player renamed"
37
#define DEATH_SUICIDE @"Death suicide"
38
#define DEATH_FRAG @"Death frag"
39
#define DEATH_TEAMKILL @"Death teamkill"
40
#define GAME_END @"Game end"
41
#define NEW_ROUND @"New Round"
42
#define ROUND_WINNER @"Round winner"
43
#define MATCH_WINNER @"Match winner"
44
#define NEW_MATCH @"New match"
46
@implementation AAGrowlPlugin
50
[GrowlApplicationBridge setGrowlDelegate:self];
53
//! Give Growl a list of all notifications we plan on sending
54
- (NSDictionary *)registrationDictionaryForGrowl
56
NSArray *all_notes = [NSArray arrayWithObjects:PLAYER_LEFT,
68
NSArray *def_notes = [NSArray arrayWithObjects:GAME_END,
76
NSDictionary *growlNotes = [NSDictionary dictionaryWithObjectsAndKeys:
77
all_notes, GROWL_NOTIFICATIONS_ALL,
78
def_notes, GROWL_NOTIFICATIONS_DEFAULT,
83
- (NSString *)applicationNameForGrowl
85
return @"Armagetron Advanced";
88
+ (void)growl:(NSString *)aTitle message:(NSString *)aMessage
90
[GrowlApplicationBridge notifyWithTitle:aTitle
92
notificationName:aTitle