sim: Fix whitespace violation
build: Add configure option for BlueZ 5 support

Going forward, BlueZ 5 will be supported by default.  BlueZ 4 support
will have to be explicitly enabled by using '--enable-bluez4'.

As before, the '--disable-bluetooth' configure option will disable all
bluetooth support (BlueZ 4 and BlueZ 5)
bluetooth: Rename bluetooth plugins

As BlueZ 5 introduced backwards incompatible API changes, and we want to
keep support for BlueZ 4 based plugins for some time, we need to separate
the plugins that are based on BlueZ 4 from the ones based on BlueZ 5.

The bluetooth.c plugin has now been renamed to bluez4.c and the hfp_hf.c
plugin is renamed to hfp_hf_bluez4.  This will make it easy to add a
HFP HF plugin for BlueZ 5.
bluetooth: Initial files for BlueZ 5

This patch adds the file for Bluetooth(BlueZ 5) oFono plugin.
hfp_hf: Add initial file for external HFP

This patch adds the initial file to support external HFP profile and
BlueZ 5. "hfp_hf_bluez5" plugin will implement an external Bluetooth
profile compatible with BlueZ 5, and "hfp_hf_bluez4" plugin will keep
the compatibility with BlueZ 4.
bluetooth: Add profile register / unregister

Adds utility API to handle BlueZ 5 RegisterProfile and UnregisterProfile
methods.
hfp_hf_bluez5: Add initial skeleton implementation
bluez5: Add a couple of defines
hfp_hf_bluez5: Add BlueZ Profile handler

This patch declares the external HFP Profile handler. It contains the
initial implementation of the D-Bus Profile1 interface and methods
responsible for handling Bluetooth connections.
storage: Include sys/types.h for ssize_t

src/storage.h:32:1: error: unknown type name 'ssize_t'
src/storage.h:36:1: error: unknown type name 'ssize_t'
build: Do not use deprecated AM_CONFIG_HEADER

The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13.
Use AC_CONFIG_HEADERS instead.
build: Use AM_CPPFLAGS instead of INCLUDES

Makefile.am:518: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
AUTHORS: Mention Claudio's contributions
hfpmodem: Add version defines for HFP 1.6
hfpmodem: Add support for sending the supported codecs

Right now, only the mandatory CVSD codec is supported. The mSBC
mandatory codec is "temporarily" not supported.

The spec alows this, HFP 1.6 Spec Section 4.34.1 page 92: "If wide band
speech is supported then the mandatory codec (mSBC) shall be included
unless it is temporarily unavailable."
gdbus: Check for valid path before handling properties
hfpmodem: Refactor voicecall notify with foreach

Define a helper function in order to use foreach statements when
ofono_voicecall_notify() needs to be called.
hfpmodem: Avoid transitional voicecall states

While processing the result of AT+CLCC, process the differences in a way
that disconnections are reported first, then call state changes and
finally new calls.

The goal is to avoid unnecessary transitional states such as two active
calls existing at the same time.
hfpmodem: Fix release-and-swap without +CIEV

Some phones do not send the corresponding call state update (+CIEV)
after a successful release-and-swap operation (AT+CHLD=1).

This has been observed with a Nokia 500, while testing ReleaseAndSwap()
while an active and a held call exist:

ofonod[20414]: > AT+CLCC\r
ofonod[20414]: < \r\n+CLCC: 1,0,1,0,0,"<number1>",145\r\n
ofonod[20414]: < \r\n+CLCC: 2,0,0,0,0,"<number2>",145\r\n
ofonod[20414]: < \r\nOK\r\n
ofonod[20414]: > AT+CHLD=1\r
ofonod[20414]: < \r\nOK\r\n

After this, no +CIEV is received, but the call has been hung up.

The proposed approach to solve this consists of using AT+CLCC, unless
a call release has been received within a specific time period.

The result fixes the problem as can be seen below:

ofonod[20847]: < \r\n+CLCC: 1,0,1,0,0,"<number1>",145\r\n
ofonod[20847]: < \r\n+CLCC: 2,0,0,0,0,"<number2>",145\r\n
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: > AT+CHLD=1\r
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: > AT+CLCC\r
ofonod[20847]: < \r\n+CLCC: 1,0,0,0,0,"<number1>",145\r\n
ofonod[20847]: < \r\nOK\r\n
ofonod[20847]: < \r\n+CIEV: 5,2\r\n
ofonod[20847]: < \r\n+CIEV: 5,0\r\n
hfpmodem: Add comment for previous commit