1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef TS_SDK_API_H 16 #define TS_SDK_API_H 17 #include "rpc/demo_rpc_server.h" 18 19 #include <string> 20 namespace SysTuning { 21 namespace TraceStreamer { 22 extern "C" { 23 extern bool g_isUseExternalModify; 24 int32_t SDK_SetTableName(const char* counterTableName, 25 const char* counterObjectTableName, 26 const char* sliceTableName, 27 const char* sliceObjectName); 28 int32_t SDK_AppendCounterObject(int32_t counterId, const char* columnName); 29 int32_t SDK_AppendCounter(int32_t counterId, uint64_t ts, int32_t value); 30 int32_t SDK_AppendSliceObject(int32_t sliceId, const char* columnName); 31 int32_t SDK_AppendSlice(int32_t sliceId, uint64_t ts, uint64_t endTs, int32_t value); 32 void SetRpcServer(DemoRpcServer* rpcServer); 33 } 34 } // namespace TraceStreamer 35 } // namespace SysTuning 36 #endif 37