objc2-core-telephony 0.3.2

Bindings to the CoreTelephony framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/coretelephony/ctcellularplanprovisioningaddplanresult?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct CTCellularPlanProvisioningAddPlanResult(pub NSUInteger);
impl CTCellularPlanProvisioningAddPlanResult {
    #[doc(alias = "CTCellularPlanProvisioningAddPlanResultUnknown")]
    pub const Unknown: Self = Self(0);
    #[doc(alias = "CTCellularPlanProvisioningAddPlanResultFail")]
    pub const Fail: Self = Self(1);
    #[doc(alias = "CTCellularPlanProvisioningAddPlanResultSuccess")]
    pub const Success: Self = Self(2);
    #[doc(alias = "CTCellularPlanProvisioningAddPlanResultCancel")]
    pub const Cancel: Self = Self(3);
}

unsafe impl Encode for CTCellularPlanProvisioningAddPlanResult {
    const ENCODING: Encoding = NSUInteger::ENCODING;
}

unsafe impl RefEncode for CTCellularPlanProvisioningAddPlanResult {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/coretelephony/ctcellularplanprovisioningrequest?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct CTCellularPlanProvisioningRequest;
);

extern_conformance!(
    unsafe impl NSCoding for CTCellularPlanProvisioningRequest {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for CTCellularPlanProvisioningRequest {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for CTCellularPlanProvisioningRequest {}
);

impl CTCellularPlanProvisioningRequest {
    extern_methods!(
        #[unsafe(method(address))]
        #[unsafe(method_family = none)]
        pub unsafe fn address(&self) -> Retained<NSString>;

        /// Setter for [`address`][Self::address].
        #[unsafe(method(setAddress:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAddress(&self, address: &NSString);

        #[unsafe(method(matchingID))]
        #[unsafe(method_family = none)]
        pub unsafe fn matchingID(&self) -> Option<Retained<NSString>>;

        /// Setter for [`matchingID`][Self::matchingID].
        #[unsafe(method(setMatchingID:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMatchingID(&self, matching_id: Option<&NSString>);

        #[unsafe(method(OID))]
        #[unsafe(method_family = none)]
        pub unsafe fn OID(&self) -> Option<Retained<NSString>>;

        /// Setter for [`OID`][Self::OID].
        #[unsafe(method(setOID:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setOID(&self, oid: Option<&NSString>);

        #[unsafe(method(confirmationCode))]
        #[unsafe(method_family = none)]
        pub unsafe fn confirmationCode(&self) -> Option<Retained<NSString>>;

        /// Setter for [`confirmationCode`][Self::confirmationCode].
        #[unsafe(method(setConfirmationCode:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setConfirmationCode(&self, confirmation_code: Option<&NSString>);

        #[unsafe(method(ICCID))]
        #[unsafe(method_family = none)]
        pub unsafe fn ICCID(&self) -> Option<Retained<NSString>>;

        /// Setter for [`ICCID`][Self::ICCID].
        #[unsafe(method(setICCID:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setICCID(&self, iccid: Option<&NSString>);

        #[unsafe(method(EID))]
        #[unsafe(method_family = none)]
        pub unsafe fn EID(&self) -> Option<Retained<NSString>>;

        /// Setter for [`EID`][Self::EID].
        #[unsafe(method(setEID:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEID(&self, eid: Option<&NSString>);
    );
}

/// Methods declared on superclass `NSObject`.
impl CTCellularPlanProvisioningRequest {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}