• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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 #ifndef OHOS_MEDIA_BACKUP_AUDIOS_COUNT_STATISITIC_H
16 #define OHOS_MEDIA_BACKUP_AUDIOS_COUNT_STATISITIC_H
17 
18 #include <string>
19 #include <vector>
20 
21 #include "media_backup_report_data_type.h"
22 
23 namespace OHOS::Media {
24 class AudiosCountStatistic {
25 public:
SetSceneCode(int32_t sceneCode)26     AudiosCountStatistic &SetSceneCode(int32_t sceneCode)
27     {
28         this->sceneCode_ = sceneCode;
29         return *this;
30     }
SetTaskId(const std::string & taskId)31     AudiosCountStatistic &SetTaskId(const std::string &taskId)
32     {
33         this->taskId_ = taskId;
34         return *this;
35     }
SetAudioCount(const uint64_t audioCount)36     AudiosCountStatistic &SetAudioCount(const uint64_t audioCount)
37     {
38         this->audioCount_ = static_cast<int32_t>(audioCount);
39         return *this;
40     }
41     std::vector<AlbumMediaStatisticInfo> Load();
42 
43 private:
44     AlbumMediaStatisticInfo GetAudioCountStatInfo();
45 private:
46     int32_t sceneCode_;
47     std::string taskId_;
48     int32_t audioCount_ = 0;
49 };
50 }  // namespace OHOS::Media
51 #endif  // OHOS_MEDIA_BACKUP_AUDIOS_COUNT_STATISITIC_H