CWSOviAccountManager Class Reference

#include <ext/mw/wsoviaccountmanager.h>

Link against: wsoviaccountmanager.lib

class CWSOviAccountManager : public CBase, public MSsoObserver

Inherits from

Public Member Functions
virtual ~CWSOviAccountManager()
IMPORT_C CWSAccount *Account()
IMPORT_C TIntCancelAsync()
IMPORT_C TIntCloseConnections()
IMPORT_C TIntDisplayAccountL(TRequestStatus &, CWSAccountManager::TEditorMode)
IMPORT_C TIntDisplayAccountL(CWSAccountManager::TEditorMode)
IMPORT_C TIntDownloadAccount(TRequestStatus &)
IMPORT_C TIntDownloadAccount()
IMPORT_C HBufC8 *GetToSLinkL(TRequestStatus &)
virtual voidHandleSsoEvent(TSsoEvent)
IMPORT_C TBoolHasValidTokenL(const MSenServiceDescription *)
IMPORT_C CWSOviAccountManager *NewL()
IMPORT_C CWSOviAccountManager *NewL(CAknViewAppUi *)
IMPORT_C CWSOviAccountManager *NewL(CAknViewAppUi *, CSenTransportProperties *)
IMPORT_C CWSOviAccountManager *NewLC()
IMPORT_C CWSOviAccountManager *NewLC(CAknViewAppUi *)
IMPORT_C CWSOviAccountManager *NewLC(CAknViewAppUi *, CSenTransportProperties *)
IMPORT_C TIntRemoveAccountL()
IMPORT_C TIntSignInL(TRequestStatus &, const MSenServiceDescription *, CWSToken *&, TBool)
IMPORT_C TIntSignInL(const MSenServiceDescription *, CWSToken *&, TBool)
IMPORT_C TIntSignOutL(TRequestStatus &, const MSenServiceDescription *)
IMPORT_C TIntSignOutL(const MSenServiceDescription *)
IMPORT_C CWSAccount *SignUpL(TRequestStatus &, CWSAccountManager::TCreateStartupView)
IMPORT_C CWSAccount *SignUpL(CWSAccountManager::TCreateStartupView)
IMPORT_C TIntSingleSignOutL()
IMPORT_C TIntTokenL(const MSenServiceDescription *, CWSToken *&)
IMPORT_C TIntUploadAccount(TRequestStatus &)
IMPORT_C TIntUploadAccount()
Inherited Enumerations
MSsoObserver:TSsoEvent
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()

Detailed Description

Manager provides functionality of remote OVI account processing. It is an asynchronous service provider therefore an active object has to be used together with this provider API. Api focuses around such usescases: Get OVI Account Sign-Up OVI account Sign-In OVI to account Close/cancel connection within OVI account Synchronize Ovi Account Display Ovi Account

It is adaptor for more generic class CWSAccountManager
Since
Series60 5.0

Constructor & Destructor Documentation

~CWSOviAccountManager ( )

~CWSOviAccountManager()[virtual]

Member Function Documentation

Account ( )

IMPORT_C CWSAccount *Account()
Getter of OVI account for current active user. If NULL is returned, then You should call SignUp method It is convenient method to deliver only OVI account.
Since
Series60 5.0
Return Value
CWSAccount (OVI account) or NULL. Ownership is NOT transffered to caller.
Leave Codes
Somesystem-wide Symbian error code

CancelAsync ( )

IMPORT_C TIntCancelAsync()

Cancels an outstanding asynchronous request. The result of the cancellation request will be reflected through the request status of the pending request. A status of KErrCancel denotes that the request has been safely cancelled.

Since
Series60 5.0
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

CloseConnections ( )

IMPORT_C TIntCloseConnections()

Close IAP connections maintained by account manager. It guarantee no connection activity after calling.

Since
Series60 5.0
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

DisplayAccountL ( TRequestStatus &, CWSAccountManager::TEditorMode )

IMPORT_C TIntDisplayAccountL(TRequestStatus &aStatus,
CWSAccountManager::TEditorModeaMode = CWSAccountManager::EReadOnly
)

Asynchronous request which is used to bootup UI to view account. UI layout depends on loaded ECOM implementation (established by provided cue)

See also: CWSAccMgrPluginInfo

Since
Series60 5.0
Parameters
aStatus- Used by Account Manager to indicate completion of the sent request. Completion means usually that UI has been closed by end user.
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet You have to SignUp first.
Leave Codes
Somesystem-wide Symbian error code

DisplayAccountL ( CWSAccountManager::TEditorMode )

IMPORT_C TIntDisplayAccountL(CWSAccountManager::TEditorModeaMode = CWSAccountManager::EReadOnly)

Synchronous(blocking) request which is used to bootup UI to view account. UI layout depends on loaded ECOM implementation (established by provided cue)

See also: CWSAccMgrPluginInfo

Since
Series60 5.0
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet You have to SignUp first.
Leave Codes
Somesystem-wide Symbian error code

DownloadAccount ( TRequestStatus & )

IMPORT_C TIntDownloadAccount(TRequestStatus &aStatus)

Download OVI account information from remote backend

Since
Series60 5.0
Parameters
aStatus- Used by Account Manager to indicate completion of the send request. Completion means successfully download from backend
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.
Leave Codes
Somesystem-wide Symbian error code

DownloadAccount ( )

IMPORT_C TIntDownloadAccount()
Download OVI account information from remote backend It is synchronous(blocking) request
Since
Series60 5.0
Return Value
KErrNone(successfully download from backend) or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.
Leave Codes
Somesystem-wide Symbian error code

GetToSLinkL ( TRequestStatus & )

IMPORT_C HBufC8 *GetToSLinkL(TRequestStatus &aStatus)

HandleSsoEvent ( TSsoEvent )

voidHandleSsoEvent(TSsoEventaEvent)[virtual]

callback method to notify client about event

aEvent notification type

HasValidTokenL ( const MSenServiceDescription * )

IMPORT_C TBoolHasValidTokenL(const MSenServiceDescription *aService = NULL)
Checks if active token is still valid.
Parameters
aService- target service to SignIn
Return Value
ETrue - token is valid, user is SignIn EFalse - token is not valid any more, user has to SignIn again
Leave Codes
Somesystem-wide Symbian error code

NewL ( )

IMPORT_C CWSOviAccountManager *NewL()[static]

Creates an object representing an account manager. Variant of Factory method used by UI-less plugins.

See also: CWSAccMgrPluginBase Method launches/attaches to Web Service Symbian server (it is time consuming).

Since
Series60 5.0
Return Value
a pointer to CWSOviAccountManager class instance.

NewL ( CAknViewAppUi * )

IMPORT_C CWSOviAccountManager *NewL(CAknViewAppUi *aAppUi)[static]

Creates an object representing an account manager. Method launches/attaches to Web Service Symbian server (it is time consuming).

Depraceted, use simple NewL() with no arguments

Since
Series60 5.0
Parameters
aAppUi- S60 The AppUi is needed to attach UI framework
Return Value
a pointer to new CWSOviAccountManager class instance.

NewL ( CAknViewAppUi *, CSenTransportProperties * )

IMPORT_C CWSOviAccountManager *NewL(CAknViewAppUi *aAppUi,
CSenTransportProperties *aTranspProperties
)[static]

Creates an object representing an account manager. Method launches/attaches to Web Service Symbian server (it is time consuming).

Since
Series60 5.0
Parameters
aAppUi- S60 The AppUi is needed to attach UI framework (deprecated argument, use NULL)
aTranspProperties- used mostly to carry IAP/SNAP information. That info is used when network connections are opened. Ownership is transferred.
Return Value
a pointer to new CWSOviAccountManager class instance.

NewLC ( )

IMPORT_C CWSOviAccountManager *NewLC()[static]

Creates an object representing an account manager. Variant of Factory method used by UI-less plugins.

See also: CWSAccMgrPluginBase Method launches/attaches to Web Service Symbian server (it is time consuming).

Since
Series60 5.0
Return Value
a pointer to new CWSOviAccountManager class instance.

NewLC ( CAknViewAppUi * )

IMPORT_C CWSOviAccountManager *NewLC(CAknViewAppUi *aAppUi)[static]

Creates an object representing an account manager. Method launches/attaches to Web Service Symbian server (it is time consuming).

Depraceted, use simple NewL() with no arguments

Since
Series60 5.0
Parameters
aAppUi- S60 The AppUi is needed to attach UI framework
Return Value
a pointer to new CWSOviAccountManager class instance.

NewLC ( CAknViewAppUi *, CSenTransportProperties * )

IMPORT_C CWSOviAccountManager *NewLC(CAknViewAppUi *aAppUi,
CSenTransportProperties *aTranspProperties
)[static]

Creates an object representing an account manager. Method launches/attaches to Web Service Symbian server (it is time consuming).

Since
Series60 5.0
Parameters
aAppUi- S60 The AppUi is needed to attach UI framework(deprecated argument, use NULL)
aTranspProperties- used mostly to carry IAP/SNAP information. That info is used when network connections are opened. Ownership is transferred.
Return Value
a pointer to new CWSOviAccountManager class instance.

RemoveAccountL ( )

IMPORT_C TIntRemoveAccountL()

Deletes account from device (only device)

Since
Series60 5.0
Return Value
KErrNone or some system-wide Symbian error code.

SignInL ( TRequestStatus &, const MSenServiceDescription *, CWSToken *&, TBool )

IMPORT_C TIntSignInL(TRequestStatus &aStatus,
const MSenServiceDescription *aService,
CWSToken *&aToken,
TBoolaUI = ETrue
)

Asynchronous request which retrieves tokens from backend.

Since
Series60 5.0
Parameters
aStatus- Used by Account Manager to indicate completion of the send request. Completion means successfully fetched token and registered within internal web services framework.
aService- optional argument to define token scope. NULL specifies general token
aToken- ready token to use by web services
aUI- tells account manager to invoke UI screens during sign in (in case of EFalse password must be provided within CWSAccount)
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first. KErrNotSupported - if You try signIn without providing password, in case when UI is disabled and account mode is manual KErrInUse - parallel application is removing account (via "display account" views)
Leave Codes
Somesystem-wide Symbian error code

SignInL ( const MSenServiceDescription *, CWSToken *&, TBool )

IMPORT_C TIntSignInL(const MSenServiceDescription *aService,
CWSToken *&aToken,
TBoolaUI = ETrue
)

Synchronous(blocking) request which retrieves tokens from backend.

Since
Series60 5.0
Parameters
aService- optional argument to define token scope. NULL specifies general token
aToken- ready token to use by web services
aUI- tells account manager to invoke UI screens during sign in (in case of EFalse password must be provided within CWSAccount)
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first. KErrNotSupported - if You try signIn without providing password, in case when UI is disabled and account mode is manual KErrInUse - parallel application is removing account (via "display account" views) Completion means successfully fetched token and registered within internal web services framework.
Leave Codes
Somesystem-wide Symbian error code

SignOutL ( TRequestStatus &, const MSenServiceDescription * )

IMPORT_C TIntSignOutL(TRequestStatus &aStatus,
const MSenServiceDescription *apService = NULL
)

Sign-out user from backend. Delete valid token from local device If service type is specified, only the tokens in that scope are "invalidated", otherwise signout happens for all services.

Since
Series60 5.0
Parameters
aStatus- Used by Account Manager to indicate completion of the sent request.
apService- determines scope of token(service) to signOut
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedIn - in manual case You have to be signed In first KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.

SignOutL ( const MSenServiceDescription * )

IMPORT_C TIntSignOutL(const MSenServiceDescription *apService = NULL)
Sign-out user from backend. Delete valid token from local device If service type is specified, only the tokens in that scope are "invalidated", otherwise signout happens for all services. It is synchronous(blocking) request
Since
Series60 5.0
Parameters
apService- determines scope of token(service) to signOut
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedIn - in manual case You have to be signed In first KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.

SignUpL ( TRequestStatus &, CWSAccountManager::TCreateStartupView )

IMPORT_C CWSAccount *SignUpL(TRequestStatus &aStatus,
CWSAccountManager::TCreateStartupViewaView = CWSAccountManager::EMain
)

Asynchronous request which performs Sign-Up. It usually runs UI wizard and invoke network communication to register remote account.

Since
Series60 5.0
KErrInUse - parallel wizard is launched KErrAlreadyExists - account already exists KErrCancel - wizard has been cancelled Some system-wide Symbian error code
Parameters
aStatus- Used by Account Manager to indicate completion of the send request. Completion means: UI is closed by end user registration succedd (WSAccount is ready to use) Come back to orginal Akn View
aView- entry view
Return Value
WSAccount which will hold all necessary information about account. At the beign aAccount is empty, step by step is filled by wizard. Ownership is NOT transffered to caller.
Leave Codes

SignUpL ( CWSAccountManager::TCreateStartupView )

IMPORT_C CWSAccount *SignUpL(CWSAccountManager::TCreateStartupViewaView = CWSAccountManager::EMain)

Synchronous(blocking) request which performs Sign-Up. It runs UI wizard and invoke network communication to register remote account.

Since
Series60 5.0
KErrInUse - parallel wizard is launched KErrAlreadyExists - account already exists KErrCancel - wizard has been cancelled Some system-wide Symbian error code
Parameters
aView- entry view
Return Value
WSAccount which holds all necessary information about account. At the beign account is empty, step by step is filled by wizard. Ownership is NOT transffered to caller. Completion means: UI is closed by end user registration succedd (WSAccount is ready to use) Come back to orginal Akn View
Leave Codes

SingleSignOutL ( )

IMPORT_C TIntSingleSignOutL()

Deletes all NCIM SSO tokens of this user (account), but only in device scope.

Since
Series60 5.0
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.

TokenL ( const MSenServiceDescription *, CWSToken *& )

IMPORT_C TIntTokenL(const MSenServiceDescription *aService,
CWSToken *&aToken
)

Synchronous request which retrieves token from internal cache of Web Service framework. Consumer applications use this method for finding Credentials/Tokens. No netwrok activity to any real Identity Provider service. Local searching in device.

Since
Series60 5.0
Parameters
aService- target service to SignIn. To obtain valid ovi token (without service scope), provide NULL.
aToken- token which keeps Credentials and related properties The ownership of the token is passed to the caller . If all ovi tokens in internal cache of Web Service framework are expired method returns KErrNone and aToken equals to NULL.
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedIn - You are not SignedIn KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.
Leave Codes
Somesystem-wide Symbian error code

UploadAccount ( TRequestStatus & )

IMPORT_C TIntUploadAccount(TRequestStatus &aStatus)
Upload & Update Ovi account information within remote backend and local web service framework
Since
Series60 5.0
Parameters
aStatus- Used by Account Manager to indicate completion of the send request. Completion means successfully upload to backend
Return Value
KErrNone or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.
Leave Codes
Somesystem-wide Symbian error code

UploadAccount ( )

IMPORT_C TIntUploadAccount()
Upload & Update Ovi account information within remote backend and local web service framework It is synchronous(blocking) request
Since
Series60 5.0
Return Value
KErrNone(successfully upload to backend) or some system-wide Symbian error code. KErrWsNotSignedUp - OVI Account has not been created yet. You have to SignUp first.
Leave Codes
Somesystem-wide Symbian error code