~townsend/unity/fix-lp1301394-trusty

3695.4.51 by Marco Trevisan (Treviño)
SessionDBusManager: add new dbus server to reply to session controlling requests
1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
2
/*
3
 * Copyright (C) 2014 Canonical Ltd
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License version 3 as
7
 * published by the Free Software Foundation.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
 *
17
 * Authored by: Marco Trevisan <marco.trevisan@canonical.com>
18
 */
19
20
#ifndef UNITYSHELL_SESSION_DBUS_MANAGER_H
21
#define UNITYSHELL_SESSION_DBUS_MANAGER_H
22
23
#include <UnityCore/ConnectionManager.h>
24
#include <UnityCore/GLibDBusServer.h>
25
#include <UnityCore/SessionManager.h>
26
27
namespace unity
28
{
29
namespace session
30
{
31
32
class DBusManager
33
{
34
public:
35
  typedef std::shared_ptr<DBusManager> Ptr;
36
37
  DBusManager(session::Manager::Ptr const& manager);
38
  virtual ~DBusManager() = default;
39
40
private:
41
  session::Manager::Ptr session_;
42
  glib::DBusServer server_;
43
  glib::DBusObject::Ptr object_;
44
  connection::Manager connections_;
45
};
46
47
} // session
48
} // unity
49
50
#endif