objc2_identity_lookup/generated/ILMessageFilterExtensionContext.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 /// Represents a MessageFilter extension request's context.
12 ///
13 /// See also [Apple's documentation](https://developer.apple.com/documentation/identitylookup/ilmessagefilterextensioncontext?language=objc)
14 #[unsafe(super(NSExtensionContext, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 pub struct ILMessageFilterExtensionContext;
17);
18
19extern_conformance!(
20 unsafe impl NSObjectProtocol for ILMessageFilterExtensionContext {}
21);
22
23impl ILMessageFilterExtensionContext {
24 extern_methods!(
25 #[cfg(all(feature = "ILNetworkResponse", feature = "block2"))]
26 /// Defer the current query request to the app extension's associated network service and receive a network response asynchronously.
27 ///
28 /// This causes the system to perform an HTTPS network request to a URL specified in the app extension's Info.plist, and the response
29 /// to that HTTPS request (or an error) is returned asynchronously. See documentation for details regarding how this HTTPS request
30 /// is formatted, restrictions on the URL, etc.
31 ///
32 ///
33 /// Parameter `completion`: Completion block containing either the network response to the HTTPS request or an error.
34 #[unsafe(method(deferQueryRequestToNetworkWithCompletion:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn deferQueryRequestToNetworkWithCompletion(
37 &self,
38 completion: &block2::DynBlock<dyn Fn(*mut ILNetworkResponse, *mut NSError)>,
39 );
40 );
41}
42
43/// Methods declared on superclass `NSObject`.
44impl ILMessageFilterExtensionContext {
45 extern_methods!(
46 #[unsafe(method(init))]
47 #[unsafe(method_family = init)]
48 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50 #[unsafe(method(new))]
51 #[unsafe(method_family = new)]
52 pub unsafe fn new() -> Retained<Self>;
53 );
54}