GCC Code Coverage Report


Directory: ./
File: server/client.cpp
Date: 2024-01-22 17:25:27
Exec Total Coverage
Lines: 29 29 100.0%
Branches: 2 4 50.0%

Line Branch Exec Source
1 /********************************************************************
2 Copyright © 2020 Roman Gilg <subdiff@gmail.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) version 3, or any
8 later version accepted by the membership of KDE e.V. (or its
9 successor approved by the membership of KDE e.V.), which shall
10 act as a proxy defined in Section 6 of version 3 of the license.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 *********************************************************************/
20 #include "client.h"
21 #include "client_p.h"
22
23 #include "wayland/client.h"
24
25 #include "display.h"
26
27 #include <wayland-server.h>
28
29 namespace Wrapland::Server
30 {
31
32 588 Client::Client(wl_client* wlClient, Display* display)
33 588 : QObject(display)
34
2/4
✓ Branch 0 taken 588 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 588 times.
588 , d_ptr(new Private(wlClient, this, display))
35
36 588 {
37 588 }
38
39 1176 Client::~Client() = default;
40
41 6 void Client::flush()
42 {
43 6 d_ptr->flush();
44 6 }
45
46 2 void Client::destroy()
47 {
48 2 d_ptr->destroy();
49 2 }
50
51 8 wl_client* Client::native() const
52 {
53 8 return d_ptr->native;
54 }
55
56 193 Display* Client::display()
57 {
58 193 return d_ptr->m_display;
59 }
60
61 1 gid_t Client::groupId() const
62 {
63 1 return d_ptr->groupId();
64 }
65
66 1 pid_t Client::processId() const
67 {
68 1 return d_ptr->processId();
69 }
70
71 1 uid_t Client::userId() const
72 {
73 1 return d_ptr->userId();
74 }
75
76 1 std::string Client::executablePath() const
77 {
78 1 return d_ptr->executablePath();
79 }
80
81 2 std::string Client::security_context_app_id() const
82 {
83 2 return d_ptr->security_context_app_id();
84 }
85
86 1 void Client::set_security_context_app_id(std::string const& id)
87 {
88 1 d_ptr->set_security_context_app_id(id);
89 1 }
90
91 }
92