1 /*****************************************************************************
2 * extensions_manager.h: Extensions manager for Cocoa
3 ****************************************************************************
4 * Copyright (C) 2012 VideoLAN and authors
7 * Authors: Brendon Justin <brendonjustin@gmail.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
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
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
28 #import "ExtensionsDialogProvider.h"
31 #import <vlc_extensions.h>
33 #import <Cocoa/Cocoa.h>
35 @class ExtensionsDialogProvider;
37 @protocol ExtensionsDelegate <NSObject>
38 - (void)extensionsUpdated;
41 @interface ExtensionsManager : NSObject
43 intf_thread_t *p_intf;
44 extensions_manager_t *p_extensions_manager;
45 ExtensionsDialogProvider *p_edp;
47 NSMutableDictionary *p_extDict;
49 BOOL b_unloading; ///< Work around threads + emit issues, see isUnloading
50 BOOL b_failed; ///< Flag set to true if we could not load the module
52 id <ExtensionsDelegate> delegate;
55 + (ExtensionsManager *)getInstance:(intf_thread_t *)_p_intf;
57 - (id)initWithIntf:(intf_thread_t *)_p_intf;
58 - (void)buildMenu:(NSMenu *)extMenu;
59 - (extensions_manager_t *)getManager;
61 - (BOOL)loadExtensions;
62 - (void)unloadExtensions;
63 - (void)reloadExtensions;
65 - (void)triggerMenu:(id)sender;
66 - (void)inputChanged:(input_thread_t *)p_input;
67 - (void)playingChanged:(int)state;
68 - (void)metaChanged:(input_item_t *)p_input;
73 @property (readonly) BOOL isUnloading;