objc2_core_bluetooth/generated/
CBCentral.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    /// Represents a remote central.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/corebluetooth/cbcentral?language=objc)
13    #[unsafe(super(CBPeer, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "CBPeer")]
16    pub struct CBCentral;
17);
18
19#[cfg(feature = "CBPeer")]
20unsafe impl NSCopying for CBCentral {}
21
22#[cfg(feature = "CBPeer")]
23unsafe impl CopyingHelper for CBCentral {
24    type Result = Self;
25}
26
27#[cfg(feature = "CBPeer")]
28unsafe impl NSObjectProtocol for CBCentral {}
29
30#[cfg(feature = "CBPeer")]
31impl CBCentral {
32    extern_methods!(
33        /// The maximum amount of data, in bytes, that can be received by the central in a single notification or indication.
34        ///
35        ///
36        /// See: updateValue:forCharacteristic:onSubscribedCentrals:
37        #[unsafe(method(maximumUpdateValueLength))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn maximumUpdateValueLength(&self) -> NSUInteger;
40    );
41}
42
43/// Methods declared on superclass `CBPeer`.
44#[cfg(feature = "CBPeer")]
45impl CBCentral {
46    extern_methods!(
47        #[unsafe(method(init))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50    );
51}
52
53/// Methods declared on superclass `NSObject`.
54#[cfg(feature = "CBPeer")]
55impl CBCentral {
56    extern_methods!(
57        #[unsafe(method(new))]
58        #[unsafe(method_family = new)]
59        pub unsafe fn new() -> Retained<Self>;
60    );
61}