X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=remote%2Fsource%2Fxinemacontrol.h;h=573207365c27b2dcfcbd0422620f176bd688faba;hb=857fbdc12041b7f01f45d4dcf2208f9dccf29294;hp=5693554836b88f7e0639810ea57f08f272affe7d;hpb=a5fc8a4255dabc9d5d514e597a7b19ffd5baf793;p=xinema.git diff --git a/remote/source/xinemacontrol.h b/remote/source/xinemacontrol.h index 5693554..5732073 100644 --- a/remote/source/xinemacontrol.h +++ b/remote/source/xinemacontrol.h @@ -16,6 +16,11 @@ public: PLAYING }; + enum + { + OFF = -1 + }; + private: QTcpSocket socket; QByteArray buffer; @@ -23,6 +28,10 @@ private: QString title; float duration; float position; + QStringList audio_channels; + QStringList spu_channels; + int current_audio_channel; + int current_spu_channel; public: XinemaControl(); @@ -43,6 +52,13 @@ public: void pause(); void stop(); + const QStringList &get_audio_channels() const { return audio_channels; } + const QStringList &get_spu_channels() const { return spu_channels; } + void select_audio_channel(int); + void select_spu_channel(int); + int get_current_audio_channel() const { return current_audio_channel; } + int get_current_spu_channel() const { return current_spu_channel; } + signals: void connected(); void disconnected(); @@ -53,6 +69,9 @@ signals: void title_changed(const QString &); void duration_changed(float); void position_changed(float); + void channels_changed(); + void current_audio_channel_changed(int); + void current_spu_channel_changed(int); private: void send_request(const QString &); @@ -60,6 +79,8 @@ private: private slots: void data_available(); void process_reply(const QString &); + static int convert_channel(const QString &); + static void resize_list(QStringList &, int); }; #endif