avdtp_sink.c (5bd73fa2fdd6d815c072dd6f6bf7b304363c7568) avdtp_sink.c (78315a58573f370dd679856042aa32fba14bc84a)
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

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

115 return;
116 }
117 avdtp_sink_context = avdtp_context;
118 avdtp_sink_context->stream_endpoints = NULL;
119 avdtp_sink_context->connections = NULL;
120 avdtp_sink_context->stream_endpoints_id_counter = 0;
121 avdtp_sink_context->packet_handler = packet_handler;
122
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

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

115 return;
116 }
117 avdtp_sink_context = avdtp_context;
118 avdtp_sink_context->stream_endpoints = NULL;
119 avdtp_sink_context->connections = NULL;
120 avdtp_sink_context->stream_endpoints_id_counter = 0;
121 avdtp_sink_context->packet_handler = packet_handler;
122
123 l2cap_register_service(&packet_handler, BLUETOOTH_PSM_AVDTP, 0xffff, LEVEL_2);
123 l2cap_register_service(&packet_handler, BLUETOOTH_PSM_AVDTP, 0xffff, gap_get_security_level());
124}
125
126avdtp_stream_endpoint_t * avdtp_sink_create_stream_endpoint(avdtp_sep_type_t sep_type, avdtp_media_type_t media_type){
127 return avdtp_create_stream_endpoint(sep_type, media_type, avdtp_sink_context);
128}
129
130void avdtp_sink_register_media_handler(void (*callback)(uint8_t local_seid, uint8_t *packet, uint16_t size)){
131 if (callback == NULL){

--- 99 unchanged lines hidden ---
124}
125
126avdtp_stream_endpoint_t * avdtp_sink_create_stream_endpoint(avdtp_sep_type_t sep_type, avdtp_media_type_t media_type){
127 return avdtp_create_stream_endpoint(sep_type, media_type, avdtp_sink_context);
128}
129
130void avdtp_sink_register_media_handler(void (*callback)(uint8_t local_seid, uint8_t *packet, uint16_t size)){
131 if (callback == NULL){

--- 99 unchanged lines hidden ---