diff dstep/corefoundation/CFXMLNode.d @ 11:07194b026fa4

Added bindings to a couple of frameworks, new license + some other things
author Jacob Carlborg <doob@me.com>
date Sat, 01 Aug 2009 15:03:28 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/corefoundation/CFXMLNode.d	Sat Aug 01 15:03:28 2009 +0200
@@ -0,0 +1,144 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Jul 12, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.corefoundation.CFXMLNode;
+
+import dstep.corefoundation.CFArray;
+import dstep.corefoundation.CFBase;
+import dstep.corefoundation.CFDictionary;
+import dstep.corefoundation.CFString;
+import dstep.corefoundation.CFTree;
+import dstep.corefoundation.CFURL;
+import dstep.objc.bridge.Bridge;
+import dstep.objc.objc : id;
+
+struct __CFXMLNode;
+alias __CFXMLNode* CFXMLNodeRef;
+alias CFTreeRef CFXMLTreeRef;
+alias int CFXMLNodeTypeCode;
+alias int CFXMLEntityTypeCode;
+
+enum
+{
+	kCFXMLNodeCurrentVersion = 1
+}
+
+enum
+{
+	kCFXMLNodeTypeDocument = 1,
+	kCFXMLNodeTypeElement = 2,
+	kCFXMLNodeTypeAttribute = 3,
+	kCFXMLNodeTypeProcessingInstruction = 4,
+	kCFXMLNodeTypeComment = 5,
+	kCFXMLNodeTypeText = 6,
+	kCFXMLNodeTypeCDATASection = 7,
+	kCFXMLNodeTypeDocumentFragment = 8,
+	kCFXMLNodeTypeEntity = 9,
+	kCFXMLNodeTypeEntityReference = 10,
+	kCFXMLNodeTypeDocumentType = 11,
+	kCFXMLNodeTypeWhitespace = 12,
+	kCFXMLNodeTypeNotation = 13,
+	kCFXMLNodeTypeElementTypeDeclaration = 14,
+	kCFXMLNodeTypeAttributeListDeclaration = 15
+}
+
+enum
+{
+	kCFXMLEntityTypeParameter,
+	kCFXMLEntityTypeParsedInternal,
+	kCFXMLEntityTypeParsedExternal,
+	kCFXMLEntityTypeUnparsed,
+	kCFXMLEntityTypeCharacter
+}
+
+struct CFXMLElementInfo
+{
+	CFDictionaryRef attributes;
+	CFArrayRef attributeOrder;
+	ubyte isEmpty;
+	char* _reserved;
+}
+
+
+struct CFXMLProcessingInstructionInfo
+{
+	CFStringRef dataString;
+}
+
+
+struct CFXMLDocumentInfo
+{
+	CFURLRef sourceURL;
+	uint encoding;
+}
+
+
+struct CFXMLExternalID
+{
+	CFURLRef systemID;
+	CFStringRef publicID;
+}
+
+
+struct CFXMLDocumentTypeInfo
+{
+	CFXMLExternalID externalID;
+}
+
+
+struct CFXMLNotationInfo
+{
+	CFXMLExternalID externalID;
+}
+
+
+struct CFXMLElementTypeDeclarationInfo
+{
+	CFStringRef contentDescription;
+}
+
+
+struct CFXMLAttributeDeclarationInfo
+{
+	CFStringRef attributeName;
+	CFStringRef typeString;
+	CFStringRef defaultString;
+}
+
+
+struct CFXMLAttributeListDeclarationInfo
+{
+	int numberOfAttributes;
+	CFXMLAttributeDeclarationInfo* attributes;
+}
+
+
+struct CFXMLEntityInfo
+{
+	int entityType;
+	CFStringRef replacementText;
+	CFXMLExternalID entityID;
+	CFStringRef notationName;
+}
+
+
+struct CFXMLEntityReferenceInfo
+{
+	int entityType;
+}
+
+extern (C)
+{
+	uint CFXMLNodeGetTypeID ();
+	CFXMLNodeRef CFXMLNodeCreate (CFAllocatorRef alloc, int xmlType, CFStringRef dataString, void* additionalInfoPtr, int version_);
+	CFXMLNodeRef CFXMLNodeCreateCopy (CFAllocatorRef alloc, CFXMLNodeRef origNode);
+	int CFXMLNodeGetTypeCode (CFXMLNodeRef node);
+	CFStringRef CFXMLNodeGetString (CFXMLNodeRef node);
+	void* CFXMLNodeGetInfoPtr (CFXMLNodeRef node);
+	int CFXMLNodeGetVersion (CFXMLNodeRef node);
+	CFXMLTreeRef CFXMLTreeCreateWithNode (CFAllocatorRef allocator, CFXMLNodeRef node);
+	CFXMLNodeRef CFXMLTreeGetNode (CFXMLTreeRef xmlTree);
+}
\ No newline at end of file