python: models: rename argument ldb to samdb
[samba.git] / source3 / smbd / dir.h
blobd520d1380b5a14cbc782addd6207cef08d247307
1 /*
2 * Unix SMB/Netbios implementation.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef _SOURCE3_SMBD_DIR_H_
19 #define _SOURCE3_SMBD_DIR_H_
21 #include "includes.h"
23 struct smb_Dir;
24 struct dptr_struct;
26 NTSTATUS can_delete_directory_fsp(files_struct *fsp);
27 struct files_struct *dir_hnd_fetch_fsp(struct smb_Dir *dir_hnd);
28 uint16_t dptr_attr(struct smbd_server_connection *sconn, int key);
29 bool dptr_case_sensitive(struct dptr_struct *dptr);
30 void dptr_closecnum(connection_struct *conn);
31 void dptr_CloseDir(files_struct *fsp);
32 NTSTATUS dptr_create(connection_struct *conn,
33 struct smb_request *req,
34 files_struct *fsp,
35 bool old_handle,
36 const char *wcard,
37 uint32_t attr,
38 struct dptr_struct **dptr_ret);
39 int dptr_dnum(struct dptr_struct *dptr);
40 files_struct *dptr_fetch_lanman2_fsp(struct smbd_server_connection *sconn,
41 int dptr_num);
42 unsigned int dptr_FileNumber(struct dptr_struct *dptr);
43 bool dptr_get_priv(struct dptr_struct *dptr);
44 bool dptr_has_wild(struct dptr_struct *dptr);
45 const char *dptr_path(struct smbd_server_connection *sconn, int key);
46 char *dptr_ReadDirName(TALLOC_CTX *ctx, struct dptr_struct *dptr);
47 void dptr_RewindDir(struct dptr_struct *dptr);
48 void dptr_set_priv(struct dptr_struct *dptr);
49 const char *dptr_wcard(struct smbd_server_connection *sconn, int key);
50 bool have_file_open_below(connection_struct *conn,
51 const struct smb_filename *name);
52 bool init_dptrs(struct smbd_server_connection *sconn);
53 bool is_visible_fsp(files_struct *fsp);
54 NTSTATUS OpenDir(TALLOC_CTX *mem_ctx,
55 connection_struct *conn,
56 const struct smb_filename *smb_dname,
57 const char *mask,
58 uint32_t attr,
59 struct smb_Dir **_dir_hnd);
60 NTSTATUS OpenDir_from_pathref(TALLOC_CTX *mem_ctx,
61 struct files_struct *dirfsp,
62 const char *mask,
63 uint32_t attr,
64 struct smb_Dir **_dir_hnd);
65 const char *ReadDirName(struct smb_Dir *dir_hnd, char **talloced);
66 void RewindDir(struct smb_Dir *dir_hnd);
67 bool smbd_dirptr_get_entry(TALLOC_CTX *ctx,
68 struct dptr_struct *dirptr,
69 const char *mask,
70 uint32_t dirtype,
71 bool dont_descend,
72 bool ask_sharemode,
73 bool get_dosmode,
74 bool (*match_fn)(TALLOC_CTX *ctx,
75 void *private_data,
76 const char *dname,
77 const char *mask,
78 char **_fname),
79 void *private_data,
80 char **_fname,
81 struct smb_filename **_smb_fname,
82 uint32_t *_mode);
83 char *smbd_dirptr_get_last_name_sent(struct dptr_struct *dirptr);
84 void smbd_dirptr_push_overflow(struct dptr_struct *dirptr,
85 char **_fname,
86 struct smb_filename **_smb_fname,
87 uint32_t mode);
88 void smbd_dirptr_set_last_name_sent(struct dptr_struct *dirptr, char **_fname);
89 #endif