struct avdtp_remote_sep *avdtp_register_remote_sep(struct avdtp *session,
							uint8_t seid,
							uint8_t type,
							GSList *caps,
							bool delay_reporting)
{
	struct avdtp_remote_sep *sep;
	GSList *l;

	sep = find_remote_sep(session->seps, seid);
	if (sep)
		return sep;

	sep = g_new0(struct avdtp_remote_sep, 1);
	session->seps = g_slist_append(session->seps, sep);
	sep->seid = seid;
	sep->type = type;
	sep->media_type = AVDTP_MEDIA_TYPE_AUDIO;
	sep->caps = caps;
	sep->delay_reporting = delay_reporting;

	for (l = caps; l; l = g_slist_next(l)) {
		struct avdtp_service_capability *cap = l->data;

		if (cap->category == AVDTP_MEDIA_CODEC)
			sep->codec = cap;
	}

	DBG("seid %d type %d media %d delay_reporting %s", sep->seid, sep->type,
				sep->media_type,
				sep->delay_reporting ? "true" : "false");

	return sep;
}
struct avdtp_remote_sep *avdtp_register_remote_sep(struct avdtp *session,
							uint8_t seid,
							uint8_t type,
							GSList *caps,
							bool delay_reporting)
{
	struct avdtp_remote_sep *sep;
	GSList *l;

	sep = find_remote_sep(session->seps, seid);
	if (sep)
		return sep;

	sep = g_new0(struct avdtp_remote_sep, 1);
	session->seps = g_slist_append(session->seps, sep);
	sep->seid = seid;
	sep->type = type;
	sep->media_type = AVDTP_MEDIA_TYPE_AUDIO;
	sep->caps = caps;
	sep->delay_reporting = delay_reporting;

	for (l = caps; l; l = g_slist_next(l)) {
		struct avdtp_service_capability *cap = l->data;

		if (cap->category == AVDTP_MEDIA_CODEC)
			sep->codec = cap;
	}

	DBG("seid %d type %d media %d delay_reporting %s", sep->seid, sep->type,
				sep->media_type,
				sep->delay_reporting ? "true" : "false");

	return sep;
}