File: kmtpdeviceinterface.h

package info (click to toggle)
kio-extras 4%3A25.04.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 31,928 kB
  • sloc: cpp: 28,852; ansic: 3,084; perl: 1,048; xml: 116; sh: 92; python: 28; makefile: 9
file content (50 lines) | stat: -rw-r--r-- 1,261 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
/*
    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;

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

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

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

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

#endif // KMTPDEVICEINTERFACE_H