icrate 0.1.2

Bindings to Apple's frameworks
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use crate::common::*;
use crate::Foundation::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "Foundation_NSArchiver")]
    #[deprecated = "Use NSKeyedArchiver instead"]
    pub struct NSArchiver;

    #[cfg(feature = "Foundation_NSArchiver")]
    unsafe impl ClassType for NSArchiver {
        #[inherits(NSObject)]
        type Super = NSCoder;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Foundation_NSArchiver")]
unsafe impl NSObjectProtocol for NSArchiver {}

extern_methods!(
    #[cfg(feature = "Foundation_NSArchiver")]
    unsafe impl NSArchiver {
        #[cfg(feature = "Foundation_NSMutableData")]
        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method_id(@__retain_semantics Init initForWritingWithMutableData:)]
        pub unsafe fn initForWritingWithMutableData(
            this: Allocated<Self>,
            mdata: &NSMutableData,
        ) -> Id<Self>;

        #[cfg(feature = "Foundation_NSMutableData")]
        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method_id(@__retain_semantics Other archiverData)]
        pub unsafe fn archiverData(&self) -> Id<NSMutableData>;

        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method(encodeRootObject:)]
        pub unsafe fn encodeRootObject(&self, root_object: &AnyObject);

        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method(encodeConditionalObject:)]
        pub unsafe fn encodeConditionalObject(&self, object: Option<&AnyObject>);

        #[cfg(feature = "Foundation_NSData")]
        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method_id(@__retain_semantics Other archivedDataWithRootObject:)]
        pub unsafe fn archivedDataWithRootObject(root_object: &AnyObject) -> Id<NSData>;

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method(archiveRootObject:toFile:)]
        pub unsafe fn archiveRootObject_toFile(root_object: &AnyObject, path: &NSString) -> bool;

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method(encodeClassName:intoClassName:)]
        pub unsafe fn encodeClassName_intoClassName(
            &self,
            true_name: &NSString,
            in_archive_name: &NSString,
        );

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method_id(@__retain_semantics Other classNameEncodedForTrueClassName:)]
        pub unsafe fn classNameEncodedForTrueClassName(
            &self,
            true_name: &NSString,
        ) -> Option<Id<NSString>>;

        #[deprecated = "Use NSKeyedArchiver instead"]
        #[method(replaceObject:withObject:)]
        pub unsafe fn replaceObject_withObject(&self, object: &AnyObject, new_object: &AnyObject);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Foundation_NSArchiver")]
    unsafe impl NSArchiver {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "Foundation_NSUnarchiver")]
    #[deprecated = "Use NSKeyedUnarchiver instead"]
    pub struct NSUnarchiver;

    #[cfg(feature = "Foundation_NSUnarchiver")]
    unsafe impl ClassType for NSUnarchiver {
        #[inherits(NSObject)]
        type Super = NSCoder;
        type Mutability = InteriorMutable;
    }
);

#[cfg(feature = "Foundation_NSUnarchiver")]
unsafe impl NSObjectProtocol for NSUnarchiver {}

extern_methods!(
    #[cfg(feature = "Foundation_NSUnarchiver")]
    unsafe impl NSUnarchiver {
        #[cfg(feature = "Foundation_NSData")]
        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method_id(@__retain_semantics Init initForReadingWithData:)]
        pub unsafe fn initForReadingWithData(
            this: Allocated<Self>,
            data: &NSData,
        ) -> Option<Id<Self>>;

        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method(setObjectZone:)]
        pub unsafe fn setObjectZone(&self, zone: *mut NSZone);

        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method(objectZone)]
        pub unsafe fn objectZone(&self) -> *mut NSZone;

        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method(isAtEnd)]
        pub unsafe fn isAtEnd(&self) -> bool;

        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method(systemVersion)]
        pub unsafe fn systemVersion(&self) -> c_uint;

        #[cfg(feature = "Foundation_NSData")]
        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method_id(@__retain_semantics Other unarchiveObjectWithData:)]
        pub unsafe fn unarchiveObjectWithData(data: &NSData) -> Option<Id<AnyObject>>;

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method_id(@__retain_semantics Other unarchiveObjectWithFile:)]
        pub unsafe fn unarchiveObjectWithFile(path: &NSString) -> Option<Id<AnyObject>>;

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method(decodeClassName:asClassName:)]
        pub unsafe fn decodeClassName_asClassName_class(
            in_archive_name: &NSString,
            true_name: &NSString,
        );

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method(decodeClassName:asClassName:)]
        pub unsafe fn decodeClassName_asClassName(
            &self,
            in_archive_name: &NSString,
            true_name: &NSString,
        );

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method_id(@__retain_semantics Other classNameDecodedForArchiveClassName:)]
        pub unsafe fn classNameDecodedForArchiveClassName_class(
            in_archive_name: &NSString,
        ) -> Id<NSString>;

        #[cfg(feature = "Foundation_NSString")]
        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method_id(@__retain_semantics Other classNameDecodedForArchiveClassName:)]
        pub unsafe fn classNameDecodedForArchiveClassName(
            &self,
            in_archive_name: &NSString,
        ) -> Id<NSString>;

        #[deprecated = "Use NSKeyedUnarchiver instead"]
        #[method(replaceObject:withObject:)]
        pub unsafe fn replaceObject_withObject(&self, object: &AnyObject, new_object: &AnyObject);
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    #[cfg(feature = "Foundation_NSUnarchiver")]
    unsafe impl NSUnarchiver {
        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Id<Self>;
    }
);