1 /* 2 * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include "standalone_location_strategy.h" 8 #include "standalone_service_registry.h" 9 #include "standalone_service_context.h" 10 query(const char * sn)11static struct service_context *query(const char *sn) 12 { 13 standalone_service_registry *registry = standalone_service_registry::instance(); 14 standalone_service_context *query_result = registry->query(sn); 15 16 if (!query_result) 17 return NULL; 18 19 return query_result->get_service_context(); 20 } 21 standalone_location_strategy(void)22const struct service_location_strategy *standalone_location_strategy(void) 23 { 24 static const struct service_location_strategy strategy = { query }; 25 return &strategy; 26 } 27