Music Hub  ..
A session-wide music playback service
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
unity_screen_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: Alberto Aguirre <alberto.aguirre@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 #include <vector>
32 #include <chrono>
33 
34 namespace core
35 {
36 
37 struct UScreen
38 {
39  static std::string& name()
40  {
41  static std::string s = "com.canonical.Unity.Screen";
42  return s;
43  }
44 
46  {
47  static std::string name()
48  {
49  static std::string s = "keepDisplayOn";
50  return s;
51  }
52 
53  static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
54 
55  typedef UScreen Interface;
56  };
57 
59  {
60  static std::string name()
61  {
62  static std::string s = "removeDisplayOnRequest";
63  return s;
64  }
65 
66  static const std::chrono::milliseconds default_timeout() { return std::chrono::seconds{1}; }
67 
68  typedef UScreen Interface;
69  };
70 };
71 
72 }
static const std::chrono::milliseconds default_timeout()
static std::string & name()
static const std::chrono::milliseconds default_timeout()