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.

105 lines
2.2 KiB

  1. #ifndef _SDPNODE_H__
  2. #define _SDPNODE_H__
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. typedef UCHAR SDP_BOOLEAN;
  7. typedef struct ISdpNodeContainer ISdpNodeContainer;
  8. typedef struct _SDP_NODE_HEADER {
  9. LIST_ENTRY Link;
  10. USHORT Type;
  11. USHORT SpecificType;
  12. } SDP_NODE_HEADER, *PSDP_NODE_HEADER;
  13. typedef union _SDP_NODE_DATA {
  14. // the nil type contains no data, so no storage is necessary
  15. // 16 byte integers
  16. //
  17. // ISSUE is there a better way to represent a 16 byte int???
  18. //
  19. SDP_LARGE_INTEGER_16 int128;
  20. SDP_ULARGE_INTEGER_16 uint128;
  21. // UUID
  22. GUID uuid128;
  23. ULONG uuid32;
  24. USHORT uuid16;
  25. // 8 byte integers
  26. LONGLONG int64;
  27. ULONGLONG uint64;
  28. // 4 byte integers
  29. LONG int32;
  30. ULONG uint32;
  31. // 2 byte integers
  32. SHORT int16;
  33. USHORT uint16;
  34. // 1 bytes integers
  35. CHAR int8;
  36. UCHAR uint8;
  37. // Boolean
  38. SDP_BOOLEAN boolean;
  39. // string
  40. PCHAR string;
  41. // URL
  42. PCHAR url;
  43. // Sequence
  44. SDP_NODE_HEADER sequence;
  45. // Alt list
  46. SDP_NODE_HEADER alternative;
  47. ISdpNodeContainer *container;
  48. struct {
  49. PUCHAR stream;
  50. ULONG streamLength;
  51. };
  52. } SDP_NODE_DATA, *PSDP_NODE_DATA;
  53. typedef struct _SDP_NODE {
  54. SDP_NODE_HEADER hdr;
  55. ULONG DataSize;
  56. SDP_NODE_DATA u;
  57. PVOID Reserved;
  58. } SDP_NODE, *PSDP_NODE;
  59. typedef struct _SDP_TREE_ROOT_NODE {
  60. SDP_NODE RootNode;
  61. } SDP_TREE_ROOT_NODE, *PSDP_TREE_ROOT_NODE;
  62. #define SdpNode_GetType(pNode) ((pNode)->hdr.Type)
  63. #define SdpNode_GetSpecificType(pNode) ((pNode)->hdr.SpecificType)
  64. #define ListEntryToSdpNode(pListEntry) CONTAINING_RECORD((pListEntry), SDP_NODE, hdr.Link)
  65. #define SdpNode_GetNextEntry(pNode) ((pNode)->hdr.Link.Flink)
  66. #define SdpNode_GetPrevEntry(pNode) ((pNode)->hdr.Link.Blink)
  67. #define SdpNode_SequenceGetListHead(pNode) (&(pNode)->u.sequence.Link)
  68. #define SdpNode_SequenceGetFirstNode(pNode) ((pNode)->u.sequence.Link.Flink)
  69. #define SdpNode_AlternativeGetListHead(pNode) (&(pNode)->u.alternative.Link)
  70. #define SdpNode_AlternativeGetFirstNode(pNode) ((pNode)->u.alternative.Link.Flink)
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif // _SDPNODE_H__