Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef FMRADIOCOMMON_H_
8 #define FMRADIOCOMMON_H_
10 #include "mozilla/Observer.h"
12 #undef FM_LOG
13 #if defined(ANDROID)
14 #include <android/log.h>
15 #define FM_LOG(FMRADIO_LOG_INFO, args...) \
16 __android_log_print(ANDROID_LOG_INFO, \
17 FMRADIO_LOG_INFO, \
18 ## args)
19 #else
20 #define FM_LOG(args...)
21 #endif
23 #define BEGIN_FMRADIO_NAMESPACE \
24 namespace mozilla { namespace dom {
25 #define END_FMRADIO_NAMESPACE \
26 } /* namespace dom */ } /* namespace mozilla */
28 BEGIN_FMRADIO_NAMESPACE
30 enum FMRadioEventType
31 {
32 FrequencyChanged,
33 EnabledChanged
34 };
36 typedef mozilla::Observer<FMRadioEventType> FMRadioEventObserver;
37 typedef mozilla::ObserverList<FMRadioEventType> FMRadioEventObserverList;
39 END_FMRADIO_NAMESPACE
41 #endif /* FMRADIOCOMMON_H_ */