[Pkg-privacy-commits] [libgsecuredelete] 06/168: Improved the documentation.

Ulrike Uhlig u-guest at moszumanska.debian.org
Thu Jul 7 20:06:32 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 1f8a3406264dff78124f473ed5c07f9d774ac92c
Author: Colomban Wendling <ban at herbesfolles.org>
Date:   Tue Sep 29 21:37:39 2009 +0200

    Improved the documentation.
    
    Added a simple example and a warning about not using a GMainLoop.
---
 gsecuredelete/async-operation.vala | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gsecuredelete/async-operation.vala b/gsecuredelete/async-operation.vala
index d2d6920..db6633f 100644
--- a/gsecuredelete/async-operation.vala
+++ b/gsecuredelete/async-operation.vala
@@ -21,6 +21,35 @@ namespace SecureDelete
    * to add actual progress support; build_environ() to provide a specific
    * environment to your command.
    * 
+   * <warning>
+   *   You need a GLib's MainLoop for the watching process to work for the
+   *   asynchronous method.
+   * </warning>
+   * 
+   * <example>
+   *   <title>Simple usage of an hypothetical subclass FooOperation</title>
+   *   <programlisting>
+   * var foo = new FooOperation();
+   * 
+   * // Connect the finish callback
+   * foo.finished.connect ((success, error) => {
+   *                         if (success) {
+   *                           stdout.printf ("success!\n");
+   *                         } else {
+   *                           stderr.printf ("failure: %s\n", error.message);
+   *                         }
+   *                       });
+   * // and the progress callback
+   * foo.progress.connect ((progress) => {
+   *                         stdout.printf ("%.0f%%", progress * 100);
+   *                       });
+   * foo.run ();
+   * 
+   * var loop = GLib.MainLoop (null, false);
+   * loop.run ();
+   *   </programlisting>
+   * </example>
+   * 
    * @n_passes: the maximum number of progress steps.
    * @passes:   the current progress step
    * @pid:      the subprocess PID

-- 
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