#include <mw/noa/profilemanager.h>
class NokiaAccount::ProfileManager : public QObject, public QObject, public QObject |
Profile Manager API.
Public Member Functions | |
---|---|
ProfileManager(const QString &, const QString &, const ConnectionDetail &, bool, QObject *) | |
~ProfileManager() | |
void | cancelAsyncRequest(int) |
ContactsInfo | contactsInfo() |
int | deleteAccount(const QString &) |
int | deleteToken() |
int | downloadProfile() |
MarketingConsentInfo | marketingInfo() |
ProfileInfo | profile() |
int | retrieveContactsInfo() |
int | retrieveMarketingInfo() |
int | retrieveSecurityQuestionList(const QLocale::Language &) |
int | retrieveSecurityQuestionList(const QString &) |
int | retrieveTermsAcceptance() |
QMap< QString, QString > | securityQuestionList() |
QStringList | serviceInfo() |
int | setUserName(const QString &) |
TermsAcceptanceData | termsAcceptance() |
int | updateContactsInfo(const ContactsInfo &) |
int | updateMarketingInfo(const MarketingConsentInfo &) |
int | updateSecurityQuestion(const QString &, const ProfileInfo &) |
int | updateTermsAcceptance(const TermsAcceptanceData &) |
int | uploadProfile(const ProfileInfo &) |
Public Signals | |
---|---|
void | initialized(bool) |
void | requestFinished(ErrorCode, RequestType, int) |
void | tokenStateChanged(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() |
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.
ProfileManager | ( | const QString & | consumerKey, |
const QString & | consumerSecret, | ||
const ConnectionDetail & | connectionDetail, | ||
bool | useAsync = false, | ||
QObject * | parent = 0 | ||
) |
Constructor
Constructor.
Parameters | |
---|---|
consumerKey | Consumer key of the client application. |
consumerSecret | Consumer secret of the client application. |
connectionDetail | Proxy connection details and timeout value. |
void | cancelAsyncRequest | ( | int | requestId = 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 | |
---|---|
requestId | Identifies the specific request to be cancelled. |
ContactsInfo | contactsInfo | ( | ) |
Returns the retrieved contacts information of the account.
Returns the retrieved contacts information .
int | deleteAccount | ( | const QString & | aPassword | ) |
Deletes account from backend. Signal indicates success or failure.
Deletes account from backend.
int | deleteToken | ( | ) |
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.
int | downloadProfile | ( | ) |
Downloads the complete profile from the backend server. Signal indicates success or failure.
Download profile from backend.
void | initialized | ( | bool | isInitialized | ) | [signal] |
MarketingConsentInfo | marketingInfo | ( | ) |
Returns the marketing consent info
Getter for the marketing information about the user.
ProfileInfo | profile | ( | ) |
Profile getter, returns complete profile details.
Local Profile getter, returns the complete profile details.
void | requestFinished | ( | ErrorCode | error, |
RequestType | requestType, | |||
int | requestId | |||
) | [signal] |
Signal to indicate that the specified request id has finished.
Parameters | |
---|---|
error | Indicates the type of error or ErrNone. |
requestType | Indicates the Requested operation type. |
requestId | The request id for which the signal is generated. |
int | retrieveContactsInfo | ( | ) |
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.
int | retrieveMarketingInfo | ( | ) |
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.
int | retrieveSecurityQuestionList | ( | 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 | |
---|---|
language | Language code to which security questions have to be localized. |
int | retrieveSecurityQuestionList | ( | 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 | |
---|---|
language | Language 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) |
int | retrieveTermsAcceptance | ( | ) |
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.
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.
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.
int | setUserName | ( | 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 | |
---|---|
aUserName | username to be set for the account |
TermsAcceptanceData | termsAcceptance | ( | ) |
Returns the retrieved terms acceptance data.
Returns the terms acceptance info .
void | tokenStateChanged | ( | TokenState | tokenState | ) | [signal] |
Notification for a change in token state e.g. if token has expired or been deleted.
Parameters | |
---|---|
tokenState | Indicates current state of token. |
int | updateContactsInfo | ( | 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 | |
---|---|
contactsInfo | An object of type ContactsInfo, containing the updated contact information. |
int | updateMarketingInfo | ( | 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 | |
---|---|
marketingInfo | An object of type MarketingConsentInfo, containing the updated marketing informantion. |
int | updateSecurityQuestion | ( | 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 | |
---|---|
aPassword | password to the account required for security reasons |
profile | Profile information with valid security question and answer to be uploaded, |
int | updateTermsAcceptance | ( | 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 | |
---|---|
terms | TermsAcceptanceData information to be uploaded, |
int | uploadProfile | ( | 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 | |
---|---|
profile | Profile information to be uploaded, |