python/samba: Another object.next() to next(object) py2/py3 converstion
[Samba.git] / source3 / lib / namemap_cache.h
bloba70de34b885868cb7ea92956fe88dc2e6272b1ec
1 /*
2 * Unix SMB/CIFS implementation.
3 * Utils for caching sid2name and name2sid
4 * Copyright (C) Volker Lendecke 2017
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef __LIB_NAMEMAP_CACHE_H__
21 #define __LIB_NAMEMAP_CACHE_H__
23 #include "lib/util/time.h"
24 #include "lib/util/data_blob.h"
25 #include "librpc/gen_ndr/lsa.h"
27 bool namemap_cache_set_sid2name(const struct dom_sid *sid,
28 const char *domain, const char *name,
29 enum lsa_SidType type, time_t timeout);
30 bool namemap_cache_set_name2sid(const char *domain, const char *name,
31 const struct dom_sid *sid,
32 enum lsa_SidType type,
33 time_t timeout);
34 bool namemap_cache_find_sid(const struct dom_sid *sid,
35 void (*fn)(const char *domain, const char *name,
36 enum lsa_SidType type, time_t timeout,
37 void *private_data),
38 void *private_data);
39 bool namemap_cache_find_name(const char *domain, const char *name,
40 void (*fn)(const struct dom_sid *sid,
41 enum lsa_SidType type, time_t timeout,
42 void *private_data),
43 void *private_data);
45 #endif