summaryrefslogtreecommitdiffstats
path: root/src/kmplayervdr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kmplayervdr.cpp')
-rw-r--r--src/kmplayervdr.cpp122
1 files changed, 61 insertions, 61 deletions
diff --git a/src/kmplayervdr.cpp b/src/kmplayervdr.cpp
index bcf23d4..56c6f38 100644
--- a/src/kmplayervdr.cpp
+++ b/src/kmplayervdr.cpp
@@ -107,7 +107,7 @@ KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVDR::KMPlayerPrefSourcePageVDR (TQWidg
KDE_NO_CDTOR_EXPORT KMPlayerPrefSourcePageVDR::~KMPlayerPrefSourcePageVDR () {}
-KDE_NO_EXPORT void KMPlayerPrefSourcePageVDR::showEvent (TQShowEvent *) {
+TDE_NO_EXPORT void KMPlayerPrefSourcePageVDR::showEvent (TQShowEvent *) {
XVideo * xvideo = static_cast<XVideo *>(m_player->players()["xvideo"]);
if (!xvideo->configDocument ())
xvideo->getConfigData ();
@@ -160,19 +160,19 @@ KDE_NO_CDTOR_EXPORT void KMPlayerVDRSource::waitForConnectionClose () {
}
}
-KDE_NO_EXPORT bool KMPlayerVDRSource::hasLength () {
+TDE_NO_EXPORT bool KMPlayerVDRSource::hasLength () {
return false;
}
-KDE_NO_EXPORT bool KMPlayerVDRSource::isSeekable () {
+TDE_NO_EXPORT bool KMPlayerVDRSource::isSeekable () {
return true;
}
-KDE_NO_EXPORT TQString KMPlayerVDRSource::prettyName () {
+TDE_NO_EXPORT TQString KMPlayerVDRSource::prettyName () {
return i18n ("VDR");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::activate () {
+TDE_NO_EXPORT void KMPlayerVDRSource::activate () {
last_channel = 0;
connect (this, TQ_SIGNAL (startPlaying ()), this, TQ_SLOT (processStarted()));
connect (this, TQ_SIGNAL (stopPlaying ()), this, TQ_SLOT (processStopped ()));
@@ -195,7 +195,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::activate () {
TQTimer::singleShot (0, m_player, TQ_SLOT (play ()));
}
-KDE_NO_EXPORT void KMPlayerVDRSource::deactivate () {
+TDE_NO_EXPORT void KMPlayerVDRSource::deactivate () {
disconnect (m_socket, TQ_SIGNAL (error (int)), this, TQ_SLOT (socketError (int)));
if (m_player->view ()) {
disconnect (this, TQ_SIGNAL(startPlaying()), this, TQ_SLOT(processStarted()));
@@ -211,19 +211,19 @@ KDE_NO_EXPORT void KMPlayerVDRSource::deactivate () {
m_request_jump.truncate (0);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::playCurrent () {
+TDE_NO_EXPORT void KMPlayerVDRSource::playCurrent () {
if (m_player->process ())
m_player->process ()->play (this, current ()); // FIXME HACK
}
-KDE_NO_EXPORT void KMPlayerVDRSource::processStopped () {
+TDE_NO_EXPORT void KMPlayerVDRSource::processStopped () {
if (m_socket->state () == TQSocket::Connected) {
queueCommand (TQString ("VOLU %1\n").arg (m_stored_volume).ascii ());
queueCommand ("QUIT\n");
}
}
-KDE_NO_EXPORT void KMPlayerVDRSource::processStarted () {
+TDE_NO_EXPORT void KMPlayerVDRSource::processStarted () {
m_socket->connectToHost ("127.0.0.1", tcp_port);
commands = new VDRCommand ("connect", commands);
}
@@ -232,7 +232,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::processStarted () {
m_actions [i] = new TDEAction (text, TQString (pix), TDEShortcut (scut), this, slot, m_app->actionCollection (), name); \
m_fullscreen_actions [i] = new TDEAction (text, TDEShortcut (scut), this, slot, m_app->view ()->viewArea ()->actionCollection (), name)
-KDE_NO_EXPORT void KMPlayerVDRSource::connected () {
+TDE_NO_EXPORT void KMPlayerVDRSource::connected () {
queueCommand (cmd_list_channels);
queueCommand (cmd_volume_query);
killTimer (channel_timer);
@@ -272,7 +272,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::connected () {
#undef DEF_ACT
-KDE_NO_EXPORT void KMPlayerVDRSource::disconnected () {
+TDE_NO_EXPORT void KMPlayerVDRSource::disconnected () {
kdDebug() << "disconnected " << commands << endl;
if (finish_timer) {
deleteCommands ();
@@ -295,7 +295,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::disconnected () {
m_app->initMenu ();
}
-KDE_NO_EXPORT void KMPlayerVDRSource::toggleConnected () {
+TDE_NO_EXPORT void KMPlayerVDRSource::toggleConnected () {
if (m_socket->state () == TQSocket::Connected) {
queueCommand ("QUIT\n");
killTimer (channel_timer);
@@ -306,7 +306,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::toggleConnected () {
}
}
-KDE_NO_EXPORT void KMPlayerVDRSource::volumeChanged (int val) {
+TDE_NO_EXPORT void KMPlayerVDRSource::volumeChanged (int val) {
queueCommand (TQString ("VOLU %1\n").arg (int (sqrt (255 * 255 * val / 100))).ascii ());
}
@@ -317,7 +317,7 @@ static struct ReadBuf {
KDE_NO_CDTOR_EXPORT ~ReadBuf () {
clear ();
}
- KDE_NO_EXPORT void operator += (const char * s) {
+ TDE_NO_EXPORT void operator += (const char * s) {
int l = strlen (s);
char * b = new char [length + l + 1];
if (length)
@@ -327,21 +327,21 @@ static struct ReadBuf {
delete buf;
buf = b;
}
- KDE_NO_EXPORT TQCString mid (int p) {
+ TDE_NO_EXPORT TQCString mid (int p) {
return TQCString (buf + p);
}
- KDE_NO_EXPORT TQCString left (int p) {
+ TDE_NO_EXPORT TQCString left (int p) {
return TQCString (buf, p);
}
- KDE_NO_EXPORT TQCString getReadLine ();
- KDE_NO_EXPORT void clear () {
+ TDE_NO_EXPORT TQCString getReadLine ();
+ TDE_NO_EXPORT void clear () {
delete [] buf;
buf = 0;
length = 0;
}
} readbuf;
-KDE_NO_EXPORT TQCString ReadBuf::getReadLine () {
+TDE_NO_EXPORT TQCString ReadBuf::getReadLine () {
TQCString out;
if (!length)
return out;
@@ -356,7 +356,7 @@ KDE_NO_EXPORT TQCString ReadBuf::getReadLine () {
return out;
}
-KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () {
+TDE_NO_EXPORT void KMPlayerVDRSource::readyRead () {
KMPlayer::View * v = finish_timer ? 0L : static_cast <KMPlayer::View *> (m_player->view ());
long nr = m_socket->bytesAvailable();
char * data = new char [nr + 1];
@@ -445,7 +445,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::readyRead () {
delete [] data;
}
-KDE_NO_EXPORT void KMPlayerVDRSource::socketError (int code) {
+TDE_NO_EXPORT void KMPlayerVDRSource::socketError (int code) {
if (code == TQSocket::ErrHostNotFound) {
KMessageBox::error (m_configpage, i18n ("Host not found"), i18n ("Error"));
} else if (code == TQSocket::ErrConnectionRefused) {
@@ -453,7 +453,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::socketError (int code) {
}
}
-KDE_NO_EXPORT void KMPlayerVDRSource::queueCommand (const char * cmd) {
+TDE_NO_EXPORT void KMPlayerVDRSource::queueCommand (const char * cmd) {
if (m_player->source () != this)
return;
if (!commands) {
@@ -475,13 +475,13 @@ KDE_NO_EXPORT void KMPlayerVDRSource::queueCommand (const char * cmd) {
}
}
-KDE_NO_EXPORT void KMPlayerVDRSource::queueCommand (const char * cmd, int t) {
+TDE_NO_EXPORT void KMPlayerVDRSource::queueCommand (const char * cmd, int t) {
queueCommand (cmd);
killTimer (channel_timer);
channel_timer = startTimer (t);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::sendCommand () {
+TDE_NO_EXPORT void KMPlayerVDRSource::sendCommand () {
//kdDebug () << "sendCommand " << commands->command << endl;
m_socket->writeBlock (commands->command, strlen(commands->command));
m_socket->flush ();
@@ -489,7 +489,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::sendCommand () {
timeout_timer = startTimer (30000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::customCmd () {
+TDE_NO_EXPORT void KMPlayerVDRSource::customCmd () {
#if KDE_IS_VERSION(3, 1, 90)
TQString cmd = KInputDialog::getText (i18n ("Custom VDR command"), i18n ("You can pass commands to VDR.\nEnter 'HELP' to see a list of available commands.\nYou can see VDR response in the console window.\n\nVDR Command:"), TQString(), 0, m_player->view ());
if (!cmd.isEmpty ())
@@ -497,7 +497,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::customCmd () {
#endif
}
-KDE_NO_EXPORT void KMPlayerVDRSource::timerEvent (TQTimerEvent * e) {
+TDE_NO_EXPORT void KMPlayerVDRSource::timerEvent (TQTimerEvent * e) {
if (e->timerId () == timeout_timer || e->timerId () == finish_timer) {
deleteCommands ();
} else if (e->timerId () == channel_timer) {
@@ -507,7 +507,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::timerEvent (TQTimerEvent * e) {
}
}
-KDE_NO_EXPORT void KMPlayerVDRSource::deleteCommands () {
+TDE_NO_EXPORT void KMPlayerVDRSource::deleteCommands () {
killTimer (timeout_timer);
timeout_timer = 0;
killTimer (channel_timer);
@@ -523,13 +523,13 @@ KDE_NO_EXPORT void KMPlayerVDRSource::deleteCommands () {
}
}
-KDE_NO_EXPORT void KMPlayerVDRSource::jump (KMPlayer::NodePtr e) {
+TDE_NO_EXPORT void KMPlayerVDRSource::jump (KMPlayer::NodePtr e) {
if (!e->isPlayable ()) return;
m_current = e;
jump (e->mrl ()->pretty_name);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::jump (const TQString & channel) {
+TDE_NO_EXPORT void KMPlayerVDRSource::jump (const TQString & channel) {
TQCString c ("CHAN ");
TQCString ch = channel.local8Bit ();
int p = ch.find (' ');
@@ -541,99 +541,99 @@ KDE_NO_EXPORT void KMPlayerVDRSource::jump (const TQString & channel) {
queueCommand (c);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::forward () {
+TDE_NO_EXPORT void KMPlayerVDRSource::forward () {
queueCommand ("CHAN +\n", 1000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::backward () {
+TDE_NO_EXPORT void KMPlayerVDRSource::backward () {
queueCommand ("CHAN -\n", 1000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyUp () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyUp () {
queueCommand ("HITK UP\n", 1000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyDown () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyDown () {
queueCommand ("HITK DOWN\n", 1000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyBack () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyBack () {
queueCommand ("HITK BACK\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyOk () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyOk () {
queueCommand ("HITK OK\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keySetup () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keySetup () {
queueCommand ("HITK SETUP\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyChannels () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyChannels () {
queueCommand ("HITK CHANNELS\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyMenu () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyMenu () {
queueCommand ("HITK MENU\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key0 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key0 () {
queueCommand ("HITK 0\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key1 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key1 () {
queueCommand ("HITK 1\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key2 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key2 () {
queueCommand ("HITK 2\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key3 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key3 () {
queueCommand ("HITK 3\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key4 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key4 () {
queueCommand ("HITK 4\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key5 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key5 () {
queueCommand ("HITK 5\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key6 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key6 () {
queueCommand ("HITK 6\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key7 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key7 () {
queueCommand ("HITK 7\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key8 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key8 () {
queueCommand ("HITK 8\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::key9 () {
+TDE_NO_EXPORT void KMPlayerVDRSource::key9 () {
queueCommand ("HITK 9\n", 2000);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyRed () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyRed () {
queueCommand ("HITK RED\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyGreen () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyGreen () {
queueCommand ("HITK GREEN\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyYellow () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyYellow () {
queueCommand ("HITK YELLOW\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::keyBlue () {
+TDE_NO_EXPORT void KMPlayerVDRSource::keyBlue () {
queueCommand ("HITK BLUE\n");
}
-KDE_NO_EXPORT void KMPlayerVDRSource::write (TDEConfig * m_config) {
+TDE_NO_EXPORT void KMPlayerVDRSource::write (TDEConfig * m_config) {
m_config->setGroup (strVDR);
m_config->writeEntry (strVDRPort, tcp_port);
m_config->writeEntry (strXVPort, m_xvport);
@@ -641,7 +641,7 @@ KDE_NO_EXPORT void KMPlayerVDRSource::write (TDEConfig * m_config) {
m_config->writeEntry (strXVScale, scale);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::read (TDEConfig * m_config) {
+TDE_NO_EXPORT void KMPlayerVDRSource::read (TDEConfig * m_config) {
m_config->setGroup (strVDR);
tcp_port = m_config->readNumEntry (strVDRPort, 2001);
m_xvport = m_config->readNumEntry (strXVPort, 0);
@@ -656,7 +656,7 @@ struct XVTreeItem : public TQListViewItem {
int encoding;
};
-KDE_NO_EXPORT void KMPlayerVDRSource::sync (bool fromUI) {
+TDE_NO_EXPORT void KMPlayerVDRSource::sync (bool fromUI) {
XVideo * xvideo = static_cast<XVideo *>(m_player->players()["xvideo"]);
if (fromUI) {
tcp_port = m_configpage->tcp_port->text ().toInt ();
@@ -714,29 +714,29 @@ KDE_NO_EXPORT void KMPlayerVDRSource::sync (bool fromUI) {
}
}
-KDE_NO_EXPORT void KMPlayerVDRSource::configReceived () {
+TDE_NO_EXPORT void KMPlayerVDRSource::configReceived () {
XVideo * xvideo = static_cast<XVideo *>(m_player->players()["xvideo"]);
disconnect (xvideo, TQ_SIGNAL (configReceived()), this, TQ_SLOT (configReceived()));
sync (false);
}
-KDE_NO_EXPORT void KMPlayerVDRSource::prefLocation (TQString & item, TQString & icon, TQString & tab) {
+TDE_NO_EXPORT void KMPlayerVDRSource::prefLocation (TQString & item, TQString & icon, TQString & tab) {
item = i18n ("Source");
icon = TQString ("text-x-src");
tab = i18n ("VDR");
}
-KDE_NO_EXPORT TQFrame * KMPlayerVDRSource::prefPage (TQWidget * parent) {
+TDE_NO_EXPORT TQFrame * KMPlayerVDRSource::prefPage (TQWidget * parent) {
if (!m_configpage)
m_configpage = new KMPlayerPrefSourcePageVDR (parent, m_player);
return m_configpage;
}
-KDE_NO_EXPORT bool KMPlayerVDRSource::requestPlayURL (KMPlayer::NodePtr) {
+TDE_NO_EXPORT bool KMPlayerVDRSource::requestPlayURL (KMPlayer::NodePtr) {
return true;
}
-KDE_NO_EXPORT void KMPlayerVDRSource::stateElementChanged (KMPlayer::Node *, KMPlayer::Node::State, KMPlayer::Node::State) {
+TDE_NO_EXPORT void KMPlayerVDRSource::stateElementChanged (KMPlayer::Node *, KMPlayer::Node::State, KMPlayer::Node::State) {
}
//-----------------------------------------------------------------------------
@@ -753,7 +753,7 @@ KDE_NO_CDTOR_EXPORT XVideo::XVideo (TQObject * parent, Settings * settings)
KDE_NO_CDTOR_EXPORT XVideo::~XVideo () {}
-KDE_NO_EXPORT bool XVideo::ready (KMPlayer::Viewer * v) {
+TDE_NO_EXPORT bool XVideo::ready (KMPlayer::Viewer * v) {
if (playing ()) {
return true;
}