summaryrefslogtreecommitdiffstats
path: root/lib/4a-hal-utilities
diff options
context:
space:
mode:
Diffstat (limited to 'lib/4a-hal-utilities')
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-data.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-data.c b/lib/4a-hal-utilities/4a-hal-utilities-data.c
index 845ea59..6f85565 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-data.c
+++ b/lib/4a-hal-utilities/4a-hal-utilities-data.c
@@ -70,6 +70,33 @@ char *HalUtlGetProbedDeviceClassString(enum ProbedDeviceClasses deviceClass)
return NULL;
}
+int HalUtlIsDependencySelected(struct InternalHalProbedDevice *probedDevice, enum DependencyStatus requestedStatus)
+{
+ if(! probedDevice) {
+ return 0;
+ }
+
+ switch(requestedStatus) {
+ case UNAVAILABLE_DEPENDENCY:
+ if(! probedDevice->deviceData)
+ return 1;
+ else
+ return 0;
+
+ case AVAILABLE_DEPENDENCY:
+ if(probedDevice->deviceData)
+ return 1;
+ else
+ return 0;
+
+ case ALL_DEPENDENCY:
+ return 1;
+
+ default:
+ return 0;
+ }
+}
+
struct InternalHalProbedDevice *HalUtlAddProbedDeviceToProbedDeviceList(struct InternalHalProbedDevice **probedDevicesList)
{
struct InternalHalProbedDevice *currentProbedDevice;
@@ -443,33 +470,6 @@ json_object *HalUtlGetJsonForSpecificDependenciesUsingUid(afb_api_t apiHandle,
return requestedProbedDeviceJ;
}
-int HalUtlIsDependencySelected(struct InternalHalProbedDevice *probedDevice, enum DependencyStatus requestedStatus)
-{
- if(! probedDevice) {
- return 0;
- }
-
- switch(requestedStatus) {
- case UNAVAILABLE_DEPENDENCY:
- if(! probedDevice->deviceData)
- return 1;
- else
- return 0;
-
- case AVAILABLE_DEPENDENCY:
- if(probedDevice->deviceData)
- return 1;
- else
- return 0;
-
- case ALL_DEPENDENCY:
- return 1;
-
- default:
- return 0;
- }
-}
-
json_object *HalUtlGetJsonArrayForSelectedDependencies(afb_api_t apiHandle,
struct InternalHalProbedDevice **probedDevicesList,
enum DependencyInfoJsonFormat jsonFormat,