File: kmtpdeviceinterface.h

package info (click to toggle)
kio-extras 4%3A22.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,768 kB
  • sloc: cpp: 26,898; ansic: 4,443; perl: 1,058; xml: 97; sh: 69; python: 28; makefile: 9
file content (51 lines) | stat: -rw-r--r-- 1,266 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
51
/*
    This file is part of the KMTP framework, part of the KDE project.

    SPDX-FileCopyrightText: 2018 Andreas Krutzler <andreas.krutzler@gmx.net>

    SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/

#ifndef KMTPDEVICEINTERFACE_H
#define KMTPDEVICEINTERFACE_H

#include <QObject>

#include "deviceinterface.h"

class KMTPStorageInterface;

/**
 * @brief The KMTPDeviceInterface class
 *
 * @note This interface should be a public API.
 */
class KMTPDeviceInterface : public QObject
{
    Q_OBJECT
    Q_PROPERTY(QString udi READ udi CONSTANT)
    Q_PROPERTY(QString friendlyName READ friendlyName NOTIFY friendlyNameChanged)

public:
    explicit KMTPDeviceInterface(const QString &dbusObjectPath, QObject *parent);

    QString udi() const;
    QString friendlyName() const;

    QVector<KMTPStorageInterface *> storages();
    KMTPStorageInterface *storageFromDescription(const QString &description) const;
    void updateStorages();

private:
    org::kde::kmtp::Device *m_dbusInterface;
    QVector<KMTPStorageInterface *> m_storages;

public Q_SLOTS:
    int setFriendlyName(const QString &friendlyName);

Q_SIGNALS:
    void friendlyNameChanged(const QString &friendlyName);
};


#endif // KMTPDEVICEINTERFACE_H