Recreate the SMB context after rmdir.
[usmb.git] / usmb.h
blobb087bfefa959e1a06800437c9d52b112c950070c
1 /* usmb - mount SMB shares via FUSE and Samba
2 * Copyright (C) 2006-2009 Geoff Johnstone
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #ifndef USMB_H
18 #define USMB_H
20 #include <stdbool.h>
21 #include <libsmbclient.h>
23 extern SMBCCTX *ctx;
25 char * make_url (const char *path) MUSTCHECK;
27 bool renew_smb_context (void);
29 /* fuse_file_info uses a uint64_t for a "File handle" */
30 static inline uint64_t smbcfile_to_fd (SMBCFILE *file)
32 return (uint64_t)(uintptr_t)file;
36 static inline SMBCFILE * fd_to_smbcfile (uint64_t fd)
38 return (SMBCFILE *)(uintptr_t)fd;
41 #endif