summaryrefslogtreecommitdiffstats
path: root/src/modules/mediaplayer/mp_amipinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/mediaplayer/mp_amipinterface.cpp')
-rw-r--r--src/modules/mediaplayer/mp_amipinterface.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/src/modules/mediaplayer/mp_amipinterface.cpp b/src/modules/mediaplayer/mp_amipinterface.cpp
index 3a7094bc..3a363ed5 100644
--- a/src/modules/mediaplayer/mp_amipinterface.cpp
+++ b/src/modules/mediaplayer/mp_amipinterface.cpp
@@ -3,7 +3,7 @@
#ifdef COMPILE_ON_WINDOWS
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include "kvi_locale.h"
#include "kvi_module.h"
@@ -69,10 +69,10 @@ static bool loadAmipDll()
return true;
};
-static QTextCodec * mediaplayer_get_codec()
+static TQTextCodec * mediaplayer_get_codec()
{
- QTextCodec * c= QTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding));
- if(!c)c = QTextCodec::codecForLocale();
+ TQTextCodec * c= TQTextCodec::codecForName(KVI_OPTION_STRING(KviOption_stringWinampTextEncoding));
+ if(!c)c = TQTextCodec::codecForLocale();
return c;
}
@@ -147,9 +147,9 @@ int eval_int(const char *var)
return res;
}
-QString eval_str(const char *var)
+TQString eval_str(const char *var)
{
- QString res;
+ TQString res;
if(!amip_dll) return res;
char buff[AC_BUFFER_SIZE];
if (AC_ERR_NOERROR == ac_eval(var, buff)) {
@@ -189,7 +189,7 @@ int KviAmipInterface::channels()
return ret;
}
-KviMediaPlayerInterface::PlayerStatus KviAmipInterface::status()
+KviMediaPlayerInterface::PlayertqStatus KviAmipInterface::status()
{
int ret = eval_int("var_stat");
switch(ret)
@@ -210,11 +210,11 @@ KviMediaPlayerInterface::PlayerStatus KviAmipInterface::status()
return KviMediaPlayerInterface::Unknown;
}
-QString KviAmipInterface::mrl()
+TQString KviAmipInterface::mrl()
{
- QString ret;
- QString fn = eval_str("var_fn");
- QTextCodec *c=mediaplayer_get_codec();
+ TQString ret;
+ TQString fn = eval_str("var_fn");
+ TQTextCodec *c=mediaplayer_get_codec();
if (c) ret = c->toUnicode(fn);
else ret=fn;
if(!ret.startsWith("http://",false))
@@ -223,46 +223,46 @@ QString KviAmipInterface::mrl()
return ret;
}
-QString getAmipString(const char * var) {
- QString ret;
- QString s = eval_str(var);
- QTextCodec *c=mediaplayer_get_codec();
+TQString getAmipString(const char * var) {
+ TQString ret;
+ TQString s = eval_str(var);
+ TQTextCodec *c=mediaplayer_get_codec();
if (c) ret = c->toUnicode(s);
else ret=s;
return ret;
}
-QString KviAmipInterface::nowPlaying()
+TQString KviAmipInterface::nowPlaying()
{
return getAmipString("var_s");
}
-QString KviAmipInterface::artist()
+TQString KviAmipInterface::artist()
{
return getAmipString("var_1");
}
-QString KviAmipInterface::title()
+TQString KviAmipInterface::title()
{
return getAmipString("var_2");
}
-QString KviAmipInterface::album()
+TQString KviAmipInterface::album()
{
return getAmipString("var_4");
}
-QString KviAmipInterface::year()
+TQString KviAmipInterface::year()
{
return getAmipString("var_5");
}
-QString KviAmipInterface::comment()
+TQString KviAmipInterface::comment()
{
return getAmipString("var_6");
}
-QString KviAmipInterface::genre()
+TQString KviAmipInterface::genre()
{
return getAmipString("var_7");
}
@@ -373,24 +373,24 @@ bool KviAmipInterface::setRepeat(bool &bVal)
return res;
}
-bool KviAmipInterface::amipExec(const QString &cmd)
+bool KviAmipInterface::amipExec(const TQString &cmd)
{
if(!amip_dll) return false;
- QTextCodec *c=mediaplayer_get_codec();
+ TQTextCodec *c=mediaplayer_get_codec();
KviStr szCmd = c ? c->fromUnicode(cmd) : cmd.utf8();
return (ac_exec(szCmd) == AC_ERR_NOERROR);
}
-QString KviAmipInterface::amipEval(const QString &cmd)
+TQString KviAmipInterface::amipEval(const TQString &cmd)
{
- QString ret;
+ TQString ret;
if(!amip_dll) return ret;
- QTextCodec *c=mediaplayer_get_codec();
+ TQTextCodec *c=mediaplayer_get_codec();
KviStr szCmd = c ? c->fromUnicode(cmd) : cmd.utf8();
char buff[AC_BUFFER_SIZE];
if((ac_eval(szCmd, buff) == AC_ERR_NOERROR)) {
- QString s = buff;
- QTextCodec *c=mediaplayer_get_codec();
+ TQString s = buff;
+ TQTextCodec *c=mediaplayer_get_codec();
if (c) ret = c->toUnicode(s);
else ret=s;
}