objc2-watch-connectivity 0.3.2

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

use crate::*;

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/watchconnectivity/wcerrordomain?language=objc)
    pub static WCErrorDomain: &'static NSString;
}

/// These are the possible error codes that can be returned from the WatchConnectivity APIs.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/watchconnectivity/wcerrorcode?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct WCErrorCode(pub NSInteger);
impl WCErrorCode {
    #[doc(alias = "WCErrorCodeGenericError")]
    pub const GenericError: Self = Self(7001);
    #[doc(alias = "WCErrorCodeSessionNotSupported")]
    pub const SessionNotSupported: Self = Self(7002);
    #[doc(alias = "WCErrorCodeSessionMissingDelegate")]
    pub const SessionMissingDelegate: Self = Self(7003);
    #[doc(alias = "WCErrorCodeSessionNotActivated")]
    pub const SessionNotActivated: Self = Self(7004);
    #[doc(alias = "WCErrorCodeDeviceNotPaired")]
    pub const DeviceNotPaired: Self = Self(7005);
    #[doc(alias = "WCErrorCodeWatchAppNotInstalled")]
    pub const WatchAppNotInstalled: Self = Self(7006);
    #[doc(alias = "WCErrorCodeNotReachable")]
    pub const NotReachable: Self = Self(7007);
    #[doc(alias = "WCErrorCodeInvalidParameter")]
    pub const InvalidParameter: Self = Self(7008);
    #[doc(alias = "WCErrorCodePayloadTooLarge")]
    pub const PayloadTooLarge: Self = Self(7009);
    #[doc(alias = "WCErrorCodePayloadUnsupportedTypes")]
    pub const PayloadUnsupportedTypes: Self = Self(7010);
    #[doc(alias = "WCErrorCodeMessageReplyFailed")]
    pub const MessageReplyFailed: Self = Self(7011);
    #[doc(alias = "WCErrorCodeMessageReplyTimedOut")]
    pub const MessageReplyTimedOut: Self = Self(7012);
    #[doc(alias = "WCErrorCodeFileAccessDenied")]
    pub const FileAccessDenied: Self = Self(7013);
    #[doc(alias = "WCErrorCodeDeliveryFailed")]
    pub const DeliveryFailed: Self = Self(7014);
    #[doc(alias = "WCErrorCodeInsufficientSpace")]
    pub const InsufficientSpace: Self = Self(7015);
    #[doc(alias = "WCErrorCodeSessionInactive")]
    pub const SessionInactive: Self = Self(7016);
    #[doc(alias = "WCErrorCodeTransferTimedOut")]
    pub const TransferTimedOut: Self = Self(7017);
    #[doc(alias = "WCErrorCodeCompanionAppNotInstalled")]
    pub const CompanionAppNotInstalled: Self = Self(7018);
    #[doc(alias = "WCErrorCodeWatchOnlyApp")]
    pub const WatchOnlyApp: Self = Self(7019);
}

unsafe impl Encode for WCErrorCode {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

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