Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
3.5 KiB

  1. //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
  2. //
  3. // cdfidl.h
  4. //
  5. // The definition of cdf idlist structures and helper functions.
  6. //
  7. // History:
  8. //
  9. // 3/19/97 edwardp Created.
  10. //
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Check for previous includes of this file.
  14. //
  15. #ifndef _CDFIDL_H_
  16. #define _CDFIDL_H_
  17. //
  18. // CDFITEMID_VERSION is used to corerectly read back persisted id lists
  19. // CDFITEMID_ID is used to identify id lists as cdf id lists.
  20. //
  21. #define CDFITEMID_VERSION 0x00
  22. #define CDFITEMID_ID 0xed071264
  23. //
  24. // Index values for "special" cdf nodes.
  25. //
  26. #define INDEX_CHANNEL_LINK -1
  27. //
  28. // Types of cdf item id lists. Note: These valuse are cast as bytes to save
  29. // space in the item id.
  30. //
  31. typedef enum _tagCDFITEMTYPE {
  32. CDF_Folder = 0x01,
  33. CDF_FolderLink = 0x02,
  34. CDF_Link = 0x03
  35. } CDFITEMTYPE;
  36. //
  37. // The structure of a cdf item id. The szName parameter is a placeholder
  38. // for a variable length name string followed by zero or more additional
  39. // variable length strings.
  40. //
  41. #pragma pack(1)
  42. typedef struct _tagCDFITEMID
  43. {
  44. USHORT cb;
  45. BYTE wVersion;
  46. BYTE cdfItemType;
  47. DWORD dwId;
  48. LONG nIndex;
  49. TCHAR szName[1];
  50. } CDFITEMID;
  51. #pragma pack()
  52. typedef UNALIGNED CDFITEMID *PCDFITEMID;
  53. typedef struct _tagCDFITEMIDLIST
  54. {
  55. CDFITEMID mkid;
  56. } CDFITEMIDLIST;
  57. typedef UNALIGNED CDFITEMIDLIST *PCDFITEMIDLIST;
  58. //
  59. // Cdf item data. Structure containing the unique elements of a cdf item id.
  60. // Its used to create cdf item ids.
  61. //
  62. typedef struct _tagCDFITEM
  63. {
  64. LONG nIndex;
  65. CDFITEMTYPE cdfItemType;
  66. BSTR bstrName;
  67. BSTR bstrURL;
  68. } CDFITEM, *PCDFITEM;
  69. //
  70. // Cdf id list function prototypes.
  71. //
  72. PCDFITEMIDLIST CDFIDL_Create(PCDFITEM pCdfItem);
  73. PCDFITEMIDLIST CDFIDL_CreateFromXMLElement(IXMLElement* pIXMLElement,
  74. ULONG nIndex);
  75. PCDFITEMIDLIST CDFIDL_CreateFolderPidl(PCDFITEMIDLIST pcdfidl);
  76. BOOL CDFIDL_IsUnreadURL(LPTSTR szUrl);
  77. void CDFIDL_Free(PCDFITEMIDLIST pcdfidl);
  78. HRESULT CDFIDL_GetDisplayName(PCDFITEMIDLIST pcdfidl, LPSTRRET pName);
  79. LPTSTR CDFIDL_GetName(PCDFITEMIDLIST pcdfidl);
  80. LPTSTR CDFIDL_GetNameId(PCDFITEMID pcdfid);
  81. LPTSTR CDFIDL_GetURL(PCDFITEMIDLIST pcdfidl);
  82. LPTSTR CDFIDL_GetURLId(PCDFITEMID pcdfid);
  83. ULONG CDFIDL_GetIndex(PCDFITEMIDLIST pcdfidl);
  84. ULONG CDFIDL_GetIndexId(PCDFITEMID pcdfid);
  85. BOOL CDFIDL_IsCachedURL(LPWSTR wszUrl);
  86. ULONG CDFIDL_GetAttributes(IXMLElementCollection* pIXMLElementCollection,
  87. PCDFITEMIDLIST pcdfidl, ULONG fAttributesFilter);
  88. SHORT CDFIDL_Compare(PCDFITEMIDLIST pcdfidl1, PCDFITEMIDLIST pcdfidl2);
  89. SHORT CDFIDL_CompareId(PCDFITEMID pcdfid1, PCDFITEMID pcdfid2);
  90. BOOL CDFIDL_IsValid(PCDFITEMIDLIST pcdfidl);
  91. BOOL CDFIDL_IsValidId(PCDFITEMID pcdfid);
  92. BOOL CDFIDL_IsValidSize(PCDFITEMID pcdfid);
  93. BOOL CDFIDL_IsValidType(PCDFITEMID pcdfid);
  94. BOOL CDFIDL_IsValidIndex(PCDFITEMID pcdfitemid);
  95. BOOL CDFIDL_IsValidStrings(PCDFITEMID pcdfitemid);
  96. BOOL CDFIDL_IsFolder(PCDFITEMIDLIST pcdfidl);
  97. BOOL CDFIDL_IsFolderId(PCDFITEMID pcdfid);
  98. HRESULT CDFIDL_NonCdfGetDisplayName(LPCITEMIDLIST pidl, LPSTRRET pName);
  99. #ifdef ALIGNMENT_MACHINE
  100. #define ALIGN4(sz) (((sz)+3)&~3)
  101. #endif /* UNIX */
  102. #endif // _CDFIDL_H_