UPS: apcupsd clean sources
[tomato.git] / release / src / router / apcupsd / src / apcagent / main.m
blob5c74c964b89333afc44fda46f25895a8a3487f39
1 /*
2  * main.m
3  *
4  * Apcupsd monitoring applet for Mac OS X
5  */
7 /*
8  * Copyright (C) 2009 Adam Kropelin
9  *
10  * This program is free software; you can redistribute it and/or
11  * modify it under the terms of version 2 of the GNU General
12  * Public License as published by the Free Software Foundation.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public
20  * License along with this program; if not, write to the Free
21  * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22  * MA 02111-1307, USA.
23  */
25 #import <Cocoa/Cocoa.h>
26 #import <Growl/Growl.h>
27 #import "InstanceManager.h"
29 int main(int argc, char *argv[])
31    NSAutoreleasePool *p = [[NSAutoreleasePool alloc] init];
32    [GrowlApplicationBridge setGrowlDelegate:@""];
33    [[[InstanceManager alloc] init] createMonitors];
34    [p release]; // run is never coming back, so free the pool now
35    [[NSApplication sharedApplication] run];