1 /* 2 * Copyright (c) 2023 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 #include "trace_collector.h" 16 17 namespace OHOS { 18 namespace HiviewDFX { 19 namespace UCollectUtil { 20 class TraceCollectorImpl : public TraceCollector { 21 public: 22 TraceCollectorImpl() = default; 23 virtual ~TraceCollectorImpl() = default; 24 25 public: 26 virtual CollectResult<std::string> DumpTrace(const std::string &tag) override; 27 virtual CollectResult<int32_t> TraceOn() override; 28 virtual CollectResult<std::string> TraceOff() override; 29 }; 30 Create()31std::shared_ptr<TraceCollector> TraceCollector::Create() 32 { 33 return std::make_shared<TraceCollectorImpl>(); 34 } 35 DumpTrace(const std::string & tag)36CollectResult<std::string> TraceCollectorImpl::DumpTrace(const std::string &tag) 37 { 38 CollectResult<std::string> result; 39 return result; 40 } 41 TraceOn()42CollectResult<int32_t> TraceCollectorImpl::TraceOn() 43 { 44 CollectResult<int32_t> result; 45 return result; 46 } 47 TraceOff()48CollectResult<std::string> TraceCollectorImpl::TraceOff() 49 { 50 CollectResult<std::string> result; 51 return result; 52 } 53 } // UCollectUtil 54 } // HiViewDFX 55 } // OHOS