1 /* 2 Project: MPDCon 3 4 Copyright (C) 2004 5 6 Author: Daniel Luederwald 7 8 Created: 2004-05-12 17:59:14 +0200 by flip 9 10 Application Controller 11 12 This application is free software; you can redistribute it and/or 13 modify it under the terms of the GNU General Public 14 License as published by the Free Software Foundation; either 15 version 2 of the License, or (at your option) any later version. 16 17 This application is distributed in the hope that it will be useful, 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20 Library General Public License for more details. 21 22 You should have received a copy of the GNU General Public 23 License along with this library; if not, write to the Free 24 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. 25 */ 26 27 #ifndef _PCAPPPROJ_APPCONTROLLER_H 28 #define _PCAPPPROJ_APPCONTROLLER_H 29 30 #include <AppKit/AppKit.h> 31 #include "PlayView.h" 32 #include "PreferencesController.h" 33 #include "PlaylistController.h" 34 #include "PlaylistItem.h" 35 #include "MPDController.h" 36 #include "PlaylistsManagerController.h" 37 #include "StatisticsController.h" 38 #include "CrossfadeController.h" 39 #include "CollectionBrowser.h" 40 #include "LyricsInspector.h" 41 #include "SongInspector.h" 42 #include "PlaylistInspector.h" 43 #include "RandomPlaylistFeed.h" 44 #include "Strings.h" 45 46 #define player_MPD 0 47 #define player_CD 1 48 49 @interface AppController : NSObject 50 { 51 IBOutlet NSButton *playButton; 52 IBOutlet NSButton *stopButton; 53 IBOutlet NSButton *prevButton; 54 IBOutlet NSButton *nextButton; 55 IBOutlet NSButton *shuffleButton; 56 IBOutlet NSButton *repeatButton; 57 IBOutlet PlayView *playView; 58 IBOutlet NSSlider *percentSlider; 59 IBOutlet NSSlider *volumeSlider; 60 61 IBOutlet NSWindow *window; 62 63 IBOutlet NSMenuItem *statisticsItem; 64 IBOutlet NSMenuItem *browseItem; 65 IBOutlet NSMenuItem *updateItem; 66 IBOutlet NSMenuItem *showItem; 67 IBOutlet NSMenuItem *manageItem; 68 69 70 NSTimer *anTimer; 71 72 int player; 73 int playedSong; 74 int prevState; 75 76 BOOL connected; 77 BOOL didDisconnect; 78 79 MPDController *mpdController; 80 RandomPlaylistFeed *randomPlaylistFeed; 81 } 82 83 // Gui Methods 84 - (void) showPrefPanel:(id)sender; 85 - (void) showLyricsInspector:(id)sender; 86 - (void) showSongInspector:(id)sender; 87 - (void) showPlaylistInspector:(id)sender; 88 - (void) showPlaylist: (id)sender; 89 - (void) managePlaylists: (id)sender; 90 - (void) browseCollection: (id)sender; 91 - (void) browseCollectionByDirectory: (id)sender; 92 - (void) serverStatistics: (id)sender; 93 - (void) showCrossfade: (id)sender; 94 95 - (void) connect: (id)sender; 96 97 - (void) updateCollection: (id)sender; 98 99 - (void) play: (id)sender; 100 - (void) stop: (id)sender; 101 - (void) prev: (id)sender; 102 - (void) next: (id)sender; 103 - (void) shuffle: (id)sender; 104 - (void) repeat: (id)sender; 105 - (void) percentChanged: (id)sender; 106 - (void) volumeChanged: (id)sender; 107 108 // Notification Methods 109 110 - (void) didDisconnect: (NSNotification *)notif; 111 - (void) didConnect: (NSNotification *)notif; 112 - (void) prefsChanged: (NSNotification *)notif; 113 114 // Service Methods 115 - (void) getPlaylist: (NSPasteboard*)pboard 116 userData: (NSString*)userData 117 error: (NSString**)error; 118 119 - (void) getAlbums: (NSPasteboard*)pboard 120 userData: (NSString*)userData 121 error: (NSString**)error; 122 123 @end 124 125 #endif 126