• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  */
15 
16 #ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_MOCK_ANS_MANAGER_STUB_H
17 #define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_MOCK_ANS_MANAGER_STUB_H
18 
19 #include "gmock/gmock.h"
20 
21 #include "ans_inner_errors.h"
22 #include "ans_log_wrapper.h"
23 #include "ans_manager_stub.h"
24 
25 namespace OHOS {
26 namespace Notification {
27 class MockAnsManagerStub : public AnsManagerStub {
28 public:
29 
30     std::string GetCmd();
31     std::string GetBundle();
32     int32_t GetUserId();
33 
34     /**
35      * @brief Obtains specific datas via specified dump option.
36      *
37      * @param cmd Indicates the specified dump command.
38      * @param bundle Indicates the specified bundle name.
39      * @param userId Indicates the specified userId.
40      * @param dumpInfo Indicates the container containing datas.
41      * @return Returns check result.
42      */
43     virtual ErrCode ShellDump(const std::string &cmd, const std::string &bundle, int32_t userId, int32_t recvUserId,
44         std::vector<std::string> &dumpInfo) override;
45 
Publish(const std::string & label,const sptr<NotificationRequest> & notification)46     ErrCode Publish(const std::string &label, const sptr<NotificationRequest> &notification) override
47     {
48         return ERR_ANS_INVALID_PARAM;
49     }
50 
PublishNotificationForIndirectProxy(const sptr<NotificationRequest> & notification)51     ErrCode PublishNotificationForIndirectProxy(const sptr<NotificationRequest>& notification) override
52     {
53         return ERR_ANS_INVALID_PARAM;
54     }
55 
Cancel(int notificationId,const std::string & label,const std::string & instanceKey)56     ErrCode Cancel(int notificationId, const std::string& label, const std::string& instanceKey) override
57     {
58         return ERR_ANS_INVALID_PARAM;
59     }
60 
CancelAll(const std::string & instanceKey)61     ErrCode CancelAll(const std::string& instanceKey) override
62     {
63         return ERR_ANS_INVALID_PARAM;
64     }
65 
CancelAsBundle(int32_t notificationId,const std::string & representativeBundle,int32_t userId)66     ErrCode CancelAsBundle(int32_t notificationId, const std::string& representativeBundle, int32_t userId) override
67     {
68         return ERR_ANS_INVALID_PARAM;
69     }
70 
CancelAsBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t notificationId)71     ErrCode CancelAsBundle(const sptr<NotificationBundleOption>& bundleOption, int32_t notificationId) override
72     {
73         return ERR_ANS_INVALID_PARAM;
74     }
75 
CancelAsBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t notificationId,int32_t userId)76     ErrCode CancelAsBundle(
77         const sptr<NotificationBundleOption>& bundleOption, int32_t notificationId, int32_t userId) override
78     {
79         return ERR_ANS_INVALID_PARAM;
80     }
81 
AddSlotByType(int32_t slotTypeInt)82     ErrCode AddSlotByType(int32_t slotTypeInt) override
83     {
84         return ERR_ANS_INVALID_PARAM;
85     }
86 
AddSlots(const std::vector<sptr<NotificationSlot>> & slots)87     ErrCode AddSlots(const std::vector<sptr<NotificationSlot>>& slots) override
88     {
89         return ERR_ANS_INVALID_PARAM;
90     }
91 
RemoveSlotByType(int32_t slotTypeInt)92     ErrCode RemoveSlotByType(int32_t slotTypeInt) override
93     {
94         return ERR_ANS_INVALID_PARAM;
95     }
96 
RemoveAllSlots()97     ErrCode RemoveAllSlots() override
98     {
99         return ERR_ANS_INVALID_PARAM;
100     }
101 
GetSlotByType(int32_t slotTypeInt,sptr<NotificationSlot> & slot)102     ErrCode GetSlotByType(int32_t slotTypeInt, sptr<NotificationSlot>& slot) override
103     {
104         return ERR_ANS_INVALID_PARAM;
105     }
106 
GetSlots(std::vector<sptr<NotificationSlot>> & slots)107     ErrCode GetSlots(std::vector<sptr<NotificationSlot>>& slots) override
108     {
109         return ERR_ANS_INVALID_PARAM;
110     }
111 
GetSlotNumAsBundle(const sptr<NotificationBundleOption> & bundleOption,uint64_t & num)112     ErrCode GetSlotNumAsBundle(const sptr<NotificationBundleOption>& bundleOption, uint64_t& num) override
113     {
114         return ERR_ANS_INVALID_PARAM;
115     }
116 
GetActiveNotifications(std::vector<sptr<NotificationRequest>> & notifications,const std::string & instanceKey)117     ErrCode GetActiveNotifications(
118         std::vector<sptr<NotificationRequest>>& notifications, const std::string& instanceKey) override
119     {
120         return ERR_ANS_INVALID_PARAM;
121     }
122 
GetActiveNotificationNums(uint64_t & num)123     ErrCode GetActiveNotificationNums(uint64_t& num) override
124     {
125         return ERR_ANS_INVALID_PARAM;
126     }
127 
GetAllActiveNotifications(std::vector<sptr<Notification>> & notifications)128     ErrCode GetAllActiveNotifications(std::vector<sptr<Notification>>& notifications) override
129     {
130         return ERR_ANS_INVALID_PARAM;
131     }
132 
GetSpecialActiveNotifications(const std::vector<std::string> & key,std::vector<sptr<Notification>> & notifications)133     ErrCode GetSpecialActiveNotifications(
134         const std::vector<std::string>& key, std::vector<sptr<Notification>>& notifications) override
135     {
136         return ERR_ANS_INVALID_PARAM;
137     }
138 
CanPublishAsBundle(const std::string & representativeBundle,bool & canPublish)139     ErrCode CanPublishAsBundle(const std::string& representativeBundle, bool& canPublish) override
140     {
141         return ERR_ANS_INVALID_PARAM;
142     }
143 
PublishAsBundle(const sptr<NotificationRequest> & notification,const std::string & representativeBundle)144     ErrCode PublishAsBundle(
145         const sptr<NotificationRequest>& notification, const std::string& representativeBundle) override
146     {
147         return ERR_ANS_INVALID_PARAM;
148     }
149 
SetNotificationBadgeNum(int num)150     ErrCode SetNotificationBadgeNum(int num) override
151     {
152         return ERR_ANS_INVALID_PARAM;
153     }
154 
GetBundleImportance(int & importance)155     ErrCode GetBundleImportance(int& importance) override
156     {
157         return ERR_ANS_INVALID_PARAM;
158     }
159 
HasNotificationPolicyAccessPermission(bool & granted)160     ErrCode HasNotificationPolicyAccessPermission(bool& granted) override
161     {
162         return ERR_ANS_INVALID_PARAM;
163     }
164 
Delete(const std::string & key,int32_t removeReason)165     ErrCode Delete(const std::string& key, int32_t removeReason) override
166     {
167         return ERR_ANS_INVALID_PARAM;
168     }
169 
RemoveNotification(const sptr<NotificationBundleOption> & bundleOption,int32_t notificationId,const std::string & label,int32_t removeReason)170     ErrCode RemoveNotification(const sptr<NotificationBundleOption>& bundleOption, int32_t notificationId,
171         const std::string& label, int32_t removeReason) override
172     {
173         return ERR_ANS_INVALID_PARAM;
174     }
175 
RemoveAllNotifications(const sptr<NotificationBundleOption> & bundleOption)176     ErrCode RemoveAllNotifications(const sptr<NotificationBundleOption>& bundleOption) override
177     {
178         return ERR_ANS_INVALID_PARAM;
179     }
180 
181     ErrCode RemoveDistributedNotifications(const std::vector<std::string>& hashcodes,
182         const int32_t slotTypeInt, const int32_t deleteTypeInt, const int32_t removeReason,
183         const std::string& deviceId = "") override
184     {
185         return ERR_ANS_INVALID_PARAM;
186     }
187 
RemoveNotifications(const std::vector<std::string> & hashcodes,int32_t removeReason)188     ErrCode RemoveNotifications(const std::vector<std::string>& hashcodes, int32_t removeReason) override
189     {
190         return ERR_ANS_INVALID_PARAM;
191     }
192 
DeleteByBundle(const sptr<NotificationBundleOption> & bundleOption)193     ErrCode DeleteByBundle(const sptr<NotificationBundleOption>& bundleOption) override
194     {
195         return ERR_ANS_INVALID_PARAM;
196     }
197 
DeleteAll()198     ErrCode DeleteAll() override
199     {
200         return ERR_ANS_INVALID_PARAM;
201     }
202 
GetSlotsByBundle(const sptr<NotificationBundleOption> & bundleOption,std::vector<sptr<NotificationSlot>> & slots)203     ErrCode GetSlotsByBundle(
204         const sptr<NotificationBundleOption>& bundleOption, std::vector<sptr<NotificationSlot>>& slots) override
205     {
206         return ERR_ANS_INVALID_PARAM;
207     }
208 
GetSlotByBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t slotTypeInt,sptr<NotificationSlot> & slot)209     ErrCode GetSlotByBundle(const sptr<NotificationBundleOption>& bundleOption, int32_t slotTypeInt,
210         sptr<NotificationSlot>& slot) override
211     {
212         return ERR_ANS_INVALID_PARAM;
213     }
214 
UpdateSlots(const sptr<NotificationBundleOption> & bundleOption,const std::vector<sptr<NotificationSlot>> & slots)215     ErrCode UpdateSlots(const sptr<NotificationBundleOption>& bundleOption,
216         const std::vector<sptr<NotificationSlot>>& slots) override
217     {
218         return ERR_ANS_INVALID_PARAM;
219     }
220 
RequestEnableNotification(const std::string & deviceId,const sptr<IAnsDialogCallback> & ansDialogCallback)221     ErrCode RequestEnableNotification(
222         const std::string& deviceId, const sptr<IAnsDialogCallback>& ansDialogCallback) override
223     {
224         return ERR_ANS_INVALID_PARAM;
225     }
226 
RequestEnableNotification(const std::string & deviceId,const sptr<IAnsDialogCallback> & ansDialogCallback,const sptr<IRemoteObject> & callerToken)227     ErrCode RequestEnableNotification(const std::string& deviceId,
228         const sptr<IAnsDialogCallback>& ansDialogCallback, const sptr<IRemoteObject>& callerToken) override
229     {
230         return ERR_ANS_INVALID_PARAM;
231     }
232 
RequestEnableNotification(const std::string & bundleName,int32_t uid)233     ErrCode RequestEnableNotification(const std::string& bundleName, int32_t uid) override
234     {
235         return ERR_ANS_INVALID_PARAM;
236     }
237 
SetNotificationsEnabledForBundle(const std::string & deviceId,bool enabled)238     ErrCode SetNotificationsEnabledForBundle(const std::string& deviceId, bool enabled) override
239     {
240         return ERR_ANS_INVALID_PARAM;
241     }
242 
SetNotificationsEnabledForAllBundles(const std::string & deviceId,bool enabled)243     ErrCode SetNotificationsEnabledForAllBundles(const std::string& deviceId, bool enabled) override
244     {
245         return ERR_ANS_INVALID_PARAM;
246     }
247 
SetNotificationsEnabledForSpecialBundle(const std::string & deviceId,const sptr<NotificationBundleOption> & bundleOption,bool enabled,bool updateUnEnableTime)248     ErrCode SetNotificationsEnabledForSpecialBundle(
249         const std::string& deviceId, const sptr<NotificationBundleOption>& bundleOption, bool enabled,
250         bool updateUnEnableTime) override
251     {
252         return ERR_ANS_INVALID_PARAM;
253     }
254 
SetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption> & bundleOption,bool enabled)255     ErrCode SetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption>& bundleOption, bool enabled) override
256     {
257         return ERR_ANS_INVALID_PARAM;
258     }
259 
GetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption> & bundleOption,bool & enabled)260     ErrCode GetShowBadgeEnabledForBundle(const sptr<NotificationBundleOption>& bundleOption, bool& enabled) override
261     {
262         return ERR_ANS_INVALID_PARAM;
263     }
264 
GetShowBadgeEnabled(bool & enabled)265     ErrCode GetShowBadgeEnabled(bool& enabled) override
266     {
267         return ERR_ANS_INVALID_PARAM;
268     }
269 
Subscribe(const sptr<IAnsSubscriber> & subscriber)270     ErrCode Subscribe(const sptr<IAnsSubscriber>& subscriber) override
271     {
272         return ERR_ANS_INVALID_PARAM;
273     }
274 
Subscribe(const sptr<IAnsSubscriber> & subscriber,const sptr<NotificationSubscribeInfo> & info)275     ErrCode Subscribe(const sptr<IAnsSubscriber>& subscriber, const sptr<NotificationSubscribeInfo>& info) override
276     {
277         return ERR_ANS_INVALID_PARAM;
278     }
279 
SubscribeSelf(const sptr<IAnsSubscriber> & subscriber)280     ErrCode SubscribeSelf(const sptr<IAnsSubscriber>& subscriber) override
281     {
282         return ERR_ANS_INVALID_PARAM;
283     }
284 
GetAllNotificationEnabledBundles(std::vector<NotificationBundleOption> & bundleOption)285     ErrCode GetAllNotificationEnabledBundles(std::vector<NotificationBundleOption>& bundleOption) override
286     {
287         return ERR_ANS_INVALID_PARAM;
288     }
289 
GetTargetDeviceStatus(const std::string & deviceType,int32_t & status)290     ErrCode GetTargetDeviceStatus(const std::string& deviceType, int32_t& status)
291     {
292         return ERR_ANS_INVALID_PARAM;
293     }
294 
GetAllLiveViewEnabledBundles(std::vector<NotificationBundleOption> & bundleOption)295     ErrCode GetAllLiveViewEnabledBundles(std::vector<NotificationBundleOption>& bundleOption) override
296     {
297         return ERR_ANS_INVALID_PARAM;
298     }
299 
GetAllDistribuedEnabledBundles(const std::string & deviceType,std::vector<NotificationBundleOption> & bundleOption)300     ErrCode GetAllDistribuedEnabledBundles(
301         const std::string& deviceType, std::vector<NotificationBundleOption>& bundleOption) override
302     {
303         return ERR_ANS_INVALID_PARAM;
304     }
305 
SubscribeLocalLiveView(const sptr<IAnsSubscriberLocalLiveView> & subscriber,bool isNatives)306     ErrCode SubscribeLocalLiveView(const sptr<IAnsSubscriberLocalLiveView>& subscriber, bool isNatives) override
307     {
308         return ERR_ANS_INVALID_PARAM;
309     }
310 
SubscribeLocalLiveView(const sptr<IAnsSubscriberLocalLiveView> & subscriber,const sptr<NotificationSubscribeInfo> & info,bool isNatives)311     ErrCode SubscribeLocalLiveView(const sptr<IAnsSubscriberLocalLiveView>& subscriber,
312         const sptr<NotificationSubscribeInfo>& info, bool isNatives) override
313     {
314         return ERR_ANS_INVALID_PARAM;
315     }
316 
Unsubscribe(const sptr<IAnsSubscriber> & subscriber)317     ErrCode Unsubscribe(const sptr<IAnsSubscriber>& subscriber) override
318     {
319         return ERR_ANS_INVALID_PARAM;
320     }
321 
Unsubscribe(const sptr<IAnsSubscriber> & subscriber,const sptr<NotificationSubscribeInfo> & info)322     ErrCode Unsubscribe(
323         const sptr<IAnsSubscriber>& subscriber, const sptr<NotificationSubscribeInfo>& info) override
324     {
325         return ERR_ANS_INVALID_PARAM;
326     }
327 
IsAllowedNotify(bool & allowed)328     ErrCode IsAllowedNotify(bool& allowed) override
329     {
330         return ERR_ANS_INVALID_PARAM;
331     }
332 
IsAllowedNotifySelf(bool & allowed)333     ErrCode IsAllowedNotifySelf(bool& allowed) override
334     {
335         return ERR_ANS_INVALID_PARAM;
336     }
337 
CanPopEnableNotificationDialog(const sptr<IAnsDialogCallback> & callback,bool & canPop,std::string & bundleName)338     ErrCode CanPopEnableNotificationDialog(
339         const sptr<IAnsDialogCallback>& callback, bool& canPop, std::string& bundleName) override
340     {
341         return ERR_ANS_INVALID_PARAM;
342     }
343 
RemoveEnableNotificationDialog()344     ErrCode RemoveEnableNotificationDialog() override
345     {
346         return ERR_ANS_INVALID_PARAM;
347     }
348 
IsSpecialBundleAllowedNotify(const sptr<NotificationBundleOption> & bundleOption,bool & allowed)349     ErrCode IsSpecialBundleAllowedNotify(const sptr<NotificationBundleOption>& bundleOption, bool& allowed) override
350     {
351         return ERR_ANS_INVALID_PARAM;
352     }
353 
SetDoNotDisturbDate(const sptr<NotificationDoNotDisturbDate> & date)354     ErrCode SetDoNotDisturbDate(const sptr<NotificationDoNotDisturbDate>& date) override
355     {
356         return ERR_ANS_INVALID_PARAM;
357     }
358 
GetDoNotDisturbDate(sptr<NotificationDoNotDisturbDate> & date)359     ErrCode GetDoNotDisturbDate(sptr<NotificationDoNotDisturbDate>& date) override
360     {
361         return ERR_ANS_INVALID_PARAM;
362     }
363 
AddDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> & profiles)364     ErrCode AddDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>>& profiles) override
365     {
366         return ERR_ANS_INVALID_PARAM;
367     }
368 
RemoveDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>> & profiles)369     ErrCode RemoveDoNotDisturbProfiles(const std::vector<sptr<NotificationDoNotDisturbProfile>>& profiles) override
370     {
371         return ERR_ANS_INVALID_PARAM;
372     }
373 
DoesSupportDoNotDisturbMode(bool & doesSupport)374     ErrCode DoesSupportDoNotDisturbMode(bool& doesSupport) override
375     {
376         return ERR_ANS_INVALID_PARAM;
377     }
378 
IsNeedSilentInDoNotDisturbMode(const std::string & phoneNumber,int32_t callerType)379     ErrCode IsNeedSilentInDoNotDisturbMode(const std::string& phoneNumber, int32_t callerType) override
380     {
381         return ERR_ANS_INVALID_PARAM;
382     }
383 
CancelGroup(const std::string & groupName,const std::string & instanceKey)384     ErrCode CancelGroup(const std::string& groupName, const std::string& instanceKey) override
385     {
386         return ERR_ANS_INVALID_PARAM;
387     }
388 
RemoveGroupByBundle(const sptr<NotificationBundleOption> & bundleOption,const std::string & groupName)389     ErrCode RemoveGroupByBundle(
390         const sptr<NotificationBundleOption>& bundleOption, const std::string& groupName) override
391     {
392         return ERR_ANS_INVALID_PARAM;
393     }
394 
IsDistributedEnabled(bool & enabled)395     ErrCode IsDistributedEnabled(bool& enabled) override
396     {
397         return ERR_ANS_INVALID_PARAM;
398     }
399 
EnableDistributed(bool enabled)400     ErrCode EnableDistributed(bool enabled) override
401     {
402         return ERR_ANS_INVALID_PARAM;
403     }
404 
EnableDistributedByBundle(const sptr<NotificationBundleOption> & bundleOption,bool enabled)405     ErrCode EnableDistributedByBundle(const sptr<NotificationBundleOption>& bundleOption, bool enabled) override
406     {
407         return ERR_ANS_INVALID_PARAM;
408     }
409 
EnableDistributedSelf(bool enabled)410     ErrCode EnableDistributedSelf(bool enabled) override
411     {
412         return ERR_ANS_INVALID_PARAM;
413     }
414 
IsDistributedEnableByBundle(const sptr<NotificationBundleOption> & bundleOption,bool & enabled)415     ErrCode IsDistributedEnableByBundle(const sptr<NotificationBundleOption>& bundleOption, bool& enabled) override
416     {
417         return ERR_ANS_INVALID_PARAM;
418     }
419 
GetDeviceRemindType(int32_t & remindTypeInt)420     ErrCode GetDeviceRemindType(int32_t& remindTypeInt) override
421     {
422         return ERR_ANS_INVALID_PARAM;
423     }
424 
PublishContinuousTaskNotification(const sptr<NotificationRequest> & request)425     ErrCode PublishContinuousTaskNotification(const sptr<NotificationRequest>& request) override
426     {
427         return ERR_ANS_INVALID_PARAM;
428     }
429 
CancelContinuousTaskNotification(const std::string & label,int32_t notificationId)430     ErrCode CancelContinuousTaskNotification(const std::string& label, int32_t notificationId) override
431     {
432         return ERR_ANS_INVALID_PARAM;
433     }
434 
IsSupportTemplate(const std::string & templateName,bool & support)435     ErrCode IsSupportTemplate(const std::string& templateName, bool& support) override
436     {
437         return ERR_ANS_INVALID_PARAM;
438     }
439 
IsSpecialUserAllowedNotify(int32_t userId,bool & allowed)440     ErrCode IsSpecialUserAllowedNotify(int32_t userId, bool& allowed) override
441     {
442         return ERR_ANS_INVALID_PARAM;
443     }
444 
SetNotificationsEnabledByUser(int32_t userId,bool enabled)445     ErrCode SetNotificationsEnabledByUser(int32_t userId, bool enabled) override
446     {
447         return ERR_ANS_INVALID_PARAM;
448     }
449 
DeleteAllByUser(int32_t userId)450     ErrCode DeleteAllByUser(int32_t userId) override
451     {
452         return ERR_ANS_INVALID_PARAM;
453     }
454 
SetDoNotDisturbDate(int32_t userId,const sptr<NotificationDoNotDisturbDate> & date)455     ErrCode SetDoNotDisturbDate(int32_t userId, const sptr<NotificationDoNotDisturbDate>& date) override
456     {
457         return ERR_ANS_INVALID_PARAM;
458     }
459 
GetDoNotDisturbDate(int32_t userId,sptr<NotificationDoNotDisturbDate> & date)460     ErrCode GetDoNotDisturbDate(int32_t userId, sptr<NotificationDoNotDisturbDate>& date) override
461     {
462         return ERR_ANS_INVALID_PARAM;
463     }
464 
SetEnabledForBundleSlot(const sptr<NotificationBundleOption> & bundleOption,int32_t slotTypeInt,bool enabled,bool isForceControl)465     ErrCode SetEnabledForBundleSlot(const sptr<NotificationBundleOption>& bundleOption, int32_t slotTypeInt,
466         bool enabled, bool isForceControl) override
467     {
468         return ERR_ANS_INVALID_PARAM;
469     }
470 
GetEnabledForBundleSlot(const sptr<NotificationBundleOption> & bundleOption,int32_t slotTypeInt,bool & enabled)471     ErrCode GetEnabledForBundleSlot(
472         const sptr<NotificationBundleOption>& bundleOption, int32_t slotTypeInt, bool& enabled) override
473     {
474         return ERR_ANS_INVALID_PARAM;
475     }
476 
GetEnabledForBundleSlotSelf(int32_t slotTypeInt,bool & enabled)477     ErrCode GetEnabledForBundleSlotSelf(int32_t slotTypeInt, bool& enabled) override
478     {
479         return ERR_ANS_INVALID_PARAM;
480     }
481 
SetSyncNotificationEnabledWithoutApp(const int32_t userId,const bool enabled)482     ErrCode SetSyncNotificationEnabledWithoutApp(const int32_t userId, const bool enabled) override
483     {
484         return ERR_ANS_INVALID_PARAM;
485     }
486 
GetSyncNotificationEnabledWithoutApp(const int32_t userId,bool & enabled)487     ErrCode GetSyncNotificationEnabledWithoutApp(const int32_t userId, bool& enabled) override
488     {
489         return ERR_ANS_INVALID_PARAM;
490     }
491 
SetBadgeNumber(int32_t badgeNumber,const std::string & instanceKey)492     ErrCode SetBadgeNumber(int32_t badgeNumber, const std::string& instanceKey) override
493     {
494         return ERR_ANS_INVALID_PARAM;
495     }
496 
SetBadgeNumberByBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t badgeNumber)497     ErrCode SetBadgeNumberByBundle(const sptr<NotificationBundleOption>& bundleOption, int32_t badgeNumber) override
498     {
499         return ERR_ANS_INVALID_PARAM;
500     }
501 
SetBadgeNumberForDhByBundle(const sptr<NotificationBundleOption> & bundleOption,int32_t badgeNumber)502     ErrCode SetBadgeNumberForDhByBundle(
503         const sptr<NotificationBundleOption>& bundleOption, int32_t badgeNumber) override
504     {
505         return ERR_ANS_INVALID_PARAM;
506     }
507 
GetSlotFlagsAsBundle(const sptr<NotificationBundleOption> & bundleOption,uint32_t & slotFlags)508     ErrCode GetSlotFlagsAsBundle(const sptr<NotificationBundleOption>& bundleOption, uint32_t& slotFlags) override
509     {
510         return ERR_ANS_INVALID_PARAM;
511     }
512 
SetSlotFlagsAsBundle(const sptr<NotificationBundleOption> & bundleOption,uint32_t slotFlags)513     ErrCode SetSlotFlagsAsBundle(const sptr<NotificationBundleOption>& bundleOption, uint32_t slotFlags) override
514     {
515         return ERR_ANS_INVALID_PARAM;
516     }
517 
GetNotificationSettings(uint32_t & slotFlags)518     ErrCode GetNotificationSettings(uint32_t& slotFlags) override
519     {
520         return ERR_ANS_INVALID_PARAM;
521     }
522 
RegisterPushCallback(const sptr<IRemoteObject> & pushCallback,const sptr<NotificationCheckRequest> & notificationCheckRequest)523     ErrCode RegisterPushCallback(const sptr<IRemoteObject>& pushCallback,
524         const sptr<NotificationCheckRequest>& notificationCheckRequest) override
525     {
526         return ERR_ANS_INVALID_PARAM;
527     }
528 
UnregisterPushCallback()529     ErrCode UnregisterPushCallback() override
530     {
531         return ERR_ANS_INVALID_PARAM;
532     }
533 
GetActiveNotificationByFilter(const sptr<NotificationBundleOption> & bundleOption,int32_t notificationId,const std::string & label,int32_t userId,const std::vector<std::string> & extraInfoKeys,sptr<NotificationRequest> & request)534     ErrCode GetActiveNotificationByFilter(const sptr<NotificationBundleOption>& bundleOption,
535         int32_t notificationId, const std::string& label, int32_t userId, const std::vector<std::string>& extraInfoKeys,
536         sptr<NotificationRequest>& request) override
537     {
538         return ERR_ANS_INVALID_PARAM;
539     }
540 
TriggerLocalLiveView(const sptr<NotificationBundleOption> & bundleOption,const int32_t notificationId,const sptr<NotificationButtonOption> & buttonOption)541     ErrCode TriggerLocalLiveView(const sptr<NotificationBundleOption>& bundleOption, const int32_t notificationId,
542         const sptr<NotificationButtonOption>& buttonOption) override
543     {
544         return ERR_ANS_INVALID_PARAM;
545     }
546 
SetDistributedEnabledByBundle(const sptr<NotificationBundleOption> & bundleOption,const std::string & deviceType,const bool enabled)547     ErrCode SetDistributedEnabledByBundle(const sptr<NotificationBundleOption>& bundleOption,
548         const std::string& deviceType, const bool enabled) override
549     {
550         return ERR_ANS_INVALID_PARAM;
551     }
552 
SetDistributedBundleOption(const std::vector<sptr<DistributedBundleOption>> & bundles,const std::string & deviceType)553     ErrCode SetDistributedBundleOption(const std::vector<sptr<DistributedBundleOption>> &bundles,
554         const std::string &deviceType) override
555     {
556         return ERR_ANS_INVALID_PARAM;
557     }
558 
SetAdditionConfig(const std::string & key,const std::string & value)559     ErrCode SetAdditionConfig(const std::string& key, const std::string& value) override
560     {
561         return ERR_ANS_INVALID_PARAM;
562     }
563 
IsDistributedEnabledByBundle(const sptr<NotificationBundleOption> & bundleOption,const std::string & deviceType,bool & enabled)564     ErrCode IsDistributedEnabledByBundle(
565         const sptr<NotificationBundleOption>& bundleOption, const std::string& deviceType, bool& enabled) override
566     {
567         return ERR_ANS_INVALID_PARAM;
568     }
569 
SetDistributedEnabled(const std::string & deviceType,bool enabled)570     ErrCode SetDistributedEnabled(const std::string &deviceType, bool enabled) override
571     {
572         return ERR_ANS_INVALID_PARAM;
573     }
574 
IsDistributedEnabled(const std::string & deviceType,bool & enabled)575     ErrCode IsDistributedEnabled(const std::string &deviceType, bool &enabled) override
576     {
577         return ERR_ANS_INVALID_PARAM;
578     }
579 
GetDistributedAbility(int32_t & abilityId)580     ErrCode GetDistributedAbility(int32_t &abilityId)
581     {
582         return ERR_ANS_INVALID_PARAM;
583     }
584 
GetDistributedAuthStatus(const std::string & deviceType,const std::string & deviceId,int32_t userId,bool & isAuth)585     ErrCode GetDistributedAuthStatus(
586     const std::string &deviceType, const std::string &deviceId, int32_t userId, bool &isAuth)
587     {
588         return ERR_ANS_INVALID_PARAM;
589     }
590 
SetDistributedAuthStatus(const std::string & deviceType,const std::string & deviceId,int32_t userId,bool isAuth)591     ErrCode SetDistributedAuthStatus(
592         const std::string &deviceType, const std::string &deviceId, int32_t userId, bool isAuth)
593     {
594         return ERR_ANS_INVALID_PARAM;
595     }
596 
GetDistributedDevicelist(std::vector<std::string> & deviceTypes)597     ErrCode GetDistributedDevicelist(std::vector<std::string> &deviceTypes) override
598     {
599         return ERR_ANS_INVALID_PARAM;
600     }
601 
IsSmartReminderEnabled(const std::string & deviceType,bool & enabled)602     ErrCode IsSmartReminderEnabled(const std::string& deviceType, bool& enabled) override
603     {
604         return ERR_ANS_INVALID_PARAM;
605     }
606 
SetSmartReminderEnabled(const std::string & deviceType,const bool enabled)607     ErrCode SetSmartReminderEnabled(const std::string& deviceType, const bool enabled) override
608     {
609         return ERR_ANS_INVALID_PARAM;
610     }
611 
SetDistributedEnabledBySlot(int32_t slotTypeInt,const std::string & deviceType,bool enabled)612     ErrCode SetDistributedEnabledBySlot(int32_t slotTypeInt, const std::string& deviceType, bool enabled) override
613     {
614         return ERR_ANS_INVALID_PARAM;
615     }
616 
IsDistributedEnabledBySlot(int32_t slotTypeInt,const std::string & deviceType,bool & enabled)617     ErrCode IsDistributedEnabledBySlot(int32_t slotTypeInt, const std::string& deviceType, bool& enabled) override
618     {
619         return ERR_ANS_INVALID_PARAM;
620     }
621 
CancelAsBundleWithAgent(const sptr<NotificationBundleOption> & bundleOption,const int32_t id)622     ErrCode CancelAsBundleWithAgent(const sptr<NotificationBundleOption>& bundleOption, const int32_t id) override
623     {
624         return ERR_ANS_INVALID_PARAM;
625     }
626 
SetTargetDeviceStatus(const std::string & deviceType,uint32_t status,const std::string & deviceId)627     ErrCode SetTargetDeviceStatus(
628         const std::string& deviceType, uint32_t status, const std::string& deviceId) override
629     {
630         return ERR_ANS_INVALID_PARAM;
631     }
632 
SetTargetDeviceStatus(const std::string & deviceType,uint32_t status,uint32_t controlFlag,const std::string & deviceId,int32_t userId)633     ErrCode SetTargetDeviceStatus(const std::string& deviceType, uint32_t status, uint32_t controlFlag,
634         const std::string& deviceId, int32_t userId) override
635     {
636         return ERR_ANS_INVALID_PARAM;
637     }
638 
SetTargetDeviceBundleList(const std::string & deviceType,const std::string & deviceId,int operatorType,const std::vector<std::string> & bundleList,const std::vector<std::string> & labelList)639     ErrCode SetTargetDeviceBundleList(const std::string& deviceType, const std::string& deviceId,
640         int operatorType, const std::vector<std::string>& bundleList,
641         const std::vector<std::string>& labelList) override
642     {
643         return ERR_ANS_INVALID_PARAM;
644     }
645 
SetTargetDeviceSwitch(const std::string & deviceType,const std::string & deviceId,bool notificaitonEnable,bool liveViewEnable)646     ErrCode SetTargetDeviceSwitch(const std::string& deviceType, const std::string& deviceId,
647         bool notificaitonEnable, bool liveViewEnable) override
648     {
649         return ERR_ANS_INVALID_PARAM;
650     }
651 
GetDoNotDisturbProfile(int64_t id,sptr<NotificationDoNotDisturbProfile> & profile)652     ErrCode GetDoNotDisturbProfile(int64_t id, sptr<NotificationDoNotDisturbProfile>& profile) override
653     {
654         return ERR_ANS_INVALID_PARAM;
655     }
656 
657 #ifdef NOTIFICATION_SMART_REMINDER_SUPPORTED
RegisterSwingCallback(const sptr<IRemoteObject> & swingCallback)658     ErrCode RegisterSwingCallback(const sptr<IRemoteObject>& swingCallback) override
659     {
660         return ERR_ANS_INVALID_PARAM;
661     }
662 #endif
663 
UpdateNotificationTimerByUid(const int32_t uid,const bool isPaused)664     ErrCode UpdateNotificationTimerByUid(const int32_t uid, const bool isPaused) override
665     {
666         return ERR_ANS_INVALID_PARAM;
667     }
668 
AllowUseReminder(const std::string & bundleName,bool & isAllowUseReminder)669     ErrCode AllowUseReminder(const std::string& bundleName, bool& isAllowUseReminder) override
670     {
671         return ERR_ANS_INVALID_PARAM;
672     }
673 
DisableNotificationFeature(const sptr<NotificationDisable> & notificationDisable)674     ErrCode DisableNotificationFeature(const sptr<NotificationDisable>& notificationDisable) override
675     {
676         return ERR_ANS_INVALID_PARAM;
677     }
678 
DistributeOperation(const sptr<NotificationOperationInfo> & operationInfo,const sptr<IAnsOperationCallback> & operationCallback)679     ErrCode DistributeOperation(const sptr<NotificationOperationInfo>& operationInfo,
680         const sptr<IAnsOperationCallback>& operationCallback) override
681     {
682         return ERR_ANS_INVALID_PARAM;
683     }
684 
ReplyDistributeOperation(const std::string & hashCode,const int32_t result)685     ErrCode ReplyDistributeOperation(const std::string& hashCode, const int32_t result) override
686     {
687         return ERR_ANS_INVALID_PARAM;
688     }
689 
GetNotificationRequestByHashCode(const std::string & hashCode,sptr<NotificationRequest> & notificationRequest)690     ErrCode GetNotificationRequestByHashCode(
691         const std::string& hashCode, sptr<NotificationRequest>& notificationRequest) override
692     {
693         return ERR_ANS_INVALID_PARAM;
694     }
695 
SetHashCodeRule(const uint32_t type)696     ErrCode SetHashCodeRule(const uint32_t type) override
697     {
698         return ERR_ANS_INVALID_PARAM;
699     }
700 
GetAllNotificationsBySlotType(std::vector<sptr<Notification>> & notifications,int32_t slotTypeInt)701     ErrCode GetAllNotificationsBySlotType(
702         std::vector<sptr<Notification>>& notifications, int32_t slotTypeInt) override
703     {
704         return ERR_ANS_INVALID_PARAM;
705     }
706 
PublishWithMaxCapacity(const std::string & label,const sptr<NotificationRequest> & notification)707     ErrCode PublishWithMaxCapacity(const std::string& label, const sptr<NotificationRequest>& notification) override
708     {
709         return ERR_ANS_INVALID_PARAM;
710     }
711 
PublishNotificationForIndirectProxyWithMaxCapacity(const sptr<NotificationRequest> & notification)712     ErrCode PublishNotificationForIndirectProxyWithMaxCapacity(
713         const sptr<NotificationRequest>& notification) override
714     {
715         return ERR_ANS_INVALID_PARAM;
716     }
717 
PublishAsBundleWithMaxCapacity(const sptr<NotificationRequest> & notification,const std::string & representativeBundle)718     ErrCode PublishAsBundleWithMaxCapacity(
719         const sptr<NotificationRequest>& notification, const std::string& representativeBundle) override
720     {
721         return ERR_ANS_INVALID_PARAM;
722     }
723 
SetSilentReminderEnabled(const sptr<NotificationBundleOption> & bundleOption,const bool enabled)724     ErrCode SetSilentReminderEnabled(const sptr<NotificationBundleOption> &bundleOption,
725     const bool enabled) override
726     {
727         return ERR_ANS_INVALID_PARAM;
728     }
729 
IsSilentReminderEnabled(const sptr<NotificationBundleOption> & bundleOption,int32_t & enableStatusInt)730     ErrCode IsSilentReminderEnabled(const sptr<NotificationBundleOption> &bundleOption,
731     int32_t &enableStatusInt) override
732     {
733         return ERR_ANS_INVALID_PARAM;
734     }
735 
GetTargetDeviceBundleList(const std::string & deviceType,const std::string & deviceId,std::vector<std::string> & bundleList,std::vector<std::string> & labelList)736     ErrCode GetTargetDeviceBundleList(const std::string& deviceType, const std::string& deviceId,
737         std::vector<std::string>& bundleList, std::vector<std::string>& labelList) override
738     {
739         return ERR_ANS_INVALID_PARAM;
740     }
741 
GetMutilDeviceStatus(const std::string & deviceType,const uint32_t status,std::string & deviceId,int32_t & userId)742     ErrCode GetMutilDeviceStatus(const std::string &deviceType, const uint32_t status,
743         std::string& deviceId, int32_t& userId) override
744     {
745         return ERR_ANS_INVALID_PARAM;
746     }
747 
748 private:
749     std::string cmd_;
750     std::string bundle_;
751     int32_t userId_;
752 };
753 }  // namespace EventFwk
754 }  // namespace OHOS
755 
756 #endif  // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_TOOLS_MOCK_ANS_MANAGER_STUB_H
757