NokiaAccount::ProfileManager Class Reference

#include <mw/noa/profilemanager.h>

class NokiaAccount::ProfileManager : public QObject, public QObject, public QObject

Profile Manager API.

Inherits from

  • NokiaAccount::ProfileManager
    Public Member Functions
    ProfileManager(const QString &, const QString &, const ConnectionDetail &, bool, QObject *)
    ~ProfileManager()
    voidcancelAsyncRequest(int)
    ContactsInfo contactsInfo()
    intdeleteAccount(const QString &)
    intdeleteToken()
    intdownloadProfile()
    MarketingConsentInfo marketingInfo()
    ProfileInfo profile()
    intretrieveContactsInfo()
    intretrieveMarketingInfo()
    intretrieveSecurityQuestionList(const QLocale::Language &)
    intretrieveSecurityQuestionList(const QString &)
    intretrieveTermsAcceptance()
    QMap< QString, QString >securityQuestionList()
    QStringList serviceInfo()
    intsetUserName(const QString &)
    TermsAcceptanceData termsAcceptance()
    intupdateContactsInfo(const ContactsInfo &)
    intupdateMarketingInfo(const MarketingConsentInfo &)
    intupdateSecurityQuestion(const QString &, const ProfileInfo &)
    intupdateTermsAcceptance(const TermsAcceptanceData &)
    intuploadProfile(const ProfileInfo &)
    Public Signals
    voidinitialized(bool)
    voidrequestFinished(ErrorCode, RequestType, int)
    voidtokenStateChanged(TokenState)
    Inherited Attributes
    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

    Profile Manager Private Implementation API.

    The ProfileManager class is responsible for updating and getting the profile of an account holder. The class also provides API for retrieving and updating the marketing and contacts info. API for deleting the account from backend is also provided in this class.

    class

    The ProfileManagerPrivate class is responsible for communication between the exposed public interface ProfileManager and the Engine class.

    Constructor & Destructor Documentation

    ProfileManager ( const QString &, const QString &, const ConnectionDetail &, bool, QObject * )

    ProfileManager(const QString &consumerKey,
    const QString &consumerSecret,
    const ConnectionDetail &connectionDetail,
    booluseAsync = false,
    QObject *parent = 0
    )

    Constructor

    Constructor.

    Parameters
    consumerKeyConsumer key of the client application.
    consumerSecretConsumer secret of the client application.
    connectionDetailProxy connection details and timeout value.

    ~ProfileManager ( )

    ~ProfileManager()

    Destructor

    Destructor.

    Member Function Documentation

    cancelAsyncRequest ( int )

    voidcancelAsyncRequest(intrequestId = 0)

    Cancels any outstanding asynchronous requests. Cancels a specific request if ID is given, if none all outstanding requests are cancelled.

    Cancels any outstanding asynchronous requests.

    Parameters
    requestIdIdentifies the specific request to be cancelled.

    contactsInfo ( )

    ContactsInfo contactsInfo()

    Returns the retrieved contacts information of the account.

    Returns the retrieved contacts information .

    Return Value
    Returns the additional contact information of the the account.

    deleteAccount ( const QString & )

    intdeleteAccount(const QString &aPassword)

    Deletes account from backend. Signal indicates success or failure.

    Deletes account from backend.

    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    deleteToken ( )

    intdeleteToken()

    Deletes the token from backend.The user gets signed-out. This is thus a global sign-out. Signal indicates success or failure.

    Deletes the token from backend. Signal indicates success or failure.

    Return Value
    A unique identifier for this request.A unique identifier for this request.

    downloadProfile ( )

    intdownloadProfile()

    Downloads the complete profile from the backend server. Signal indicates success or failure.

    Download profile from backend.

    Return Value
    a unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    initialized ( bool )

    voidinitialized(boolisInitialized)[signal]

    marketingInfo ( )

    MarketingConsentInfo marketingInfo()

    Returns the marketing consent info

    Getter for the marketing information about the user.

    Return Value
    Returns the marketing consents status of the account.

    profile ( )

    ProfileInfo profile()

    Profile getter, returns complete profile details.

    Local Profile getter, returns the complete profile details.

    Return Value
    Profile details as QProfileInfo object.

    requestFinished ( ErrorCode, RequestType, int )

    voidrequestFinished(ErrorCodeerror,
    RequestTyperequestType,
    intrequestId
    )[signal]

    Signal to indicate that the specified request id has finished.

    Parameters
    errorIndicates the type of error or ErrNone.
    requestTypeIndicates the Requested operation type.
    requestIdThe request id for which the signal is generated.

    retrieveContactsInfo ( )

    intretrieveContactsInfo()

    Retrieves additional contact information about the user from the backend. Request status is returned via a signal. Once the signal is received, the client needs to call contactsInfo() to get the information.

    Retrieves additional contact information about the user from the backend.

    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    retrieveMarketingInfo ( )

    intretrieveMarketingInfo()

    Retrieves additional marketing information about the user from the backend. Request status is returned via a signal. Once the signal is received, the client needs to call marketingInfo() to get the information.

    Retrieves additional marketing information about the user from the backend.

    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    retrieveSecurityQuestionList ( const QLocale::Language & )

    intretrieveSecurityQuestionList(const QLocale::Language &language)

    Retrieve list of security questions. Request status is returned via a signal. Once the signal is received, the client should call securityQuestionList() to retrieve the questions list.

    Retrieve list of security questions.

    Parameters
    languageLanguage code to which security questions have to be localized.
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    retrieveSecurityQuestionList ( const QString & )

    intretrieveSecurityQuestionList(const QString &language)

    Retrieve list of security questions. Request status is returned via a signal. Once the signal is received, the client should call securityQuestionList() to retrieve the questions list.

    Parameters
    languageLanguage string code to which security questions have to be localized. language string is validated at the enabler, if the passed language string is invalid (not as per BCP47 standards) it emits the requestFinished signal with errorInvalidLanguage. BCP-formats for the language, language-script-region (example: zh-Hant-HK) language-script (example : zh-Hant) langugae-region (example: zh-HK) language (example: zh)
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    retrieveTermsAcceptance ( )

    intretrieveTermsAcceptance()

    Retrieves Terms acceptance information from the backend Once the signal is received, the client needs to call termsAcceptance() to get the information. The user has to be signed in to use this API

    Retrieves additional terms acceptance of the user from the backend.

    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    securityQuestionList ( )

    QMap< QString, QString >securityQuestionList()

    Returns a map of security questions and their IDs. The security questions are localised.

    Returns the retrieved map of security questions and their IDs.

    Return Value
    A map of security questions and their IDs.

    serviceInfo ( )

    QStringList serviceInfo()

    Returns the retrieved service information of the account. The client needs to call downloadprofile API to retrieve service information from backend.

    Returns the retrieved service information of the account.

    Return Value
    Returns list of services subscribed by the user in the QSrtingList.

    setUserName ( const QString & )

    intsetUserName(const QString &aUserName)

    Updates usernameof the profile in the backend.(This can be done only once, after which you will get error) Status of this request is indicated by requestFinished signal success or failure.

    Uploads profile to backend.

    Parameters
    aUserNameusername to be set for the account
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error or if user is not signed in, in this case enabler doesn't emit requestFinished signal.

    termsAcceptance ( )

    TermsAcceptanceData termsAcceptance()

    Returns the retrieved terms acceptance data.

    Returns the terms acceptance info .

    Return Value
    Returns the additional contact information of the the account.

    tokenStateChanged ( TokenState )

    voidtokenStateChanged(TokenStatetokenState)[signal]

    Notification for a change in token state e.g. if token has expired or been deleted.

    Parameters
    tokenStateIndicates current state of token.

    updateContactsInfo ( const ContactsInfo & )

    intupdateContactsInfo(const ContactsInfo &contactsInfo)

    Updates contact information of the user with the backend. Request status is returned via a signal.

    Updates contacts information about the user to the backend.

    Parameters
    contactsInfoAn object of type ContactsInfo, containing the updated contact information.
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    updateMarketingInfo ( const MarketingConsentInfo & )

    intupdateMarketingInfo(const MarketingConsentInfo &marketingInfo)

    Updates additional marketing information about the user to the backend. Request status is returned via a signal.

    Updates additional marketing information about the user to the backend.

    Parameters
    marketingInfoAn object of type MarketingConsentInfo, containing the updated marketing informantion.
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    updateSecurityQuestion ( const QString &, const ProfileInfo & )

    intupdateSecurityQuestion(const QString &aPassword,
    const ProfileInfo &profile
    )

    Updates security question and answer of the profile in the backend. Signal indicates success or failure.

    Uploads profile to backend.

    Parameters
    aPasswordpassword to the account required for security reasons
    profileProfile information with valid security question and answer to be uploaded,
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    updateTermsAcceptance ( const TermsAcceptanceData & )

    intupdateTermsAcceptance(const TermsAcceptanceData &terms)

    Uploads the updated Terms acceptance boolean values passed by the user. Signal indicates success or failure. If successful, the terms can then be retrieved via retrieveTermsAcceptance() method.

    Updates terms to backend.

    Parameters
    termsTermsAcceptanceData information to be uploaded,
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.

    uploadProfile ( const ProfileInfo & )

    intuploadProfile(const ProfileInfo &profile)

    Uploads the updated profile to the backend server. Signal indicates success or failure. If successful, the profile can then be retrieved via profile() method.

    Uploads profile to backend.

    Parameters
    profileProfile information to be uploaded,
    Return Value
    A unique identifier for this request. -1, if NoA enabler encounters internal error, in this case enabler doesn't emit requestFinished signal.