• 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
16sequenceable OHOS.DeviceUsageStats.BundleActiveEvent;
17sequenceable OHOS.DeviceUsageStats.BundleActiveHighFrequencyPeriod;
18sequenceable OHOS.DeviceUsageStats.BundleActivePackageStats;
19sequenceable OHOS.DeviceUsageStats.BundleActiveModuleRecord;
20sequenceable OHOS.DeviceUsageStats.BundleActiveEventStats;
21interface OHOS.DeviceUsageStats.IAppGroupCallback;
22interface OHOS.DeviceUsageStats.IBundleActiveService {
23    [oneway] void ReportEvent([in] BundleActiveEvent event, [in] int userId);
24    void IsBundleIdle([out] boolean isBundleIdle, [in] String bundleName, [in] int userId);
25    void IsBundleUsePeriod([out] boolean isUsePeriod, [in] String bundleName, [in] int userId);
26    void QueryBundleStatsInfoByInterval([out] List<BundleActivePackageStats> packageStats,
27        [in] int intervalType, [in] long beginTime, [in] long endTime, [in] int userId);
28    void QueryBundleEvents([out] List<BundleActiveEvent> bundleActiveEvents, [in] long beginTime,
29        [in] long endTime, [in] int userId);
30    void QueryBundleStatsInfos([out] List<BundleActivePackageStats> bundleActivePackageStats,
31        [in] int intervalType, [in] long beginTime, [in] long endTime);
32    void QueryCurrentBundleEvents([out] List<BundleActiveEvent> bundleActiveEvents,
33        [in] long beginTime, [in]long endTime);
34    void QueryAppGroup([out] int appGroup, [in] String bundleName, [in] int userId);
35    void SetAppGroup([in] String bundleName, [in] int newGroup, [in] int userId);
36    void QueryModuleUsageRecords([in] int maxNum, [out] List<BundleActiveModuleRecord> results, [in] int userId);
37    void RegisterAppGroupCallBack([in] IAppGroupCallback observer);
38    void UnRegisterAppGroupCallBack([in] IAppGroupCallback observer);
39    void QueryDeviceEventStats([in] long beginTime, [in] long endTime,
40        [out]List<BundleActiveEventStats> eventStats, [in] int userId);
41    void QueryNotificationEventStats([in] long beginTime, [in] long endTime,
42        [out]List<BundleActiveEventStats> eventStats, [in] int userId);
43    void QueryHighFrequencyPeriodBundle([out] List<BundleActiveHighFrequencyPeriod> bundleHighFreqPeriod, [in] int userId);
44    void QueryBundleTodayLatestUsedTime([out] long latestUsedTime, [in] String bundleName, [in] int userId);
45}