Enginio Namespace | Enginio Manual 1.6

Qt 1.6 | Enginio Manual | Enginio Namespace

Qt 1.6.2 Reference Documentation

# Enginio Namespace

The Enginio namespace provides enums used throughout Enginio. More...

Header: | #include <Enginio>

## Types

enum | AuthenticationState { NotAuthenticated, Authenticating, Authenticated, AuthenticationFailure }
enum | ErrorType { NoError, NetworkError, BackendError }
enum | Operation { ObjectOperation, AccessControlOperation, FileOperation, UserOperation, UsergroupOperation, UsergroupMembersOperation }
enum | Role { CreatedAtRole, UpdatedAtRole, IdRole, ObjectTypeRole, ..., JsonObjectRole }

## Detailed Description

The Enginio namespace provides enums used throughout Enginio.

## Type Documentation

### enum Enginio::AuthenticationState

This enum describes the state of the user authentication.

Constant | Value | Description
--- | --- | ---
`Enginio::NotAuthenticated` | `0` | No attempt to authenticate was made
`Enginio::Authenticating` | `1` | Authentication request has been sent to the server
`Enginio::Authenticated` | `2` | Authentication was successful
`Enginio::AuthenticationFailure` | `3` | Authentication failed

See also EnginioClient::authenticationState.

### enum Enginio::ErrorType

Describes the type of error that occured when making a request to the Enginio backend.

Constant | Value | Description
--- | --- | ---
`Enginio::NoError` | `0` | The reply returned without errors
`Enginio::NetworkError` | `1` | The error was a networking problem
`Enginio::BackendError` | `2` | The backend did not accept the query

### enum Enginio::Operation

Enginio has a unified API for several `operations`. For example when using query(), the default is `ObjectOperation`, which means that the query will return objects from the database. When passing in UserOperation instead, the query will return users.

Constant | Value | Description
--- | --- | ---
`Enginio::ObjectOperation` | `0` | Operate on objects
`Enginio::AccessControlOperation` | `1` | Operate on the ACL
`Enginio::FileOperation` | `5` | Operate with files
`Enginio::UserOperation` | `2` | Operate on users
`Enginio::UsergroupOperation` | `3` | Operate on groups
`Enginio::UsergroupMembersOperation` | `4` | Operate on group members

### enum Enginio::Role

EnginioModel defines roles which represent data used by every object stored in the Enginio backend

Constant | Value | Description
--- | --- | ---
`Enginio::CreatedAtRole` | ? | `When` an item was created
`Enginio::UpdatedAtRole` | ? | `When` an item was updated last time
`Enginio::IdRole` | ? | `What` is the id of an item
`Enginio::ObjectTypeRole` | ? | `What` is item type
`Enginio::SyncedRole` | `Qt::UserRole + 1` | `Mark` if an item is in sync with the backend
`Enginio::CustomPropertyRole` | `Qt::UserRole + 10` | `The` first role id that may be used for dynamically created roles.
`Enginio::JsonObjectRole` | ? | `Object` like representation of an item

Additionally EnginioModel supports dynamic roles which are mapped directly from received data. EnginioModel is mapping an item's properties to role names.

Note: Some objects may not contain value for a static role, it may happen for example when an item is not in sync with the backend.

See also QAbstractItemModel::roleNames().