NokiaAnalyticsCollector::AnalyticsSession Class Reference

#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.

Inherits from

  • NokiaAnalyticsCollector::AnalyticsSession
    Public Member Enumerations
    enumCloseReason { OptOutCloseReason, AppExitCloseReason, AppCrashCloseReason, OtherCloseReason }
    enumErrorValue { NoErr, InvalidArgErr, NotAllowedErr }
    enumLogEventType { ActivityLogEvent, ErrorLogEvent, OtherLogEvent }
    Public Member Functions
    AnalyticsSession(const ApplicationParameters &, const CustomParams &, QObject *)
    virtual ~AnalyticsSession()
    Public Slots
    intbackground()
    intclose(CloseReason, int, const CustomParams &)
    intcreate()
    intforeground()
    intlogEvent(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()

    Detailed Description

    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.

    Typically client application can create session object when application is started and delete object when client application is closed or client application doesn't want use the analytics collector anymore.
    Note:

    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 API is deprecated. Use Analytics::Session and Analytics::Application classes instead (analyticsnokia.h)

    Member Enumeration Documentation

    Enum CloseReason

    This enum describes the close reason values.

    EnumeratorValueDescription
    OptOutCloseReason0x0Session was closed because of user opt-out.
    AppExitCloseReasonSession was closed because user exited the application.
    AppCrashCloseReasonSession was closed because of an application crash.
    OtherCloseReasonApplication specific reason. Custom parameters can be used for define application specific close reason.

    Enum ErrorValue

    This enum describes the error values.

    EnumeratorValueDescription
    NoErr0x0No Error.
    InvalidArgErrPassed argument was invalid.
    NotAllowedErrFunction was called on a closed session.

    Enum LogEventType

    This enum describes the log event types.

    EnumeratorValueDescription
    ActivityLogEvent0x0Activity event type i.e. user has pressed a button in application, application view has been switched etc.
    ErrorLogEventError event type i.e. error has occurred in the application.
    OtherLogEventApplication generated "system" event type e.g. "navigation target reached", bearer type has changed etc.

    Constructor & Destructor Documentation

    AnalyticsSession ( const ApplicationParameters &, const CustomParams &, QObject * )

    AnalyticsSession(const ApplicationParameters &applicationParams,
    const CustomParams &customUserParams =  CustomParams(),
    QObject *parent = 0
    )[explicit]

    Constructs a AnalyticsSession object with the given applicationParams, customUserParams and parent

    ~AnalyticsSession ( )

    ~AnalyticsSession()[virtual]

    Destroys the AnalyticsSession object.

    Member Function Documentation

    background ( )

    intbackground()[slot]

    Records that application has gone to the background.

    See also: AnalyticsSession::ErrorValue

    Return Value
    One of the error values

    close ( CloseReason, int, const CustomParams & )

    intclose(CloseReasonreason,
    intdataVolume = -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

    Return Value
    One of the error values

    create ( )

    intcreate()[slot]

    Creates a session.

    See also: AnalyticsSession::ErrorValue

    Return Value
    One of the error values

    foreground ( )

    intforeground()[slot]

    Records that application has come back to the foreground.

    See also: AnalyticsSession::ErrorValue

    Return Value
    One of the error values

    logEvent ( LogEventType, const QString &, const CustomParams & )

    intlogEvent(LogEventTypetype,
    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

    Return Value
    One of the error values