[1166] | 1 | /**
|
---|
| 2 | * This file is part of the mingw-w64 runtime package.
|
---|
| 3 | * No warranty is given; refer to the file DISCLAIMER within this package.
|
---|
| 4 | */
|
---|
| 5 |
|
---|
| 6 | cpp_quote("#include <winapifamily.h>")
|
---|
| 7 | cpp_quote("")
|
---|
| 8 | cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
|
---|
| 9 |
|
---|
| 10 | import "oaidl.idl";
|
---|
| 11 | import "ocidl.idl";
|
---|
| 12 |
|
---|
| 13 | cpp_quote("")
|
---|
| 14 | interface IWSDXMLContext;
|
---|
| 15 |
|
---|
| 16 | enum {
|
---|
| 17 | OpNone,
|
---|
| 18 | OpEndOfTable,
|
---|
| 19 | OpBeginElement_,
|
---|
| 20 | OpBeginAnyElement,
|
---|
| 21 | OpEndElement,
|
---|
| 22 | OpElement_,
|
---|
| 23 | OpAnyElement,
|
---|
| 24 | OpAnyElements,
|
---|
| 25 | OpAnyText,
|
---|
| 26 | OpAttribute_,
|
---|
| 27 | OpBeginChoice,
|
---|
| 28 | OpEndChoice,
|
---|
| 29 | OpBeginSequence,
|
---|
| 30 | OpEndSequence,
|
---|
| 31 | OpBeginAll,
|
---|
| 32 | OpEndAll,
|
---|
| 33 | OpAnything,
|
---|
| 34 | OpAnyNumber,
|
---|
| 35 | OpOneOrMore,
|
---|
| 36 | OpOptional,
|
---|
| 37 | OpFormatBool_,
|
---|
| 38 | OpFormatInt8_,
|
---|
| 39 | OpFormatInt16_,
|
---|
| 40 | OpFormatInt32_,
|
---|
| 41 | OpFormatInt64_,
|
---|
| 42 | OpFormatUInt8_,
|
---|
| 43 | OpFormatUInt16_,
|
---|
| 44 | OpFormatUInt32_,
|
---|
| 45 | OpFormatUInt64_,
|
---|
| 46 | OpFormatUnicodeString_,
|
---|
| 47 | OpFormatDom_,
|
---|
| 48 | OpFormatStruct_,
|
---|
| 49 | OpFormatUri_,
|
---|
| 50 | OpFormatUuidUri_,
|
---|
| 51 | OpFormatName_,
|
---|
| 52 | OpFormatListInsertTail_,
|
---|
| 53 | OpFormatType_,
|
---|
| 54 | OpFormatDynamicType_,
|
---|
| 55 | OpFormatLookupType_,
|
---|
| 56 | OpFormatDuration_,
|
---|
| 57 | OpFormatDateTime_,
|
---|
| 58 | OpFormatFloat_,
|
---|
| 59 | OpFormatDouble_,
|
---|
| 60 | OpProcess_,
|
---|
| 61 | OpQualifiedAttribute_,
|
---|
| 62 | OpFormatXMLDeclaration_,
|
---|
| 63 | OpFormatMax
|
---|
| 64 | };
|
---|
| 65 |
|
---|
| 66 | typedef struct _WSDXML_NAMESPACE WSDXML_NAMESPACE;
|
---|
| 67 | typedef const WSDXML_NAMESPACE *PCWSDXML_NAMESPACE;
|
---|
| 68 | typedef struct _WSDXML_NAME WSDXML_NAME;
|
---|
| 69 | typedef struct _WSDXML_TYPE WSDXML_TYPE;
|
---|
| 70 | typedef const WSDXML_TYPE *PCWSDXML_TYPE;
|
---|
| 71 | typedef struct _WSDXML_PREFIX_MAPPING WSDXML_PREFIX_MAPPING;
|
---|
| 72 | typedef struct _WSDXML_ATTRIBUTE WSDXML_ATTRIBUTE;
|
---|
| 73 | typedef struct _WSDXML_NODE WSDXML_NODE;
|
---|
| 74 | typedef struct _WSDXML_ELEMENT WSDXML_ELEMENT;
|
---|
| 75 | typedef struct _WSDXML_TEXT WSDXML_TEXT;
|
---|
| 76 | typedef struct _WSDXML_ELEMENT_LIST WSDXML_ELEMENT_LIST;
|
---|
| 77 |
|
---|
| 78 | typedef struct _WSD_DATETIME {
|
---|
| 79 | BOOL isPositive;
|
---|
| 80 | ULONG year;
|
---|
| 81 | UCHAR month;
|
---|
| 82 | UCHAR day;
|
---|
| 83 | UCHAR hour;
|
---|
| 84 | UCHAR minute;
|
---|
| 85 | UCHAR second;
|
---|
| 86 | UINT millisecond;
|
---|
| 87 | BOOL TZIsLocal;
|
---|
| 88 | BOOL TZIsPositive;
|
---|
| 89 | UCHAR TZHour;
|
---|
| 90 | UCHAR TZMinute;
|
---|
| 91 | } WSD_DATETIME;
|
---|
| 92 |
|
---|
| 93 | typedef struct _WSD_DURATION {
|
---|
| 94 | BOOL isPositive;
|
---|
| 95 | ULONG year;
|
---|
| 96 | ULONG month;
|
---|
| 97 | ULONG day;
|
---|
| 98 | ULONG hour;
|
---|
| 99 | ULONG minute;
|
---|
| 100 | ULONG second;
|
---|
| 101 | ULONG millisecond;
|
---|
| 102 | } WSD_DURATION;
|
---|
| 103 |
|
---|
| 104 | cpp_quote("")
|
---|
| 105 | cpp_quote("#define WSDXML_TYPE_ENCODING(tidx,lno) ((((DWORD) lno) << 28) | tidx)")
|
---|
| 106 | cpp_quote("#define WSDXML_NAMESPACE_ENCODING(nsidx, lno) ((((WORD) lno) << 12) | nsidx)")
|
---|
| 107 | cpp_quote("#define WSDXML_NAME_ENCODING(nidx, nsenc) ((((DWORD) nsenc) << 16) | nidx)")
|
---|
| 108 | cpp_quote("")
|
---|
| 109 | cpp_quote("#define OFFSET(type,field) ((DWORD_PTR) (&((type *)0)->field))")
|
---|
| 110 | cpp_quote("#define BYTE0(n) (BYTE) (((DWORD) n) & 0xff)")
|
---|
| 111 | cpp_quote("#define BYTE1(n) (BYTE) ((((DWORD) n) >> 8) & 0xff)")
|
---|
| 112 | cpp_quote("#define BYTE2(n) (BYTE) ((((DWORD) n) >> 16) & 0xff)")
|
---|
| 113 | cpp_quote("#define BYTE3(n) (BYTE)((((DWORD) n) >> 24) & 0xff)")
|
---|
| 114 | cpp_quote("#define BYTES(n) BYTE0(n), BYTE1(n), BYTE2(n), BYTE3(n)")
|
---|
| 115 | cpp_quote("")
|
---|
| 116 | cpp_quote("#define OpAttribute(name) OpAttribute_, BYTES(name)")
|
---|
| 117 | cpp_quote("#define OpBeginElement(name) OpBeginElement_, BYTES(name)")
|
---|
| 118 | cpp_quote("#define OpElement(name) OpElement_, BYTES(name)")
|
---|
| 119 | cpp_quote("#define OpFormatBool(type,field,isptr) OpFormatBool_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 120 | cpp_quote("#define OpFormatDateTime(type,field) OpFormatDateTime_, BYTES(OFFSET(type,field))")
|
---|
| 121 | cpp_quote("#define OpFormatDom(type,field) OpFormatDom_, BYTES(OFFSET(type,field))")
|
---|
| 122 | cpp_quote("#define OpFormatDouble(type,field,isptr) OpFormatDouble_, BYTES(isptr),BYTES(OFFSET(type,field))")
|
---|
| 123 | cpp_quote("#define OpFormatDuration(type,field) OpFormatDuration_, BYTES(OFFSET(type,field))")
|
---|
| 124 | cpp_quote("#define OpFormatDynamicType(name,type,field) OpFormatDynamicType_, BYTES(name),BYTES(OFFSET(type,field))")
|
---|
| 125 | cpp_quote("#define OpFormatFloat(type,field,isptr) OpFormatFloat_, BYTES(isptr),BYTES(OFFSET(type,field))")
|
---|
| 126 | cpp_quote("#define OpFormatInt8(type,field,isptr) OpFormatInt8_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 127 | cpp_quote("#define OpFormatInt16(type,field,isptr) OpFormatInt16_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 128 | cpp_quote("#define OpFormatInt32(type,field,isptr) OpFormatInt32_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 129 | cpp_quote("#define OpFormatInt64(type,field,isptr) OpFormatInt64_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 130 | cpp_quote("#define OpFormatListInsertTail(s,type,field) OpFormatListInsertTail_,BYTES(sizeof(s)),BYTES(OFFSET(type,field))")
|
---|
| 131 | cpp_quote("#define OpFormatLookupType(uriField,type,field) OpFormatLookupType_, BYTES(OFFSET(type,uriField)),BYTES(OFFSET(type,field))")
|
---|
| 132 | cpp_quote("#define OpFormatName(type,field) OpFormatName_, BYTES(OFFSET(type,field))")
|
---|
| 133 | cpp_quote("#define OpFormatPointerToStruct(sType) OpFormatStruct_, BYTES(sizeof(sType)),BYTES(0)")
|
---|
| 134 | cpp_quote("#define OpFormatStruct(sType,type,field) OpFormatStruct_, BYTES(sizeof(sType)),BYTES(OFFSET(type,field))")
|
---|
| 135 | cpp_quote("#define OpFormatType(table,type,field) OpFormatType_, BYTES(table),BYTES(OFFSET(type,field))")
|
---|
| 136 | cpp_quote("#define OpFormatUInt8(type,field,isptr) OpFormatUInt8_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 137 | cpp_quote("#define OpFormatUInt16(type,field,isptr) OpFormatUInt16_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 138 | cpp_quote("#define OpFormatUInt32(type,field,isptr) OpFormatUInt32_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 139 | cpp_quote("#define OpFormatUInt64(type,field,isptr) OpFormatUInt64_, BYTES(isptr), BYTES(OFFSET(type,field))")
|
---|
| 140 | cpp_quote("#define OpFormatUnicodeString(type,field) OpFormatUnicodeString_, BYTES(OFFSET(type,field))")
|
---|
| 141 | cpp_quote("#define OpFormatUri(type,field) OpFormatUri_, BYTES(OFFSET(type,field))")
|
---|
| 142 | cpp_quote("#define OpFormatUuidUri(type,field,isptr) OpFormatUuidUri_, BYTES(isptr),BYTES(OFFSET(type,field))")
|
---|
| 143 | cpp_quote("#define OpFormatXMLDeclaration(type,field) OpFormatXMLDeclaration_, BYTES(OFFSET(type,field))")
|
---|
| 144 | cpp_quote("#define OpProcess(type,field) OpProcess_, BYTES(OFFSET(type,field))")
|
---|
| 145 | cpp_quote("#define OpQualifiedAttribute(name) OpQualifiedAttribute_, BYTES(name)")
|
---|
| 146 |
|
---|
| 147 | [object, local, restricted, uuid (75d8f3ee-3e5a-43b4-a15a-bcf6887460c0), pointer_default (unique)]
|
---|
| 148 | interface IWSDXMLContext : IUnknown {
|
---|
| 149 | HRESULT AddNamespace ([in] LPCWSTR pszUri,[in] LPCWSTR pszSuggestedPrefix,[out] WSDXML_NAMESPACE **ppNamespace);
|
---|
| 150 | HRESULT AddNameToNamespace ([in] LPCWSTR pszUri,[in] LPCWSTR pszName,[out] WSDXML_NAME **ppName);
|
---|
| 151 | HRESULT SetNamespaces ([in, size_is (wNamespacesCount)] const PCWSDXML_NAMESPACE *pNamespaces,[in] WORD wNamespacesCount,[in] BYTE bLayerNumber);
|
---|
| 152 | HRESULT SetTypes ([in, size_is (dwTypesCount)] const PCWSDXML_TYPE *pTypes,[in] DWORD dwTypesCount,[in] BYTE bLayerNumber);
|
---|
| 153 | };
|
---|
| 154 |
|
---|
| 155 | cpp_quote("HRESULT WINAPI WSDXMLGetNameFromBuiltinNamespace(LPCWSTR pszNamespace, LPCWSTR pszName, WSDXML_NAME **ppName);")
|
---|
| 156 | cpp_quote("HRESULT WINAPI WSDXMLCreateContext(IWSDXMLContext **ppContext);")
|
---|
| 157 |
|
---|
| 158 | cpp_quote("#endif")
|
---|