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")]
20extern_conformance!(
21    unsafe impl NSCoding for MXNetworkTransferMetric {}
22);
23
24#[cfg(feature = "MXMetric")]
25extern_conformance!(
26    unsafe impl NSObjectProtocol for MXNetworkTransferMetric {}
27);
28
29#[cfg(feature = "MXMetric")]
30extern_conformance!(
31    unsafe impl NSSecureCoding for MXNetworkTransferMetric {}
32);
33
34#[cfg(feature = "MXMetric")]
35impl MXNetworkTransferMetric {
36    extern_methods!(
37        /// Cumulative amount of data uploaded over WiFi.
38        ///
39        /// Dimensioned as NSUnitInformationStorage.
40        #[unsafe(method(cumulativeWifiUpload))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn cumulativeWifiUpload(
43            &self,
44        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
45
46        /// Cumulative amount of data downloaded over WiFi.
47        ///
48        /// Dimensioned as NSUnitInformationStorage.
49        #[unsafe(method(cumulativeWifiDownload))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn cumulativeWifiDownload(
52            &self,
53        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
54
55        /// Cumulative amount of data uploaded over cellular networks.
56        ///
57        /// This data is radio access technology agnostic.
58        ///
59        /// Dimensioned as NSUnitInformationStorage.
60        #[unsafe(method(cumulativeCellularUpload))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn cumulativeCellularUpload(
63            &self,
64        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
65
66        /// Cumulative amount of data downloaded over cellular networks.
67        ///
68        /// This data is radio access technology agnostic.
69        ///
70        /// Dimensioned as NSUnitInformationStorage.
71        #[unsafe(method(cumulativeCellularDownload))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn cumulativeCellularDownload(
74            &self,
75        ) -> Retained<NSMeasurement<NSUnitInformationStorage>>;
76    );
77}
78
79/// Methods declared on superclass `NSObject`.
80#[cfg(feature = "MXMetric")]
81impl MXNetworkTransferMetric {
82    extern_methods!(
83        #[unsafe(method(init))]
84        #[unsafe(method_family = init)]
85        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
86
87        #[unsafe(method(new))]
88        #[unsafe(method_family = new)]
89        pub unsafe fn new() -> Retained<Self>;
90    );
91}