1 /*
2 * Copyright (c) 2023 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 #include "module_app_gallery/app_gallery_dispose_proxy.h"
17
18 #include <string>
19 #include <gtest/gtest.h>
20
21 #include "message_parcel.h"
22 #include "want.h"
23
24 #include "module_app_gallery/app_gallery_service_connection.h"
25
26 namespace OHOS::FileManagement::Backup {
27 using namespace std;
28
AppGalleryDisposeProxy()29 AppGalleryDisposeProxy::AppGalleryDisposeProxy()
30 {
31 GTEST_LOG_(INFO) << "AppGalleryDisposeProxy is OK";
32 }
33
~AppGalleryDisposeProxy()34 AppGalleryDisposeProxy::~AppGalleryDisposeProxy()
35 {
36 GTEST_LOG_(INFO) << "~AppGalleryDisposeProxy is OK";
37 }
38
GetInstance()39 sptr<AppGalleryDisposeProxy> AppGalleryDisposeProxy::GetInstance()
40 {
41 return new AppGalleryDisposeProxy;
42 }
43
StartBackup(const std::string & bundleName)44 DisposeErr AppGalleryDisposeProxy::StartBackup(const std::string &bundleName)
45 {
46 return DoDispose(bundleName, DisposeOperation::START_BACKUP);
47 }
48
EndBackup(const std::string & bundleName)49 DisposeErr AppGalleryDisposeProxy::EndBackup(const std::string &bundleName)
50 {
51 return DoDispose(bundleName, DisposeOperation::END_BACKUP);
52 }
53
StartRestore(const std::string & bundleName)54 DisposeErr AppGalleryDisposeProxy::StartRestore(const std::string &bundleName)
55 {
56 return DoDispose(bundleName, DisposeOperation::START_RESTORE);
57 }
58
EndRestore(const std::string & bundleName)59 DisposeErr AppGalleryDisposeProxy::EndRestore(const std::string &bundleName)
60 {
61 return DoDispose(bundleName, DisposeOperation::END_RESTORE);
62 }
63
DoDispose(const std::string & bundleName,DisposeOperation disposeOperation)64 DisposeErr AppGalleryDisposeProxy::DoDispose(const std::string &bundleName, DisposeOperation disposeOperation)
65 {
66 return DisposeErr::OK;
67 }
68
69 } // namespace OHOS::FileManagement::Backup
70