Make oplocks a per-share option.
[samba.git] / source4 / param / share.h
index 4e16f03715757b84b3dfeba9ff08c8d0e92f25d0..9f9cbdce5bed8ed447f37ffa68c9fa8bb6c97d0d 100644 (file)
@@ -49,7 +49,8 @@ struct share_info {
 
 struct share_ops {
        const char *name;
 
 struct share_ops {
        const char *name;
-       NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct share_context **);
+       NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct loadparm_context *lp_ctx,
+                        struct share_context **);
        const char *(*string_option)(struct share_config *, const char *, const char *);
        int (*int_option)(struct share_config *, const char *, int);
        bool (*bool_option)(struct share_config *, const char *, bool);
        const char *(*string_option)(struct share_config *, const char *, const char *);
        int (*int_option)(struct share_config *, const char *, int);
        bool (*bool_option)(struct share_config *, const char *, bool);
@@ -61,6 +62,8 @@ struct share_ops {
        NTSTATUS (*remove)(struct share_context *, const char *);
 };
 
        NTSTATUS (*remove)(struct share_context *, const char *);
 };
 
+struct loadparm_context;
+
 #include "param/share_proto.h"
 
 /* list of shares options */
 #include "param/share_proto.h"
 
 /* list of shares options */
@@ -87,6 +90,7 @@ struct share_ops {
 #define SHARE_MAP_ARCHIVE      "map-archive"
 
 #define SHARE_STRICT_LOCKING   "strict-locking"
 #define SHARE_MAP_ARCHIVE      "map-archive"
 
 #define SHARE_STRICT_LOCKING   "strict-locking"
+#define SHARE_OPLOCKS          "oplocks"
 #define SHARE_STRICT_SYNC      "strict-sync"
 #define SHARE_MSDFS_ROOT       "msdfs-root"
 #define SHARE_CI_FILESYSTEM    "ci-filesystem"
 #define SHARE_STRICT_SYNC      "strict-sync"
 #define SHARE_MSDFS_ROOT       "msdfs-root"
 #define SHARE_CI_FILESYSTEM    "ci-filesystem"
@@ -103,8 +107,8 @@ struct share_ops {
 #define SHARE_VOLUME_DEFAULT           NULL
 #define SHARE_TYPE_DEFAULT             "DISK"  
 #define SHARE_CSC_POLICY_DEFAULT       0
 #define SHARE_VOLUME_DEFAULT           NULL
 #define SHARE_TYPE_DEFAULT             "DISK"  
 #define SHARE_CSC_POLICY_DEFAULT       0
-#define SHARE_AVAILABLE_DEFAULT                True
-#define SHARE_BROWSEABLE_DEFAULT       True
+#define SHARE_AVAILABLE_DEFAULT                true
+#define SHARE_BROWSEABLE_DEFAULT       true
 #define SHARE_MAX_CONNECTIONS_DEFAULT  0
 
 #define SHARE_DIR_MASK_DEFAULT                   0755
 #define SHARE_MAX_CONNECTIONS_DEFAULT  0
 
 #define SHARE_DIR_MASK_DEFAULT                   0755
@@ -116,14 +120,15 @@ struct share_ops {
 
 /* I'd like to see the following options go away
  * and always use EAs and SECDESCs */
 
 /* I'd like to see the following options go away
  * and always use EAs and SECDESCs */
-#define SHARE_READONLY_DEFAULT         True
-#define SHARE_MAP_SYSTEM_DEFAULT       False
-#define SHARE_MAP_HIDDEN_DEFAULT       False
-#define SHARE_MAP_ARCHIVE_DEFAULT      True
-
-#define SHARE_STRICT_LOCKING_DEFAULT   True
-#define SHARE_STRICT_SYNC_DEFAULT      False
-#define SHARE_MSDFS_ROOT_DEFAULT       False
-#define SHARE_CI_FILESYSTEM_DEFAULT    False
+#define SHARE_READONLY_DEFAULT         true
+#define SHARE_MAP_SYSTEM_DEFAULT       false
+#define SHARE_MAP_HIDDEN_DEFAULT       false
+#define SHARE_MAP_ARCHIVE_DEFAULT      true
+
+#define SHARE_STRICT_LOCKING_DEFAULT   true
+#define SHARE_OPLOCKS_DEFAULT  true
+#define SHARE_STRICT_SYNC_DEFAULT      false
+#define SHARE_MSDFS_ROOT_DEFAULT       false
+#define SHARE_CI_FILESYSTEM_DEFAULT    false
 
 #endif /* _SHARE_H */
 
 #endif /* _SHARE_H */