• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2022 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 
16 #ifndef REGISTER_HDC_CONNECT_H
17 #define REGISTER_HDC_CONNECT_H
18 
19 #include <string>
20 #include "define_register.h"
21 namespace Hdc {
22 #ifdef __cplusplus
23 #if __cplusplus
24 extern "C" {
25 #endif
26 #endif /* End of #ifdef __cplusplus */
27 void StartConnect(const std::string& processName, const std::string& pkgName, bool isDebug, Callback cb);
28 void StopConnect();
29 #ifdef __cplusplus
30 #if __cplusplus
31 }
32 #endif
33 #endif /* End of #ifdef __cplusplus */
34 
35 class ConnectManagement {
36 public:
37     ConnectManagement() = default;
~ConnectManagement()38     ~ConnectManagement() {}
39     void SetProcessName(const std::string& processName);
40     std::string GetProcessName() const;
41     void SetPkgName(const std::string& pkgName);
42     std::string GetPkgName() const;
43     void SetDebug(bool isDebug);
44     bool GetDebug() const;
45     void SetCallback(Callback cb);
46     Callback GetCallback() const;
47 
48 private:
49     std::string processName_;
50     std::string pkgName_;
51     bool isDebug_;
52     Callback cb_;
53 };
54 } // namespace Hdc
55 
56 #endif // REGISTER_HDC_CONNECT_H
57