use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSSharingCollaborationMode(pub NSInteger);
impl NSSharingCollaborationMode {
#[doc(alias = "NSSharingCollaborationModeSendCopy")]
pub const SendCopy: Self = Self(0);
#[doc(alias = "NSSharingCollaborationModeCollaborate")]
pub const Collaborate: Self = Self(1);
}
unsafe impl Encode for NSSharingCollaborationMode {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSSharingCollaborationMode {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSSharingCollaborationModeRestriction;
);
extern_conformance!(
unsafe impl NSCoding for NSSharingCollaborationModeRestriction {}
);
extern_conformance!(
unsafe impl NSCopying for NSSharingCollaborationModeRestriction {}
);
unsafe impl CopyingHelper for NSSharingCollaborationModeRestriction {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for NSSharingCollaborationModeRestriction {}
);
extern_conformance!(
unsafe impl NSSecureCoding for NSSharingCollaborationModeRestriction {}
);
impl NSSharingCollaborationModeRestriction {
extern_methods!(
#[unsafe(method(disabledMode))]
#[unsafe(method_family = none)]
pub fn disabledMode(&self) -> NSSharingCollaborationMode;
#[unsafe(method(alertTitle))]
#[unsafe(method_family = none)]
pub fn alertTitle(&self) -> Option<Retained<NSString>>;
#[unsafe(method(alertMessage))]
#[unsafe(method_family = none)]
pub fn alertMessage(&self) -> Option<Retained<NSString>>;
#[unsafe(method(alertDismissButtonTitle))]
#[unsafe(method_family = none)]
pub fn alertDismissButtonTitle(&self) -> Option<Retained<NSString>>;
#[unsafe(method(alertRecoverySuggestionButtonTitle))]
#[unsafe(method_family = none)]
pub fn alertRecoverySuggestionButtonTitle(&self) -> Option<Retained<NSString>>;
#[unsafe(method(alertRecoverySuggestionButtonLaunchURL))]
#[unsafe(method_family = none)]
pub fn alertRecoverySuggestionButtonLaunchURL(&self) -> Option<Retained<NSURL>>;
#[unsafe(method(initWithDisabledMode:))]
#[unsafe(method_family = init)]
pub fn initWithDisabledMode(
this: Allocated<Self>,
disabled_mode: NSSharingCollaborationMode,
) -> Retained<Self>;
#[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:))]
#[unsafe(method_family = init)]
pub fn initWithDisabledMode_alertTitle_alertMessage(
this: Allocated<Self>,
disabled_mode: NSSharingCollaborationMode,
alert_title: &NSString,
alert_message: &NSString,
) -> Retained<Self>;
#[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:))]
#[unsafe(method_family = init)]
pub fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle(
this: Allocated<Self>,
disabled_mode: NSSharingCollaborationMode,
alert_title: &NSString,
alert_message: &NSString,
alert_dismiss_button_title: &NSString,
) -> Retained<Self>;
#[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:alertRecoverySuggestionButtonTitle:alertRecoverySuggestionButtonLaunchURL:))]
#[unsafe(method_family = init)]
pub fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle_alertRecoverySuggestionButtonTitle_alertRecoverySuggestionButtonLaunchURL(
this: Allocated<Self>,
disabled_mode: NSSharingCollaborationMode,
alert_title: &NSString,
alert_message: &NSString,
alert_dismiss_button_title: &NSString,
alert_recovery_suggestion_button_title: &NSString,
alert_recovery_suggestion_button_launch_url: &NSURL,
) -> Retained<Self>;
#[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>;
);
}