Root/
Source at commit 1808 created 12 years 3 months ago. By blackosx, Revise layout of package installer 'Welcome' file so it looks cleaner. Change the copyright notice to begin from 2009 as seen in the Chameleon 2.0 r431 installer. Should this date be set earlier? | |
---|---|
1 | /*␊ |
2 | * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * Portions Copyright (c) 2003 Apple Computer, Inc. All Rights␊ |
7 | * Reserved. This file contains Original Code and/or Modifications of␊ |
8 | * Original Code as defined in and that are subject to the Apple Public␊ |
9 | * Source License Version 2.0 (the "License"). You may not use this file␊ |
10 | * except in compliance with the License. Please obtain a copy of the␊ |
11 | * License at http://www.apple.com/publicsource and read it before using␊ |
12 | * this file.␊ |
13 | * ␊ |
14 | * The Original Code and all software distributed under the License are␊ |
15 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
16 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
17 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
18 | * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the␊ |
19 | * License for the specific language governing rights and limitations␊ |
20 | * under the License.␊ |
21 | * ␊ |
22 | * @APPLE_LICENSE_HEADER_END@␊ |
23 | */␊ |
24 | ␊ |
25 | #ifndef __LIBSAIO_XML_H␊ |
26 | #define __LIBSAIO_XML_H␊ |
27 | ␊ |
28 | enum xmltype {␊ |
29 | kTagTypeNone = 0,␊ |
30 | kTagTypeDict,␊ |
31 | kTagTypeKey,␊ |
32 | kTagTypeString,␊ |
33 | kTagTypeInteger,␊ |
34 | kTagTypeData,␊ |
35 | kTagTypeDate,␊ |
36 | kTagTypeFalse,␊ |
37 | kTagTypeTrue,␊ |
38 | kTagTypeArray␊ |
39 | };␊ |
40 | ␊ |
41 | struct string_ref␊ |
42 | {␊ |
43 | ␉char* string;␊ |
44 | ␉int id;␊ |
45 | ␉struct string_ref* next;␊ |
46 | };␊ |
47 | typedef struct string_ref string_ref;␊ |
48 | ␊ |
49 | extern string_ref* ref_strings;␊ |
50 | ␊ |
51 | #define kXMLTagPList "plist "␊ |
52 | #define kXMLTagDict "dict"␊ |
53 | #define kXMLTagKey "key"␊ |
54 | #define kXMLTagString "string"␊ |
55 | #define kXMLTagInteger "integer"␊ |
56 | #define kXMLTagData "data"␊ |
57 | #define kXMLTagDate "date"␊ |
58 | #define kXMLTagFalse "false/"␊ |
59 | #define kXMLTagTrue "true/"␊ |
60 | #define kXMLTagArray "array"␊ |
61 | ␊ |
62 | #define kXMLStringID␉"ID="␊ |
63 | #define kXMLStringIDRef "IDREF="␊ |
64 | ␊ |
65 | #define kPropCFBundleIdentifier ("CFBundleIdentifier")␊ |
66 | #define kPropCFBundleExecutable ("CFBundleExecutable")␊ |
67 | #define kPropOSBundleRequired ("OSBundleRequired")␊ |
68 | #define kPropOSBundleLibraries ("OSBundleLibraries")␊ |
69 | #define kPropIOKitPersonalities ("IOKitPersonalities")␊ |
70 | #define kPropIONameMatch ("IONameMatch")␊ |
71 | ␊ |
72 | /*␊ |
73 | struct Tag {␊ |
74 | long type;␊ |
75 | char *string;␊ |
76 | struct Tag *tag;␊ |
77 | struct Tag *tagNext;␊ |
78 | };␊ |
79 | typedef struct Tag Tag, *TagPtr;␊ |
80 | */␊ |
81 | ␊ |
82 | extern long gImageFirstBootXAddr;␊ |
83 | extern long gImageLastKernelAddr;␊ |
84 | ␊ |
85 | TagPtr XMLGetProperty( TagPtr dict, const char * key );␊ |
86 | TagPtr XMLGetElement( TagPtr dict, int id );␊ |
87 | TagPtr XMLGetKey( TagPtr dict, int id );␊ |
88 | TagPtr XMLGetValueForKey(TagPtr key);␊ |
89 | ␊ |
90 | int XMLTagCount( TagPtr dict );␊ |
91 | ␊ |
92 | bool XMLIsType(TagPtr dict, enum xmltype type);␊ |
93 | ␊ |
94 | bool XMLCastBoolean( TagPtr dict );␊ |
95 | char* XMLCastString( TagPtr dict );␊ |
96 | long XMLCastStringOffset(TagPtr dict);␊ |
97 | int XMLCastInteger ( TagPtr dict );␊ |
98 | TagPtr XMLCastDict ( TagPtr dict );␊ |
99 | TagPtr XMLCastArray( TagPtr dict );␊ |
100 | ␊ |
101 | bool XMLIsBoolean(TagPtr entry);␊ |
102 | bool XMLIsString (TagPtr entry);␊ |
103 | bool XMLIsInteger(TagPtr entry);␊ |
104 | bool XMLIsDict (TagPtr entry);␊ |
105 | bool XMLIsArray (TagPtr entry);␊ |
106 | ␊ |
107 | ␊ |
108 | bool XMLAddTagToDictionary(TagPtr dict, char* key, TagPtr value);␊ |
109 | ␊ |
110 | long XMLParseNextTag(char *buffer, TagPtr *tag);␊ |
111 | void XMLFreeTag(TagPtr tag);␊ |
112 | char* XMLDecode(const char *in);␊ |
113 | //==========================================================================␊ |
114 | // XMLParseFile␊ |
115 | // Expects to see one dictionary in the XML file.␊ |
116 | // Puts the first dictionary it finds in the␊ |
117 | // tag pointer and returns 0, or returns -1 if not found.␊ |
118 | //␊ |
119 | long XMLParseFile( char * buffer, TagPtr * dict );␊ |
120 | ␊ |
121 | //==========================================================================␊ |
122 | // ParseTag*␊ |
123 | long ParseTagBoolean( char * buffer, TagPtr * tag, long type );␊ |
124 | ␊ |
125 | ␊ |
126 | #endif /* __LIBSAIO_XML_H */␊ |
127 |