include/smb_share_modes.h

説明を見る。
00001 /*
00002    Samba share mode database library.
00003 
00004    Copyright (C) Jeremy Allison 2005.
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with this library; if not, write to the Free Software
00018    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 */
00020 
00021 #ifndef _SMB_SHARE_MODES_H_
00022 #define _SMB_STATE_MODES_H_
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 #if HAVE_INTTYPES_H
00029 # include <inttypes.h>
00030 #else
00031 # if HAVE_STDINT_H
00032 #  include <stdint.h>
00033 # endif
00034 #endif
00035 
00036 /* Opaque database context handle. */
00037 struct smbdb_ctx;
00038 
00039 /* Share mode entry. */
00040 /*
00041  We use 64 bit types for device and inode as
00042  we don't know what size mode Samba has been
00043  compiled in - dev/ino may be 32, may be 64
00044  bits. This interface copes with either.
00045 */
00046   
00047 struct smb_share_mode_entry {
00048         uint64_t dev;
00049         uint64_t ino;
00050         uint32_t share_access;
00051         uint32_t access_mask;
00052         struct timeval open_time;
00053         uint32_t file_id;
00054         struct process_id pid;
00055 };
00056 
00057 /*
00058  * open/close sharemode database.
00059  */
00060 
00061 struct smbdb_ctx *smb_share_mode_db_open(const char *db_path);
00062 int smb_share_mode_db_close(struct smbdb_ctx *db_ctx);
00063 
00064 /*
00065  * lock/unlock entry in sharemode database.
00066  */
00067 
00068 int smb_lock_share_mode_entry(struct smbdb_ctx *db_ctx,
00069                                 uint64_t dev,
00070                                 uint64_t ino);
00071 
00072 int smb_unlock_share_mode_entry(struct smbdb_ctx *db_ctx,
00073                                 uint64_t dev,
00074                                 uint64_t ino);
00075 
00076 /*
00077  * Share mode database accessor functions.
00078  */
00079 
00080 int smb_get_share_mode_entries(struct smbdb_ctx *db_ctx,
00081                                 uint64_t dev,
00082                                 uint64_t ino,
00083                                 struct smb_share_mode_entry **pp_list,
00084                                 unsigned char *p_delete_on_close);
00085 
00086 int smb_create_share_mode_entry(struct smbdb_ctx *db_ctx,
00087                                 uint64_t dev,
00088                                 uint64_t ino,
00089                                 const struct smb_share_mode_entry *set_entry,
00090                                 const char *path);
00091 
00092 int smb_delete_share_mode_entry(struct smbdb_ctx *db_ctx,
00093                                 uint64_t dev,
00094                                 uint64_t ino,
00095                                 const struct smb_share_mode_entry *set_entry);
00096 
00097 int smb_change_share_mode_entry(struct smbdb_ctx *db_ctx,
00098                                 uint64_t dev,
00099                                 uint64_t ino,
00100                                 const struct smb_share_mode_entry *set_entry,
00101                                 const struct smb_share_mode_entry *new_entry);
00102 
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106 #endif

Sambaに対してSat Aug 29 21:22:57 2009に生成されました。  doxygen 1.4.7