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 FILE_ACCESS_SERVICE_MOCK_H
17 #define FILE_ACCESS_SERVICE_MOCK_H
18 
19 #include "file_access_service_stub.h"
20 
21 namespace OHOS {
22 namespace FileAccessFwk {
23 class FileAccessServiceMock final : public FileAccessServiceStub {
24 public:
25     virtual ~FileAccessServiceMock() = default;
26 
OnChange(Uri uri,NotifyType notifyType)27     int32_t OnChange(Uri uri, NotifyType notifyType) override { return 0; }
RegisterNotify(Uri uri,bool notifyForDescendants,const sptr<IFileAccessObserver> & observer,const std::shared_ptr<ConnectExtensionInfo> & info)28     int32_t RegisterNotify(Uri uri, bool notifyForDescendants, const sptr<IFileAccessObserver> &observer,
29         const std::shared_ptr<ConnectExtensionInfo> &info) override { return 0; }
UnregisterNotify(Uri uri,const sptr<IFileAccessObserver> & observer,const std::shared_ptr<ConnectExtensionInfo> & info)30     int32_t UnregisterNotify(Uri uri, const sptr<IFileAccessObserver> &observer,
31         const std::shared_ptr<ConnectExtensionInfo> &info) override { return 0; }
GetExtensionProxy(const std::shared_ptr<ConnectExtensionInfo> & info,sptr<IFileAccessExtBase> & extensionProxy)32     int32_t GetExtensionProxy(const std::shared_ptr<ConnectExtensionInfo> &info,
33         sptr<IFileAccessExtBase> &extensionProxy) override { return 0; }
CleanAllNotify(Uri uri,const std::shared_ptr<ConnectExtensionInfo> & info)34     int32_t CleanAllNotify(Uri uri, const std::shared_ptr<ConnectExtensionInfo> &info) override { return 0; }
ConnectFileExtAbility(const AAFwk::Want & want,const sptr<AAFwk::IAbilityConnection> & connection)35     int32_t ConnectFileExtAbility(const AAFwk::Want &want,
36         const sptr<AAFwk::IAbilityConnection>& connection) override { return 0; }
DisConnectFileExtAbility(const sptr<AAFwk::IAbilityConnection> & connection)37     int32_t DisConnectFileExtAbility(const sptr<AAFwk::IAbilityConnection>& connection) override { return 0; }
38 };
39 } // namespace FileAccessFwk
40 } // namespace OHOS
41 #endif // FILE_ACCESS_SERVICE_MOCK_H