~ubuntu-branches/ubuntu/raring/workrave/raring

« back to all changes in this revision

Viewing changes to backend/src/ConfigBackendAdapter.hh

  • Committer: Package Import Robot
  • Author(s): Francois Marier, Francois Marier, Jordi Mallach
  • Date: 2012-05-28 11:29:40 UTC
  • mfrom: (1.2.9)
  • Revision ID: package-import@ubuntu.com-20120528112940-bbbsjkk30fom9s8x
Tags: 1.9.909+abc941eb70-1
[ Francois Marier ]
* New upstream snapshot
  - Drop leak-fix patch (applied upstream)
  - Document how the tarball is built in README.source
* Build GNOME applets and use gsettings
* Massive update of Build-Depends as per configure.ac

* Update README.source with snapshot instructions
* Switch to machine-readable copyright file
* Update alioth git repo links
* Bump debhelper version to 9
* Bump Standards-Version to 3.9.3

[ Jordi Mallach ]
* Avoid references to GNU/Linux in manpage.
* Drop build dependency on libgnet-dev, it's obsolete and unneeded.
* Add myself to Uploaders.
* Rewrite d/rules into dh style.
  - Move all install tweaks to .install files.
  - Install manpages using dh_installman.
* As a side effect, the package installs arch-dependant data in the
  arch triplet directory; add the required Pre-Depends for m-a-support.
* Bring back GNOME Panel applet (for GNOME 3 fallback mode) and ship the
  new GNOME Shell extension (closes: #642514, #666100).
* Add private_dirs.patch: move libworkrave-private and GObject
  Introspection files to a private dir, so they are really out of the
  way, but disable it for now as it breaks the Shell extension.
* Move typelib out of the triplet dir as gobject-introspection is not
  M-A ready yet.
* Enable dh_autoreconf for the above patches.
* Add lintian overrides.
* Add necessary Breaks/Replaces as the xpm icon has moved to workrave-data.
* Prefix all debhelper files with package name.
* Suggest gnome-shell and gnome-panel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// IConfigBackend.hh
2
2
//
3
 
// Copyright (C) 2001 - 2007 Rob Caelers <robc@krandor.nl>
 
3
// Copyright (C) 2001 - 2007, 2012 Rob Caelers <robc@krandor.nl>
4
4
// All rights reserved.
5
5
//
6
6
// This program is free software: you can redistribute it and/or modify
27
27
class ConfigBackendAdapter : public virtual IConfigBackend
28
28
{
29
29
public:
30
 
  virtual bool get_value(const std::string &key, std::string &out) const = 0;
31
 
  virtual bool get_value(const std::string &key, bool &out) const = 0;
32
 
  virtual bool get_value(const std::string &key, int &out) const = 0;
33
 
  virtual bool get_value(const std::string &key, long &out) const = 0;
34
 
  virtual bool get_value(const std::string &key, double &out) const = 0;
 
30
  virtual bool get_config_value(const std::string &key, std::string &out) const = 0;
 
31
  virtual bool get_config_value(const std::string &key, bool &out) const = 0;
 
32
  virtual bool get_config_value(const std::string &key, int &out) const = 0;
 
33
  virtual bool get_config_value(const std::string &key, long &out) const = 0;
 
34
  virtual bool get_config_value(const std::string &key, double &out) const = 0;
35
35
 
36
 
  virtual bool set_value(const std::string &key, std::string v) = 0;
37
 
  virtual bool set_value(const std::string &key, bool v) = 0;
38
 
  virtual bool set_value(const std::string &key, int v) = 0;
39
 
  virtual bool set_value(const std::string &key, long v) = 0;
40
 
  virtual bool set_value(const std::string &key, double v) = 0;
 
36
  virtual bool set_config_value(const std::string &key, std::string v) = 0;
 
37
  virtual bool set_config_value(const std::string &key, bool v) = 0;
 
38
  virtual bool set_config_value(const std::string &key, int v) = 0;
 
39
  virtual bool set_config_value(const std::string &key, long v) = 0;
 
40
  virtual bool set_config_value(const std::string &key, double v) = 0;
41
41
 
42
42
  virtual bool get_value(const std::string &key, VariantType type, Variant &value) const
43
43
  {
45
45
    switch(type)
46
46
      {
47
47
      case VARIANT_TYPE_INT:
48
 
        return get_value(key, value.int_value);
 
48
        return get_config_value(key, value.int_value);
49
49
 
50
50
      case VARIANT_TYPE_BOOL:
51
 
        return get_value(key, value.bool_value);
 
51
        return get_config_value(key, value.bool_value);
52
52
 
53
53
      case VARIANT_TYPE_DOUBLE:
54
 
        return get_value(key, value.double_value);
 
54
        return get_config_value(key, value.double_value);
55
55
 
56
56
      case VARIANT_TYPE_NONE:
57
57
      case VARIANT_TYPE_STRING:
58
 
        return get_value(key, value.string_value);
 
58
        return get_config_value(key, value.string_value);
59
59
 
60
60
      default:
61
61
        return false;
71
71
        return false;
72
72
 
73
73
      case VARIANT_TYPE_INT:
74
 
        return set_value(key, value.int_value);
 
74
        return set_config_value(key, value.int_value);
75
75
 
76
76
      case VARIANT_TYPE_BOOL:
77
 
        return set_value(key, value.bool_value);
 
77
        return set_config_value(key, value.bool_value);
78
78
 
79
79
      case VARIANT_TYPE_DOUBLE:
80
 
        return set_value(key, value.double_value);
 
80
        return set_config_value(key, value.double_value);
81
81
 
82
82
      case VARIANT_TYPE_STRING:
83
 
        return set_value(key, value.string_value);
 
83
        return set_config_value(key, value.string_value);
84
84
 
85
85
      default:
86
86
        return false;