dom/fmradio/FMRadioCommon.h
author Mike Hommey <mh+mozilla@glandium.org>
Fri, 06 Sep 2013 10:09:52 +0900
changeset 145789 e197b9e71614f2af7805ecb1bb13d6ba6b56d1bf
parent 144828 05529a089e45d12e6be364564e14b1f7783cb158
child 208047 dfbae87208dd532ab3280fb8b63837829174448b
permissions -rw-r--r--
Fixup for bug 912832 busting static analysis builds. r=me

/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef FMRADIOCOMMON_H_
#define FMRADIOCOMMON_H_

#include "mozilla/Observer.h"

#undef FM_LOG
#if defined(ANDROID)
#include <android/log.h>
#define FM_LOG(FMRADIO_LOG_INFO, args...) \
  __android_log_print(ANDROID_LOG_INFO, \
                      FMRADIO_LOG_INFO, \
                      ## args)
#else
#define FM_LOG(args...)
#endif

#define BEGIN_FMRADIO_NAMESPACE \
  namespace mozilla { namespace dom {
#define END_FMRADIO_NAMESPACE \
  } /* namespace dom */ } /* namespace mozilla */

BEGIN_FMRADIO_NAMESPACE

enum FMRadioEventType
{
  FrequencyChanged,
  EnabledChanged
};

typedef mozilla::Observer<FMRadioEventType>     FMRadioEventObserver;
typedef mozilla::ObserverList<FMRadioEventType> FMRadioEventObserverList;

END_FMRADIO_NAMESPACE

#endif /* FMRADIOCOMMON_H_ */