summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/xpcom/nsIFOG.idl
blob: 80112c6a17b35e04d62c84b8c12b8346f013b879 (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
/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
/* 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"

[scriptable, uuid(98d0e975-9cad-4ce3-ae2f-f878b8be6307)]
interface nsIFOG : nsISupports
{

  /**
   * Initialize FOG.
   *
   * To be scheduled at some opportune time after the bulk of Firefox startup
   * has completed.
   */
  void initializeFOG();

  /**
   * Enable or Disable the logging of pings in the Glean SDK.
   * See https://firefox-source-docs.mozilla.org/toolkit/components/glean/testing.html
   * for details.
   *
   * @param aEnableLogPings - true to enable logging, false to disable.
   */
  void setLogPings(in boolean aEnableLogPings);

  /**
   * Set the tag to be applied to pings assembled from now on.
   * See https://firefox-source-docs.mozilla.org/toolkit/components/glean/testing.html
   * for details.
   *
   * @param aDebugTag - The string tag to apply.
   *                    If it cannot be applied (e.g it contains characters that are
   *                    forbidden in HTTP headers) the old value will remain.
   */
  void setTagPings(in ACString aDebugTag);

  /**
   * Send the named ping.
   * See https://firefox-source-docs.mozilla.org/toolkit/components/glean/testing.html
   * for details.
   *
   * @param aPingName - The name of the ping to send. If no ping of that name
   *                    exists, or the ping is known but cannot be assembled
   *                    (e.g if it is empty), no ping will be sent.
   */
  void sendPing(in ACString aPingName);
};