- tmp = __get_json_object_string(object, "license");
- info->license = __convert_license_str_to_enum(tmp);
-
- info->library_name = g_strdup(__get_json_object_string(object, "library_name"));
- info->library_name_64bit = g_strdup(__get_json_object_string(object, "library_name_64bit"));
- info->symbol_name = g_strdup(__get_json_object_string(object, "symbol_name"));
-
- if (info->library_name && info->library_name_64bit && info->symbol_name)
- info->hal_api = true;
-
- json_object_object_get_ex(object, "abi_versions", &abi_versions_array);
- if (json_object_get_type(abi_versions_array) != json_type_array)
- return info;
-
- info->num_abi_versions = json_object_array_length(abi_versions_array);
- if (info->num_abi_versions > 0) {
- info->abi_versions = (struct hal_abi_version_match*)calloc(info->num_abi_versions,
- sizeof(struct hal_abi_version_match));
- if (info->abi_versions == NULL) {
- _E("Out of Memory\n");
- _destroy_module_info(info);
- return NULL;
- }
-
- for (int i = 0; i < info->num_abi_versions; i++) {
- json_object *abi_object = json_object_array_get_idx(abi_versions_array, i);
-
- tmp = __get_json_object_string(abi_object, "platform_abi_version");
- info->abi_versions[list_index].platform_abi_version =
- __convert_abi_version_str_to_enum(tmp);
-
- tmp = __get_json_object_string(abi_object, "backend_min_abi_version");
- info->abi_versions[list_index].backend_min_abi_version =
- __convert_abi_version_str_to_enum(tmp);
- list_index++;
- }