objc2_metric_kit/generated/
MXNetworkTransferMetric.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// An MXMetric subclass that encapsulates network transfer metrics
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxnetworktransfermetric?language=objc)
13    #[unsafe(super(MXMetric, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MXMetric")]
16    pub struct MXNetworkTransferMetric;
17);
18
19#[cfg(feature = "MXMetric")]
20unsafe impl NSCoding for MXNetworkTransferMetric {}
21
22#[cfg(feature = "MXMetric")]
23unsafe impl NSObjectProtocol for MXNetworkTransferMetric {}
24
25#[cfg(feature = "MXMetric")]
26unsafe impl NSSecureCoding for MXNetworkTransferMetric {}
27
28#[cfg(feature = "MXMetric")]
29impl MXNetworkTransferMetric {
30    extern_methods!(
31        /// Cumulative amount of data uploaded over WiFi.
32        ///
33        /// Dimensioned as NSUnitInformationStorage.
34        #[unsafe(method(cumulativeWifiUpload))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn cumulativeWifiUpload(
37            &self,
38        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
39
40        /// Cumulative amount of data downloaded over WiFi.
41        ///
42        /// Dimensioned as NSUnitInformationStorage.
43        #[unsafe(method(cumulativeWifiDownload))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn cumulativeWifiDownload(
46            &self,
47        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
48
49        /// Cumulative amount of data uploaded over cellular networks.
50        ///
51        /// This data is radio access technology agnostic.
52        ///
53        /// Dimensioned as NSUnitInformationStorage.
54        #[unsafe(method(cumulativeCellularUpload))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn cumulativeCellularUpload(
57            &self,
58        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
59
60        /// Cumulative amount of data downloaded over cellular networks.
61        ///
62        /// This data is radio access technology agnostic.
63        ///
64        /// Dimensioned as NSUnitInformationStorage.
65        #[unsafe(method(cumulativeCellularDownload))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn cumulativeCellularDownload(
68            &self,
69        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
70    );
71}
72
73/// Methods declared on superclass `NSObject`.
74#[cfg(feature = "MXMetric")]
75impl MXNetworkTransferMetric {
76    extern_methods!(
77        #[unsafe(method(init))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81        #[unsafe(method(new))]
82        #[unsafe(method_family = new)]
83        pub unsafe fn new() -> Retained<Self>;
84    );
85}