1/* 2 * Copyright (c) 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 */ 15import { paramMock } from "../../utils" 16import { NotificationRequest } from "./notificationRequest" 17import { NotificationSortingMap } from "./notificationSortingMap" 18 19export const NotificationSubscriber = { 20 onConsume: function (...args) { 21 console.warn("NotificationSubscriber.onConsume interface mocked in the Previewer. How this interface works on the" + 22 " Previewer may be different from that on a real device.") 23 }, 24 onCancel: function (...args) { 25 console.warn("NotificationSubscriber.onCancel interface mocked in the Previewer. How this interface works on the" + 26 " Previewer may be different from that on a real device.") 27 }, 28 onUpdate: function (...args) { 29 console.warn("NotificationSubscriber.onUpdate interface mocked in the Previewer. How this interface works on the" + 30 " Previewer may be different from that on a real device.") 31 }, 32 onConnect: function () { 33 console.warn("NotificationSubscriber.onConnect interface mocked in the Previewer. How this interface works on the" + 34 " Previewer may be different from that on a real device.") 35 }, 36 onDisconnect: function () { 37 console.warn("NotificationSubscriber.onDisconnect interface mocked in the Previewer. How this interface works on the" + 38 " Previewer may be different from that on a real device.") 39 }, 40 onDestroy: function () { 41 console.warn("NotificationSubscriber.onDestroy interface mocked in the Previewer. How this interface works on the" + 42 " Previewer may be different from that on a real device.") 43 }, 44 onDoNotDisturbDateChange: function (...args) { 45 console.warn("NotificationSubscriber.onDoNotDisturbDateChange interface mocked in the Previewer. How this interface works on the" + 46 " Previewer may be different from that on a real device.") 47 }, 48 onEnabledNotificationChanged: function (...args) { 49 console.warn("NotificationSubscriber.onEnabledNotificationChanged interface mocked in the Previewer. How this interface works on the" + 50 " Previewer may be different from that on a real device.") 51 } 52} 53export const SubscribeCallbackData = { 54 request: NotificationRequest, 55 sortingMap: NotificationSortingMap, 56 reason: '[PC preview] unknow reason', 57 sound: '[PC preview] unknow sound', 58 vibrationValues: [paramMock.paramNumberMock], 59} 60export const EnabledNotificationCallbackData = { 61 bundle: '[PC preview] unknow bundle', 62 uid: '[PC preview] unknow uid', 63 enable: '[PC preview] unknow enable', 64}