File: sambainstaller.h

package info (click to toggle)
kdenetwork-filesharing 4%3A22.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,500 kB
  • sloc: cpp: 1,999; xml: 129; makefile: 3; sh: 2
file content (41 lines) | stat: -rw-r--r-- 1,022 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
    SPDX-License-Identifier: GPL-2.0-or-later
    SPDX-FileCopyrightText: 2020 Harald Sitter <sitter@kde.org>
*/

#pragma once

#include <PackageKit/Daemon>
#include <PackageKit/Transaction>

class SambaInstaller : public QObject
{
    Q_OBJECT
    Q_PROPERTY(bool installing READ isInstalling NOTIFY installingChanged)
    Q_PROPERTY(bool installed READ isInstalled NOTIFY installedChanged)
    Q_PROPERTY(bool failed READ hasFailed NOTIFY failedChanged)
public:
    using QObject::QObject;

public Q_SLOTS:
    void install();
    bool isInstalling() const;
    bool hasFailed() const;

    static bool isInstalled();

Q_SIGNALS:
    void installingChanged();
    void installedChanged();
    void failedChanged();

private Q_SLOTS:
    void packageFinished(PackageKit::Transaction::Exit status);

private:
    void setFailed(bool failed); // **un**sets installing if it is set as well
    void setInstalling(bool installing); // **un**sets failed if set

    bool m_installing = false;
    bool m_failed = false;
};