objc2_metric_kit/generated/
MXMetaData.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    /// A class that contains miscellaneous metadata about an associated payload.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxmetadata?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MXMetaData;
16);
17
18unsafe impl NSCoding for MXMetaData {}
19
20unsafe impl NSObjectProtocol for MXMetaData {}
21
22unsafe impl NSSecureCoding for MXMetaData {}
23
24impl MXMetaData {
25    extern_methods!(
26        /// An NSString designating the region format associated with the application.
27        #[unsafe(method(regionFormat))]
28        #[unsafe(method_family = none)]
29        pub unsafe fn regionFormat(&self) -> Retained<NSString>;
30
31        /// An NSString designating the OS version associated with the device.
32        #[unsafe(method(osVersion))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn osVersion(&self) -> Retained<NSString>;
35
36        /// An NSString designating the device type associated with this device.
37        #[unsafe(method(deviceType))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn deviceType(&self) -> Retained<NSString>;
40
41        /// An NSString designating the app build version.
42        #[unsafe(method(applicationBuildVersion))]
43        #[unsafe(method_family = none)]
44        pub unsafe fn applicationBuildVersion(&self) -> Retained<NSString>;
45
46        /// An NSString designating the current architecture.
47        #[unsafe(method(platformArchitecture))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn platformArchitecture(&self) -> Retained<NSString>;
50
51        /// A boolean representing low power mode enablement on device
52        #[unsafe(method(lowPowerModeEnabled))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn lowPowerModeEnabled(&self) -> bool;
55
56        /// A boolean representing if the app is registered as a testFlightApp
57        #[unsafe(method(isTestFlightApp))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn isTestFlightApp(&self) -> bool;
60
61        #[cfg(feature = "libc")]
62        /// pid of the process
63        ///
64        /// Note: A value of -1 indicates that the PID was unavailable for the containing payload.
65        #[unsafe(method(pid))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn pid(&self) -> libc::pid_t;
68
69        /// Convenience method to return a JSON representation of this metadata.
70        ///
71        /// Returns: An NSData object containing the JSON representation
72        #[unsafe(method(JSONRepresentation))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
75
76        /// Convenience method to return a NSDictionary representation of this metadata.
77        ///
78        /// Returns: An NSDictionary object containing the dictionary representation
79        #[deprecated]
80        #[unsafe(method(DictionaryRepresentation))]
81        #[unsafe(method_family = none)]
82        pub unsafe fn DictionaryRepresentation(&self) -> Retained<NSDictionary>;
83
84        /// Convenience method to return a NSDictionary representation of this metadata.
85        ///
86        /// Returns: An NSDictionary object containing the dictionary representation
87        #[unsafe(method(dictionaryRepresentation))]
88        #[unsafe(method_family = none)]
89        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
90    );
91}
92
93/// Methods declared on superclass `NSObject`.
94impl MXMetaData {
95    extern_methods!(
96        #[unsafe(method(init))]
97        #[unsafe(method_family = init)]
98        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100        #[unsafe(method(new))]
101        #[unsafe(method_family = new)]
102        pub unsafe fn new() -> Retained<Self>;
103    );
104}