Music Hub
..
A session-wide music playback service
context.cpp
Go to the documentation of this file.
1
/*
2
* Copyright © 2014 Canonical Ltd.
3
* Copyright © 2022 UBports Foundation.
4
*
5
* Contact: Alberto Mardegan <mardy@users.sourceforge.net>
6
*
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU Lesser General Public License version 3,
9
* as published by the Free Software Foundation.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*
19
* Authored by: Thomas Voß <thomas.voss@canonical.com>
20
*/
21
22
#include "
apparmor/context.h
"
23
24
namespace
apparmor
=
lomiri::MediaHubService::apparmor
;
25
26
apparmor::Context::Context
(
const
QString &name) : name{name}
27
{
28
if
(name.isEmpty())
throw
std::runtime_error
29
{
30
"apparmor::Context cannot be created for empty name."
31
};
32
}
33
34
const
QString &
apparmor::Context::str
()
const
35
{
36
return
name;
37
}
lomiri::MediaHubService::apparmor::Context::str
const QString & str() const
Definition:
context.cpp:34
lomiri::MediaHubService::apparmor
Definition:
context.h:30
context.h
lomiri::MediaHubService::apparmor::Context::Context
Context(const QString &name)
Definition:
context.cpp:26
src
service
apparmor
context.cpp
Generated on Fri Dec 16 2022 11:18:10 for Music Hub by
1.8.17