Mesh: Handle Multi-application init & deinit logic 84/241384/2 accepted/tizen/unified/20200821.042426 submit/tizen/20200820.041741
authorAnupam Roy <anupam.r@samsung.com>
Wed, 19 Aug 2020 15:33:01 +0000 (21:03 +0530)
committerPyun DoHyun <dh79.pyun@samsung.com>
Thu, 20 Aug 2020 01:34:13 +0000 (01:34 +0000)
commitf050aff800bdd9bda43b425154feb17e211ed86e
treed4b6878f0e9387b3ff26c08b55784caf3cbdf798
parent61757e498b4146755051e304622aac3cb17182e2
Mesh: Handle Multi-application init & deinit logic

This patch handles following:-
- Introduces Network Unload API. This API
  will be used by application to unload
  all network resources from bt-service.
  During mesh application deinit, FRWK
  library will call Network Unload to cleanup
  resources from service layer. CDB will remain
  unaffected due to this.

- Implements init/deinit logic for multiple apps.
  bt-service keeps reference count of applications.
  mesh stack launch/unlaunch is done single time
  based on app reference count logic. Don't allow
  to stop mesh stack service, if atleast one app
  is using mesh service.

Change-Id: I705c9c4d462036a657184dbdbb131c77af83b3a3
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
bt-api/bt-mesh.c
bt-service/services/bt-request-handler.c
bt-service/services/include/bt-service-mesh-network.h
bt-service/services/mesh/bt-service-mesh-main.c
bt-service/services/mesh/bt-service-mesh-network.c
include/bluetooth-mesh-api.h
include/bt-internal-types.h