blob: 557e2cdab358813bffae309b3285277452f63293 [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
phoglund@webrtc.orgba21c952012-12-03 09:01:21 +000011// This is a pure C wrapper of the DataLog class. The functions are directly
12// mapped here except for InsertCell as C does not support templates.
13// See data_log.h for a description of the functions.
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000014
15#ifndef SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_
16#define SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_
17
phoglund@webrtc.orgba21c952012-12-03 09:01:21 +000018#include <stddef.h> // size_t
henrik.lundin@webrtc.org18436642011-10-10 09:56:52 +000019
phoglund@webrtc.orgba21c952012-12-03 09:01:21 +000020#include "webrtc/typedefs.h" // NOLINT(build/include)
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000021
22#ifdef __cplusplus
23extern "C" {
24#endif
25
phoglund@webrtc.orgba21c952012-12-03 09:01:21 +000026// All char* parameters in this file are expected to be null-terminated
27// character sequences.
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000028int WebRtcDataLog_CreateLog();
29void WebRtcDataLog_ReturnLog();
30char* WebRtcDataLog_Combine(char* combined_name, size_t combined_len,
31 const char* table_name, int table_id);
32int WebRtcDataLog_AddTable(const char* table_name);
33int WebRtcDataLog_AddColumn(const char* table_name, const char* column_name,
34 int multi_value_length);
35
36int WebRtcDataLog_InsertCell_int(const char* table_name,
37 const char* column_name,
38 int value);
39int WebRtcDataLog_InsertArray_int(const char* table_name,
40 const char* column_name,
41 const int* values,
42 int length);
43int WebRtcDataLog_InsertCell_float(const char* table_name,
44 const char* column_name,
45 float value);
46int WebRtcDataLog_InsertArray_float(const char* table_name,
47 const char* column_name,
48 const float* values,
49 int length);
50int WebRtcDataLog_InsertCell_double(const char* table_name,
51 const char* column_name,
52 double value);
53int WebRtcDataLog_InsertArray_double(const char* table_name,
54 const char* column_name,
55 const double* values,
56 int length);
57int WebRtcDataLog_InsertCell_int32(const char* table_name,
58 const char* column_name,
59 int32_t value);
60int WebRtcDataLog_InsertArray_int32(const char* table_name,
61 const char* column_name,
62 const int32_t* values,
63 int length);
64int WebRtcDataLog_InsertCell_uint32(const char* table_name,
65 const char* column_name,
66 uint32_t value);
67int WebRtcDataLog_InsertArray_uint32(const char* table_name,
68 const char* column_name,
69 const uint32_t* values,
70 int length);
71int WebRtcDataLog_InsertCell_int64(const char* table_name,
72 const char* column_name,
73 int64_t value);
74int WebRtcDataLog_InsertArray_int64(const char* table_name,
75 const char* column_name,
76 const int64_t* values,
77 int length);
78
79int WebRtcDataLog_NextRow(const char* table_name);
80
81#ifdef __cplusplus
phoglund@webrtc.orgba21c952012-12-03 09:01:21 +000082} // end of extern "C"
henrik.lundin@webrtc.orgd855bd42011-10-10 08:06:17 +000083#endif
84
phoglund@webrtc.orgba21c952012-12-03 09:01:21 +000085#endif // SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_ // NOLINT