19#ifndef JELLYFIN_VIEWMODEL_REMOTEDEVICE_H
20#define JELLYFIN_VIEWMODEL_REMOTEDEVICE_H
24#include <QAbstractItemModel>
27#include <QQmlParserStatus>
28#include <QSharedPointer>
48 Q_INTERFACES(QQmlParserStatus)
77 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
78 QVariant
data(
const QModelIndex &index,
int role)
const override;
105 void onSessionLost(QString sessionId);
106 void onSessionsReset();
109 bool m_scanning =
false;
110 bool m_componentComplete =
false;
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Abstract class for describing a playback session that can be controlled.
Definition controllablesession.h:56
The PlaybackManager class manages the playback of Jellyfin items.
Definition playbackmanager.h:76
AbstractListModel of remotely controllable devices by JellyfinQt.
Definition remotedevice.h:46
void componentComplete() override
Definition remotedevice.cpp:32
ApiClient * apiClient() const
Definition remotedevice.h:70
RemoteDeviceList(QObject *parent=nullptr)
Definition remotedevice.cpp:28
Jellyfin::ApiClient * apiClient
Definition remotedevice.h:53
void setScanning(bool scanning)
Definition remotedevice.cpp:96
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition remotedevice.cpp:66
Q_INVOKABLE void activateSession(Jellyfin::ViewModel::PlaybackManager *manager, int index)
Sets the PlaybackManager to control the session at the given index in this model.
Definition remotedevice.cpp:92
void classBegin() override
Definition remotedevice.cpp:31
QHash< int, QByteArray > roleNames() const override
Definition remotedevice.h:79
QVariant data(const QModelIndex &index, int role) const override
Definition remotedevice.cpp:70
bool scanning
Definition remotedevice.h:57
RoleNames
Definition remotedevice.h:59
@ deviceType
Definition remotedevice.h:63
@ userName
Definition remotedevice.h:64
@ jellyfinId
Definition remotedevice.h:60
@ session
Definition remotedevice.h:65
@ deviceName
Definition remotedevice.h:62
@ name
Definition remotedevice.h:61
void setApiClient(ApiClient *apiClient)
Definition remotedevice.cpp:39
bool scanning() const
Definition remotedevice.h:73
Definition mediaplayer2.h:20