From f3d1f0a9f78f0e4a633cfafca649fd3289f981ae Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Thu, 10 Oct 2019 10:36:55 +0200 Subject: Add functions to unmanage handled halmap Add functions to unmanage handled halmap. Using these functions, it is possible to unmanage : - a specific halmap. - dependency related halmaps (e.g. at dynamic dependency disconnection). - all handled halmaps (a.g. at binder exit). BUG-AGL: SPEC-2893 Change-Id: I24c40ade8a392b30ad962e2396fdb5f8d7e71b33 Signed-off-by: Jonathan Aillet --- src/4a-internals-hal/4a-internals-hal-cb.h | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'src/4a-internals-hal/4a-internals-hal-cb.h') diff --git a/src/4a-internals-hal/4a-internals-hal-cb.h b/src/4a-internals-hal/4a-internals-hal-cb.h index 48e3c35..2224046 100644 --- a/src/4a-internals-hal/4a-internals-hal-cb.h +++ b/src/4a-internals-hal/4a-internals-hal-cb.h @@ -24,12 +24,18 @@ #include -// Enum for the type of dependencies handling -enum DependenciesHandlingType { +// Enum for to define which type of dependency selection we want to use +enum DependencySelectionType { ALL_DEPENDENCIES = 0, UID_CORRESPONDING_DEPENDENCIES = 1 }; +// Enum to define if to to handle or to unmanage a selected halmap +enum HalMapProcessingType { + HANDLE_SELECTED_HALMAP = 0, + UNMANAGE_SELECTED_HALMAP = 1 +}; + // Enum for the type of subscription enum SubscribeUnsubscribeType { SUBSCRIPTION = 0, @@ -43,7 +49,7 @@ void InternalHalDispatchApiEvent(afb_api_t apiHandle, const char *evtLabel, json int InternalHalHandleHalDependencies(afb_api_t apiHandle, struct HalData *currentHalData, struct cds_list_head *halDevicesToProbeListHead, - enum DependenciesHandlingType dependenciesHandlingType, + enum DependencySelectionType dependenciesSelectionType, char *uid); int InternalHalHalDependenciesConfig(afb_api_t apiHandle, CtlSectionT *section, json_object *DependenciesJ); @@ -51,6 +57,20 @@ int InternalHalHalDependenciesConfig(afb_api_t apiHandle, CtlSectionT *section, int InternalHalHalMixerConfig(afb_api_t apiHandle, CtlSectionT *section, json_object *MixerJ); // Internals HAL - 'halmap' section parsing/handling functions +int InternalHalHandleDependencyRelatedHalmap(afb_api_t apiHandle, + struct cds_list_head *halMapListHead, + struct cds_list_head *halDevicesToProbeListHead, + char *targetedDependency); +int InternalHalUnmanageDependencyRelatedHalmap(afb_api_t apiHandle, + struct cds_list_head *halMapListHead, + struct cds_list_head *halDevicesToProbeListHead, + char *targetedDependency); +int InternalHalHandleAllHalMap(afb_api_t apiHandle, + struct cds_list_head *halMapListHead, + struct cds_list_head *halDevicesToProbeListHead); +int InternalHalUnmanageAllHalMap(afb_api_t apiHandle, + struct cds_list_head *halMapListHead, + struct cds_list_head *halDevicesToProbeListHead); int InternalHalHalMapConfig(afb_api_t apiHandle, CtlSectionT *section, json_object *halMapJ); // Internals HAL verbs functions -- cgit 1.2.3-korg