objc2-io-bluetooth 0.3.2

Bindings to the IOBluetooth framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
//! 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::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
#[cfg(feature = "objc2-foundation")]
use objc2_foundation::*;

use crate::*;

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

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

impl OBEXFileTransferServices {
    extern_methods!(
        /// # Safety
        ///
        /// This is not retained internally, you must ensure the object is still alive.
        #[unsafe(method(delegate))]
        #[unsafe(method_family = none)]
        pub unsafe fn delegate(&self) -> Option<Retained<AnyObject>>;

        /// Setter for [`delegate`][Self::delegate].
        ///
        /// # Safety
        ///
        /// - `delegate` should be of the correct type.
        /// - `delegate` might not allow `None`.
        /// - This is unretained, you must ensure the object is kept alive while in use.
        #[unsafe(method(setDelegate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDelegate(&self, delegate: Option<&AnyObject>);

        #[cfg(all(feature = "IOBluetoothOBEXSession", feature = "OBEXSession"))]
        /// Create a new OBEXFileTransferServices object
        ///
        /// This object must be constructed with a valid IOBluetoothOBEXSession. The given
        /// IOBluetoothOBEXSession does not need to be connected to the remote server.
        /// This module can be manually connected through the connect(void) method.
        ///
        /// Parameter `inOBEXSession`: A valid IOBluetoothOBEXSession
        ///
        /// Returns: A newly created OBEXFileTransferServices object on success, nil on failure
        ///
        /// # Safety
        ///
        /// `in_obex_session` might not allow `None`.
        #[unsafe(method(withOBEXSession:))]
        #[unsafe(method_family = none)]
        pub unsafe fn withOBEXSession(
            in_obex_session: Option<&IOBluetoothOBEXSession>,
        ) -> Option<Retained<Self>>;

        #[cfg(all(feature = "IOBluetoothOBEXSession", feature = "OBEXSession"))]
        /// Create a new OBEXFileTransferServices object
        ///
        /// This object must be constructed with a valid IOBluetoothOBEXSession. The given
        /// IOBluetoothOBEXSession does not need to be connected to the remote server.
        /// OBEXFileTransferServices can be manually connected through the provided connection
        /// methods.
        ///
        /// Parameter `inOBEXSession`: A valid IOBluetoothOBEXSession
        ///
        /// Returns: A newly created OBEXFileTransferServices object on success, nil on failure
        ///
        /// # Safety
        ///
        /// `in_obex_session` might not allow `None`.
        #[unsafe(method(initWithOBEXSession:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithOBEXSession(
            this: Allocated<Self>,
            in_obex_session: Option<&IOBluetoothOBEXSession>,
        ) -> Option<Retained<Self>>;

        #[cfg(feature = "objc2-foundation")]
        /// Get the remote current directory path during an FTP session
        ///
        /// This path is changed with each path-specific command called on OBEXFileTransferServices.
        ///
        /// Returns: The current path being browsed over FTP
        #[unsafe(method(currentPath))]
        #[unsafe(method_family = none)]
        pub unsafe fn currentPath(&self) -> Option<Retained<NSString>>;

        /// Get the action state of the module
        ///
        /// OBEXFileTransferServices will be considered "busy" when an operation in taking place or
        /// has not completed.  Calling abort: on this module will not automatically reset its busy
        /// state.  The user will have to wait for the operation to complete or for the current
        /// operation to timeout.
        ///
        /// Returns: Success or failure code.
        #[unsafe(method(isBusy))]
        #[unsafe(method_family = none)]
        pub unsafe fn isBusy(&self) -> bool;

        /// Get the connected state of this module.
        ///
        /// Asks the OBEXSession that was passed to it on creation if it has an open OBEX connection
        ///
        /// Returns: Success or failure code.
        #[unsafe(method(isConnected))]
        #[unsafe(method_family = none)]
        pub unsafe fn isConnected(&self) -> bool;

        #[cfg(feature = "OBEX")]
        /// Connect to a remote device for FTP operations
        ///
        /// If the OBEXSession given to OBEXFileTransferServices on creation is not connected it
        /// can be manually connected through this method.
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXSessionAlreadyConnectedError, kOBEXNoResourcesError
        /// initially.  Further results returned through the fileTransferServicesConnectionComplete:
        /// delegate method if initially successful.
        #[unsafe(method(connectToFTPService))]
        #[unsafe(method_family = none)]
        pub unsafe fn connectToFTPService(&self) -> OBEXError;

        #[cfg(feature = "OBEX")]
        /// Connect to a remote device for ObjectPush operations.
        /// Most of the FTP functionality of this object will be disabled.
        ///
        /// If the OBEXSession given to OBEXFileTransferServices on creation is not connected it
        /// can be manually connected through this method.
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXSessionAlreadyConnectedError, kOBEXNoResourcesError
        /// initially.  Further results returned through the fileTransferServicesConnectionComplete:
        /// delegate method if initially successful.
        #[unsafe(method(connectToObjectPushService))]
        #[unsafe(method_family = none)]
        pub unsafe fn connectToObjectPushService(&self) -> OBEXError;

        #[cfg(feature = "OBEX")]
        /// Disconnect from the remote device
        ///
        /// The user can manually disconnect the OBEXSession from the remote device if they want
        /// to.  OBEXFileTransferServices will disconnect the OBEXSession at release only if it was responsible
        /// for opening the connection via a connect method.
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionNotConnectedError, or kOBEXSessionBusyError initially. Further results
        /// returned through the fileTransferServicesDisconnectionComplete: delegate method if initially successful.
        #[unsafe(method(disconnect))]
        #[unsafe(method_family = none)]
        pub unsafe fn disconnect(&self) -> OBEXError;

        #[cfg(feature = "OBEX")]
        /// Asynchronously change to the remote root directory
        ///
        /// Equivalent to 'cd ~/'
        ///
        /// Returns: kOBEXSuccess or kOBEXSessionBusyError initially.  Further results
        /// returned through the fileTransferServicesPathChangeComplete: delegate method if initially successful.
        #[unsafe(method(changeCurrentFolderToRoot))]
        #[unsafe(method_family = none)]
        pub unsafe fn changeCurrentFolderToRoot(&self) -> OBEXError;

        #[cfg(feature = "OBEX")]
        /// Change to the directory above the current level if not at the root
        ///
        /// Equivalent to 'cd ..' only if remote path is not already at root.
        ///
        /// Returns: kOBEXSuccess or kOBEXSessionBusyError initially. Further results
        /// returned through the fileTransferServicesPathChangeComplete: delegate method if initially successful.
        #[unsafe(method(changeCurrentFolderBackward))]
        #[unsafe(method_family = none)]
        pub unsafe fn changeCurrentFolderBackward(&self) -> OBEXError;

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// Change the remote path
        ///
        /// Equivalent to 'cd dirName'.
        ///
        /// Parameter `inDirName`: The name of the remote folder to be set as current
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXBadArgumentError initially. Further results
        /// returned through the fileTransferServicesPathChangeComplete: delegate method if initially successful.
        ///
        /// # Safety
        ///
        /// `in_dir_name` might not allow `None`.
        #[unsafe(method(changeCurrentFolderForwardToPath:))]
        #[unsafe(method_family = none)]
        pub unsafe fn changeCurrentFolderForwardToPath(
            &self,
            in_dir_name: Option<&NSString>,
        ) -> OBEXError;

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// Create a folder on the remote target
        ///
        /// Equivalent to 'mkdir dirName'.
        ///
        /// Parameter `inDirName`: The name of the folder to be created
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXBadArgumentError initially.
        /// Further results returned through the fileTransferServicesCreateFolderComplete delegate method
        /// if initially successful.
        ///
        /// # Safety
        ///
        /// `in_dir_name` might not allow `None`.
        #[unsafe(method(createFolder:))]
        #[unsafe(method_family = none)]
        pub unsafe fn createFolder(&self, in_dir_name: Option<&NSString>) -> OBEXError;

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// Remove a remote item.
        ///
        /// Not supported for use on Apple computer targets
        ///
        /// Parameter `inItemName`: The name of the remote item to be removed
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXBadArgumentError initially.
        /// Further results returned through the fileTransferServicesRemoveItemComplete: delegate method
        /// if initially successful.
        ///
        /// # Safety
        ///
        /// `in_item_name` might not allow `None`.
        #[unsafe(method(removeItem:))]
        #[unsafe(method_family = none)]
        pub unsafe fn removeItem(&self, in_item_name: Option<&NSString>) -> OBEXError;

        #[cfg(feature = "OBEX")]
        /// Get a remote directory listing
        ///
        /// Equivalent to 'ls'.
        ///
        /// Returns: kOBEXSuccess or kOBEXSessionBusyError initially.  Further results returned through
        /// the fileTransferServicesRetrieveFolderListingComplete: delegate method if initially successful.
        #[unsafe(method(retrieveFolderListing))]
        #[unsafe(method_family = none)]
        pub unsafe fn retrieveFolderListing(&self) -> OBEXError;

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// Put a local file to the remote target
        ///
        /// Equivalent to 'mv inLocalFilePath remoteCurrentPath'.
        ///
        /// Parameter `inLocalPathAndName`: The name and path of the file to be sent an instance of OBEXFilePut.
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXBadArgumentError initially. Further
        /// results returned through the fileTransferServicesSendComplete: and
        /// fileTransferServicesSendProgress: delegate methods if initially successful.
        ///
        /// # Safety
        ///
        /// `in_local_path_and_name` might not allow `None`.
        #[unsafe(method(sendFile:))]
        #[unsafe(method_family = none)]
        pub unsafe fn sendFile(&self, in_local_path_and_name: Option<&NSString>) -> OBEXError;

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// Copy a remote file to a local path
        ///
        /// Equivalent to 'cp remotePath/remoteFileName localPathAndName'.
        ///
        /// Parameter `inRemoteFileName`: The name of the remote file to get
        ///
        /// Parameter `inLocalPathAndName`: The path and name of where the received file will go
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXBadArgumentError. initially.  Further
        /// results returned through the fileTransferServicesGetComplete: and
        /// fileTransferServicesGetProgress: delegate methods if initially successful.
        ///
        /// # Safety
        ///
        /// - `in_remote_file_name` might not allow `None`.
        /// - `in_local_path_and_name` might not allow `None`.
        #[unsafe(method(copyRemoteFile:toLocalPath:))]
        #[unsafe(method_family = none)]
        pub unsafe fn copyRemoteFile_toLocalPath(
            &self,
            in_remote_file_name: Option<&NSString>,
            in_local_path_and_name: Option<&NSString>,
        ) -> OBEXError;

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// Send data to a remote target
        ///
        /// Use this method when you have data to send but no file to read from.
        ///
        /// Parameter `inData`: The data to be sent
        ///
        /// Parameter `inType`: The type of the data to be sent that will be used in the OBEX type header,
        /// usually a mime-type.  For example, use "text/x-vCard" when sending vCards. This
        /// argument is optional.
        ///
        /// Parameter `inName`: The name of the file that the data can be referenced as.
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXBadArgumentError initially. Further
        /// results returned through the fileTransferServicesSendComplete: and
        /// fileTransferServicesSendProgress: delegate methods if initially successful.
        ///
        /// # Safety
        ///
        /// - `in_data` might not allow `None`.
        /// - `in_type` might not allow `None`.
        /// - `in_name` might not allow `None`.
        #[unsafe(method(sendData:type:name:))]
        #[unsafe(method_family = none)]
        pub unsafe fn sendData_type_name(
            &self,
            in_data: Option<&NSData>,
            in_type: Option<&NSString>,
            in_name: Option<&NSString>,
        ) -> OBEXError;

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// Get the remote default VCard, if it is supported
        ///
        /// Some devices such as cellphones and computers support default VCards
        ///
        /// Parameter `inLocalPathAndName`: The path and name of where the received file will go
        ///
        /// Returns: kOBEXSuccess, kOBEXSessionBusyError, or kOBEXBadArgumentError initially.  Further
        /// results returned through the fileTransferServicesGetComplete: and
        /// fileTransferServicesGetProgress: delegate methods if initially successful.
        ///
        /// # Safety
        ///
        /// `in_local_path_and_name` might not allow `None`.
        #[unsafe(method(getDefaultVCard:))]
        #[unsafe(method_family = none)]
        pub unsafe fn getDefaultVCard(
            &self,
            in_local_path_and_name: Option<&NSString>,
        ) -> OBEXError;

        #[cfg(feature = "OBEX")]
        /// Abort the current operation
        ///
        /// Attempts send an abort request to the remote device.  Returns the OBEXFileTransferServices
        /// object to an idle state though the state of the remote device is not guaranteed.
        ///
        /// Returns: kOBEXSuccess, or kOBEXGeneralError if no command is in progress. ABORT
        /// commands can only be sent on our turn, meaning we may have to timeout if the
        /// target side never responds to the command in progress.  In that case this object
        /// will call back with a status of kOBEXTimeoutError and an error. Further results
        /// returned through the fileTransferServicesAbortComplete: delegate method if initially successful.
        #[unsafe(method(abort))]
        #[unsafe(method_family = none)]
        pub unsafe fn abort(&self) -> OBEXError;
    );
}

/// Methods declared on superclass `NSObject`.
impl OBEXFileTransferServices {
    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>;
    );
}

extern "C" {
    /// NSNumber integer value. This key is used with the NSDictionary returned from the fileTransferServicesPutProgress:
    /// and fileTransferServicesGetProgress: delegate methods
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftsprogressbytestransferredkey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSProgressBytesTransferredKey: Option<&'static CFString>;
}

extern "C" {
    /// NSNumber integer value. This key is used with the NSDictionary returned from the fileTransferServicesPutProgress:
    /// and fileTransferServicesGetProgress: delegate methods
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftsprogressbytestotalkey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSProgressBytesTotalKey: Option<&'static CFString>;
}

extern "C" {
    /// NSNumber float value. This key is used with the NSDictionary returned from the fileTransferServicesPutProgress:
    /// and fileTransferServicesGetProgress: delegate methods
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftsprogresspercentagekey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSProgressPercentageKey: Option<&'static CFString>;
}

extern "C" {
    /// [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftsprogressprecentagekey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSProgressPrecentageKey: Option<&'static CFString>;
}

extern "C" {
    /// NSNumber double value. This key is used with the NSDictionary returned from the fileTransferServicesPutProgress:
    /// and fileTransferServicesGetProgress: delegate methods
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftsprogressestimatedtimekey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSProgressEstimatedTimeKey: Option<&'static CFString>;
}

extern "C" {
    /// NSNumber int value. This key is used with the NSDictionary returned from the fileTransferServicesPutProgress:
    /// and fileTransferServicesGetProgress: delegate methods
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftsprogresstimeelapsedkey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSProgressTimeElapsedKey: Option<&'static CFString>;
}

extern "C" {
    /// NSNumber float value. This key is used with the NSDictionary returned from the fileTransferServicesPutProgress:
    /// and fileTransferServicesGetProgress: delegate methods
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftsprogresstransferratekey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSProgressTransferRateKey: Option<&'static CFString>;
}

extern "C" {
    /// NSString value.  This key is used with the array of NSDictionary's returned through the delegate method
    /// fileTransferServicesGetListingComplete: after calling getFolderListing.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftslistingnamekey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSListingNameKey: Option<&'static CFString>;
}

extern "C" {
    /// FTSFileType value.  This key is used with the array of NSDictionary's returned through the delegate method
    /// fileTransferServicesGetListingComplete: after calling getFolderListing.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftslistingtypekey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSListingTypeKey: Option<&'static CFString>;
}

extern "C" {
    /// Int value.  This key is used with the array of NSDictionary's returned through the delegate method
    /// fileTransferServicesGetListingComplete: after calling getFolderListing.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/kftslistingsizekey?language=objc)
    #[cfg(feature = "objc2-core-foundation")]
    pub static kFTSListingSizeKey: Option<&'static CFString>;
}

/// The type values associated with the kFTSListingTypeKey dictionary value
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/iobluetooth/ftsfiletype?language=objc)
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct FTSFileType(pub c_uint);
impl FTSFileType {
    #[doc(alias = "kFTSFileTypeFolder")]
    pub const Folder: Self = Self(1);
    #[doc(alias = "kFTSFileTypeFile")]
    pub const File: Self = Self(2);
}

unsafe impl Encode for FTSFileType {
    const ENCODING: Encoding = c_uint::ENCODING;
}

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

mod private_NSObjectOBEXFileTransferServicesDelegate {
    pub trait Sealed {}
}

/// Category "OBEXFileTransferServicesDelegate" on [`NSObject`].
#[doc(alias = "OBEXFileTransferServicesDelegate")]
pub unsafe trait NSObjectOBEXFileTransferServicesDelegate:
    ClassType + Sized + private_NSObjectOBEXFileTransferServicesDelegate::Sealed
{
    extern_methods!(
        #[cfg(feature = "OBEX")]
        /// The delegate method that corresponds to the connect method
        ///
        /// inError will either be kOBEXSuccess or it will be an error returned by the OBEX Session
        ///
        /// # Safety
        ///
        /// `in_services` might not allow `None`.
        #[unsafe(method(fileTransferServicesConnectionComplete:error:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesConnectionComplete_error(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
        );

        #[cfg(feature = "OBEX")]
        /// The delegate method that corresponds to the disconnect method
        ///
        /// inError will be kOBEXSuccess on success.  This method will also be called if the connection
        /// is lost to the server.  Possible error codes include kOBEXSessionTransportDiedError,
        /// kOBEXSessionNoTransportError, and kOBEXSessionNotConnectedError.
        ///
        /// # Safety
        ///
        /// `in_services` might not allow `None`.
        #[unsafe(method(fileTransferServicesDisconnectionComplete:error:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesDisconnectionComplete_error(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
        );

        #[cfg(feature = "OBEX")]
        /// The delegate method that corresponds to the abort method
        ///
        /// Possible inError values are kOBEXSuccess and kOBEXTimeoutError
        ///
        /// # Safety
        ///
        /// `in_services` might not allow `None`.
        #[unsafe(method(fileTransferServicesAbortComplete:error:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesAbortComplete_error(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
        );

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// The delegate method that corresponds to the removeItemNamed: method.
        ///
        ///
        /// Parameter `inItemName`: The name of the remote item that was removed
        ///
        /// # Safety
        ///
        /// - `in_services` might not allow `None`.
        /// - `in_item_name` might not allow `None`.
        #[unsafe(method(fileTransferServicesRemoveItemComplete:error:removedItem:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesRemoveItemComplete_error_removedItem(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
            in_item_name: Option<&NSString>,
        );

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// The delegate method that corresponds to the createFolderNamed: method.
        ///
        ///
        /// Parameter `inFolderName`: The name of the newly created folder
        ///
        /// # Safety
        ///
        /// - `in_services` might not allow `None`.
        /// - `in_folder_name` might not allow `None`.
        #[unsafe(method(fileTransferServicesCreateFolderComplete:error:folder:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesCreateFolderComplete_error_folder(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
            in_folder_name: Option<&NSString>,
        );

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// The delegate method that corresponds to the changeCurrentFolderToRoot:,
        /// changeCurrentFolderBackward:, and changeCurrentFolderForward: methods
        ///
        ///
        /// Parameter `inPath`: The current remote path
        ///
        /// # Safety
        ///
        /// - `in_services` might not allow `None`.
        /// - `in_path` might not allow `None`.
        #[unsafe(method(fileTransferServicesPathChangeComplete:error:finalPath:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesPathChangeComplete_error_finalPath(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
            in_path: Option<&NSString>,
        );

        #[cfg(all(feature = "OBEX", feature = "objc2-foundation"))]
        /// The delegate method that corresponds to the retrieveFolderListing method
        ///
        ///
        /// Parameter `inListing`: An array of NSDictionary's that detail each file at the current path.  The keys
        /// to this dictionary are defined in the OBEXFileTransferServicesDelegate category.
        ///
        /// # Safety
        ///
        /// - `in_services` might not allow `None`.
        /// - `in_listing` generic should be of the correct type.
        /// - `in_listing` might not allow `None`.
        #[unsafe(method(fileTransferServicesRetrieveFolderListingComplete:error:listing:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesRetrieveFolderListingComplete_error_listing(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
            in_listing: Option<&NSArray>,
        );

        #[cfg(feature = "OBEX")]
        /// The delegate method for receiving information on the preparation of each file to send
        ///
        /// This method will be called before the transfer operation.
        ///
        /// # Safety
        ///
        /// `in_services` might not allow `None`.
        #[unsafe(method(fileTransferServicesFilePreparationComplete:error:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesFilePreparationComplete_error(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
        );

        #[cfg(feature = "objc2-foundation")]
        /// The delegate method for receiving information on the sendFile: transfer
        ///
        /// This method will be called during the transfer operation.
        ///
        /// Parameter `inProgressDescription`: A dictionary containing information on the state of the transfer. The keys
        /// to this dictionary are defined in the OBEXFileTransferServicesDelegate category.
        ///
        /// # Safety
        ///
        /// - `in_services` might not allow `None`.
        /// - `in_progress_description` generic should be of the correct type.
        /// - `in_progress_description` might not allow `None`.
        #[unsafe(method(fileTransferServicesSendFileProgress:transferProgress:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesSendFileProgress_transferProgress(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_progress_description: Option<&NSDictionary>,
        );

        #[cfg(feature = "OBEX")]
        /// The delegate method that corresponds to the sendFile: method.
        ///
        /// This method will be called when the transfer operation has finished.
        ///
        /// # Safety
        ///
        /// `in_services` might not allow `None`.
        #[unsafe(method(fileTransferServicesSendFileComplete:error:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesSendFileComplete_error(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
        );

        #[cfg(feature = "objc2-foundation")]
        /// The delegate method for receiving information on the GET transfer
        ///
        /// This method will be called during the transfer operation
        ///
        /// Parameter `inProgressDescription`: A dictionary containing information on the state of the transfer. The keys
        /// to this dictionary are defined in the OBEXFileTransferServicesDelegate category.
        ///
        /// # Safety
        ///
        /// - `in_services` might not allow `None`.
        /// - `in_progress_description` generic should be of the correct type.
        /// - `in_progress_description` might not allow `None`.
        #[unsafe(method(fileTransferServicesCopyRemoteFileProgress:transferProgress:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesCopyRemoteFileProgress_transferProgress(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_progress_description: Option<&NSDictionary>,
        );

        #[cfg(feature = "OBEX")]
        /// The delegate method that corresponds to the getFileNamed:toLocalPathAndName: method
        ///
        /// This method will be called when the transfer operation has finished
        ///
        /// # Safety
        ///
        /// `in_services` might not allow `None`.
        #[unsafe(method(fileTransferServicesCopyRemoteFileComplete:error:))]
        #[unsafe(method_family = none)]
        unsafe fn fileTransferServicesCopyRemoteFileComplete_error(
            &self,
            in_services: Option<&OBEXFileTransferServices>,
            in_error: OBEXError,
        );
    );
}

impl private_NSObjectOBEXFileTransferServicesDelegate::Sealed for NSObject {}
unsafe impl NSObjectOBEXFileTransferServicesDelegate for NSObject {}