1 /* 2 * Copyright (c) 2025 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 NOTIFICATION_PERIPHERAL_H 17 #define NOTIFICATION_PERIPHERAL_H 18 19 #define API __attribute__((visibility("default"))) 20 21 #include <mutex> 22 #include <string> 23 24 #include "event_config.h" 25 #include "image_source.h" 26 #include "pixel_map.h" 27 28 namespace OHOS { 29 namespace ExternalDeviceManager { 30 31 class DeviceNotification { 32 public: 33 static DeviceNotification &GetInstance(void); 34 35 bool HandleNotification(const FaultInfo ¬ifCfg); 36 37 private: 38 DeviceNotification() = default; 39 virtual ~DeviceNotification() = default; 40 41 bool PeripheralDeviceNotification(const FaultInfo ¬ifCfg); 42 FaultInfo FillNotificationCfg(const FaultInfo ¬ifCfg); 43 bool GetPixelMap(const std::string &path); 44 45 std::shared_ptr<Media::PixelMap> iconPixelMap_ {}; 46 }; 47 } // namespace ExternalDeviceManager 48 } // namespace OHOS 49 #endif // DEVICE_NOTIFICATION_H 50