diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2013-03-27 21:12:58 -0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2013-03-28 09:29:50 -0500 |
commit | 759cf256148bf2735501cd76860bc8cd34478a3b (patch) | |
tree | 7b20637b0ae64a91411d33afcca5c3fb1d5ea51d | |
parent | ac4e5f0045443ca0b8fa0f65e83314939804aea2 (diff) | |
download | ofono-759cf256148bf2735501cd76860bc8cd34478a3b.tar.bz2 |
hfp_hf_bluez5: Add a card driver for HFP 1.6
This is just the skeleton of a Handsfree Audio Card for the HF side of
HFP 1.6.
-rw-r--r-- | plugins/hfp_hf_bluez5.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/plugins/hfp_hf_bluez5.c b/plugins/hfp_hf_bluez5.c index ff8afba8..e2fa70c4 100644 --- a/plugins/hfp_hf_bluez5.c +++ b/plugins/hfp_hf_bluez5.c @@ -60,6 +60,8 @@ #define HFP_EXT_PROFILE_PATH "/bluetooth/profile/hfp_hf" +#define HFP16_HF_DRIVER "hfp16-hf-driver" + struct hfp { struct hfp_slc_info info; DBusMessage *msg; @@ -310,6 +312,31 @@ static struct ofono_modem_driver hfp_driver = { .post_sim = hfp_post_sim, }; +static int hfp16_card_probe(struct ofono_handsfree_card *card, + unsigned int vendor, void *data) +{ + return 0; +} + +static void hfp16_card_remove(struct ofono_handsfree_card *card) +{ + +} + +static void hfp16_card_connect(struct ofono_handsfree_card *card, + ofono_handsfree_card_connect_cb_t cb, + void *data) +{ + +} + +static struct ofono_handsfree_card_driver hfp16_hf_driver = { + .name = HFP16_HF_DRIVER, + .probe = hfp16_card_probe, + .remove = hfp16_card_remove, + .connect = hfp16_card_connect, +}; + static ofono_bool_t device_path_compare(struct ofono_modem *modem, void *userdata) { @@ -616,6 +643,13 @@ static int hfp_init(void) return -EIO; } + err = ofono_handsfree_card_driver_register(&hfp16_hf_driver); + if (err < 0) { + g_dbus_unregister_interface(conn, HFP_EXT_PROFILE_PATH, + BLUEZ_PROFILE_INTERFACE); + return err; + } + err = ofono_modem_driver_register(&hfp_driver); if (err < 0) { g_dbus_unregister_interface(conn, HFP_EXT_PROFILE_PATH, @@ -647,6 +681,9 @@ static void hfp_exit(void) bt_unregister_profile(conn, HFP_EXT_PROFILE_PATH); g_dbus_unregister_interface(conn, HFP_EXT_PROFILE_PATH, BLUEZ_PROFILE_INTERFACE); + + ofono_handsfree_card_driver_unregister(&hfp16_hf_driver); + ofono_modem_driver_unregister(&hfp_driver); g_dbus_client_unref(bluez); |