blob: fffbb4fd86122b23b1817933bd7b335c0a7e66c8 [file] [log] [blame]
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +00001/*
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11/*
12 * This is a pure C wrapper of the DataLog class. The functions are directly
13 * mapped here except for InsertCell as C does not support templates.
14 * See data_log.h for a description of the functions.
15 */
16
17#ifndef SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_
18#define SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_
19
20#include <stddef.h> /* size_t */
henrik.lundin@webrtc.org18436642011-10-10 09:56:52 +000021
22#include "typedefs.h" /* NOLINT(build/include) */
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000023
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/*
29 * All char* parameters in this file are expected to be null-terminated
30 * character sequences.
31 */
32int WebRtcDataLog_CreateLog();
33void WebRtcDataLog_ReturnLog();
34char* WebRtcDataLog_Combine(char* combined_name, size_t combined_len,
35 const char* table_name, int table_id);
36int WebRtcDataLog_AddTable(const char* table_name);
37int WebRtcDataLog_AddColumn(const char* table_name, const char* column_name,
38 int multi_value_length);
39
40int WebRtcDataLog_InsertCell_int(const char* table_name,
41 const char* column_name,
42 int value);
43int WebRtcDataLog_InsertArray_int(const char* table_name,
44 const char* column_name,
45 const int* values,
46 int length);
47int WebRtcDataLog_InsertCell_float(const char* table_name,
48 const char* column_name,
49 float value);
50int WebRtcDataLog_InsertArray_float(const char* table_name,
51 const char* column_name,
52 const float* values,
53 int length);
54int WebRtcDataLog_InsertCell_double(const char* table_name,
55 const char* column_name,
56 double value);
57int WebRtcDataLog_InsertArray_double(const char* table_name,
58 const char* column_name,
59 const double* values,
60 int length);
61int WebRtcDataLog_InsertCell_int32(const char* table_name,
62 const char* column_name,
63 int32_t value);
64int WebRtcDataLog_InsertArray_int32(const char* table_name,
65 const char* column_name,
66 const int32_t* values,
67 int length);
68int WebRtcDataLog_InsertCell_uint32(const char* table_name,
69 const char* column_name,
70 uint32_t value);
71int WebRtcDataLog_InsertArray_uint32(const char* table_name,
72 const char* column_name,
73 const uint32_t* values,
74 int length);
75int WebRtcDataLog_InsertCell_int64(const char* table_name,
76 const char* column_name,
77 int64_t value);
78int WebRtcDataLog_InsertArray_int64(const char* table_name,
79 const char* column_name,
80 const int64_t* values,
81 int length);
82
83int WebRtcDataLog_NextRow(const char* table_name);
84
85#ifdef __cplusplus
86} /* end of extern "C" */
87#endif
88
henrik.lundin@webrtc.org18436642011-10-10 09:56:52 +000089#endif /* SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_ */ /* NOLINT */