summaryrefslogtreecommitdiffstats
path: root/4a-hal/4a-hal-manager/4a-hal-manager.c
diff options
context:
space:
mode:
Diffstat (limited to '4a-hal/4a-hal-manager/4a-hal-manager.c')
-rw-r--r--4a-hal/4a-hal-manager/4a-hal-manager.c41
1 files changed, 21 insertions, 20 deletions
diff --git a/4a-hal/4a-hal-manager/4a-hal-manager.c b/4a-hal/4a-hal-manager/4a-hal-manager.c
index 017199f..4d2fbf1 100644
--- a/4a-hal/4a-hal-manager/4a-hal-manager.c
+++ b/4a-hal/4a-hal-manager/4a-hal-manager.c
@@ -25,7 +25,7 @@
#include "4a-hal-utilities-data.h"
#include "4a-hal-utilities-verbs-loader.h"
-#include "../4a-hal-controllers/4a-hal-controllers-api-loader.h"
+#include "../4a-internals-hal/4a-internals-hal-api-loader.h"
#include "4a-hal-manager.h"
#include "4a-hal-manager-cb.h"
@@ -54,11 +54,11 @@ afb_verb_t HalManagerApiStaticVerbs[] =
};
/*******************************************************************************
- * HAL Manager get 'SpecificHalData' linked list *
+ * HAL Manager get 'HalData' linked list *
from HAL list function *
******************************************************************************/
-struct SpecificHalData **HalMngGetHalDataList(void)
+struct HalData **HalMngGetHalDataList(void)
{
return &localHalMgrGlobalData.halDataList;
}
@@ -69,8 +69,8 @@ struct SpecificHalData **HalMngGetHalDataList(void)
static int HalMgrInitApi(afb_api_t apiHandle)
{
- struct SpecificHalData *currentCtlHalData;
- struct HalMgrData *HalMgrGlobalData;
+ struct HalData *currentHalData;
+ struct HalMgrData *halMgrData;
if(! apiHandle)
return -1;
@@ -79,21 +79,22 @@ static int HalMgrInitApi(afb_api_t apiHandle)
AFB_default = apiHandle;
// Retrieve section config from api handle
- if(! (HalMgrGlobalData = (struct HalMgrData *) afb_api_get_userdata(apiHandle)))
+ halMgrData = (struct HalMgrData *) afb_api_get_userdata(apiHandle);
+ if(! halMgrData)
return -2;
- if(HalUtlInitializeHalMgrData(apiHandle, HalMgrGlobalData, HAL_MANAGER_API_NAME, HAL_MANAGER_API_INFO))
+ if(HalUtlInitializeHalMgrData(apiHandle, halMgrData, HAL_MANAGER_API_NAME, HAL_MANAGER_API_INFO))
return -3;
- currentCtlHalData = HalMgrGlobalData->halDataList;
+ currentHalData = halMgrData->halDataList;
- while(currentCtlHalData) {
- if(! currentCtlHalData->apiName)
+ while(currentHalData) {
+ if(! currentHalData->apiName)
return -4;
- else if(afb_api_require_api(apiHandle, currentCtlHalData->apiName, 1))
+ else if(afb_api_require_api(apiHandle, currentHalData->apiName, 1))
return -5;
- currentCtlHalData = currentCtlHalData->next;
+ currentHalData = currentHalData->next;
}
return 0;
@@ -101,15 +102,15 @@ static int HalMgrInitApi(afb_api_t apiHandle)
static int HalMgrLoadApi(void *cbdata, afb_api_t apiHandle)
{
- struct HalMgrData *HalMgrGlobalData;
+ struct HalMgrData *halMgrData;
if(! cbdata || ! apiHandle)
return -1;
- HalMgrGlobalData = (struct HalMgrData *) cbdata;
+ halMgrData = (struct HalMgrData *) cbdata;
// Save closure as api's data context
- afb_api_set_userdata(apiHandle, HalMgrGlobalData);
+ afb_api_set_userdata(apiHandle, halMgrData);
// Add static controls verbs
if(HalUtlLoadVerbs(apiHandle, HalManagerApiStaticVerbs)) {
@@ -128,13 +129,13 @@ static int HalMgrLoadApi(void *cbdata, afb_api_t apiHandle)
return 0;
}
-int HalMgrCreateApi(afb_api_t apiHandle, struct HalMgrData *HalMgrGlobalData)
+int HalMgrCreateApi(afb_api_t apiHandle, struct HalMgrData *halMgrData)
{
- if(! apiHandle || ! HalMgrGlobalData)
+ if(! apiHandle || ! halMgrData)
return -1;
// Create one API
- return afb_api_new_api(apiHandle, HAL_MANAGER_API_NAME, HAL_MANAGER_API_INFO, 1, HalMgrLoadApi, HalMgrGlobalData) ? 0 : -1;
+ return afb_api_new_api(apiHandle, HAL_MANAGER_API_NAME, HAL_MANAGER_API_INFO, 1, HalMgrLoadApi, halMgrData) ? 0 : -1;
}
/*******************************************************************************
@@ -158,8 +159,8 @@ int afbBindingEntry(afb_api_t apiHandle)
if(rc < 0)
status--;
- // Load Hal-Ctls using Api v3
- rc = HalCtlsCreateAllApi(apiHandle, &localHalMgrGlobalData);
+ // Load internals Hal using Api v3
+ rc = InternalHalCreateAllApi(apiHandle, &localHalMgrGlobalData);
if(rc < 0)
status -= rc;