• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 DUBAI_H
16 #define DUBAI_H
17 namespace OHOS {
18 namespace SmartPerf {
19 class Dubai {
20 public:
GetInstance()21     static Dubai &GetInstance()
22     {
23         static Dubai instance;
24         return instance;
25     }
26     // dubai db转移smartperf 沙箱
27     static void MoveDubaiDb();
28     // testsa自拉起SP dubai db转移到local
29     static void MoveDubaiDb(const std::string &path);
30     // dubai -b
31     static void DumpDubaiBegin();
32     // dubai -f
33     static void DumpDubaiFinish();
34     static void CallBeginAndFinish();
35     static std::string CallMoveDubaiDbFinished();
36     static bool IsFileAccessible(const std::string &filename);
37     static inline std::string dubaiPkgName = " ";
38     static inline bool isDumpDubaiFinish = false;
39 private:
Dubai()40     Dubai() {};
41     Dubai(const Dubai &);
42     Dubai &operator = (const Dubai &);
43 };
44 }
45 }
46 #endif