fn make_profile_service_definition() -> ServiceDefinition {
    ServiceDefinition {
        service_class_uuids: vec![String::from("110B")], // Audio Sink UUID
        protocol_descriptors: vec![
            ProtocolDescriptor {
                protocol: ProtocolIdentifier::L2Cap,
                params: vec![DataElement {
                    type_: DataElementType::UnsignedInteger,
                    size: 2,
                    data: DataElementData::Integer(PSM_AVDTP),
                }],
            },
            ProtocolDescriptor {
                protocol: ProtocolIdentifier::Avdtp,
                params: vec![DataElement {
                    type_: DataElementType::UnsignedInteger,
                    size: 2,
                    data: DataElementData::Integer(0x0103), // Indicate v1.3
                }],
            },
        ],
        profile_descriptors: vec![ProfileDescriptor {
            profile_id: ServiceClassProfileIdentifier::AdvancedAudioDistribution,
            major_version: 1,
            minor_version: 3,
        }],
        additional_protocol_descriptors: None,
        information: vec![Information {
            language: "en".to_string(),
            name: Some("A2DP".to_string()),
            description: Some("Advanced Audio Distribution Profile".to_string()),
            provider: Some("Fuchsia".to_string()),
        }],
        additional_attributes: None,
    }
}
/// Make the SDP definition for the A2DP sink service.
Make the SDP definition for the A2DP sink service.
Make the SDP definition for the A2DP sink service .
fn make_profile_service_definition() -> ServiceDefinition {
    ServiceDefinition {
        service_class_uuids: vec![String::from("110B")], // Audio Sink UUID
        protocol_descriptors: vec![
            ProtocolDescriptor {
                protocol: ProtocolIdentifier::L2Cap,
                params: vec![DataElement {
                    type_: DataElementType::UnsignedInteger,
                    size: 2,
                    data: DataElementData::Integer(PSM_AVDTP),
                }],
            },
            ProtocolDescriptor {
                protocol: ProtocolIdentifier::Avdtp,
                params: vec![DataElement {
                    type_: DataElementType::UnsignedInteger,
                    size: 2,
                    data: DataElementData::Integer(0x0103), // Indicate v1.3
                }],
            },
        ],
        profile_descriptors: vec![ProfileDescriptor {
            profile_id: ServiceClassProfileIdentifier::AdvancedAudioDistribution,
            major_version: 1,
            minor_version: 3,
        }],
        additional_protocol_descriptors: None,
        information: vec![Information {
            language: "en".to_string(),
            name: Some("A2DP".to_string()),
            description: Some("Advanced Audio Distribution Profile".to_string()),
            provider: Some("Fuchsia".to_string()),
        }],
        additional_attributes: None,
    }
}
fn make_profile_service_definition ( ) -> ServiceDefinition { ServiceDefinition { service_class_uuids : vec ! [ String from ( " " ) ] , // Audio Sink UUID protocol_descriptors : vec ! [ ProtocolDescriptor { protocol ProtocolIdentifier L2Cap params vec [ DataElement { type_ DataElementType UnsignedInteger size 2 data DataElementData Integer ( PSM_AVDTP ) } ] } ProtocolDescriptor { protocol ProtocolIdentifier Avdtp params vec [ DataElement { type_ DataElementType UnsignedInteger size 2 data DataElementData Integer ( 0x0103 ) // Indicate v1.3 } ] } ] , profile_descriptors : vec ! [ ProfileDescriptor { profile_id ServiceClassProfileIdentifier AdvancedAudioDistribution major_version 1 minor_version 3 } ] , additional_protocol_descriptors : None , information : vec ! [ Information { language " " to_string ( ) name Some ( " " to_string ( ) ) description Some ( " " to_string ( ) ) provider Some ( " " to_string ( ) ) } ] , additional_attributes : None , } }
Make the SDP definition for the A2DP sink service.
Make the SDP definition for the A2DP sink service .