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        /// Convenience method to return a JSON representation of this metadata.
76        ///
77        /// Returns: An NSData object containing the JSON representation
78        #[unsafe(method(JSONRepresentation))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
81
82        /// Convenience method to return a NSDictionary representation of this metadata.
83        ///
84        /// Returns: An NSDictionary object containing the dictionary representation
85        #[deprecated]
86        #[unsafe(method(DictionaryRepresentation))]
87        #[unsafe(method_family = none)]
88        pub unsafe fn DictionaryRepresentation(&self) -> Retained<NSDictionary>;
89
90        /// Convenience method to return a NSDictionary representation of this metadata.
91        ///
92        /// Returns: An NSDictionary object containing the dictionary representation
93        #[unsafe(method(dictionaryRepresentation))]
94        #[unsafe(method_family = none)]
95        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
96    );
97}
98
99/// Methods declared on superclass `NSObject`.
100impl MXMetaData {
101    extern_methods!(
102        #[unsafe(method(init))]
103        #[unsafe(method_family = init)]
104        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
105
106        #[unsafe(method(new))]
107        #[unsafe(method_family = new)]
108        pub unsafe fn new() -> Retained<Self>;
109    );
110}