henrik.lundin@webrtc.org | d855bd4 | 2011-10-10 08:06:17 +0000 | [diff] [blame] | 1 | /* |
| 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.org | ba21c95 | 2012-12-03 09:01:21 +0000 | [diff] [blame] | 11 | // 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.org | d855bd4 | 2011-10-10 08:06:17 +0000 | [diff] [blame] | 14 | |
| 15 | #ifndef SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_ |
| 16 | #define SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_ |
| 17 | |
phoglund@webrtc.org | ba21c95 | 2012-12-03 09:01:21 +0000 | [diff] [blame] | 18 | #include <stddef.h> // size_t |
henrik.lundin@webrtc.org | 1843664 | 2011-10-10 09:56:52 +0000 | [diff] [blame] | 19 | |
phoglund@webrtc.org | ba21c95 | 2012-12-03 09:01:21 +0000 | [diff] [blame] | 20 | #include "webrtc/typedefs.h" // NOLINT(build/include) |
henrik.lundin@webrtc.org | d855bd4 | 2011-10-10 08:06:17 +0000 | [diff] [blame] | 21 | |
| 22 | #ifdef __cplusplus |
| 23 | extern "C" { |
| 24 | #endif |
| 25 | |
phoglund@webrtc.org | ba21c95 | 2012-12-03 09:01:21 +0000 | [diff] [blame] | 26 | // All char* parameters in this file are expected to be null-terminated |
| 27 | // character sequences. |
henrik.lundin@webrtc.org | d855bd4 | 2011-10-10 08:06:17 +0000 | [diff] [blame] | 28 | int WebRtcDataLog_CreateLog(); |
| 29 | void WebRtcDataLog_ReturnLog(); |
| 30 | char* WebRtcDataLog_Combine(char* combined_name, size_t combined_len, |
| 31 | const char* table_name, int table_id); |
| 32 | int WebRtcDataLog_AddTable(const char* table_name); |
| 33 | int WebRtcDataLog_AddColumn(const char* table_name, const char* column_name, |
| 34 | int multi_value_length); |
| 35 | |
| 36 | int WebRtcDataLog_InsertCell_int(const char* table_name, |
| 37 | const char* column_name, |
| 38 | int value); |
| 39 | int WebRtcDataLog_InsertArray_int(const char* table_name, |
| 40 | const char* column_name, |
| 41 | const int* values, |
| 42 | int length); |
| 43 | int WebRtcDataLog_InsertCell_float(const char* table_name, |
| 44 | const char* column_name, |
| 45 | float value); |
| 46 | int WebRtcDataLog_InsertArray_float(const char* table_name, |
| 47 | const char* column_name, |
| 48 | const float* values, |
| 49 | int length); |
| 50 | int WebRtcDataLog_InsertCell_double(const char* table_name, |
| 51 | const char* column_name, |
| 52 | double value); |
| 53 | int WebRtcDataLog_InsertArray_double(const char* table_name, |
| 54 | const char* column_name, |
| 55 | const double* values, |
| 56 | int length); |
| 57 | int WebRtcDataLog_InsertCell_int32(const char* table_name, |
| 58 | const char* column_name, |
| 59 | int32_t value); |
| 60 | int WebRtcDataLog_InsertArray_int32(const char* table_name, |
| 61 | const char* column_name, |
| 62 | const int32_t* values, |
| 63 | int length); |
| 64 | int WebRtcDataLog_InsertCell_uint32(const char* table_name, |
| 65 | const char* column_name, |
| 66 | uint32_t value); |
| 67 | int WebRtcDataLog_InsertArray_uint32(const char* table_name, |
| 68 | const char* column_name, |
| 69 | const uint32_t* values, |
| 70 | int length); |
| 71 | int WebRtcDataLog_InsertCell_int64(const char* table_name, |
| 72 | const char* column_name, |
| 73 | int64_t value); |
| 74 | int WebRtcDataLog_InsertArray_int64(const char* table_name, |
| 75 | const char* column_name, |
| 76 | const int64_t* values, |
| 77 | int length); |
| 78 | |
| 79 | int WebRtcDataLog_NextRow(const char* table_name); |
| 80 | |
| 81 | #ifdef __cplusplus |
phoglund@webrtc.org | ba21c95 | 2012-12-03 09:01:21 +0000 | [diff] [blame] | 82 | } // end of extern "C" |
henrik.lundin@webrtc.org | d855bd4 | 2011-10-10 08:06:17 +0000 | [diff] [blame] | 83 | #endif |
| 84 | |
phoglund@webrtc.org | ba21c95 | 2012-12-03 09:01:21 +0000 | [diff] [blame] | 85 | #endif // SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_ // NOLINT |