1 /* 2 * Copyright (c) 2023, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef RESTAPI_SERVICE_CONTEXT_H 8 #define RESTAPI_SERVICE_CONTEXT_H 9 10 #include "service_locator.h" 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /** 17 * \brief Construct a service context 18 * 19 * Factory method to create a service context to represent a service instance 20 * reachable using the provided URL. 21 * 22 * \param[in] service_url URL string for the service API endpoint 23 * 24 * \return Pointer to constructed service_context 25 */ 26 struct service_context *restapi_service_context_create(const char *service_url); 27 28 #ifdef __cplusplus 29 } 30 #endif 31 32 #endif /* RESTAPI_SERVICE_CONTEXT_H */ 33