summaryrefslogtreecommitdiffstats
path: root/vendor/core-foundation-sys/src/propertylist.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-19 09:26:03 +0000
commit9918693037dce8aa4bb6f08741b6812923486c18 (patch)
tree21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/core-foundation-sys/src/propertylist.rs
parentReleasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff)
downloadrustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz
rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/core-foundation-sys/src/propertylist.rs')
-rw-r--r--vendor/core-foundation-sys/src/propertylist.rs102
1 files changed, 80 insertions, 22 deletions
diff --git a/vendor/core-foundation-sys/src/propertylist.rs b/vendor/core-foundation-sys/src/propertylist.rs
index 574c4d13f..d4ceb1b0c 100644
--- a/vendor/core-foundation-sys/src/propertylist.rs
+++ b/vendor/core-foundation-sys/src/propertylist.rs
@@ -7,9 +7,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use base::{CFAllocatorRef, CFIndex, CFOptionFlags, CFTypeRef};
-use data::CFDataRef;
-use error::CFErrorRef;
+use crate::base::{Boolean, CFAllocatorRef, CFIndex, CFOptionFlags, CFTypeRef};
+use crate::data::CFDataRef;
+use crate::error::CFErrorRef;
+use crate::stream::{CFReadStreamRef, CFWriteStreamRef};
+use crate::string::CFStringRef;
pub type CFPropertyListRef = CFTypeRef;
@@ -23,24 +25,80 @@ pub const kCFPropertyListImmutable: CFPropertyListMutabilityOptions = 0;
pub const kCFPropertyListMutableContainers: CFPropertyListMutabilityOptions = 1;
pub const kCFPropertyListMutableContainersAndLeaves: CFPropertyListMutabilityOptions = 2;
+/* Reading and Writing Error Codes */
+pub const kCFPropertyListReadCorruptError: CFIndex = 3840;
+pub const kCFPropertyListReadUnknownVersionError: CFIndex = 3841;
+pub const kCFPropertyListReadStreamError: CFIndex = 3842;
+pub const kCFPropertyListWriteStreamError: CFIndex = 3851;
+
extern "C" {
- // CFPropertyList.h
- //
-
- // fn CFPropertyListCreateDeepCopy
- // fn CFPropertyListIsValid
- pub fn CFPropertyListCreateWithData(allocator: CFAllocatorRef,
- data: CFDataRef,
- options: CFPropertyListMutabilityOptions,
- format: *mut CFPropertyListFormat,
- error: *mut CFErrorRef)
- -> CFPropertyListRef;
- // fn CFPropertyListCreateWithStream
- // fn CFPropertyListWrite
- pub fn CFPropertyListCreateData(allocator: CFAllocatorRef,
- propertyList: CFPropertyListRef,
- format: CFPropertyListFormat,
- options: CFOptionFlags,
- error: *mut CFErrorRef)
- -> CFDataRef;
+ /*
+ * CFPropertyList.h
+ */
+
+ /* Creating a Property List */
+ pub fn CFPropertyListCreateWithData(
+ allocator: CFAllocatorRef,
+ data: CFDataRef,
+ options: CFPropertyListMutabilityOptions,
+ format: *mut CFPropertyListFormat,
+ error: *mut CFErrorRef,
+ ) -> CFPropertyListRef;
+ pub fn CFPropertyListCreateWithStream(
+ allocator: CFAllocatorRef,
+ stream: CFReadStreamRef,
+ streamLength: CFIndex,
+ options: CFOptionFlags,
+ format: *mut CFPropertyListFormat,
+ error: *mut CFErrorRef,
+ ) -> CFPropertyListRef;
+ pub fn CFPropertyListCreateDeepCopy(
+ allocator: CFAllocatorRef,
+ propertyList: CFPropertyListRef,
+ mutabilityOption: CFOptionFlags,
+ ) -> CFPropertyListRef;
+ pub fn CFPropertyListCreateFromXMLData(
+ allocator: CFAllocatorRef,
+ xmlData: CFDataRef,
+ mutabilityOption: CFOptionFlags,
+ errorString: *mut CFStringRef,
+ ) -> CFPropertyListRef; // deprecated
+ pub fn CFPropertyListCreateFromStream(
+ allocator: CFAllocatorRef,
+ stream: CFReadStreamRef,
+ streamLength: CFIndex,
+ mutabilityOption: CFOptionFlags,
+ format: *mut CFPropertyListFormat,
+ errorString: *mut CFStringRef,
+ ) -> CFPropertyListRef; // deprecated
+
+ /* Exporting a Property List */
+ pub fn CFPropertyListCreateData(
+ allocator: CFAllocatorRef,
+ propertyList: CFPropertyListRef,
+ format: CFPropertyListFormat,
+ options: CFOptionFlags,
+ error: *mut CFErrorRef,
+ ) -> CFDataRef;
+ pub fn CFPropertyListWrite(
+ propertyList: CFPropertyListRef,
+ stream: CFWriteStreamRef,
+ format: CFPropertyListFormat,
+ options: CFOptionFlags,
+ error: *mut CFErrorRef,
+ ) -> CFIndex;
+ pub fn CFPropertyListCreateXMLData(
+ allocator: CFAllocatorRef,
+ propertyList: CFPropertyListRef,
+ ) -> CFDataRef; // deprecated
+ pub fn CFPropertyListWriteToStream(
+ propertyList: CFPropertyListRef,
+ stream: CFWriteStreamRef,
+ format: CFPropertyListFormat,
+ errorString: *mut CFStringRef,
+ ) -> CFIndex;
+
+ /* Validating a Property List */
+ pub fn CFPropertyListIsValid(plist: CFPropertyListRef, format: CFPropertyListFormat)
+ -> Boolean;
}