 Chromium Code Reviews
 Chromium Code Reviews Issue 2832008:
  add C wrapper for libmetrics  (Closed) 
  Base URL: ssh://git@chromiumos-git//metrics.git
    
  
    Issue 2832008:
  add C wrapper for libmetrics  (Closed) 
  Base URL: ssh://git@chromiumos-git//metrics.git| Index: c_metrics_library.h | 
| diff --git a/c_metrics_library.h b/c_metrics_library.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..6d1e6f907f7f41a8c6de6200a612151d1a152896 | 
| --- /dev/null | 
| +++ b/c_metrics_library.h | 
| @@ -0,0 +1,33 @@ | 
| +// 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); | 
| 
petkov
2010/06/17 21:00:32
Do you need the "void" here?
 | 
| + | 
| +// 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, | 
| + const char* name, int sample, | 
| + int min, int max, int nbuckets); | 
| + | 
| +// C wrapper for MetricsLibrary::SendEnumToUMA. | 
| +int CMetricsLibrarySendEnumToUMA(CMetricsLibrary handle, | 
| + const char* name, int sample, int max); | 
| +#if defined(__cplusplus) | 
| +} | 
| +#endif | 
| +#endif // C_METRICS_LIBRARY_H_ |