1/*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23/* IOUnserialize.h created by rsulack on Mon 23-Nov-1998 */
24/* IOCFUnserialize.h creates CF collections Mon 30-Aug-1999 */
25
26#ifndef __IOKIT_IOCFUNSERIALIZE_H
27#define __IOKIT_IOCFUNSERIALIZE_H
28
29#include <CoreFoundation/CFBase.h>
30#include <CoreFoundation/CFString.h>
31
32#if defined(__cplusplus)
33extern "C" {
34#endif
35
36// on success IOCFUnserialize sets errorString to 0 and returns
37// the unserialized object.
38
39// on failure IOCFUnserialize sets errorString to a CFString object
40// containing a error message suitable for logging and returns 0
41
42CF_RETURNS_RETAINED
43CFTypeRef
44IOCFUnserialize(const char *buffer,
45                CFAllocatorRef allocator,
46                CFOptionFlags options,
47                CFStringRef *errorString);
48
49CF_RETURNS_RETAINED
50CFTypeRef
51IOCFUnserializeBinary(const char	* buffer,
52					  size_t          bufferSize,
53					  CFAllocatorRef  allocator,
54					  CFOptionFlags	  options,
55					  CFStringRef	* errorString);
56
57CF_RETURNS_RETAINED
58CFTypeRef
59IOCFUnserializeWithSize(const char	  * buffer,
60						size_t          bufferSize,
61						CFAllocatorRef	allocator,
62						CFOptionFlags	options,
63						CFStringRef	  * errorString);
64
65#if defined(__cplusplus)
66}
67#endif
68
69#endif /* __IOKIT_IOCFUNSERIALIZE_H */
70