#include <analyticscollector.h>
Link against: analyticscollector.lib
class NokiaAnalyticsCollector::AnalyticsSession : public QObject, public QObject |
Class is interface to analytics collector session and class implements logging api functionality.
Public Member Enumerations | |
---|---|
enum | CloseReason { OptOutCloseReason, AppExitCloseReason, AppCrashCloseReason, OtherCloseReason } |
enum | ErrorValue { NoErr, InvalidArgErr, NotAllowedErr } |
enum | LogEventType { ActivityLogEvent, ErrorLogEvent, OtherLogEvent } |
Public Member Functions | |
---|---|
AnalyticsSession(const ApplicationParameters &, const CustomParams &, QObject *) | |
virtual | ~AnalyticsSession() |
Public Slots | |
---|---|
int | background() |
int | close(CloseReason, int, const CustomParams &) |
int | create() |
int | foreground() |
int | logEvent(LogEventType, const QString &, const CustomParams &) |
Inherited Attributes | |
---|---|
QObject::d_ptr | |
QObject::objectName | |
QObject::staticQtMetaObject |
Inherited Functions | |
---|---|
QObject::QObject(QObjectPrivate &,QObject *) | |
QObject::blockSignals(bool) | |
QObject::childEvent(QChildEvent *) | |
QObject::children()const | |
QObject::connect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const QObject *,const char *,Qt::ConnectionType) | |
QObject::connect(const QObject *,const char *,const char *,Qt::ConnectionType)const | |
QObject::connectNotify(const char *) | |
QObject::customEvent(QEvent *) | |
QObject::deleteLater | |
QObject::destroyed | |
QObject::disconnect(const QObject *,const QMetaMethod &,const QObject *,const QMetaMethod &) | |
QObject::disconnect(const QObject *,const char *) | |
QObject::disconnect(const QObject *,const char *,const QObject *,const char *) | |
QObject::disconnect(const char *,const QObject *,const char *) | |
QObject::disconnectNotify(const char *) | |
QObject::dumpObjectInfo() | |
QObject::dumpObjectTree() | |
QObject::dynamicPropertyNames()const | |
QObject::event(QEvent *) | |
QObject::eventFilter(QObject *,QEvent *) | |
QObject::findChild(const QString &)const | |
QObject::findChildren(const QRegExp &)const | |
QObject::findChildren(const QString &)const | |
QObject::inherits(const char *)const | |
QObject::installEventFilter(QObject *) | |
QObject::isWidgetType()const | |
QObject::killTimer(int) | |
QObject::moveToThread(QThread *) | |
QObject::objectName()const | |
QObject::parent()const | |
QObject::property(const char *)const | |
QObject::receivers(const char *)const | |
QObject::registerUserData() | |
QObject::removeEventFilter(QObject *) | |
QObject::sender()const | |
QObject::senderSignalIndex()const | |
QObject::setObjectName(const QString &) | |
QObject::setParent(QObject *) | |
QObject::setProperty(const char *,const QVariant &) | |
QObject::setUserData(uint,QObjectUserData *) | |
QObject::signalsBlocked()const | |
QObject::startTimer(int) | |
QObject::thread()const | |
QObject::timerEvent(QTimerEvent *) | |
QObject::userData(uint)const | |
QObject::~QObject() |
Application can create AnalyticsSession object and create analytics collector session with create()-function. Client can send log events to the session with logEvent()-function. Session can be closed with close()-function . New session can be created by calling create session function etc. When client application deletes the session object; all analytics collector resources are freed.
NAC uses approximately 1500kB of memory, so this must be taken into account by the client application on Symbian/S60 platform, i.e. increase heap size accordingly.
This enum describes the close reason values.
Enumerator | Value | Description |
---|---|---|
OptOutCloseReason | 0x0 | Session was closed because of user opt-out. |
AppExitCloseReason | Session was closed because user exited the application. | |
AppCrashCloseReason | Session was closed because of an application crash. | |
OtherCloseReason | Application specific reason. Custom parameters can be used for define application specific close reason. |
This enum describes the error values.
Enumerator | Value | Description |
---|---|---|
NoErr | 0x0 | No Error. |
InvalidArgErr | Passed argument was invalid. | |
NotAllowedErr | Function was called on a closed session. |
This enum describes the log event types.
Enumerator | Value | Description |
---|---|---|
ActivityLogEvent | 0x0 | Activity event type i.e. user has pressed a button in application, application view has been switched etc. |
ErrorLogEvent | Error event type i.e. error has occurred in the application. | |
OtherLogEvent | Application generated "system" event type e.g. "navigation target reached", bearer type has changed etc. |
AnalyticsSession | ( | const ApplicationParameters & | applicationParams, |
const CustomParams & | customUserParams = CustomParams(), | ||
QObject * | parent = 0 | ||
) | [explicit] |
Constructs a AnalyticsSession object with the given applicationParams, customUserParams and parent
int | background | ( | ) | [slot] |
Records that application has gone to the background.
See also: AnalyticsSession::ErrorValue
int | close | ( | CloseReason | reason, |
int | dataVolume = -1, | |||
const CustomParams & | customSessionParams = CustomParams() | |||
) | [slot] |
Closes current session and ends the session. Once session has been closed it will also automatically end and provided parameters will be recorded with implicit session end event.
See also: AnalyticsSession::ErrorValue
int | create | ( | ) | [slot] |
Creates a session.
See also: AnalyticsSession::ErrorValue
int | foreground | ( | ) | [slot] |
Records that application has come back to the foreground.
See also: AnalyticsSession::ErrorValue
int | logEvent | ( | LogEventType | type, |
const QString & | name, | |||
const CustomParams & | customEventParams = CustomParams() | |||
) | [slot] |
Logs an event of a given type and name for current Session object with customEventParams.
See also: AnalyticsSession::ErrorValue