10Sigor@sysoev.ru 20Sigor@sysoev.ru /* 30Sigor@sysoev.ru * Copyright (C) Igor Sysoev 40Sigor@sysoev.ru * Copyright (C) NGINX, Inc. 50Sigor@sysoev.ru */ 60Sigor@sysoev.ru 70Sigor@sysoev.ru #ifndef _NXT_SERVICE_H_INCLUDED_ 80Sigor@sysoev.ru #define _NXT_SERVICE_H_INCLUDED_ 90Sigor@sysoev.ru 100Sigor@sysoev.ru 110Sigor@sysoev.ru typedef struct { 120Sigor@sysoev.ru const char *type; 130Sigor@sysoev.ru const char *name; 140Sigor@sysoev.ru const void *service; 150Sigor@sysoev.ru } nxt_service_t; 160Sigor@sysoev.ru 170Sigor@sysoev.ru 18*2084Salx.manpages@gmail.com #define nxt_service_is_module(s) \ 190Sigor@sysoev.ru ((s)->type == NULL) 200Sigor@sysoev.ru 210Sigor@sysoev.ru 2265Sigor@sysoev.ru NXT_EXPORT nxt_array_t *nxt_services_init(nxt_mp_t *mp); 230Sigor@sysoev.ru NXT_EXPORT nxt_int_t nxt_service_add(nxt_array_t *services, 240Sigor@sysoev.ru const nxt_service_t *service); 250Sigor@sysoev.ru NXT_EXPORT const void *nxt_service_get(nxt_array_t *services, const char *type, 260Sigor@sysoev.ru const char *name); 270Sigor@sysoev.ru 280Sigor@sysoev.ru 290Sigor@sysoev.ru #endif /* _NXT_SERVICE_H_INCLUDED_ */ 30