1 2 /* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7 #ifndef _NXT_SERVICE_H_INCLUDED_ 8 #define _NXT_SERVICE_H_INCLUDED_ 9 10 11 typedef struct { 12 const char *type; 13 const char *name; 14 const void *service; 15 } nxt_service_t; 16 17 18 #define \ 19 nxt_service_is_module(s) \ 20 ((s)->type == NULL) 21 22 23 NXT_EXPORT nxt_array_t *nxt_services_init(nxt_mp_t *mp); 24 NXT_EXPORT nxt_int_t nxt_service_add(nxt_array_t *services, 25 const nxt_service_t *service); 26 NXT_EXPORT const void *nxt_service_get(nxt_array_t *services, const char *type, 27 const char *name); 28 29 30 #endif /* _NXT_SERVICE_H_INCLUDED_ */ 31