Music Hub  ..
A session-wide music playback service
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
indicator_power_service.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Author: Jim Hodapp <jim.hodapp@canonical.com>
17  */
18 
19 #include <core/dbus/dbus.h>
20 #include <core/dbus/fixture.h>
21 #include <core/dbus/object.h>
22 #include <core/dbus/property.h>
23 #include <core/dbus/service.h>
24 #include <core/dbus/interfaces/properties.h>
25 #include <core/dbus/types/stl/tuple.h>
26 #include <core/dbus/types/stl/vector.h>
27 
28 #include <core/dbus/asio/executor.h>
29 
30 #include <string>
31 
32 namespace core
33 {
34 
36 {
37  static std::string& name()
38  {
39  static std::string s = "com.canonical.indicator.power.Battery";
40  return s;
41  }
42 
43  struct PowerLevel
44  {
45  static std::string name()
46  {
47  static std::string s = "PowerLevel";
48  return s;
49  }
50 
52  // Possible values: "ok", "low", "very_low", "critical"
53  typedef std::string ValueType;
54  static const bool readable = true;
55  static const bool writable = false;
56  };
57 
58  struct IsWarning
59  {
60  static std::string name()
61  {
62  static std::string s = "IsWarning";
63  return s;
64  }
65 
67  typedef bool ValueType;
68  static const bool readable = true;
69  static const bool writable = false;
70  };
71 
72 }; // IndicatorPower
73 
74 }
Definition: player.h:29
static std::string & name()