use core::cell::UnsafeCell;
use core::ffi::*;
use core::marker::{PhantomData, PhantomPinned};
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use crate::*;
pub const kCharsetStringISO88591: &CStr =
unsafe { CStr::from_bytes_with_nul_unchecked(b"CHARSET=ISO-8859-1\0") };
pub const kCharsetStringUTF8: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"UTF-8\0") };
pub const kEncodingStringQuotedPrintable: &CStr =
unsafe { CStr::from_bytes_with_nul_unchecked(b"QUOTED-PRINTABLE\0") };
pub const kEncodingStringBase64: &CStr =
unsafe { CStr::from_bytes_with_nul_unchecked(b"BASE-64\0") };
pub const kEncodingString8Bit: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"8BIT\0") };
pub type OBEXError = i32;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXErrorCodes(pub c_int);
impl OBEXErrorCodes {
#[doc(alias = "kOBEXErrorRangeMin")]
pub const ErrorRangeMin: Self = Self(-21850);
#[doc(alias = "kOBEXErrorRangeMax")]
pub const ErrorRangeMax: Self = Self(-21899);
#[doc(alias = "kOBEXSuccess")]
pub const Success: Self = Self(0);
#[doc(alias = "kOBEXGeneralError")]
pub const GeneralError: Self = Self(-21850);
#[doc(alias = "kOBEXNoResourcesError")]
pub const NoResourcesError: Self = Self(-21851);
#[doc(alias = "kOBEXUnsupportedError")]
pub const UnsupportedError: Self = Self(-21852);
#[doc(alias = "kOBEXInternalError")]
pub const InternalError: Self = Self(-21853);
#[doc(alias = "kOBEXBadArgumentError")]
pub const BadArgumentError: Self = Self(-21854);
#[doc(alias = "kOBEXTimeoutError")]
pub const TimeoutError: Self = Self(-21855);
#[doc(alias = "kOBEXBadRequestError")]
pub const BadRequestError: Self = Self(-21856);
#[doc(alias = "kOBEXCancelledError")]
pub const CancelledError: Self = Self(-21857);
#[doc(alias = "kOBEXForbiddenError")]
pub const ForbiddenError: Self = Self(-21858);
#[doc(alias = "kOBEXUnauthorizedError")]
pub const UnauthorizedError: Self = Self(-21859);
#[doc(alias = "kOBEXNotAcceptableError")]
pub const NotAcceptableError: Self = Self(-21860);
#[doc(alias = "kOBEXConflictError")]
pub const ConflictError: Self = Self(-21861);
#[doc(alias = "kOBEXMethodNotAllowedError")]
pub const MethodNotAllowedError: Self = Self(-21862);
#[doc(alias = "kOBEXNotFoundError")]
pub const NotFoundError: Self = Self(-21863);
#[doc(alias = "kOBEXNotImplementedError")]
pub const NotImplementedError: Self = Self(-21864);
#[doc(alias = "kOBEXPreconditionFailedError")]
pub const PreconditionFailedError: Self = Self(-21865);
#[doc(alias = "kOBEXSessionBusyError")]
pub const SessionBusyError: Self = Self(-21875);
#[doc(alias = "kOBEXSessionNotConnectedError")]
pub const SessionNotConnectedError: Self = Self(-21876);
#[doc(alias = "kOBEXSessionBadRequestError")]
pub const SessionBadRequestError: Self = Self(-21877);
#[doc(alias = "kOBEXSessionBadResponseError")]
pub const SessionBadResponseError: Self = Self(-21878);
#[doc(alias = "kOBEXSessionNoTransportError")]
pub const SessionNoTransportError: Self = Self(-21879);
#[doc(alias = "kOBEXSessionTransportDiedError")]
pub const SessionTransportDiedError: Self = Self(-21880);
#[doc(alias = "kOBEXSessionTimeoutError")]
pub const SessionTimeoutError: Self = Self(-21881);
#[doc(alias = "kOBEXSessionAlreadyConnectedError")]
pub const SessionAlreadyConnectedError: Self = Self(-21882);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXErrorCodes {
const ENCODING: Encoding = c_int::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXErrorCodes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXHeaderIdentifiers(pub c_uint);
impl OBEXHeaderIdentifiers {
#[doc(alias = "kOBEXHeaderIDName")]
pub const IDName: Self = Self(0x01);
#[doc(alias = "kOBEXHeaderIDDescription")]
pub const IDDescription: Self = Self(0x05);
#[doc(alias = "kOBEXHeaderIDReservedRangeStart")]
pub const IDReservedRangeStart: Self = Self(0x10);
#[doc(alias = "kOBEXHeaderIDReservedRangeEnd")]
pub const IDReservedRangeEnd: Self = Self(0x2F);
#[doc(alias = "kOBEXHeaderIDUserDefinedRangeStart")]
pub const IDUserDefinedRangeStart: Self = Self(0x30);
#[doc(alias = "kOBEXHeaderIDUserDefinedRangeEnd")]
pub const IDUserDefinedRangeEnd: Self = Self(0x3F);
#[doc(alias = "kOBEXHeaderIDType")]
pub const IDType: Self = Self(0x42);
#[doc(alias = "kOBEXHeaderIDTimeISO")]
pub const IDTimeISO: Self = Self(0x44);
#[doc(alias = "kOBEXHeaderIDTarget")]
pub const IDTarget: Self = Self(0x46);
#[doc(alias = "kOBEXHeaderIDHTTP")]
pub const IDHTTP: Self = Self(0x47);
#[doc(alias = "kOBEXHeaderIDBody")]
pub const IDBody: Self = Self(0x48);
#[doc(alias = "kOBEXHeaderIDEndOfBody")]
pub const IDEndOfBody: Self = Self(0x49);
#[doc(alias = "kOBEXHeaderIDWho")]
pub const IDWho: Self = Self(0x4A);
#[doc(alias = "kOBEXHeaderIDAppParameters")]
pub const IDAppParameters: Self = Self(0x4C);
#[doc(alias = "kOBEXHeaderIDAuthorizationChallenge")]
pub const IDAuthorizationChallenge: Self = Self(0x4D);
#[doc(alias = "kOBEXHeaderIDAuthorizationResponse")]
pub const IDAuthorizationResponse: Self = Self(0x4E);
#[doc(alias = "kOBEXHeaderIDObjectClass")]
pub const IDObjectClass: Self = Self(0x4F);
#[doc(alias = "kOBEXHeaderIDCount")]
pub const IDCount: Self = Self(0xC0);
#[doc(alias = "kOBEXHeaderIDLength")]
pub const IDLength: Self = Self(0xC3);
#[doc(alias = "kOBEXHeaderIDTime4Byte")]
pub const IDTime4Byte: Self = Self(0xC4);
#[doc(alias = "kOBEXHeaderIDConnectionID")]
pub const IDConnectionID: Self = Self(0xCB);
#[doc(alias = "kOBEXHeaderIDOBEX13WANUUID")]
pub const IDOBEX13WANUUID: Self = Self(0x50);
#[doc(alias = "kOBEXHeaderIDOBEX13ObjectClass")]
pub const IDOBEX13ObjectClass: Self = Self(0x51);
#[doc(alias = "kOBEXHeaderIDOBEX13SessionParameters")]
pub const IDOBEX13SessionParameters: Self = Self(0x52);
#[doc(alias = "kOBEXHeaderIDOBEX13SessionSequenceNumber")]
pub const IDOBEX13SessionSequenceNumber: Self = Self(0x93);
#[doc(alias = "kOBEXHeaderIDOBEX13CreatorID")]
pub const IDOBEX13CreatorID: Self = Self(0xCF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXHeaderIdentifiers {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXHeaderIdentifiers {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXOpCodeResponseValues(pub c_uint);
impl OBEXOpCodeResponseValues {
#[doc(alias = "kOBEXResponseCodeReservedRangeStart")]
pub const ResponseCodeReservedRangeStart: Self = Self(0x00);
#[doc(alias = "kOBEXResponseCodeReservedRangeEnd")]
pub const ResponseCodeReservedRangeEnd: Self = Self(0x0F);
#[doc(alias = "kOBEXResponseCodeContinue")]
pub const ResponseCodeContinue: Self = Self(0x10);
#[doc(alias = "kOBEXResponseCodeContinueWithFinalBit")]
pub const ResponseCodeContinueWithFinalBit: Self = Self(0x90);
#[doc(alias = "kOBEXResponseCodeSuccess")]
pub const ResponseCodeSuccess: Self = Self(0x20);
#[doc(alias = "kOBEXResponseCodeSuccessWithFinalBit")]
pub const ResponseCodeSuccessWithFinalBit: Self = Self(0xA0);
#[doc(alias = "kOBEXResponseCodeCreated")]
pub const ResponseCodeCreated: Self = Self(0x21);
#[doc(alias = "kOBEXResponseCodeCreatedWithFinalBit")]
pub const ResponseCodeCreatedWithFinalBit: Self = Self(0xA1);
#[doc(alias = "kOBEXResponseCodeAccepted")]
pub const ResponseCodeAccepted: Self = Self(0x22);
#[doc(alias = "kOBEXResponseCodeAcceptedWithFinalBit")]
pub const ResponseCodeAcceptedWithFinalBit: Self = Self(0xA2);
#[doc(alias = "kOBEXResponseCodeNonAuthoritativeInfo")]
pub const ResponseCodeNonAuthoritativeInfo: Self = Self(0x23);
#[doc(alias = "kOBEXResponseCodeNonAuthoritativeInfoWithFinalBit")]
pub const ResponseCodeNonAuthoritativeInfoWithFinalBit: Self = Self(0xA3);
#[doc(alias = "kOBEXResponseCodeNoContent")]
pub const ResponseCodeNoContent: Self = Self(0x24);
#[doc(alias = "kOBEXResponseCodeNoContentWithFinalBit")]
pub const ResponseCodeNoContentWithFinalBit: Self = Self(0xA4);
#[doc(alias = "kOBEXResponseCodeResetContent")]
pub const ResponseCodeResetContent: Self = Self(0x25);
#[doc(alias = "kOBEXResponseCodeResetContentWithFinalBit")]
pub const ResponseCodeResetContentWithFinalBit: Self = Self(0xA5);
#[doc(alias = "kOBEXResponseCodePartialContent")]
pub const ResponseCodePartialContent: Self = Self(0x26);
#[doc(alias = "kOBEXResponseCodePartialContentWithFinalBit")]
pub const ResponseCodePartialContentWithFinalBit: Self = Self(0xA6);
#[doc(alias = "kOBEXResponseCodeMultipleChoices")]
pub const ResponseCodeMultipleChoices: Self = Self(0x30);
#[doc(alias = "kOBEXResponseCodeMultipleChoicesWithFinalBit")]
pub const ResponseCodeMultipleChoicesWithFinalBit: Self = Self(0xB0);
#[doc(alias = "kOBEXResponseCodeMovedPermanently")]
pub const ResponseCodeMovedPermanently: Self = Self(0x31);
#[doc(alias = "kOBEXResponseCodeMovedPermanentlyWithFinalBit")]
pub const ResponseCodeMovedPermanentlyWithFinalBit: Self = Self(0xB1);
#[doc(alias = "kOBEXResponseCodeMovedTemporarily")]
pub const ResponseCodeMovedTemporarily: Self = Self(0x32);
#[doc(alias = "kOBEXResponseCodeMovedTemporarilyWithFinalBit")]
pub const ResponseCodeMovedTemporarilyWithFinalBit: Self = Self(0xB2);
#[doc(alias = "kOBEXResponseCodeSeeOther")]
pub const ResponseCodeSeeOther: Self = Self(0x33);
#[doc(alias = "kOBEXResponseCodeSeeOtherWithFinalBit")]
pub const ResponseCodeSeeOtherWithFinalBit: Self = Self(0xB3);
#[doc(alias = "kOBEXResponseCodeNotModified")]
pub const ResponseCodeNotModified: Self = Self(0x34);
#[doc(alias = "kOBEXResponseCodeNotModifiedWithFinalBit")]
pub const ResponseCodeNotModifiedWithFinalBit: Self = Self(0xB4);
#[doc(alias = "kOBEXResponseCodeUseProxy")]
pub const ResponseCodeUseProxy: Self = Self(0x35);
#[doc(alias = "kOBEXResponseCodeUseProxyWithFinalBit")]
pub const ResponseCodeUseProxyWithFinalBit: Self = Self(0xB5);
#[doc(alias = "kOBEXResponseCodeBadRequest")]
pub const ResponseCodeBadRequest: Self = Self(0x40);
#[doc(alias = "kOBEXResponseCodeBadRequestWithFinalBit")]
pub const ResponseCodeBadRequestWithFinalBit: Self = Self(0xC0);
#[doc(alias = "kOBEXResponseCodeUnauthorized")]
pub const ResponseCodeUnauthorized: Self = Self(0x41);
#[doc(alias = "kOBEXResponseCodeUnauthorizedWithFinalBit")]
pub const ResponseCodeUnauthorizedWithFinalBit: Self = Self(0xC1);
#[doc(alias = "kOBEXResponseCodePaymentRequired")]
pub const ResponseCodePaymentRequired: Self = Self(0x42);
#[doc(alias = "kOBEXResponseCodePaymentRequiredWithFinalBit")]
pub const ResponseCodePaymentRequiredWithFinalBit: Self = Self(0xC2);
#[doc(alias = "kOBEXResponseCodeForbidden")]
pub const ResponseCodeForbidden: Self = Self(0x43);
#[doc(alias = "kOBEXResponseCodeForbiddenWithFinalBit")]
pub const ResponseCodeForbiddenWithFinalBit: Self = Self(0xC3);
#[doc(alias = "kOBEXResponseCodeNotFound")]
pub const ResponseCodeNotFound: Self = Self(0x44);
#[doc(alias = "kOBEXResponseCodeNotFoundWithFinalBit")]
pub const ResponseCodeNotFoundWithFinalBit: Self = Self(0xC4);
#[doc(alias = "kOBEXResponseCodeMethodNotAllowed")]
pub const ResponseCodeMethodNotAllowed: Self = Self(0x45);
#[doc(alias = "kOBEXResponseCodeMethodNotAllowedWithFinalBit")]
pub const ResponseCodeMethodNotAllowedWithFinalBit: Self = Self(0xC5);
#[doc(alias = "kOBEXResponseCodeNotAcceptable")]
pub const ResponseCodeNotAcceptable: Self = Self(0x46);
#[doc(alias = "kOBEXResponseCodeNotAcceptableWithFinalBit")]
pub const ResponseCodeNotAcceptableWithFinalBit: Self = Self(0xC6);
#[doc(alias = "kOBEXResponseCodeProxyAuthenticationRequired")]
pub const ResponseCodeProxyAuthenticationRequired: Self = Self(0x47);
#[doc(alias = "kOBEXResponseCodeProxyAuthenticationRequiredWithFinalBit")]
pub const ResponseCodeProxyAuthenticationRequiredWithFinalBit: Self = Self(0xC7);
#[doc(alias = "kOBEXResponseCodeRequestTimeOut")]
pub const ResponseCodeRequestTimeOut: Self = Self(0x48);
#[doc(alias = "kOBEXResponseCodeRequestTimeOutWithFinalBit")]
pub const ResponseCodeRequestTimeOutWithFinalBit: Self = Self(0xC8);
#[doc(alias = "kOBEXResponseCodeConflict")]
pub const ResponseCodeConflict: Self = Self(0x49);
#[doc(alias = "kOBEXResponseCodeConflictWithFinalBit")]
pub const ResponseCodeConflictWithFinalBit: Self = Self(0xC9);
#[doc(alias = "kOBEXResponseCodeGone")]
pub const ResponseCodeGone: Self = Self(0x4A);
#[doc(alias = "kOBEXResponseCodeGoneWithFinalBit")]
pub const ResponseCodeGoneWithFinalBit: Self = Self(0xCA);
#[doc(alias = "kOBEXResponseCodeLengthRequired")]
pub const ResponseCodeLengthRequired: Self = Self(0x4B);
#[doc(alias = "kOBEXResponseCodeLengthRequiredFinalBit")]
pub const ResponseCodeLengthRequiredFinalBit: Self = Self(0xCB);
#[doc(alias = "kOBEXResponseCodePreconditionFailed")]
pub const ResponseCodePreconditionFailed: Self = Self(0x4C);
#[doc(alias = "kOBEXResponseCodePreconditionFailedWithFinalBit")]
pub const ResponseCodePreconditionFailedWithFinalBit: Self = Self(0xCC);
#[doc(alias = "kOBEXResponseCodeRequestedEntityTooLarge")]
pub const ResponseCodeRequestedEntityTooLarge: Self = Self(0x4D);
#[doc(alias = "kOBEXResponseCodeRequestedEntityTooLargeWithFinalBit")]
pub const ResponseCodeRequestedEntityTooLargeWithFinalBit: Self = Self(0xCD);
#[doc(alias = "kOBEXResponseCodeRequestURLTooLarge")]
pub const ResponseCodeRequestURLTooLarge: Self = Self(0x4E);
#[doc(alias = "kOBEXResponseCodeRequestURLTooLargeWithFinalBit")]
pub const ResponseCodeRequestURLTooLargeWithFinalBit: Self = Self(0xCE);
#[doc(alias = "kOBEXResponseCodeUnsupportedMediaType")]
pub const ResponseCodeUnsupportedMediaType: Self = Self(0x4F);
#[doc(alias = "kOBEXResponseCodeUnsupportedMediaTypeWithFinalBit")]
pub const ResponseCodeUnsupportedMediaTypeWithFinalBit: Self = Self(0xCF);
#[doc(alias = "kOBEXResponseCodeInternalServerError")]
pub const ResponseCodeInternalServerError: Self = Self(0x50);
#[doc(alias = "kOBEXResponseCodeInternalServerErrorWithFinalBit")]
pub const ResponseCodeInternalServerErrorWithFinalBit: Self = Self(0xD0);
#[doc(alias = "kOBEXResponseCodeNotImplemented")]
pub const ResponseCodeNotImplemented: Self = Self(0x51);
#[doc(alias = "kOBEXResponseCodeNotImplementedWithFinalBit")]
pub const ResponseCodeNotImplementedWithFinalBit: Self = Self(0xD1);
#[doc(alias = "kOBEXResponseCodeBadGateway")]
pub const ResponseCodeBadGateway: Self = Self(0x52);
#[doc(alias = "kOBEXResponseCodeBadGatewayWithFinalBit")]
pub const ResponseCodeBadGatewayWithFinalBit: Self = Self(0xD2);
#[doc(alias = "kOBEXResponseCodeServiceUnavailable")]
pub const ResponseCodeServiceUnavailable: Self = Self(0x53);
#[doc(alias = "kOBEXResponseCodeServiceUnavailableWithFinalBit")]
pub const ResponseCodeServiceUnavailableWithFinalBit: Self = Self(0xD3);
#[doc(alias = "kOBEXResponseCodeGatewayTimeout")]
pub const ResponseCodeGatewayTimeout: Self = Self(0x54);
#[doc(alias = "kOBEXResponseCodeGatewayTimeoutWithFinalBit")]
pub const ResponseCodeGatewayTimeoutWithFinalBit: Self = Self(0xD4);
#[doc(alias = "kOBEXResponseCodeHTTPVersionNotSupported")]
pub const ResponseCodeHTTPVersionNotSupported: Self = Self(0x55);
#[doc(alias = "kOBEXResponseCodeHTTPVersionNotSupportedWithFinalBit")]
pub const ResponseCodeHTTPVersionNotSupportedWithFinalBit: Self = Self(0xD5);
#[doc(alias = "kOBEXResponseCodeDatabaseFull")]
pub const ResponseCodeDatabaseFull: Self = Self(0x60);
#[doc(alias = "kOBEXResponseCodeDatabaseFullWithFinalBit")]
pub const ResponseCodeDatabaseFullWithFinalBit: Self = Self(0xE0);
#[doc(alias = "kOBEXResponseCodeDatabaseLocked")]
pub const ResponseCodeDatabaseLocked: Self = Self(0x61);
#[doc(alias = "kOBEXResponseCodeDatabaseLockedWithFinalBit")]
pub const ResponseCodeDatabaseLockedWithFinalBit: Self = Self(0xE1);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXOpCodeResponseValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXOpCodeResponseValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXOpCodeCommandValues(pub c_uint);
impl OBEXOpCodeCommandValues {
#[doc(alias = "kOBEXOpCodeReserved")]
pub const Reserved: Self = Self(0x04);
#[doc(alias = "kOBEXOpCodeConnect")]
pub const Connect: Self = Self(0x80);
#[doc(alias = "kOBEXOpCodeDisconnect")]
pub const Disconnect: Self = Self(0x81);
#[doc(alias = "kOBEXOpCodePut")]
pub const Put: Self = Self(0x02);
#[doc(alias = "kOBEXOpCodePutWithHighBitSet")]
pub const PutWithHighBitSet: Self = Self(0x82);
#[doc(alias = "kOBEXOpCodeGet")]
pub const Get: Self = Self(0x03);
#[doc(alias = "kOBEXOpCodeGetWithHighBitSet")]
pub const GetWithHighBitSet: Self = Self(0x83);
#[doc(alias = "kOBEXOpCodeReservedWithHighBitSet")]
pub const ReservedWithHighBitSet: Self = Self(0x84);
#[doc(alias = "kOBEXOpCodeSetPath")]
pub const SetPath: Self = Self(0x85);
#[doc(alias = "kOBEXOpCodeAbort")]
pub const Abort: Self = Self(0xFF);
#[doc(alias = "kOBEXOpCodeReservedRangeStart")]
pub const ReservedRangeStart: Self = Self(0x06);
#[doc(alias = "kOBEXOpCodeReservedRangeEnd")]
pub const ReservedRangeEnd: Self = Self(0x0F);
#[doc(alias = "kOBEXOpCodeUserDefinedStart")]
pub const UserDefinedStart: Self = Self(0x10);
#[doc(alias = "kOBEXOpCodeUserDefinedEnd")]
pub const UserDefinedEnd: Self = Self(0x1F);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXOpCodeCommandValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXOpCodeCommandValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXConnectFlagValues(pub c_uint);
impl OBEXConnectFlagValues {
#[doc(alias = "kOBEXConnectFlagNone")]
pub const FlagNone: Self = Self(0 << 0);
#[doc(alias = "kOBEXConnectFlagSupportMultipleItLMPConnections")]
pub const FlagSupportMultipleItLMPConnections: Self = Self(1 << 0);
#[doc(alias = "kOBEXConnectFlag1Reserved")]
pub const Flag1Reserved: Self = Self(1 << 1);
#[doc(alias = "kOBEXConnectFlag2Reserved")]
pub const Flag2Reserved: Self = Self(1 << 2);
#[doc(alias = "kOBEXConnectFlag3Reserved")]
pub const Flag3Reserved: Self = Self(1 << 3);
#[doc(alias = "kOBEXConnectFlag4Reserved")]
pub const Flag4Reserved: Self = Self(1 << 4);
#[doc(alias = "kOBEXConnectFlag5Reserved")]
pub const Flag5Reserved: Self = Self(1 << 5);
#[doc(alias = "kOBEXConnectFlag6Reserved")]
pub const Flag6Reserved: Self = Self(1 << 6);
#[doc(alias = "kOBEXConnectFlag7Reserved")]
pub const Flag7Reserved: Self = Self(1 << 7);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXConnectFlagValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXConnectFlagValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXPutFlagValues(pub c_uint);
impl OBEXPutFlagValues {
#[doc(alias = "kOBEXPutFlagNone")]
pub const FlagNone: Self = Self(0 << 0);
#[doc(alias = "kOBEXPutFlagGoToParentDirFirst")]
pub const FlagGoToParentDirFirst: Self = Self(1 << 0);
#[doc(alias = "kOBEXPutFlagDontCreateDirectory")]
pub const FlagDontCreateDirectory: Self = Self(1 << 1);
#[doc(alias = "kOBEXPutFlag2Reserved")]
pub const Flag2Reserved: Self = Self(1 << 2);
#[doc(alias = "kOBEXPutFlag3Reserved")]
pub const Flag3Reserved: Self = Self(1 << 3);
#[doc(alias = "kOBEXPutFlag4Reserved")]
pub const Flag4Reserved: Self = Self(1 << 4);
#[doc(alias = "kOBEXPutFlag5Reserved")]
pub const Flag5Reserved: Self = Self(1 << 5);
#[doc(alias = "kOBEXPutFlag6Reserved")]
pub const Flag6Reserved: Self = Self(1 << 6);
#[doc(alias = "kOBEXPutFlag7Reserved")]
pub const Flag7Reserved: Self = Self(1 << 7);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXPutFlagValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXPutFlagValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXNonceFlagValues(pub c_uint);
impl OBEXNonceFlagValues {
#[doc(alias = "kOBEXNonceFlagNone")]
pub const FlagNone: Self = Self(0 << 0);
#[doc(alias = "kOBEXNonceFlagSendUserIDInResponse")]
pub const FlagSendUserIDInResponse: Self = Self(1 << 0);
#[doc(alias = "kOBEXNonceFlagAccessModeReadOnly")]
pub const FlagAccessModeReadOnly: Self = Self(1 << 1);
#[doc(alias = "kOBEXNonceFlag2Reserved")]
pub const Flag2Reserved: Self = Self(1 << 2);
#[doc(alias = "kOBEXNonceFlag3Reserved")]
pub const Flag3Reserved: Self = Self(1 << 3);
#[doc(alias = "kOBEXNonceFlag4Reserved")]
pub const Flag4Reserved: Self = Self(1 << 4);
#[doc(alias = "kOBEXNonceFlag5Reserved")]
pub const Flag5Reserved: Self = Self(1 << 5);
#[doc(alias = "kOBEXNonceFlag6Reserved")]
pub const Flag6Reserved: Self = Self(1 << 6);
#[doc(alias = "kOBEXNonceFlag7Reserved")]
pub const Flag7Reserved: Self = Self(1 << 7);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXNonceFlagValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXNonceFlagValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXRealmValues(pub c_uint);
impl OBEXRealmValues {
#[doc(alias = "kOBEXRealmASCII")]
pub const ASCII: Self = Self(0x00);
#[doc(alias = "kOBEXRealmISO88591")]
pub const ISO88591: Self = Self(0x01);
#[doc(alias = "kOBEXRealmISO88592")]
pub const ISO88592: Self = Self(0x02);
#[doc(alias = "kOBEXRealmISO88593")]
pub const ISO88593: Self = Self(0x03);
#[doc(alias = "kOBEXRealmISO88594")]
pub const ISO88594: Self = Self(0x04);
#[doc(alias = "kOBEXRealmISO88595")]
pub const ISO88595: Self = Self(0x05);
#[doc(alias = "kOBEXRealmISO88596")]
pub const ISO88596: Self = Self(0x06);
#[doc(alias = "kOBEXRealmISO88597")]
pub const ISO88597: Self = Self(0x07);
#[doc(alias = "kOBEXRealmISO88598")]
pub const ISO88598: Self = Self(0x08);
#[doc(alias = "kOBEXRealmISO88599")]
pub const ISO88599: Self = Self(0x09);
#[doc(alias = "kOBEXRealmUNICODE")]
pub const UNICODE: Self = Self(0xFF);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXRealmValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXRealmValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXOpCodeSessionValues(pub c_uint);
impl OBEXOpCodeSessionValues {
#[doc(alias = "kOBEXOpCodeCreateSession")]
pub const CreateSession: Self = Self(0x00);
#[doc(alias = "kOBEXOpCodeCloseSession")]
pub const CloseSession: Self = Self(0x01);
#[doc(alias = "kOBEXOpCodeSuspendSession")]
pub const SuspendSession: Self = Self(0x02);
#[doc(alias = "kOBEXOpCodeResumeSession")]
pub const ResumeSession: Self = Self(0x03);
#[doc(alias = "kOBEXOpCodeSetTimeout")]
pub const SetTimeout: Self = Self(0x04);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXOpCodeSessionValues {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXOpCodeSessionValues {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXSessionParameterTags(pub c_uint);
impl OBEXSessionParameterTags {
#[doc(alias = "kOBEXSessionParameterTagDeviceAddress")]
pub const DeviceAddress: Self = Self(0x00);
#[doc(alias = "kOBEXSessionParameterTagNonce")]
pub const Nonce: Self = Self(0x01);
#[doc(alias = "kOBEXSessionParameterTagSessionID")]
pub const SessionID: Self = Self(0x02);
#[doc(alias = "kOBEXSessionParameterTagNextSequenceNumber")]
pub const NextSequenceNumber: Self = Self(0x03);
#[doc(alias = "kOBEXSessionParameterTagTimeout")]
pub const Timeout: Self = Self(0x04);
#[doc(alias = "kOBEXSessionParameterTagSessionOpcode")]
pub const SessionOpcode: Self = Self(0x05);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXSessionParameterTags {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXSessionParameterTags {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXVersions(pub c_uint);
impl OBEXVersions {
#[doc(alias = "kOBEXVersion10")]
pub const Version10: Self = Self(0x10);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXVersions {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXVersions {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type OBEXHeaderIdentifier = u8;
pub type OBEXVersion = u8;
pub type OBEXFlags = u8;
pub type OBEXOpCode = u8;
pub type OBEXConstants = u8;
pub type OBEXMaxPacketLength = u16;
#[repr(C)]
#[derive(Debug)]
pub struct OpaqueOBEXSessionRef {
inner: [u8; 0],
_p: UnsafeCell<PhantomData<(*const UnsafeCell<()>, PhantomPinned)>>,
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OpaqueOBEXSessionRef {
const ENCODING_REF: Encoding =
Encoding::Pointer(&Encoding::Struct("OpaqueOBEXSessionRef", &[]));
}
pub type OBEXSessionRef = *mut OpaqueOBEXSessionRef;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXConnectCommandResponseData {
pub serverResponseOpCode: OBEXOpCode,
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
pub maxPacketSize: OBEXMaxPacketLength,
pub version: OBEXVersion,
pub flags: OBEXFlags,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXConnectCommandResponseData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXConnectCommandResponseData",
&[
<OBEXOpCode>::ENCODING,
<*mut c_void>::ENCODING,
<usize>::ENCODING,
<OBEXMaxPacketLength>::ENCODING,
<OBEXVersion>::ENCODING,
<OBEXFlags>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXConnectCommandResponseData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXDisconnectCommandResponseData {
pub serverResponseOpCode: OBEXOpCode,
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXDisconnectCommandResponseData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXDisconnectCommandResponseData",
&[
<OBEXOpCode>::ENCODING,
<*mut c_void>::ENCODING,
<usize>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXDisconnectCommandResponseData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXPutCommandResponseData {
pub serverResponseOpCode: OBEXOpCode,
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXPutCommandResponseData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXPutCommandResponseData",
&[
<OBEXOpCode>::ENCODING,
<*mut c_void>::ENCODING,
<usize>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXPutCommandResponseData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXGetCommandResponseData {
pub serverResponseOpCode: OBEXOpCode,
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXGetCommandResponseData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXGetCommandResponseData",
&[
<OBEXOpCode>::ENCODING,
<*mut c_void>::ENCODING,
<usize>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXGetCommandResponseData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXSetPathCommandResponseData {
pub serverResponseOpCode: OBEXOpCode,
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
pub flags: OBEXFlags,
pub constants: OBEXConstants,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXSetPathCommandResponseData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXSetPathCommandResponseData",
&[
<OBEXOpCode>::ENCODING,
<*mut c_void>::ENCODING,
<usize>::ENCODING,
<OBEXFlags>::ENCODING,
<OBEXConstants>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXSetPathCommandResponseData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXAbortCommandResponseData {
pub serverResponseOpCode: OBEXOpCode,
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXAbortCommandResponseData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXAbortCommandResponseData",
&[
<OBEXOpCode>::ENCODING,
<*mut c_void>::ENCODING,
<usize>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXAbortCommandResponseData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXConnectCommandData {
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
pub maxPacketSize: OBEXMaxPacketLength,
pub version: OBEXVersion,
pub flags: OBEXFlags,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXConnectCommandData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXConnectCommandData",
&[
<*mut c_void>::ENCODING,
<usize>::ENCODING,
<OBEXMaxPacketLength>::ENCODING,
<OBEXVersion>::ENCODING,
<OBEXFlags>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXConnectCommandData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXDisconnectCommandData {
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXDisconnectCommandData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXDisconnectCommandData",
&[<*mut c_void>::ENCODING, <usize>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXDisconnectCommandData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXPutCommandData {
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
pub bodyDataLeftToSend: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXPutCommandData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXPutCommandData",
&[
<*mut c_void>::ENCODING,
<usize>::ENCODING,
<usize>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXPutCommandData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXGetCommandData {
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXGetCommandData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXGetCommandData",
&[<*mut c_void>::ENCODING, <usize>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXGetCommandData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXSetPathCommandData {
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
pub flags: OBEXFlags,
pub constants: OBEXConstants,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXSetPathCommandData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXSetPathCommandData",
&[
<*mut c_void>::ENCODING,
<usize>::ENCODING,
<OBEXFlags>::ENCODING,
<OBEXConstants>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXSetPathCommandData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXAbortCommandData {
pub headerDataPtr: *mut c_void,
pub headerDataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXAbortCommandData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXAbortCommandData",
&[<*mut c_void>::ENCODING, <usize>::ENCODING],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXAbortCommandData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct OBEXErrorData {
pub error: OBEXError,
pub dataPtr: *mut c_void,
pub dataLength: usize,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXErrorData {
const ENCODING: Encoding = Encoding::Struct(
"OBEXErrorData",
&[
<OBEXError>::ENCODING,
<*mut c_void>::ENCODING,
<usize>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXErrorData {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct OBEXSessionEventTypes(pub c_uint);
impl OBEXSessionEventTypes {
#[doc(alias = "kOBEXSessionEventTypeConnectCommandResponseReceived")]
pub const ConnectCommandResponseReceived: Self = Self(0x4f434543);
#[doc(alias = "kOBEXSessionEventTypeDisconnectCommandResponseReceived")]
pub const DisconnectCommandResponseReceived: Self = Self(0x4f434544);
#[doc(alias = "kOBEXSessionEventTypePutCommandResponseReceived")]
pub const PutCommandResponseReceived: Self = Self(0x4f434550);
#[doc(alias = "kOBEXSessionEventTypeGetCommandResponseReceived")]
pub const GetCommandResponseReceived: Self = Self(0x4f434547);
#[doc(alias = "kOBEXSessionEventTypeSetPathCommandResponseReceived")]
pub const SetPathCommandResponseReceived: Self = Self(0x4f434553);
#[doc(alias = "kOBEXSessionEventTypeAbortCommandResponseReceived")]
pub const AbortCommandResponseReceived: Self = Self(0x4f434541);
#[doc(alias = "kOBEXSessionEventTypeConnectCommandReceived")]
pub const ConnectCommandReceived: Self = Self(0x4f534543);
#[doc(alias = "kOBEXSessionEventTypeDisconnectCommandReceived")]
pub const DisconnectCommandReceived: Self = Self(0x4f534544);
#[doc(alias = "kOBEXSessionEventTypePutCommandReceived")]
pub const PutCommandReceived: Self = Self(0x4f534550);
#[doc(alias = "kOBEXSessionEventTypeGetCommandReceived")]
pub const GetCommandReceived: Self = Self(0x4f534547);
#[doc(alias = "kOBEXSessionEventTypeSetPathCommandReceived")]
pub const SetPathCommandReceived: Self = Self(0x4f534553);
#[doc(alias = "kOBEXSessionEventTypeAbortCommandReceived")]
pub const AbortCommandReceived: Self = Self(0x4f534541);
#[doc(alias = "kOBEXSessionEventTypeError")]
pub const Error: Self = Self(0x4f474545);
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXSessionEventTypes {
const ENCODING: Encoding = c_uint::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXSessionEventTypes {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type OBEXSessionEventType = u32;
#[repr(C)]
#[derive(Clone, Copy)]
pub union OBEXSessionEvent_u {
pub connectCommandResponseData: OBEXConnectCommandResponseData,
pub disconnectCommandResponseData: OBEXDisconnectCommandResponseData,
pub putCommandResponseData: OBEXPutCommandResponseData,
pub getCommandResponseData: OBEXGetCommandResponseData,
pub setPathCommandResponseData: OBEXSetPathCommandResponseData,
pub abortCommandResponseData: OBEXAbortCommandResponseData,
pub connectCommandData: OBEXConnectCommandData,
pub disconnectCommandData: OBEXDisconnectCommandData,
pub putCommandData: OBEXPutCommandData,
pub getCommandData: OBEXGetCommandData,
pub setPathCommandData: OBEXSetPathCommandData,
pub abortCommandData: OBEXAbortCommandData,
pub errorData: OBEXErrorData,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXSessionEvent_u {
const ENCODING: Encoding = Encoding::Union(
"?",
&[
<OBEXConnectCommandResponseData>::ENCODING,
<OBEXDisconnectCommandResponseData>::ENCODING,
<OBEXPutCommandResponseData>::ENCODING,
<OBEXGetCommandResponseData>::ENCODING,
<OBEXSetPathCommandResponseData>::ENCODING,
<OBEXAbortCommandResponseData>::ENCODING,
<OBEXConnectCommandData>::ENCODING,
<OBEXDisconnectCommandData>::ENCODING,
<OBEXPutCommandData>::ENCODING,
<OBEXGetCommandData>::ENCODING,
<OBEXSetPathCommandData>::ENCODING,
<OBEXAbortCommandData>::ENCODING,
<OBEXErrorData>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXSessionEvent_u {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(C)]
#[derive(Clone, Copy)]
pub struct OBEXSessionEvent {
pub r#type: OBEXSessionEventType,
pub session: OBEXSessionRef,
pub refCon: *mut c_void,
pub isEndOfEventData: Boolean,
pub reserved1: *mut c_void,
pub reserved2: *mut c_void,
pub u: OBEXSessionEvent_u,
}
#[cfg(feature = "objc2")]
unsafe impl Encode for OBEXSessionEvent {
const ENCODING: Encoding = Encoding::Struct(
"OBEXSessionEvent",
&[
<OBEXSessionEventType>::ENCODING,
<OBEXSessionRef>::ENCODING,
<*mut c_void>::ENCODING,
<Boolean>::ENCODING,
<*mut c_void>::ENCODING,
<*mut c_void>::ENCODING,
<OBEXSessionEvent_u>::ENCODING,
],
);
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for OBEXSessionEvent {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
pub type OBEXSessionEventCallback = Option<unsafe extern "C-unwind" fn(*const OBEXSessionEvent)>;
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionDelete(in_session_ref: OBEXSessionRef) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionHasOpenOBEXConnection(
in_session_ref: OBEXSessionRef,
out_is_connected: *mut Boolean,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionGetMaxPacketLength(
in_session_ref: OBEXSessionRef,
out_length: *mut OBEXMaxPacketLength,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionGetAvailableCommandPayloadLength(
in_session_ref: OBEXSessionRef,
in_op_code: OBEXOpCode,
out_length: *mut OBEXMaxPacketLength,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionGetAvailableCommandResponsePayloadLength(
in_session_ref: OBEXSessionRef,
in_op_code: OBEXOpCode,
out_length: *mut OBEXMaxPacketLength,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionConnect(
in_session_ref: OBEXSessionRef,
in_flags: OBEXFlags,
in_max_packet_length: OBEXMaxPacketLength,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionDisconnect(
in_session_ref: OBEXSessionRef,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
#[deprecated]
#[inline]
pub unsafe extern "C-unwind" fn OBEXSessionPut(
in_session_ref: OBEXSessionRef,
in_is_final_chunk: bool,
in_headers_data: *mut c_void,
in_headers_data_length: usize,
in_body_data: *mut c_void,
in_body_data_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError {
extern "C-unwind" {
fn OBEXSessionPut(
in_session_ref: OBEXSessionRef,
in_is_final_chunk: Boolean,
in_headers_data: *mut c_void,
in_headers_data_length: usize,
in_body_data: *mut c_void,
in_body_data_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
unsafe {
OBEXSessionPut(
in_session_ref,
in_is_final_chunk as _,
in_headers_data,
in_headers_data_length,
in_body_data,
in_body_data_length,
in_callback,
in_user_ref_con,
)
}
}
#[deprecated]
#[inline]
pub unsafe extern "C-unwind" fn OBEXSessionGet(
in_session_ref: OBEXSessionRef,
in_is_final_chunk: bool,
in_headers_data: *mut c_void,
in_headers_data_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError {
extern "C-unwind" {
fn OBEXSessionGet(
in_session_ref: OBEXSessionRef,
in_is_final_chunk: Boolean,
in_headers_data: *mut c_void,
in_headers_data_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
unsafe {
OBEXSessionGet(
in_session_ref,
in_is_final_chunk as _,
in_headers_data,
in_headers_data_length,
in_callback,
in_user_ref_con,
)
}
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionAbort(
in_session_ref: OBEXSessionRef,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionSetPath(
in_session_ref: OBEXSessionRef,
in_flags: OBEXFlags,
in_constants: OBEXConstants,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionConnectResponse(
in_session_ref: OBEXSessionRef,
in_response_op_code: OBEXOpCode,
in_flags: OBEXFlags,
in_max_packet_length: OBEXMaxPacketLength,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionDisconnectResponse(
in_session_ref: OBEXSessionRef,
in_response_op_code: OBEXOpCode,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionGetResponse(
in_session_ref: OBEXSessionRef,
in_response_op_code: OBEXOpCode,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionPutResponse(
in_session_ref: OBEXSessionRef,
in_response_op_code: OBEXOpCode,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionAbortResponse(
in_session_ref: OBEXSessionRef,
in_response_op_code: OBEXOpCode,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionSetPathResponse(
in_session_ref: OBEXSessionRef,
in_response_op_code: OBEXOpCode,
in_optional_headers: *mut c_void,
in_optional_headers_length: usize,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
extern "C-unwind" {
#[deprecated]
pub fn OBEXSessionSetServerCallback(
in_session_ref: OBEXSessionRef,
in_callback: OBEXSessionEventCallback,
in_user_ref_con: *mut c_void,
) -> OBEXError;
}
#[cfg(feature = "objc2-core-foundation")]
#[deprecated]
#[inline]
pub unsafe extern "C-unwind" fn OBEXCreateVCard(
in_first_name: *const c_void,
in_first_name_length: u32,
in_last_name: *const c_void,
in_last_name_length: u32,
in_friendly_name: *const c_void,
in_friendly_name_length: u32,
in_name_charset: *const c_void,
in_name_charset_length: u32,
in_home_phone: *const c_void,
in_home_phone_length: u32,
in_work_phone: *const c_void,
in_work_phone_length: u32,
in_cell_phone: *const c_void,
in_cell_phone_length: u32,
in_fax_phone: *const c_void,
in_fax_phone_length: u32,
in_e_mail_address: *const c_void,
in_e_mail_address_length: u32,
in_e_mail_address_charset: *const c_void,
in_e_mail_address_charset_length: u32,
in_organization: *const c_void,
in_organization_length: u32,
in_organization_charset: *const c_void,
in_organization_charset_length: u32,
in_title: *const c_void,
in_title_length: u32,
in_title_charset: *const c_void,
in_title_charset_length: u32,
) -> Option<CFRetained<CFData>> {
extern "C-unwind" {
fn OBEXCreateVCard(
in_first_name: *const c_void,
in_first_name_length: u32,
in_last_name: *const c_void,
in_last_name_length: u32,
in_friendly_name: *const c_void,
in_friendly_name_length: u32,
in_name_charset: *const c_void,
in_name_charset_length: u32,
in_home_phone: *const c_void,
in_home_phone_length: u32,
in_work_phone: *const c_void,
in_work_phone_length: u32,
in_cell_phone: *const c_void,
in_cell_phone_length: u32,
in_fax_phone: *const c_void,
in_fax_phone_length: u32,
in_e_mail_address: *const c_void,
in_e_mail_address_length: u32,
in_e_mail_address_charset: *const c_void,
in_e_mail_address_charset_length: u32,
in_organization: *const c_void,
in_organization_length: u32,
in_organization_charset: *const c_void,
in_organization_charset_length: u32,
in_title: *const c_void,
in_title_length: u32,
in_title_charset: *const c_void,
in_title_charset_length: u32,
) -> Option<NonNull<CFData>>;
}
let ret = unsafe {
OBEXCreateVCard(
in_first_name,
in_first_name_length,
in_last_name,
in_last_name_length,
in_friendly_name,
in_friendly_name_length,
in_name_charset,
in_name_charset_length,
in_home_phone,
in_home_phone_length,
in_work_phone,
in_work_phone_length,
in_cell_phone,
in_cell_phone_length,
in_fax_phone,
in_fax_phone_length,
in_e_mail_address,
in_e_mail_address_length,
in_e_mail_address_charset,
in_e_mail_address_charset_length,
in_organization,
in_organization_length,
in_organization_charset,
in_organization_charset_length,
in_title,
in_title_length,
in_title_charset,
in_title_charset_length,
)
};
ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}
#[cfg(feature = "objc2-core-foundation")]
#[deprecated]
#[inline]
pub unsafe extern "C-unwind" fn OBEXCreateVEvent(
in_charset: *const c_char,
in_charset_length: u32,
in_encoding: *const c_char,
in_encoding_length: u32,
in_event_start_date: *const c_char,
in_event_start_date_length: u32,
in_event_end_date: *const c_char,
in_event_end_date_length: u32,
in_alarm_date: *const c_char,
in_alarm_date_length: u32,
in_category: *const c_char,
in_category_length: u32,
in_summary: *const c_char,
in_summary_length: u32,
in_location: *const c_char,
in_location_length: u32,
in_xirmcluid: *const c_char,
in_xirmcluid_length: u32,
) -> Option<CFRetained<CFData>> {
extern "C-unwind" {
fn OBEXCreateVEvent(
in_charset: *const c_char,
in_charset_length: u32,
in_encoding: *const c_char,
in_encoding_length: u32,
in_event_start_date: *const c_char,
in_event_start_date_length: u32,
in_event_end_date: *const c_char,
in_event_end_date_length: u32,
in_alarm_date: *const c_char,
in_alarm_date_length: u32,
in_category: *const c_char,
in_category_length: u32,
in_summary: *const c_char,
in_summary_length: u32,
in_location: *const c_char,
in_location_length: u32,
in_xirmcluid: *const c_char,
in_xirmcluid_length: u32,
) -> Option<NonNull<CFData>>;
}
let ret = unsafe {
OBEXCreateVEvent(
in_charset,
in_charset_length,
in_encoding,
in_encoding_length,
in_event_start_date,
in_event_start_date_length,
in_event_end_date,
in_event_end_date_length,
in_alarm_date,
in_alarm_date_length,
in_category,
in_category_length,
in_summary,
in_summary_length,
in_location,
in_location_length,
in_xirmcluid,
in_xirmcluid_length,
)
};
ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyName: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyType: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyDescription: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyTimeISO: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyTime4Byte: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyTarget: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyHTTP: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyBody: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyEndOfBody: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyWho: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyAppParameters: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyAuthorizationChallenge: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyAuthorizationResponse: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyObjectClass: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyCount: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyLength: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyConnectionID: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyByteSequence: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyUnknownUnicodeText: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyUnknownByteSequence: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyUnknown1ByteQuantity: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyUnknown4ByteQuantity: Option<&'static CFString>;
}
extern "C" {
#[cfg(feature = "objc2-core-foundation")]
pub static kOBEXHeaderIDKeyUserDefined: Option<&'static CFString>;
}
#[cfg(feature = "objc2-core-foundation")]
#[inline]
pub unsafe extern "C-unwind" fn OBEXGetHeaders(
in_data: *const c_void,
in_data_size: usize,
) -> Option<CFRetained<CFDictionary>> {
extern "C-unwind" {
fn OBEXGetHeaders(
in_data: *const c_void,
in_data_size: usize,
) -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { OBEXGetHeaders(in_data, in_data_size) };
ret.map(|ret| unsafe { CFRetained::from_raw(ret) })
}
#[cfg(feature = "objc2-core-foundation")]
#[inline]
pub unsafe extern "C-unwind" fn OBEXHeadersToBytes(
dictionary_of_headers: Option<&CFDictionary>,
) -> Option<CFRetained<CFMutableData>> {
extern "C-unwind" {
fn OBEXHeadersToBytes(
dictionary_of_headers: Option<&CFDictionary>,
) -> Option<NonNull<CFMutableData>>;
}
let ret = unsafe { OBEXHeadersToBytes(dictionary_of_headers) };
ret.map(|ret| unsafe { CFRetained::retain(ret) })
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddNameHeader(
name: Option<&CFString>,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddDescriptionHeader(
description: Option<&CFString>,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddCountHeader(count: u32, dict_ref: Option<&CFMutableDictionary>) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddTime4ByteHeader(
time4_byte: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddLengthHeader(length: u32, dict_ref: Option<&CFMutableDictionary>) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddTypeHeader(
r#type: Option<&CFString>,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddTimeISOHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddTargetHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddHTTPHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
#[cfg(feature = "objc2-core-foundation")]
#[inline]
pub unsafe extern "C-unwind" fn OBEXAddBodyHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
is_end_of_body: bool,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError {
extern "C-unwind" {
fn OBEXAddBodyHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
is_end_of_body: Boolean,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
unsafe {
OBEXAddBodyHeader(
in_header_data,
in_header_data_length,
is_end_of_body as _,
dict_ref,
)
}
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddWhoHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddConnectionIDHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddApplicationParameterHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddByteSequenceHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddObjectClassHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddAuthorizationChallengeHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddAuthorizationResponseHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}
extern "C-unwind" {
#[cfg(feature = "objc2-core-foundation")]
pub fn OBEXAddUserDefinedHeader(
in_header_data: *const c_void,
in_header_data_length: u32,
dict_ref: Option<&CFMutableDictionary>,
) -> OBEXError;
}