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 OHOS_STORAGE_MANAGER_STORAGE_STATS_H
17 #define OHOS_STORAGE_MANAGER_STORAGE_STATS_H
18 
19 #include "parcel.h"
20 
21 namespace OHOS {
22 namespace StorageManager {
23 class StorageStats final : public Parcelable {
24 public:
StorageStats()25     StorageStats() {}
StorageStats(int64_t total,int64_t audio,int64_t video,int64_t image,int64_t file,int64_t app)26     StorageStats(int64_t total, int64_t audio, int64_t video, int64_t image, int64_t file, int64_t app)
27         : total_(total), audio_(audio), video_(video), image_(image), file_(file), app_(app) {}
~StorageStats()28     ~StorageStats() {}
29 
30     int64_t total_ {0};
31     int64_t audio_ {0};
32     int64_t video_ {0};
33     int64_t image_ {0};
34     int64_t file_ {0};
35     int64_t app_ {0};
36 
37     bool Marshalling(Parcel &parcel) const override;
38     static std::unique_ptr<StorageStats> Unmarshalling(Parcel &parcel);
39 };
40 } // StorageMangaer
41 } // OHOS
42 
43 #endif // OHOS_STORAGE_MANAGER_STORAGE_STATS_H