/loggerouter/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/loggerouter/trunk
1 by Gustav Hartvigsson
* Inital release
1
/*
2
   This file is part of LoggerOuter.
3
4
 LoggerOuter is free software: you can redistribute it and/or modify it under the
5
 terms of the GNU Lesser General Public License as published by the Free Software
6
 Foundation, either version 3 of the License, or (at your option) any later
7
 version.
8
9
 LoggerOuter is distributed in the hope that it will be useful, but WITHOUT
10
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12
 License for more details.
13
14
 You should have received a copy of the GNU Lessel General Public License
15
 along with LoggerOuter. If not, see <https://www.gnu.org/licenses/>.
16
 */
17
18
public struct LO.Options{
19
  public string exec_name;
20
  public bool version;
21
  public string config_path;
22
  public bool config_help;
23
  public string actions_path;
24
25
  private static GLib.Once<LO.Options?> instance;
26
27
  public static unowned LO.Options? get_instance () {
28
    return instance.once (() => {
29
        return LO.Options ();
30
    });
31
  }
32
33
  private  Options () {
34
  }
35
5 by Gustav Hartvigsson
[timer.vala] Fixed the timeout being triggered even is user has pressed concle.
36
  public string to_string () {
37
    var outstr = new StringBuilder ();
38
    outstr.append ("exec_name:");
39
    outstr.append (exec_name);
40
    outstr.append ("\nversion:");
41
    outstr.append (version.to_string ());
42
    outstr.append ("\nconfig_path:");
43
    outstr.append (config_path);
44
    outstr.append ("\nconfig_help:");
45
    outstr.append (config_help.to_string ());
46
    outstr.append ("\nactions_path:");
47
    outstr.append (actions_path);
48
    outstr.append ("\n");
49
50
    return outstr.str;
51
  }
52
}
1 by Gustav Hartvigsson
* Inital release
53