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")]
20extern_conformance!(
21    unsafe impl NSCopying for CBCentral {}
22);
23
24#[cfg(feature = "CBPeer")]
25unsafe impl CopyingHelper for CBCentral {
26    type Result = Self;
27}
28
29#[cfg(feature = "CBPeer")]
30extern_conformance!(
31    unsafe impl NSObjectProtocol for CBCentral {}
32);
33
34#[cfg(feature = "CBPeer")]
35impl CBCentral {
36    extern_methods!(
37        /// The maximum amount of data, in bytes, that can be received by the central in a single notification or indication.
38        ///
39        ///
40        /// See: updateValue:forCharacteristic:onSubscribedCentrals:
41        #[unsafe(method(maximumUpdateValueLength))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn maximumUpdateValueLength(&self) -> NSUInteger;
44    );
45}
46
47/// Methods declared on superclass `CBPeer`.
48#[cfg(feature = "CBPeer")]
49impl CBCentral {
50    extern_methods!(
51        #[unsafe(method(init))]
52        #[unsafe(method_family = init)]
53        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
54    );
55}
56
57/// Methods declared on superclass `NSObject`.
58#[cfg(feature = "CBPeer")]
59impl CBCentral {
60    extern_methods!(
61        #[unsafe(method(new))]
62        #[unsafe(method_family = new)]
63        pub unsafe fn new() -> Retained<Self>;
64    );
65}