03-04-2013 02:37 AM
I want to send bytes (images, files, mp3,...etc) to a remote PC with meta information. I think encoding to Base64 string will be a good solution for this case.
But I cant find API or example for that in Cascades. Please advise
03-04-2013 03:03 AM
base64 encoding is available for QByteArray objects. You can load a file's content into QByteArray with QFile class.
Loading is simple:
QByteArray loadedArray = new QByteArray(file.readAll());
When you have the QByteArray loaded, you can encode it to Base64 with these lines:
QByteArray* encodedFile = new QByteArray(loadedArray->toBase64());
03-04-2013 04:31 AM
03-04-2013 04:47 AM
03-04-2013 04:50 AM
03-04-2013 04:54 AM
Don't worry, Cascades team just copied some parts of the Qt API reference... In Cascades documentation you can find instructions for Symbian and MeeGo too....
My example will work. Here is the Cascades reference:
03-04-2013 04:56 AM