summaryrefslogtreecommitdiffstats
path: root/src/ifmedia/qifmediadevice.cpp
blob: ffa07529fc9eeacf8ae499287da7678618372bc6 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// Copyright (C) 2021 The Qt Company Ltd.
// Copyright (C) 2019 Luxoft Sweden AB
// Copyright (C) 2018 Pelagicore AG
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qifmediadevice.h"

QT_BEGIN_NAMESPACE

/*!
    \class QIfMediaDevice
    \inmodule QtIfMedia
    \brief QIfMediaDevice is the base class for all media devices.

    A Media Device is an externally or internally connected device on which media is stored.
    It can be a physical medium like a USB thumbdrive or a CD/DVD, but it could also be a DLNA Media Server running
    on a different machine e.g. on the rear seat entertainment system.

    Media Devices can be retrieved by using the QIfMediaDeviceDiscoveryModel, which asks the backend
    which devices it knows of that are currently connected to the Interface Framework system.

    \section1 Supported Media Devices
    \target SupportedMediaDevices

    The following media devices are supported by the QIfMedia module:
    \annotatedlist qtif_mediadevices
*/

/*!
    \qmltype MediaDevice
    \instantiates QIfMediaDevice
    \inqmlmodule QtInterfaceFramework.Media
    \inherits ServiceObject
    \brief MediaDevice is the base item for all Media Devices.

    A Media Device is an externally or internally connected device on which media is stored.
    It can be a physical medium like a USB thumbdrive or a CD/DVD, but it could also be a DLNA Media Server running
    on a different machine e.g. on the rear seat entertainment system.

    Media Devices can be retrieved by using the MediaDeviceDiscoveryModel, which asks the backend
    which devices it knows of that are currently connected to the Interface Framework system.

    \section1 Supported Media Devices
    \target QmlSupportedMediaDevices

    The following media devices are supported by the QIfMedia module:
    \annotatedlist qtif_qmlmediadevices
*/

/*!
    \qmlproperty string MediaDevice::name
    The name of the media device. E.g. the CD-name or the name of the thumbdrive.
*/

/*!
    \property QIfMediaDevice::name
    The name of the media device. E.g. the CD-name or the name of the thumbdrive.
*/

/*!
    \qmlproperty string MediaDevice::type
    The type of the media device. E.g. "usb", "CD". See \l QmlSupportedMediaDevices for the supported Devices.
*/

/*!
    \property QIfMediaDevice::type
    The type of the media device. E.g. "usb", "CD". See \l SupportedMediaDevices for the supported Devices.
*/

QIfMediaDevice::QIfMediaDevice(QObject *parent)
    : QIfServiceObject(parent)
{

}

/*!
    \class QIfMediaUsbDevice
    \inmodule QtIfMedia
    \ingroup qtif_mediadevices
    \brief QIfMediaUsbDevice represents a USB device connected to the system.

    This device instance can be used as a serviceObject for other Features e.g. the
    QIfFilterAndBrowseModel to browse through the content. Whether a feature is supported
    by this device is decided by the backend implementing it.

    \note The type of this device is \e "usb"
*/

/*!
    \qmltype MediaUsbDevice
    \instantiates QIfMediaUsbDevice
    \inqmlmodule QtInterfaceFramework.Media
    \ingroup qtif_qmlmediadevices
    \inherits MediaDevice
    \brief MediaUsbDevice represents a USB device connected to the system.

    This device instance can be used as a serviceObject for other Features e.g. the
    FilterAndBrowseModel to browse through the content. Whether a feature is supported
    by this device is decided by the backend implementing it.

    \note The type of this device is \e "usb"
*/

QIfMediaUsbDevice::QIfMediaUsbDevice(QObject *parent)
    : QIfMediaDevice(parent)
{

}

/*!
    \reimp

    Returns \e "usb".
*/
QString QIfMediaUsbDevice::type() const
{
    return QLatin1String("usb");
}

/*!
    \qmlmethod MediaUsbDevice::eject()

    Ejects the USB media device and makes sure all data is written to the thumb-drive so it can safely be removed.
*/

/*!
    \fn void QIfMediaUsbDevice::eject()

    Ejects the USB media device and makes sure all data is written to the thumb-drive so it can safely be removed.
*/

QT_END_NAMESPACE

#include "moc_qifmediadevice.cpp"