diff options
author | Gustavo F. Padovan <gustavo@padovan.org> | 2010-06-14 15:04:22 -0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-06-17 05:06:39 -0500 |
commit | 4004433ad457a6ee71623f5a0c8dd4692d752235 (patch) | |
tree | 4376010f01f4be8243b382180872340d3ca44a34 /plugins/bluetooth.h | |
parent | 412ed596b94526fa8acbaba2a9112ff01a4d1c54 (diff) | |
download | ofono-4004433ad457a6ee71623f5a0c8dd4692d752235.tar.bz2 |
Add bluetooth plugin skeleton.
The bluetooth plugin has bluetooth_resgister_uuid() and
bluetooth_unresgister_uuid() where bluetooth profiles plugins such as HFP
and DUN can register themselves to get know about BlueZ stuff ( new
devices, bluetoothd shutdown, etc..)
Diffstat (limited to 'plugins/bluetooth.h')
-rw-r--r-- | plugins/bluetooth.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/bluetooth.h b/plugins/bluetooth.h new file mode 100644 index 00000000..94ebaf69 --- /dev/null +++ b/plugins/bluetooth.h @@ -0,0 +1,42 @@ +/* + * oFono - Open Source Telephony + * + * Copyright (C) 2010 Gustavo F. Padovan <gustavo@padovan.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#define BLUEZ_SERVICE "org.bluez" +#define BLUEZ_MANAGER_INTERFACE BLUEZ_SERVICE ".Manager" +#define BLUEZ_ADAPTER_INTERFACE BLUEZ_SERVICE ".Adapter" +#define BLUEZ_DEVICE_INTERFACE BLUEZ_SERVICE ".Device" + +#define HFP_AG_UUID "0000111F-0000-1000-8000-00805F9B34FB" + +/* Profiles bitfield */ +#define HFP_AG 0x01 + +struct bluetooth_profile { + const char *name; + int (*create)(const char *device, const char *dev_addr, + const char *adapter_addr, const char *alias); + void (*remove_all)(); + void (*set_alias)(const char *device, const char *); +}; + +int bluetooth_register_uuid(const char *uuid, + struct bluetooth_profile *profile); +void bluetooth_unregister_uuid(const char *uuid); + |