cache_req.h revision 2749964664a69bbb99d09409c1110095cbfcc664
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina/*
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina Authors:
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina Pavel Březina <pbrezina@redhat.com>
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina Copyright (C) 2016 Red Hat
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina This program is free software; you can redistribute it and/or modify
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina it under the terms of the GNU General Public License as published by
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina the Free Software Foundation; either version 3 of the License, or
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina (at your option) any later version.
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina This program is distributed in the hope that it will be useful,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina but WITHOUT ANY WARRANTY; without even the implied warranty of
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina GNU General Public License for more details.
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina You should have received a copy of the GNU General Public License
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina along with this program. If not, see <http://www.gnu.org/licenses/>.
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina*/
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#ifndef _CACHE_REQ_H_
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#define _CACHE_REQ_H_
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#include "util/util.h"
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#include "confdb/confdb.h"
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#include "responder/common/negcache.h"
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březinaenum cache_req_type {
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina CACHE_REQ_SENTINEL
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina};
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina/* Input data. */
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březinastruct cache_req_data;
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina/* Generic request. */
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březinastruct tevent_req *cache_req_send(TALLOC_CTX *mem_ctx,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina struct tevent_context *ev,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina struct resp_ctx *rctx,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina struct sss_nc_ctx *ncache,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina int midpoint,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina const char *domain,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina struct cache_req_data *data);
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březinaerrno_t cache_req_recv(TALLOC_CTX *mem_ctx,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina struct tevent_req *req,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina struct ldb_result **_result,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina struct sss_domain_info **_domain,
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina char **_name);
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina
2749964664a69bbb99d09409c1110095cbfcc664Pavel Březina#endif /* _CACHE_REQ_H_ */