summaryrefslogtreecommitdiffstats
path: root/dom/system/gonk/nsIDataCallManager.idl
blob: de8477801bb7952cbce711335889ceec1ebb720f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* 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"
#include "nsINetworkInterface.idl"

[scriptable, uuid(b8bcd6aa-5b06-4362-a68c-317878429e51)]
interface nsIRilNetworkInfo : nsINetworkInfo
{
  readonly attribute unsigned long serviceId;
  readonly attribute DOMString iccId;

  /* The following attributes are for MMS proxy settings. */
  readonly attribute DOMString mmsc;     // Empty string if not set.
  readonly attribute DOMString mmsProxy; // Empty string if not set.
  readonly attribute long      mmsPort;  // -1 if not set.

  /**
   * Get the list of pcscf addresses, could be IPv4 or IPv6.
   *
   * @param count
   *        The length of the list of pcscf addresses.
   *
   * @returns the list of pcscf addresses.
   */
  void getPcscf([optional] out unsigned long count,
                [array, size_is(count), retval] out wstring pcscf);
};

[scriptable, function, uuid(cb2f0f5b-67f4-4c14-93e8-01e66b630464)]
interface nsIDeactivateDataCallsCallback : nsISupports
{
  /**
   * Callback function used to notify when all data calls are disconnected.
   */
  void notifyDataCallsDisconnected();
};

[scriptable, uuid(e3feec20-36b4-47de-a7a5-e32a65f20186)]
interface nsIDataCallHandler : nsISupports
{
  /**
   * PDP APIs
   *
   * @param networkType
   *        Mobile network type, that is,
   *        nsINetworkInterface.NETWORK_TYPE_MOBILE or one of the
   *        nsINetworkInterface.NETWORK_TYPE_MOBILE_* values.
   */
  void setupDataCallByType(in long networkType);
  void deactivateDataCallByType(in long networkType);
  long getDataCallStateByType(in long networkType);

  /**
   * Deactivate all data calls.
   *
   * @param callback
   *        Callback to notify when all data calls are disconnected.
   */
  void deactivateDataCalls(in nsIDeactivateDataCallsCallback callback);

  /**
   * Called to reconsider data call state.
   */
  void updateRILNetworkInterface();
};

[scriptable, uuid(2c46e37d-88dc-4d25-bb37-e1c0d3e9cb5f)]
interface nsIDataCallManager : nsISupports
{
  readonly attribute long dataDefaultServiceId;

  /**
   * Get the corresponding data call handler.
   *
   * @param clientId
   *        clientId of the data call handler to get.
   */
  nsIDataCallHandler getDataCallHandler(in unsigned long clientId);
};