avrcp.c (c783120492cd0cfc0834300b156fe1acdc4803c9) avrcp.c (615299a8c484342eb99a854562a3b6535a360eec)
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 53 unchanged lines hidden (view full) ---

62 uint16_t browsing_l2cap_psm;
63 uint16_t browsing_version;
64 uint16_t cover_art_l2cap_psm;
65} avrcp_sdp_query_context_t;
66
67static void avrcp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
68static void avrcp_start_next_sdp_query(void);
69
1/*
2 * Copyright (C) 2016 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 53 unchanged lines hidden (view full) ---

62 uint16_t browsing_l2cap_psm;
63 uint16_t browsing_version;
64 uint16_t cover_art_l2cap_psm;
65} avrcp_sdp_query_context_t;
66
67static void avrcp_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size);
68static void avrcp_start_next_sdp_query(void);
69
70static const char * avrcp_default_controller_service_name = "BTstack AVRCP Controller Service";
71static const char * avrcp_default_controller_service_provider_name = "BTstack AVRCP Controller Service Provider";
72static const char * avrcp_defaul_target_service_name = "BTstack AVRCP Target Service";
73static const char * avrcp_default_target_service_provider_name = "BTstack AVRCP Target Service Provider";
70static const char * avrcp_default_controller_service_name = "AVRCP Controller";
71static const char * avrcp_default_controller_service_provider_name = "BlueKitchen";
72static const char * avrcp_default_target_service_name = "AVRCP Target";
73static const char * avrcp_default_target_service_provider_name = "BlueKitchen";
74
75static const char * avrcp_subunit_type_name[] = {
76 "MONITOR", "AUDIO", "PRINTER", "DISC", "TAPE_RECORDER_PLAYER", "TUNER",
77 "CA", "CAMERA", "RESERVED", "PANEL", "BULLETIN_BOARD", "CAMERA_STORAGE",
78 "VENDOR_UNIQUE", "RESERVED_FOR_ALL_SUBUNIT_TYPES",
79 "EXTENDED_TO_NEXT_BYTE", "UNIT", "ERROR"
80};
81

--- 261 unchanged lines hidden (view full) ---

343 // 0x0100 "Service Name"
344 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0100);
345 if (service_name){
346 de_add_data(service, DE_STRING, (uint16_t) strlen(service_name), (uint8_t *) service_name);
347 } else {
348 if (controller){
349 de_add_data(service, DE_STRING, (uint16_t) strlen(avrcp_default_controller_service_name), (uint8_t *) avrcp_default_controller_service_name);
350 } else {
74
75static const char * avrcp_subunit_type_name[] = {
76 "MONITOR", "AUDIO", "PRINTER", "DISC", "TAPE_RECORDER_PLAYER", "TUNER",
77 "CA", "CAMERA", "RESERVED", "PANEL", "BULLETIN_BOARD", "CAMERA_STORAGE",
78 "VENDOR_UNIQUE", "RESERVED_FOR_ALL_SUBUNIT_TYPES",
79 "EXTENDED_TO_NEXT_BYTE", "UNIT", "ERROR"
80};
81

--- 261 unchanged lines hidden (view full) ---

343 // 0x0100 "Service Name"
344 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0100);
345 if (service_name){
346 de_add_data(service, DE_STRING, (uint16_t) strlen(service_name), (uint8_t *) service_name);
347 } else {
348 if (controller){
349 de_add_data(service, DE_STRING, (uint16_t) strlen(avrcp_default_controller_service_name), (uint8_t *) avrcp_default_controller_service_name);
350 } else {
351 de_add_data(service, DE_STRING, (uint16_t) strlen(avrcp_defaul_target_service_name), (uint8_t *) avrcp_defaul_target_service_name);
351 de_add_data(service, DE_STRING, (uint16_t) strlen(avrcp_default_target_service_name), (uint8_t *) avrcp_default_target_service_name);
352 }
353 }
354
355 // 0x0100 "Provider Name"
356 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0102);
357 if (service_provider_name){
358 de_add_data(service, DE_STRING, (uint16_t) strlen(service_provider_name), (uint8_t *) service_provider_name);
359 } else {

--- 941 unchanged lines hidden ---
352 }
353 }
354
355 // 0x0100 "Provider Name"
356 de_add_number(service, DE_UINT, DE_SIZE_16, 0x0102);
357 if (service_provider_name){
358 de_add_data(service, DE_STRING, (uint16_t) strlen(service_provider_name), (uint8_t *) service_provider_name);
359 } else {

--- 941 unchanged lines hidden ---