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