1
// -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
3
* Copyright (C) 2011 Canonical Ltd
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.
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.
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/>.
17
* Authored by: Neil Jagdish Patel <neil.patel@canonical.com>
24
#include <NuxCore/Logger.h>
27
#include "GLibWrapper.h"
37
nux::logging::Logger logger("unity.dash.lens");
47
string const& dbus_name,
48
string const& dbus_path,
51
string const& description,
52
string const& search_hint,
54
string const& shortcut);
57
string const& dbus_name();
58
string const& dbus_path();
61
string const& description();
62
string const& search_hint();
64
string const& shortcut();
82
Lens::Impl::Impl(Lens* owner,
84
string const& dbus_name,
85
string const& dbus_path,
88
string const& description,
89
string const& search_hint,
91
string const& shortcut)
94
, dbus_name_(dbus_name)
95
, dbus_path_(dbus_path)
98
, description_(description)
99
, search_hint_(search_hint)
101
, shortcut_(shortcut)
107
string const& Lens::Impl::id()
112
string const& Lens::Impl::dbus_name()
117
string const& Lens::Impl::dbus_path()
122
string const& Lens::Impl::name()
127
string const& Lens::Impl::icon()
132
string const& Lens::Impl::description()
137
string const& Lens::Impl::search_hint()
142
bool Lens::Impl::visible()
147
string const& Lens::Impl::shortcut()
152
Lens::Lens(string const& id_,
153
string const& dbus_name_,
154
string const& dbus_path_,
157
string const& description_,
158
string const& search_hint_,
160
string const& shortcut_)
162
: pimpl(new Impl(this,
173
id.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::id));
174
dbus_name.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::dbus_name));
175
dbus_path.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::dbus_path));
176
name.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::name));
177
icon.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::icon));
178
description.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::description));
179
search_hint.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::search_hint));
180
visible.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::visible));
181
shortcut.SetGetterFunction(sigc::mem_fun(pimpl, &Lens::Impl::shortcut));