1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef TelemetryEventInfo_h__
7 #define TelemetryEventInfo_h__
9 #include "TelemetryCommon.h"
11 // This module is internal to Telemetry. The structures here hold data that
13 // It should only be used by TelemetryEventData.h and TelemetryEvent.cpp.
15 // For the public interface to Telemetry functionality, see Telemetry.h.
19 struct CommonEventInfo
{
20 // Indices for the category and expiration strings.
21 uint32_t category_offset
;
22 uint32_t expiration_version_offset
;
24 // The index and count for the extra key offsets in the extra table.
28 // The dataset this event is recorded in.
31 // Which processes to record this event in.
32 mozilla::Telemetry::Common::RecordedProcessType record_in_processes
;
34 // Which products to record this event on.
35 mozilla::Telemetry::Common::SupportedProduct products
;
37 // Convenience functions for accessing event strings.
38 const nsDependentCString
expiration_version() const;
39 const nsDependentCString
category() const;
40 const nsDependentCString
extra_key(uint32_t index
) const;
44 // The corresponding CommonEventInfo.
45 const CommonEventInfo
& common_info
;
47 // Indices for the method & object strings.
48 uint32_t method_offset
;
49 uint32_t object_offset
;
51 const nsDependentCString
method() const;
52 const nsDependentCString
object() const;
57 #endif // TelemetryEventInfo_h__