Home | History | Annotate | Download | only in interface
      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 
     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 */
     21 
     22 #include "typedefs.h"  /* NOLINT(build/include) */
     23 
     24 #ifdef __cplusplus
     25 extern "C" {
     26 #endif
     27 
     28 /*
     29  * All char* parameters in this file are expected to be null-terminated
     30  * character sequences.
     31  */
     32 int WebRtcDataLog_CreateLog();
     33 void WebRtcDataLog_ReturnLog();
     34 char* WebRtcDataLog_Combine(char* combined_name, size_t combined_len,
     35                             const char* table_name, int table_id);
     36 int WebRtcDataLog_AddTable(const char* table_name);
     37 int WebRtcDataLog_AddColumn(const char* table_name, const char* column_name,
     38                             int multi_value_length);
     39 
     40 int WebRtcDataLog_InsertCell_int(const char* table_name,
     41                                  const char* column_name,
     42                                  int value);
     43 int WebRtcDataLog_InsertArray_int(const char* table_name,
     44                                   const char* column_name,
     45                                   const int* values,
     46                                   int length);
     47 int WebRtcDataLog_InsertCell_float(const char* table_name,
     48                                    const char* column_name,
     49                                    float value);
     50 int WebRtcDataLog_InsertArray_float(const char* table_name,
     51                                     const char* column_name,
     52                                     const float* values,
     53                                     int length);
     54 int WebRtcDataLog_InsertCell_double(const char* table_name,
     55                                     const char* column_name,
     56                                     double value);
     57 int WebRtcDataLog_InsertArray_double(const char* table_name,
     58                                      const char* column_name,
     59                                      const double* values,
     60                                      int length);
     61 int WebRtcDataLog_InsertCell_int32(const char* table_name,
     62                                    const char* column_name,
     63                                    int32_t value);
     64 int WebRtcDataLog_InsertArray_int32(const char* table_name,
     65                                     const char* column_name,
     66                                     const int32_t* values,
     67                                     int length);
     68 int WebRtcDataLog_InsertCell_uint32(const char* table_name,
     69                                     const char* column_name,
     70                                     uint32_t value);
     71 int WebRtcDataLog_InsertArray_uint32(const char* table_name,
     72                                      const char* column_name,
     73                                      const uint32_t* values,
     74                                      int length);
     75 int WebRtcDataLog_InsertCell_int64(const char* table_name,
     76                                    const char* column_name,
     77                                    int64_t value);
     78 int WebRtcDataLog_InsertArray_int64(const char* table_name,
     79                                     const char* column_name,
     80                                     const int64_t* values,
     81                                     int length);
     82 
     83 int WebRtcDataLog_NextRow(const char* table_name);
     84 
     85 #ifdef __cplusplus
     86 }  /* end of extern "C" */
     87 #endif
     88 
     89 #endif  /* SRC_SYSTEM_WRAPPERS_INTERFACE_DATA_LOG_C_H_ */ /* NOLINT */
     90