summaryrefslogtreecommitdiff
path: root/cras/src/server/cras_hfp_iodev.h
blob: b50aa2591ac200e3d29938a44438d7be87cbef36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#ifndef CRAS_HFP_IODEV_H_
#define CRAS_HFP_IODEV_H_

#include "cras_bt_device.h"
#include "cras_hfp_info.h"
#include "cras_types.h"

struct hfp_slc_handle;

/*
 * Creates an hfp iodev.
 */
struct cras_iodev *hfp_iodev_create(enum CRAS_STREAM_DIRECTION dir,
				    struct cras_bt_device *device,
				    struct hfp_slc_handle *slc,
				    enum cras_bt_device_profile profile,
				    struct hfp_info *info);

void hfp_iodev_destroy(struct cras_iodev *iodev);

/*
 * Returns if the iodev is running for a HSP connection. Note that
 * hfp_iodev is implemented for both HFP and HSP connection. And this
 * function allows caller to test if it falls to the rare case - HSP.
 */
int hfp_iodev_is_hsp(struct cras_iodev *iodev);

#endif /* CRAS_HFP_IODEV_H_ */