[Pkg-privacy-commits] [libgsecuredelete] 26/168: Move modes inside class namespace.

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 20:06:34 UTC 2016


This is an automated email from the git hooks/post-receive script.

u-guest pushed a commit to branch master
in repository libgsecuredelete.

commit ed04eeee8fb2753dddea5ca977569b9c6fdb735e
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Fri Oct 2 19:55:42 2009 +0200

    Move modes inside class namespace.
    
    SecureDeleteOperationMode and FillOpeationWipeMode are now
    SecureDeleteOperation.Mode ans FillOpeation.WipeMode.
---
 gsecuredelete/fill-operation.vala         | 36 +++++++++++++-------------
 gsecuredelete/securedelete-operation.vala | 43 ++++++++++++++++---------------
 2 files changed, 40 insertions(+), 39 deletions(-)

diff --git a/gsecuredelete/fill-operation.vala b/gsecuredelete/fill-operation.vala
index 7434089..c6ee314 100644
--- a/gsecuredelete/fill-operation.vala
+++ b/gsecuredelete/fill-operation.vala
@@ -24,28 +24,28 @@ namespace SecureDelete
    * perhaps add support -z.
    */
   
-  /**
-   * FillOperationWipeMode:
-   * 
-   * @FULL:   wipe both free inode and data free space.
-   * @INODES: wipe only free inode space (not free data space)
-   * @DATA:   wipe only free data space (not free inode space)
-   */
-  public enum FillOperationWipeMode {
-    FULL,
-    INODES,
-    DATA
-  }
-  
   public class FillOperation : SecureDeleteOperation
   {
+    /**
+     * WipeMode:
+     * 
+     * @FULL:   wipe both free inode and data free space.
+     * @INODES: wipe only free inode space (not free data space)
+     * @DATA:   wipe only free data space (not free inode space)
+     */
+    public enum WipeMode {
+      FULL,
+      INODES,
+      DATA
+    }
+    
     /** FillOperation:wipe_mode
      * The wiping mode
      */
-    public FillOperationWipeMode wipe_mode {
+    public WipeMode wipe_mode {
       get;
       set;
-      default = FillOperationWipeMode.FULL;
+      default = WipeMode.FULL;
     }
     /** FillOperation:directory:
      * The directory to fill (must of course be on the filesystem to clean).
@@ -61,12 +61,12 @@ namespace SecureDelete
     }
     
     /* returns the argument needed for the a wipe mode */
-    private unowned string? get_argument_for_wipe_mode (FillOperationWipeMode wipe_mode)
+    private unowned string? get_argument_for_wipe_mode (WipeMode wipe_mode)
     {
       switch (wipe_mode) {
-        case FillOperationWipeMode.INODES:
+        case WipeMode.INODES:
           return "-i";
-        case FillOperationWipeMode.DATA:
+        case WipeMode.DATA:
           return "-I";
       }
       return null;
diff --git a/gsecuredelete/securedelete-operation.vala b/gsecuredelete/securedelete-operation.vala
index 7b4114a..8a839f8 100644
--- a/gsecuredelete/securedelete-operation.vala
+++ b/gsecuredelete/securedelete-operation.vala
@@ -21,21 +21,6 @@ using GLib;
 
 namespace SecureDelete
 {
-  /**
-   * SecureDeleteOperationMode:
-   * 
-   * Secure mode:
-   * @NORMAL: normal mode
-   * @FAST: faster but less secure (correspond to the -f option)
-   * @VERY_FAST: really faster but with a very poor security
-   * @VERY_VERY_FAST: even more faster, even less secure
-   */
-  public enum SecureDeleteOperationMode {
-    NORMAL,
-    FAST,
-    VERY_FAST,
-    VERY_VERY_FAST
-  }
   
   /**
    * SecureDeleteOperation:
@@ -46,24 +31,40 @@ namespace SecureDelete
    */
   public abstract class SecureDeleteOperation : AsyncOperation
   {
+    /**
+     * Mode:
+     * 
+     * Secure mode:
+     * @NORMAL: normal mode
+     * @FAST: faster but less secure (correspond to the -f option)
+     * @VERY_FAST: really faster but with a very poor security
+     * @VERY_VERY_FAST: even more faster, even less secure
+     */
+    public enum Mode {
+      NORMAL,
+      FAST,
+      VERY_FAST,
+      VERY_VERY_FAST
+    }
+    
     /** The security mode */
-    public SecureDeleteOperationMode mode {
+    public Mode mode {
       get;
       set;
-      default = SecureDeleteOperationMode.NORMAL;
+      default = Mode.NORMAL;
     }
     
     /* returns the argument to pass to SecureDelete tools depending on the
      * security mode. %null wan be returned, meaning no argument should be
      * added */
-    protected unowned string? get_argument_for_mode (SecureDeleteOperationMode mode)
+    protected unowned string? get_argument_for_mode (Mode mode)
     {
       switch (mode) {
-        case SecureDeleteOperationMode.FAST:
+        case Mode.FAST:
           return "-f";
-        case SecureDeleteOperationMode.VERY_FAST:
+        case Mode.VERY_FAST:
           return "-l";
-        case SecureDeleteOperationMode.VERY_VERY_FAST:
+        case Mode.VERY_VERY_FAST:
           return "-ll";
       }
       return null;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/libgsecuredelete.git



More information about the Pkg-privacy-commits mailing list