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
18extern_conformance!(
19    unsafe impl NSCoding for MXMetaData {}
20);
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for MXMetaData {}
24);
25
26extern_conformance!(
27    unsafe impl NSSecureCoding for MXMetaData {}
28);
29
30impl MXMetaData {
31    extern_methods!(
32        /// An NSString designating the region format associated with the application.
33        #[unsafe(method(regionFormat))]
34        #[unsafe(method_family = none)]
35        pub unsafe fn regionFormat(&self) -> Retained<NSString>;
36
37        /// An NSString designating the OS version associated with the device.
38        #[unsafe(method(osVersion))]
39        #[unsafe(method_family = none)]
40        pub unsafe fn osVersion(&self) -> Retained<NSString>;
41
42        /// An NSString designating the device type associated with this device.
43        #[unsafe(method(deviceType))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn deviceType(&self) -> Retained<NSString>;
46
47        /// An NSString designating the app build version.
48        #[unsafe(method(applicationBuildVersion))]
49        #[unsafe(method_family = none)]
50        pub unsafe fn applicationBuildVersion(&self) -> Retained<NSString>;
51
52        /// An NSString designating the current architecture.
53        #[unsafe(method(platformArchitecture))]
54        #[unsafe(method_family = none)]
55        pub unsafe fn platformArchitecture(&self) -> Retained<NSString>;
56
57        /// A boolean representing low power mode enablement on device
58        #[unsafe(method(lowPowerModeEnabled))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn lowPowerModeEnabled(&self) -> bool;
61
62        /// A boolean representing if the app is registered as a testFlightApp
63        #[unsafe(method(isTestFlightApp))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn isTestFlightApp(&self) -> bool;
66
67        #[cfg(feature = "libc")]
68        /// pid of the process
69        ///
70        /// Note: A value of -1 indicates that the PID was unavailable for the containing payload.
71        #[unsafe(method(pid))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn pid(&self) -> libc::pid_t;
74
75        /// String representation of the bundle ID of the process.
76        #[unsafe(method(bundleIdentifier))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn bundleIdentifier(&self) -> Retained<NSString>;
79
80        /// Convenience method to return a JSON representation of this metadata.
81        ///
82        /// Returns: An NSData object containing the JSON representation
83        #[unsafe(method(JSONRepresentation))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
86
87        /// Convenience method to return a NSDictionary representation of this metadata.
88        ///
89        /// Returns: An NSDictionary object containing the dictionary representation
90        #[deprecated]
91        #[unsafe(method(DictionaryRepresentation))]
92        #[unsafe(method_family = none)]
93        pub unsafe fn DictionaryRepresentation(&self) -> Retained<NSDictionary>;
94
95        /// Convenience method to return a NSDictionary representation of this metadata.
96        ///
97        /// Returns: An NSDictionary object containing the dictionary representation
98        #[unsafe(method(dictionaryRepresentation))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
101    );
102}
103
104/// Methods declared on superclass `NSObject`.
105impl MXMetaData {
106    extern_methods!(
107        #[unsafe(method(init))]
108        #[unsafe(method_family = init)]
109        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
110
111        #[unsafe(method(new))]
112        #[unsafe(method_family = new)]
113        pub unsafe fn new() -> Retained<Self>;
114    );
115}