• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 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 BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_MANAGER_H
17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_MANAGER_H
18 
19 #include "distributed_device_data.h"
20 
21 #include <unordered_set>
22 #include <utility>
23 #include "distributed_data_define.h"
24 
25 namespace OHOS {
26 namespace Notification {
27 class DistributedManager {
28 public:
29     DistributedManager();
30     ~DistributedManager() = default;
31     static DistributedManager& GetInstance();
32     void ReleaseLocalDevice();
33     int32_t InitLocalDevice(const std::string &deviceId, uint16_t deviceType, DistributedDeviceConfig config);
34     void AddDevice(const std::string &deviceId, uint16_t deviceType,
35         const std::string &networkId);
36     void ReleaseDevice(const std::string &deviceId, uint16_t deviceType);
37     void RefreshDevice(const std::string &deviceId, uint16_t deviceType,
38         const std::string &networkId);
39     void InitHACallBack(std::function<void(int32_t, int32_t, uint32_t, std::string)> callback);
40     void InitSendReportCallBack(std::function<void(int32_t, int32_t, std::string)> callback);
41 };
42 }
43 }
44 
45 #endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_MANAGER_H
46