2012-12-03 10:31:00 -08:00
|
|
|
/* -*- 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 "nsIObserver.idl"
|
|
|
|
|
2012-12-06 18:15:13 -08:00
|
|
|
interface nsIFile;
|
|
|
|
|
2013-05-31 13:34:20 -07:00
|
|
|
[scriptable, uuid(32fbb784-a20c-49aa-9db9-9a0da1c2f7d8)]
|
2012-12-03 10:31:00 -08:00
|
|
|
interface nsITelemetryPing : nsIObserver {
|
2012-12-07 10:49:21 -08:00
|
|
|
/**
|
|
|
|
* Return the current telemetry payload.
|
|
|
|
*/
|
2012-12-03 10:31:00 -08:00
|
|
|
jsval getPayload();
|
2012-12-07 10:49:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Save histograms to a file.
|
|
|
|
*
|
|
|
|
* @param aFile - File to load from.
|
|
|
|
* @param aSync - Use sync writes.
|
|
|
|
*/
|
2012-12-06 18:15:13 -08:00
|
|
|
void saveHistograms(in nsIFile aFile, in boolean aSync);
|
2012-12-07 10:49:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Collect and store information about startup.
|
|
|
|
*/
|
2012-12-06 21:28:13 -08:00
|
|
|
void gatherStartup();
|
2012-12-07 10:49:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Notify observers when loads and saves finish. Used only for testing.
|
|
|
|
*/
|
|
|
|
void enableLoadSaveNotifications();
|
|
|
|
|
2013-02-28 11:04:49 -08:00
|
|
|
/**
|
|
|
|
* Cache the profile directory for later use.
|
|
|
|
*/
|
|
|
|
void cacheProfileDirectory();
|
|
|
|
|
2012-12-07 10:49:21 -08:00
|
|
|
/**
|
|
|
|
* Inform the ping which AddOns are installed.
|
|
|
|
*
|
|
|
|
* @param aAddOns - The AddOns.
|
|
|
|
*/
|
2012-12-06 21:45:33 -08:00
|
|
|
void setAddOns(in AString aAddOns);
|
2012-12-07 10:49:21 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send a ping to a test server. Used only for testing.
|
|
|
|
*
|
|
|
|
* @param aServer - The server.
|
|
|
|
*/
|
2012-12-06 22:06:33 -08:00
|
|
|
void testPing(in AString aServer);
|
2012-12-07 05:53:06 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Load histograms from a file.
|
|
|
|
*
|
|
|
|
* @param aFile - File to load from.
|
|
|
|
* @param aSync - Use sync reads.
|
|
|
|
*/
|
|
|
|
void testLoadHistograms(in nsIFile aFile, in boolean aSync);
|
2013-05-31 08:04:09 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the path component of the current submission URL.
|
|
|
|
*/
|
|
|
|
AString submissionPath();
|
2012-12-03 10:31:00 -08:00
|
|
|
};
|