Each server use its own databa list to manage handlers so all operations
should managed separately by each GATT server instead of using a global
handler list.
This patch attaches attribute channels to the gatt server list instead
of using the global client list. Furthermore, we use the GATT server
started in the default adapter when attrib_channel_detach is invoked in
order to keep backward compatibility until the interface is updated to
accept the adapter too.
Each server has its own database so the global database list will be
removed. This patch makes a wrapper over attrib_db_add function to get
the default GATT server in order to add attributes in the default
adapter, int his way we keep backward compatibility with the gatt server
interface until the API is updated.
Each server has its own SDP registry wich will be managed separately.
Furthermore, this patch makes a wrapper over attrib_create_sdp function
using the default GATT server started in thye default adapter in order
to keep backward compatibility with the gatt server interface until the
api is finally updated.
We need neither to init nor stop gatt server whenever the demon
starts and finishes the execution, instead of doing that, we init
or stop the GATT server when the adapter is initialized or removed.
Due to the way legacy name resolving is handled for the mgmt interface
the entire logic that was previously part of the core daemon needs to be
moved into hciops. Essentially hciops now contains what the mgmt code
in the kernel will do when mgmtops is used.
If pending connection will stay after state has been changed to
HEADSET_STATE_DISCONNECTED, then crash may happen (e.g. when hs_connect
will be called quickly again after that) To avoid that kind of problems
using headset_shutdown, which does necessary cleanup first (finalizes
pending connections) and after that changes state to
HEADSET_STATE_DISCONNECTED.
SetProperty for "Value" property needs to be queued when disconnected.
Registering ATTIO connection callback does not mean that the link is
established, GAttrib instance is assigned in the connection callback.
Although ATT connection callbacks control GAttrib reference, each
entity using GAttrib should be increment the GAttrib reference to
keep the code standard.
This signal is sent before channel is connected as soon as MCAP accepts
the data channel creation request. At this moment, applications that
try to get the fd before the connection finishes will fail. This problem
can be solved delaying the ChannelConnection signal until the connection
operation finishes.
Time stamp value is an optional field provided in the measure, so next
value in the array will start in a different index depending if the time
stamp was provided or not. This patch check this case and update the
index to a proper value in the byte array before reading the temperature
type value.
This patch checks the GATT server is connected before doing any GATT
transaction. If it isn't, we abort the operation to avoid the NULL
pointer deference problem.
Some changes were missing from the previous patch. This moves the fast
connectable command to the right place, adds a Class_Of_Device parameter
to Set UUID Caching (renamed from Set Service Cache) and adds a Class Of
Device Changed event.
This patch updates the mgmt API to match the current plans. This is
hopefully the last major change and because of that the command and
event codes are also reshuffled to match some kind of a logical
ordering.