sbAppleMediaKeyController.h
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN NIGHTINGALE GPL
4 //
5 // This file is part of the Nightingale Media Player.
6 //
7 // Copyright(c) 2014
8 // http://getnightingale.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END NIGHTINGALE GPL
24 //
25 */
26 
27 #ifndef sbAppleMediaKeyController_h_
28 #define sbAppleMediaKeyController_h_
29 
30 #include <nsIObserver.h>
31 #include <nsIComponentManager.h>
32 #include <nsIGenericFactory.h>
33 #include <nsIFile.h>
34 
35 
36 //------------------------------------------------------------------------------
37 //
38 // @brief XPCOM service to listen to media key events in Mac OS X and update
39 // the Songbird player as needed.
40 //
41 //------------------------------------------------------------------------------
42 
44 {
45 public:
48 
50  NS_DECL_NSIOBSERVER
51 
52  NS_IMETHOD Init(); // does this really need to be virtual
53 
54  static NS_METHOD RegisterSelf(nsIComponentManager *aCompMgr,
55  nsIFile *aPath,
56  const char *aLoaderStr,
57  const char *aType,
58  const nsModuleComponentInfo *aInfo);
59 };
60 
61 
62 //------------------------------------------------------------------------------
63 // Component Registration Stuff:
64 
65 #define SONGBIRD_APPLEMEDIAKEYCONTROLLER_CONTRACTID \
66  "@songbirdnest.com/apple-media-key-controller;1"
67 #define SONGBIRD_APPLEMEDIAKEYCONTROLLER_CLASSNAME \
68  "Songbird Apple Media Key Controller"
69 #define SONGBIRD_APPLEMEDIAKEYCONTROLLER_CID \
70 { /* ECA6F002-175E-4FF4-B46D-ACE45680DBC5 */ \
71  0xECA6F002, \
72  0x175E, \
73  0x4FF4, \
74  {0xB4, 0x6D, 0xAC, 0xE4, 0x56, 0x80, 0xDB, 0xC5} \
75 }
76 
77 #endif // sbAppleMediaKeyController_h_
78 
_updateCookies aPath
NS_DECL_ISUPPORTS NS_DECL_NSIOBSERVER NS_IMETHOD Init()
static NS_METHOD RegisterSelf(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *aLoaderStr, const char *aType, const nsModuleComponentInfo *aInfo)