Extract from EnginioClient safe, base api subset.

We want get rid of EnginioClient EnginioQmlClient hierarchy it causes
problems with api. C++ api should based on functions and QJsonObject but
Qml api works better with properties and QJSValue. It is inconvenient
for us to unify them, and for a user it doesn't present much value.

Change-Id: I80833d8dcf70ec7d321792a45dfb983d65634ea6
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Change inheritance model of EnginioClient and EnginioQmlClient

By separating these two classes we will gain a flexibility allowing us
to tune api for different languages.

Change-Id: I56cf6102b6050558e14b25b0773e7927562f2bf0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Use QJSValue in qml signals

That is base for solution of EnginioQmlReply's ownership problem.

Change-Id: I8291b60560840adecfd07d483eba0f85f00b2fce
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Remove emit keyword from simple function call

Change-Id: I413bb72069cc3eca6e94293f11bd93c5b77a3743
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Split EnginioReply into two classes

We want EnginioQmlReply to have a different interface therefore we can
not inherit it from EnginioReply

Change-Id: I0caefe540e3a076368f2578e44abc5d1d80eb6a7
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Break inheritance model of EnginioQmlReply.

As a side effect of that, finish signal signature could be changed and
a potential memory leak was fixed.

Change-Id: I01296089b4efe4db620b6dd25210245993d3128f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Add EnginioQmlReply isError and isFinished properties.

Change-Id: I0af73a266b3c5127fabce9f7c6d9e7e6aaf58a22
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Deinline EnginioClientPrivate::prepareRequest

The function is used in a template code, but it's result is completely
independent from the type.

Change-Id: I49db543e2ddbaca6111c663cd613219a2b3006e3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Extract common base from EnginioModel.

Change-Id: I6a0a8d59933eab12c0ae2bab40f235d42e920ece
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Replace static const int by an enum value.

That simplify refactoring, as the value can be placed in a header only.

Change-Id: Ic76a0bdea81121cc44f81927482da71c8474217e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Move EnginioModelPrivate to a separate header file.

We will need parts of that code for EnginioQmlModelPrivate

Change-Id: I128c7d55c1cb789b3f9443305e70a0c40649e5ea
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Allow to use EnginioClientPrivate as a paremeter in connectToBackend

Change-Id: If443e4c1e75310a2d35e1d0e25de0bfb3e555e25
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Use EnginioClientPrivate instead of EnginioClient in EnginioModelPrivate

It will allow us to play with types more. I hope that I will not
have to convert all QJsonObject usage to ObjectAdaptor at once.
The pach would be huuuuge

Change-Id: Ifff020d4f6f5bc15e9bacf83fc700cc8ede6a95a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Use EnginioModelBase instead of EnginioModel in EnginioModelPrivate

Change-Id: I0ca23e7e348fa2efaa515910181103bbfb34c84e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Use EnginioReplyBase instead of EnginioReply in EnginioModelPrivate

Change-Id: Iab74f845643b48b436f97679d1dd8995c00d618b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Code cleanup

The code was repeated twice, instead of useing existing type
information

Change-Id: I43236bd653673be4a410422af2f9b44141c7713b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Fix enginio accessor.

We can not cast EnginioClientPrivate::q to EnginioClient, becasue
it could be EnginioQmlClient

Change-Id: Iff3d56a8bf694ca3fc7ed7e986a4176e491cf79d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Move ObjectAdaptors into Qt namespace

Change-Id: I5514729e6d2c56479eb994cb4197d0af47b2442c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Store EnginioModel::query in a native type.

Change-Id: I18dd7714076203378a4d714f5b980427ecc59ba3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Deinline some methods that were to big to be inlined anyway.

Change-Id: I6b40ce394a426d1f19cff69ba7e5c5c1ea4e436a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>