From d8d0d2eb5437884738b8cb62b390b0fae79c28ce Mon Sep 17 00:00:00 2001 From: leo9001 Date: Fri, 12 Sep 2025 09:23:48 +0800 Subject: [PATCH] [issue]statistics ani [issue]statistics ani Issue: https://gitee.com/openharmony/communication_netmanager_base/issues/ICXMSW Signed-off-by: leo9001 --- api/@ohos.net.statistics.d.ts | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts index c5db7867df..f085e9f8d0 100644 --- a/api/@ohos.net.statistics.d.ts +++ b/api/@ohos.net.statistics.d.ts @@ -699,6 +699,48 @@ declare namespace statistics { info: NetStatsInfo; }[]; + /** + * Array of {@link NetStatsInfoSequenceItem}. + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. + * @since 20 static + */ + export type NetStatsInfoSequence = Array; + + /** + * Parameters for an {@link NetStatsInfo} with start time and end time. + * @interface NetStatsInfoSequenceItem + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. + * @since 20 static + */ + export interface NetStatsInfoSequenceItem { + /** + * Start time for querying traffic. + * @type { int } + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. + * @since 20 static + */ + startTime: int; + /** + * End time for querying traffic. + * @type { int } + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. + * @since 20 static + */ + endTime: int; + /** + * Detailed information of statistics. + * @type { NetStatsInfo } + * @syscap SystemCapability.Communication.NetManager.Core + * @systemapi Hide this for inner system use. + * @since 20 static + */ + info: NetStatsInfo; + } + /** * {@link NetStatsInfo} for every UID. Key is UID. * @syscap SystemCapability.Communication.NetManager.Core @@ -798,6 +840,7 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. * @since 12 dynamic + * @since 20 static */ function getTrafficStatsByUidNetwork(uid: int, networkInfo: NetworkInfo): Promise; } -- Gitee