| 1 | #pragma once |
| 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 3 | |
| 4 | |
| 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
| 9 | #define ReleaseRssChannel(p) if (p) { RssFreeChannel(p); } |
| 10 | #define ReleaseNullRssChannel(p) if (p) { RssFreeChannel(p); p = NULL; } |
| 11 | |
| 12 | |
| 13 | struct RSS_UNKNOWN_ATTRIBUTE |
| 14 | { |
| 15 | LPWSTR wzNamespace; |
| 16 | LPWSTR wzAttribute; |
| 17 | LPWSTR wzValue; |
| 18 | |
| 19 | RSS_UNKNOWN_ATTRIBUTE* pNext; |
| 20 | }; |
| 21 | |
| 22 | struct RSS_UNKNOWN_ELEMENT |
| 23 | { |
| 24 | LPWSTR wzNamespace; |
| 25 | LPWSTR wzElement; |
| 26 | LPWSTR wzValue; |
| 27 | |
| 28 | RSS_UNKNOWN_ATTRIBUTE* pAttributes; |
| 29 | RSS_UNKNOWN_ELEMENT* pNext; |
| 30 | }; |
| 31 | |
| 32 | struct RSS_ITEM |
| 33 | { |
| 34 | LPWSTR wzTitle; |
| 35 | LPWSTR wzLink; |
| 36 | LPWSTR wzDescription; |
| 37 | |
| 38 | LPWSTR wzGuid; |
| 39 | FILETIME ftPublished; |
| 40 | |
| 41 | LPWSTR wzEnclosureUrl; |
| 42 | DWORD dwEnclosureSize; |
| 43 | LPWSTR wzEnclosureType; |
| 44 | |
| 45 | RSS_UNKNOWN_ELEMENT* pUnknownElements; |
| 46 | }; |
| 47 | |
| 48 | struct RSS_CHANNEL |
| 49 | { |
| 50 | LPWSTR wzTitle; |
| 51 | LPWSTR wzLink; |
| 52 | LPWSTR wzDescription; |
| 53 | DWORD dwTimeToLive; |
| 54 | |
| 55 | RSS_UNKNOWN_ELEMENT* pUnknownElements; |
| 56 | |
| 57 | DWORD cItems; |
| 58 | RSS_ITEM rgItems[1]; |
| 59 | }; |
| 60 | |
| 61 | HRESULT DAPI RssInitialize( |
| 62 | ); |
| 63 | |
| 64 | void DAPI RssUninitialize( |
| 65 | ); |
| 66 | |
| 67 | HRESULT DAPI RssParseFromString( |
| 68 | __in_z LPCWSTR wzRssString, |
| 69 | __out RSS_CHANNEL **ppChannel |
| 70 | ); |
| 71 | |
| 72 | HRESULT DAPI RssParseFromFile( |
| 73 | __in_z LPCWSTR wzRssFile, |
| 74 | __out RSS_CHANNEL **ppChannel |
| 75 | ); |
| 76 | |
| 77 | // Adding this until we have the updated specstrings.h |
| 78 | #ifndef __in_xcount |
| 79 | #define __in_xcount(size) |
| 80 | #endif |
| 81 | |
| 82 | void DAPI RssFreeChannel( |
| 83 | __in_xcount(pChannel->cItems) RSS_CHANNEL *pChannel |
| 84 | ); |
| 85 | |
| 86 | #ifdef __cplusplus |
| 87 | } |
| 88 | #endif |
| 89 |