2010-06-17 21:22:43 +00:00
|
|
|
// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef C_METRICS_LIBRARY_H_
|
|
|
|
#define C_METRICS_LIBRARY_H_
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
typedef struct CMetricsLibraryOpaque* CMetricsLibrary;
|
|
|
|
|
|
|
|
// C wrapper for MetricsLibrary::MetricsLibrary.
|
|
|
|
CMetricsLibrary CMetricsLibraryNew(void);
|
|
|
|
|
|
|
|
// C wrapper for MetricsLibrary::~MetricsLibrary.
|
|
|
|
void CMetricsLibraryDelete(CMetricsLibrary handle);
|
|
|
|
|
|
|
|
// C wrapper for MetricsLibrary::Init.
|
|
|
|
void CMetricsLibraryInit(CMetricsLibrary handle);
|
|
|
|
|
|
|
|
// C wrapper for MetricsLibrary::SendToUMA.
|
|
|
|
int CMetricsLibrarySendToUMA(CMetricsLibrary handle,
|
2010-08-27 01:35:06 +00:00
|
|
|
const char* name, int sample,
|
|
|
|
int min, int max, int nbuckets);
|
2010-06-17 21:22:43 +00:00
|
|
|
|
|
|
|
// C wrapper for MetricsLibrary::SendEnumToUMA.
|
|
|
|
int CMetricsLibrarySendEnumToUMA(CMetricsLibrary handle,
|
2010-08-27 01:35:06 +00:00
|
|
|
const char* name, int sample, int max);
|
|
|
|
|
2011-01-06 18:51:47 +00:00
|
|
|
// C wrapper for MetricsLibrary::SendUserActionToUMA.
|
|
|
|
int CMetricsLibrarySendUserActionToUMA(CMetricsLibrary handle,
|
|
|
|
const char* action);
|
|
|
|
|
2011-01-22 14:15:56 +00:00
|
|
|
// C wrapper for MetricsLibrary::SendCrashToUMA.
|
|
|
|
int CMetricsLibrarySendCrashToUMA(CMetricsLibrary handle,
|
|
|
|
const char* crash_kind);
|
|
|
|
|
2010-08-27 01:35:06 +00:00
|
|
|
// C wrapper for MetricsLibrary::AreMetricsEnabled.
|
|
|
|
int CMetricsLibraryAreMetricsEnabled(CMetricsLibrary handle);
|
|
|
|
|
2010-06-17 21:22:43 +00:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
2010-08-27 01:35:06 +00:00
|
|
|
#endif // C_METRICS_LIBRARY_H_
|