aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/enginio_global.qdocconf2
-rw-r--r--doc/enginio_overview.qdoc29
-rw-r--r--doc/qtenginiooverview.qdocconf11
-rw-r--r--doc/shared/client-create.qdocinc26
-rw-r--r--doc/shared/client-downloadUrl.qdocinc0
-rw-r--r--doc/shared/client-fullTextSearch.qdocinc0
-rw-r--r--doc/shared/client-query.qdocinc37
-rw-r--r--doc/shared/client-remove.qdocinc16
-rw-r--r--doc/shared/client-update.qdocinc28
-rw-r--r--doc/shared/client-uploadFile.qdocinc0
-rw-r--r--doc/shared/model-append.qdocinc13
-rw-r--r--doc/shared/model-query.qdocinc19
-rw-r--r--doc/shared/model-remove.qdocinc8
13 files changed, 160 insertions, 29 deletions
diff --git a/doc/enginio_global.qdocconf b/doc/enginio_global.qdocconf
new file mode 100644
index 0000000..e4b0c01
--- /dev/null
+++ b/doc/enginio_global.qdocconf
@@ -0,0 +1,2 @@
+navigation.homepage = "Enginio $QT_VER"
+buildversion = "Enginio $QT_VERSION Reference Documentation" \ No newline at end of file
diff --git a/doc/enginio_overview.qdoc b/doc/enginio_overview.qdoc
index aa20a27..6ae91ff 100644
--- a/doc/enginio_overview.qdoc
+++ b/doc/enginio_overview.qdoc
@@ -119,34 +119,13 @@ This guide can be also applied when integrating Enginio with existing Qt project
\section1 Prerequisites
-You can use Enginio with an existing installation of Qt 5.2 or later, or get Qt packages containing Engino (starting with Qt 5.2).
+Enginio comes with Qt 5.2 and later (for 5.2.0 only in the online installer).
+Make sure to select the Enginio component in the \tt{Qt Cloud Services} category.
-\list
- \li Development environment (Linux, Windows or Mac OS X) and compiler toolchain.
- \li Qt framework, 5.2 or newer
- \li OpenSSL to enable SSL support in Qt.
- Install the OpenSSL binaries into your system and Qt will automatically pick them up.
-
- \list
- \li Mac OS X: the OpenSSL library should be preinstalled in the system
- \li Linux: Most distributions have a preinstalled OpenSSL library. If yours doesn't, install libssl via your distribution's package manager
- \li Windows: Install Win32 OpenSSL (light version is enough, copy DLLs to windows system directory when asked)
- \endlist
-
- \li Perl 5.10 or newer to enable Qt5 module compilation
- \list
- \li Mac OS X: Perl should exist as preinstalled in the system
- \li Linux: Perl should exist as preinstalled in the system
- \li Windows: Install some Perl distribution
- \endlist
-\endlist
+\note Make sure to have OpenSSL installed for Enginio to work.
-\section1 Install Enginio Qt library
+On iOS openSSL is not required since the native SSL framework is used.
-\list
- \li Download the latest library release for your platform
- \li Execute downloaded binary installer and follow instructions
-\endlist
*/
/*!
diff --git a/doc/qtenginiooverview.qdocconf b/doc/qtenginiooverview.qdocconf
index c6faf29..3c8c701 100644
--- a/doc/qtenginiooverview.qdocconf
+++ b/doc/qtenginiooverview.qdocconf
@@ -1,8 +1,11 @@
include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
+include(enginio_global.qdocconf)
+
project = QtEnginioOverview
description = Enginio Client Library
url = http://engin.io
+version = $QT_VERSION
sourcedirs += .
headerdirs += .
@@ -14,13 +17,13 @@ depends += qtcore qtgui qtwidgets qtnetwork qtdoc qtenginio qtenginioqml
qhp.projects = QtEnginioOverview
qhp.QtEnginioOverview.file = qtenginiooverview.qhp
-qhp.QtEnginioOverview.namespace = io.engin.overview.101
+qhp.QtEnginioOverview.namespace = io.engin.overview.$QT_VERSION_TAG
qhp.QtEnginioOverview.virtualFolder = enginiooverview
qhp.QtEnginioOverview.indexTitle = Enginio Manual
-qhp.QtEnginioOverview.filterAttributes = enginio 1.0.1
-qhp.QtEnginioOverview.customFilters.Qt.name = Enginio 1.0.1
-qhp.QtEnginioOverview.customFilters.Qt.filterAttributes = enginio 1.0.1
+qhp.QtEnginioOverview.filterAttributes = enginio $QT_VERSION
+qhp.QtEnginioOverview.customFilters.Qt.name = Enginio $QT_VERSION
+qhp.QtEnginioOverview.customFilters.Qt.filterAttributes = enginio $QT_VERSION
qhp.QtEnginioOverview.subprojects = manual
qhp.QtEnginioOverview.subprojects.manual.title = Manual
diff --git a/doc/shared/client-create.qdocinc b/doc/shared/client-create.qdocinc
new file mode 100644
index 0000000..abf060d
--- /dev/null
+++ b/doc/shared/client-create.qdocinc
@@ -0,0 +1,26 @@
+\brief Insert a new \a object into the database.
+
+The returned \l EnginioReply indicates the success of the object creation.
+The object becomes available from the backend if it finishes without errors.
+
+\a operation determines the kind of object created. For example a regular object
+or a user or usergroup.
+By default, \l Enginio::ObjectOperation is used and regular objects created.
+\note that the \tt objectType is required for regular objects and has to begin with
+\tt {"objects."}.
+
+The JSON for the object that will be created must follow this structure:
+\code
+{
+ "objectType": "object.myType",
+ "name" : "A thing",
+ "price" : "5",
+}
+\endcode
+Where only the \tt objectType property is required and \tt name and \tt price
+are examples of custom properties.
+
+Users and all kinds of other objects are created the same way but do not require any
+\tt objectType.
+
+\sa EnginioReply, query(), update(), remove(), Enginio::Operation
diff --git a/doc/shared/client-downloadUrl.qdocinc b/doc/shared/client-downloadUrl.qdocinc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/shared/client-downloadUrl.qdocinc
diff --git a/doc/shared/client-fullTextSearch.qdocinc b/doc/shared/client-fullTextSearch.qdocinc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/shared/client-fullTextSearch.qdocinc
diff --git a/doc/shared/client-query.qdocinc b/doc/shared/client-query.qdocinc
new file mode 100644
index 0000000..1c4499a
--- /dev/null
+++ b/doc/shared/client-query.qdocinc
@@ -0,0 +1,37 @@
+\brief Query the database
+
+The \a query is an object containing the actual query to the backend.
+The query will be run on the \a operation part of the backend.
+
+The \a query has to contain an "objectType" which has to point to a type defined
+in the backend. Optionally, it can also contain:
+\list
+\li query - describes how objects are queried, allows filtering of results. See {https://engin.io/documentation/rest/parameters/queries}
+{JSON query structure}
+\li limit - limits how many objects the server should return (default value is \c 100).
+\li offset - how many objects the server should skip from the beginning of the returned results. Note that the server keeps the data
+in random order so that usage of offset implies using \c sort as well.
+\li sort - describes how results are sorted. See \l{https://engin.io/documentation/rest/parameters/sort}{JSON sort request structure}
+\li count - if the \c count is set, the server will return only count of matching objects
+\li include - describes which other objects are included in the response. See \l{https://engin.io/documentation/rest/parameters/include}
+{JSON include structure}
+\endlist
+
+The JSON to list all objects of type "objects.image":
+\code
+{
+ "objectType": "objects.image"
+}
+\endcode
+
+An example using \tt include to get \tt file references and with a query parameter that
+limits the results to only those objects where the reference is valid:
+\code
+{
+ "objectType": "objects.image",
+ "include": {"file": {}},
+ "query" : { "file": { "$ne": null } }
+}
+\endcode
+
+\sa EnginioReply, create(), update(), remove()
diff --git a/doc/shared/client-remove.qdocinc b/doc/shared/client-remove.qdocinc
new file mode 100644
index 0000000..995554c
--- /dev/null
+++ b/doc/shared/client-remove.qdocinc
@@ -0,0 +1,16 @@
+\brief Remove an object from the database.
+
+The \a object that is to be removed is identified by its object ID and if it is a regular object also \tt objectType.
+
+The JSON that identfies an object looks like this:
+\code
+{
+ "objectType": "objects.images",
+ "id": "52b1a94b5a3d8b15b1037ff5"
+}
+\endcode
+
+The \a operation is the area from which the object gets removed.
+It defaults to \l Enginio::ObjectOperation to remove regular objects by default.
+
+\sa EnginioReply, create(), query(), update()
diff --git a/doc/shared/client-update.qdocinc b/doc/shared/client-update.qdocinc
new file mode 100644
index 0000000..f1d0874
--- /dev/null
+++ b/doc/shared/client-update.qdocinc
@@ -0,0 +1,28 @@
+\brief Update an object in the database.
+
+The \a operation is the area in which the \a object gets updated. It defaults to \l Enginio::ObjectOperation
+to update regular objects by default.
+
+To change the name property of an object to "New Name", use the following JSON:
+\code
+{
+ "id": "objectId",
+ "objectType": "objects.objectType",
+ "name": "New Name"
+}
+\endcode
+
+All other existing properties of the object are not affected by the update.
+
+To update the access control list of an object, use the following JSON:
+\code
+{
+ "id": "objectId",
+ "objectType": "objects.objectType",
+ "access": { "read": ["id": "userId", "objectTypes": "users"],
+ "update": ["id": "userId", "objectTypes": "users"],
+ "admin": ["id": "userId", "objectTypes": "users"] }
+}
+\endcode
+
+\sa EnginioReply, create(), query(), remove()
diff --git a/doc/shared/client-uploadFile.qdocinc b/doc/shared/client-uploadFile.qdocinc
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/doc/shared/client-uploadFile.qdocinc
diff --git a/doc/shared/model-append.qdocinc b/doc/shared/model-append.qdocinc
new file mode 100644
index 0000000..cf1bb5d
--- /dev/null
+++ b/doc/shared/model-append.qdocinc
@@ -0,0 +1,13 @@
+\brief Add a new \a object to the model and database.
+
+This function appends the new object to the local model cache
+and makes an asynchronous request to the backend.
+
+Since adding an object to the database may fail for various reasons,
+the returned reply must be kept and used for error handling (see \l EnginioReply).
+If the operation fails, the object that was supposed to be appended will be removed
+from the local model again. If the model is used in a view and the backend does
+not accept the object because it violates a validator, it will be visible to the
+user that a new row in the view appears and disappears again.
+
+\return the EnginioReply from the backend
diff --git a/doc/shared/model-query.qdocinc b/doc/shared/model-query.qdocinc
new file mode 100644
index 0000000..bdba13a
--- /dev/null
+++ b/doc/shared/model-query.qdocinc
@@ -0,0 +1,19 @@
+\brief The query used to populate the model with data from the backend.
+
+It takes the same argument as \l EnginioClient::query(), so that the documentation
+for \l EnginioClient::query() can be consulted regarding how to construct the query.
+
+While \l EnginioClient::query() returns the data of a query as a JSON
+object, for the model the query will be interpreted as the model data.
+
+Usually the query is for one object type and will return all objects
+in the database of that type. The model will then represent each returned object
+as one row. It can be limited and sorted just like its counterpart
+in EnginioClient.
+
+One important thing to note is that the model cannot keep the same sorting as
+the backend and thus sorting and limits are only preserved until
+an insertion or deletion happens.
+
+\return the EnginioReply from the backend
+\sa EnginioClient::query()
diff --git a/doc/shared/model-remove.qdocinc b/doc/shared/model-remove.qdocinc
new file mode 100644
index 0000000..94de12d
--- /dev/null
+++ b/doc/shared/model-remove.qdocinc
@@ -0,0 +1,8 @@
+
+\brief Removes the \a row from the model and database.
+
+This function immediately removes the \a row from the local cache
+and sends a remove request to the Enginio backend.
+
+\return the EnginioReply from the backend
+\sa EnginioClient::remove() \ No newline at end of file