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

interface nsINetworkInfo;

[scriptable, uuid(55779d32-1e28-4f43-af87-09d04bc3cce9)]
interface nsINetworkInterfaceList : nsISupports
{
  /**
   * Number of the network interfaces that is available.
   */
  long getNumberOfInterface();

  /**
   * Get the i-th interface info info from the list.
   * @param interfaceIndex index of interface, from 0 to number of interface - 1.
   */
  nsINetworkInfo getInterfaceInfo(in long interfaceIndex);
};

[scriptable, uuid(21d7fc8b-28c4-4a4f-a15e-1f9defbc2cec)]
interface nsINetworkInterfaceListService : nsISupports
{
  const long LIST_NOT_INCLUDE_MMS_INTERFACES  = (1 << 0);
  const long LIST_NOT_INCLUDE_SUPL_INTERFACES = (1 << 1);
  const long LIST_NOT_INCLUDE_IMS_INTERFACES  = (1 << 2);
  const long LIST_NOT_INCLUDE_DUN_INTERFACES  = (1 << 3);
  const long LIST_NOT_INCLUDE_FOTA_INTERFACES = (1 << 4);

  /**
   * Obtain a list of network interfaces that satisfy the specified condition.
   * @param condition flags that specify the interfaces to be returned. This
   *        can be OR combination of LIST_* flags, or zero to make all available
   *        interfaces returned.
   */
  nsINetworkInterfaceList getDataInterfaceList(in long condition);
};