bluetoothapis.h) (SDP_ELEMENT_DATA 结构

SDP_ELEMENT_DATA结构存储 SDP 元素数据。

语法

typedef struct _SDP_ELEMENT_DATA {
  SDP_TYPE         type;
  SDP_SPECIFICTYPE specificType;
  union {
    SDP_LARGE_INTEGER_16  int128;
    LONGLONG              int64;
    LONG                  int32;
    SHORT                 int16;
    CHAR                  int8;
    SDP_ULARGE_INTEGER_16 uint128;
    ULONGLONG             uint64;
    ULONG                 uint32;
    USHORT                uint16;
    UCHAR                 uint8;
    UCHAR                 booleanVal;
    GUID                  uuid128;
    ULONG                 uuid32;
    USHORT                uuid16;
    struct {
      LPBYTE value;
      ULONG  length;
    } string;
    struct {
      LPBYTE value;
      ULONG  length;
    } url;
    struct {
      LPBYTE value;
      ULONG  length;
    } sequence;
    struct {
      LPBYTE value;
      ULONG  length;
    } alternative;
  } data;
} SDP_ELEMENT_DATA, *PSDP_ELEMENT_DATA;

成员

type

SDP 元素类型的枚举。 泛型元素类型具有不同于SDP_ST_NONE 的 specificType 值。 泛型 SDP 元素类型如下:

  • SDP_TYPE_UINT
  • SDP_TYPE_INT
  • SDP_TYPE_UUID

以下元素类型没有相应的 specificType 值:

  • SDP_TYPE_STRING
  • SDP_TYPE_URL
  • SDP_TYPE_SEQUENCE
  • SDP_TYPE_ALTERNATIVE
  • SDP_TYPE_BOOLEAN
  • SDP_TYPE_NIL

没有与类型SDP_TYPE_NIL关联的数据值。

specificType

SDP 元素的特定类型,用于进一步指定泛型元素类型。

data

data.int128

类型的值等于 SDP_TYPE_INT,specificType 的值等于 SDP_ST_INT128。

data.int64

类型的值等于 SDP_TYPE_INT,specificType 的值等于 SDP_ST_INT64。

data.int32

类型的值等于 SDP_TYPE_INT,specificType 的值等于 SDP_ST_INT32。

data.int16

类型的值等于 SDP_TYPE_INT,specificType 的值等于 SDP_ST_INT16。

data.int8

类型的值等于 SDP_TYPE_INT,specificType 的值等于 SDP_ST_INT8。

data.uint128

类型的值等于 SDP_TYPE_UINT,specificType 的值等于 SDP_ST_UINT128。

data.uint64

类型的值等于 SDP_TYPE_UINT,specificType 的值等于SDP_ST_UINT64。

data.uint32

类型的值等于 SDP_TYPE_UINT,specificType 的值等于 SDP_ST_UINT32。

data.uint16

类型的值等于 SDP_TYPE_UINT,specificType 的值等于 SDP_ST_UINT16。

data.uint8

类型的值等于 SDP_TYPE_UINT,specificType 的值等于 SDP_ST_UINT8。

data.booleanVal

类型的值等于 SDP_TYPE_BOOLEAN。

data.uuid128

类型的值等于 SDP_TYPE_UUID,specificType 的值等于 SDP_ST_UUID128。

data.uuid32

类型的值等于 SDP_TYPE_UUID,specificType 的值等于 SDP_ST_UUID32。

data.uuid16

类型的值等于 SDP_TYPE_UUID,specificType 的值等于SDP_ST_UUID16。

data.string

data.string.value

类型的值等于 SDP_TYPE_STRING,即原始字符串缓冲区。 不能编码为 ANSI。 如果基本语言属性标识符列表描述了该值,请使用 BluetoothSdpGetString 函数转换该值。

data.string.length

字符串的原始长度。 不能以 null 结尾。

data.url

data.url.value

类型的值等于 SDP_TYPE_URL。

data.url.length

原始 URL 的长度。 不能以 null 结尾。

data.sequence

data.sequence.value

从序列元素标头开始的原始序列。 类型的值等于 SDP_TYPE_SEQUENCE。

data.sequence.length

原始序列的长度。 不能以 null 结尾。

data.alternative

data.alternative.value

原始替代项,从备用元素标头开始。 类型的值等于 SDP_TYPE_ALTERNATIVE。

data.alternative.length

原始替代项的长度。 不能以 null 结尾。

要求

要求
最低受支持的客户端 Windows Vista、Windows XP 和 SP2 [仅限桌面应用]
最低受支持的服务器 无受支持的版本
标头 bluetoothapis.h (包括 Bthsdpdef.h、BluetoothAPIs.h)

另请参阅

BluetoothSdpEnumAttributes

BluetoothSdpGetAttributeValue

BluetoothSdpGetContainerElementData

BluetoothSdpGetElementData

BluetoothSdpGetString

PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK