objc2_event_kit/generated/EKVirtualConferenceProvider.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 /// Provides virtual conferences to Calendar.
12 ///
13 /// Subclass this class in your extension and override the below two methods.
14 ///
15 /// See also [Apple's documentation](https://developer.apple.com/documentation/eventkit/ekvirtualconferenceprovider?language=objc)
16 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct EKVirtualConferenceProvider;
19);
20
21extern_conformance!(
22 unsafe impl NSExtensionRequestHandling for EKVirtualConferenceProvider {}
23);
24
25extern_conformance!(
26 unsafe impl NSObjectProtocol for EKVirtualConferenceProvider {}
27);
28
29impl EKVirtualConferenceProvider {
30 extern_methods!(
31 #[cfg(all(feature = "EKVirtualConferenceDescriptor", feature = "block2"))]
32 /// Called to determine the available virtual conference room types that the user can add to a calendar event.
33 ///
34 /// Your extension must override this method in order to present virtual conference options in Calendar's UI.
35 /// When your extension has finished determining what room types are available, call the completion handler with
36 /// an array of EKVirtualConferenceRoomTypeDescriptors. Most extensions will only need to provide one room type.
37 ///
38 /// Parameter `completionHandler`: A block to call when your extension has finished retrieving available room types. If
39 /// your extension is unable to provide any room types at this time, call this block with nil
40 /// for the first argument and an appropriate NSError object for the second argument. Do not
41 /// call this block with nil for both arguments. Similarly, do not call this block with both
42 /// a non-nil array and a non-nil NSError. This block must be called when your extension has
43 /// finished its work.
44 #[unsafe(method(fetchAvailableRoomTypesWithCompletionHandler:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn fetchAvailableRoomTypesWithCompletionHandler(
47 &self,
48 completion_handler: &block2::DynBlock<
49 dyn Fn(*mut NSArray<EKVirtualConferenceRoomTypeDescriptor>, *mut NSError),
50 >,
51 );
52
53 #[cfg(all(feature = "EKVirtualConferenceDescriptor", feature = "block2"))]
54 /// Called to fetch the specific virtual conference details to add to an event.
55 ///
56 /// Your extension must override this method in order to add virtual conferences to calendar events.
57 /// When your extension has finished retrieving the requested virtual conference details, create an
58 /// EKVirtualConferenceDescriptor object containing the virtual conference details and call the completion handler
59 /// with the EKVirtualConferenceDescriptor object as the first argument.
60 ///
61 /// Parameter `identifier`: Represents the room type that the user chose. This is the same identifier that your extension
62 /// chose for this EKVirtualConferenceRoomTypeDescriptor in an earlier call to
63 /// fetchAvailableRoomTypesWithCompletionHandler:.
64 ///
65 /// Parameter `completionHandler`: A block to call when your extension has finished retrieving the virtual conference details.
66 /// If your extension is unable to retrieve virtual conference details at this time (for example,
67 /// because network access is not available), call this block with nil for the first argument and
68 /// an appropriate NSError object for the second argument. Do not call this block with nil for
69 /// both arguments. Similarly, do not call this block with both a non-nil
70 /// EKVirtualConferenceDescriptor and a non-nil NSError. This block must be called when your
71 /// extension has finished its work.
72 #[unsafe(method(fetchVirtualConferenceForIdentifier:completionHandler:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn fetchVirtualConferenceForIdentifier_completionHandler(
75 &self,
76 identifier: &EKVirtualConferenceRoomTypeIdentifier,
77 completion_handler: &block2::DynBlock<
78 dyn Fn(*mut EKVirtualConferenceDescriptor, *mut NSError),
79 >,
80 );
81 );
82}
83
84/// Methods declared on superclass `NSObject`.
85impl EKVirtualConferenceProvider {
86 extern_methods!(
87 #[unsafe(method(init))]
88 #[unsafe(method_family = init)]
89 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
90
91 #[unsafe(method(new))]
92 #[unsafe(method_family = new)]
93 pub unsafe fn new() -> Retained<Self>;
94 );
95}