/* 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/. */

#include "nsISupports.idl"

/**
 * Monitors OS-level permission changes for a single capability and notifies
 * via the observer service.
 *
 * When a permission change is detected, the observer service is notified with:
 *   topic:  "system-permission-changed"
 *   data:   the capability name passed to startMonitoring()
 *
 * Monitoring starts when startMonitoring() is called and stops when the
 * service is destroyed.
 */
[scriptable, uuid(c5765549-7cf1-4b3d-9baa-5e74282be542)]
interface nsIPermissionMonitor : nsISupports
{
  void startMonitoring(in AString aCapabilityName);
};
