cache_req.h revision a79acee185654d110c0e35ba351368d664e4e53d
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 Red Hat
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _CACHE_REQ_H_
#define _CACHE_REQ_H_
#include "responder/common/negcache.h"
enum cache_req_type {
};
/* Input data. */
struct cache_req_data;
struct cache_req_data *
enum cache_req_type type,
const char *name);
struct cache_req_data *
enum cache_req_type type,
struct cache_req_data *
enum cache_req_type type,
const char *cert);
struct cache_req_data *
enum cache_req_type type,
const char *sid,
const char **attrs);
struct cache_req_data *
enum cache_req_type type);
/* Output data. */
struct cache_req_result {
/**
* SSSD domain where the result was obtained.
*/
struct sss_domain_info *domain;
/**
* Result from ldb lookup.
*/
struct ldb_result *ldb_result;
/**
* Shortcuts into ldb_result. This shortens the code a little since
* callers usually don't don't need to work with ldb_result directly.
*/
unsigned int count;
struct ldb_message **msgs;
/**
* If name was used as a lookup parameter, @lookup_name contains name
* normalized to @domain rules.
*/
const char *lookup_name;
};
/* Generic request. */
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
int midpoint,
const char *domain,
struct cache_req_data *data);
struct tevent_req *req,
struct cache_req_result ***_results);
struct tevent_req *req,
struct cache_req_result **_result);
/* Plug-ins. */
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
const char *name);
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
const char *pem_cert);
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
const char *name);
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
const char *name);
struct tevent_req *
struct tevent_context *ev,
const char *domain,
const char *filter);
struct tevent_req *
struct tevent_context *ev,
const char *domain,
const char *filter);
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain,
const char *sid,
const char **attrs);
struct tevent_req *
struct tevent_context *ev,
struct sss_nc_ctx *ncache,
const char *domain);
#endif /* _CACHE_REQ_H_ */