mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
Provide base64 encode and decode to js resolvers
This commit is contained in:
parent
96d89e230c
commit
c41c7eaa94
src/libtomahawk/resolvers
@ -176,6 +176,20 @@ QtScriptResolverHelper::addCustomUrlHandler( const QString& protocol, const QStr
|
||||
}
|
||||
|
||||
|
||||
QByteArray
|
||||
QtScriptResolverHelper::base64Encode( const QByteArray& input )
|
||||
{
|
||||
return input.toBase64();
|
||||
}
|
||||
|
||||
|
||||
QByteArray
|
||||
QtScriptResolverHelper::base64Decode( const QByteArray& input )
|
||||
{
|
||||
return QByteArray::fromBase64( input );
|
||||
}
|
||||
|
||||
|
||||
QSharedPointer< QIODevice >
|
||||
QtScriptResolverHelper::customIODeviceFactory( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
|
@ -53,6 +53,9 @@ public:
|
||||
|
||||
Q_INVOKABLE void addCustomUrlHandler( const QString& protocol, const QString& callbackFuncName );
|
||||
|
||||
Q_INVOKABLE QByteArray base64Encode( const QByteArray& input );
|
||||
Q_INVOKABLE QByteArray base64Decode( const QByteArray& input );
|
||||
|
||||
QSharedPointer<QIODevice> customIODeviceFactory( const Tomahawk::result_ptr& result );
|
||||
|
||||
public slots:
|
||||
|
Loading…
x
Reference in New Issue
Block a user