CWSAccountManager Class Reference

#include <ext/mw/wsaccountmanager.h>

Link against: wsaccountmanager.lib

class CWSAccountManager : public CBase, public MWSAccMgrMepExtendedInterface, public CBase, public MWSAccMgrMepExtendedInterface
Public Member Enumerations
enumTCreateStartupView { EMain, ENew, EUseExisting }
enumTEditorMode { EReadOnly, EWrite }
Public Member Functions
pure virtual TInt AccountsL(RPointerArray< CWSAccount > &)
pure virtual TInt AccountsL(RPointerArray< CWSAccount > &, const TDesC8 &)
pure virtual TInt CancelAsync()
pure virtual TInt CloseConnections()
pure virtual TInt DisplayAccountL(TRequestStatus &, CWSAccount &, TEditorMode)
pure virtual TInt DisplayAccountL(CWSAccount &, TEditorMode)
pure virtual TInt DownloadAccount(TRequestStatus &, CWSAccount &)
pure virtual TInt DownloadAccount(CWSAccount &)
pure virtual HBufC8 *GetToSLinksL(TRequestStatus &)
pure virtual TBool IsFTU()
IMPORT_C CWSAccountManager *NewL()
IMPORT_C CWSAccountManager *NewL(CAknViewAppUi *)
IMPORT_C CWSAccountManager *NewL(CAknViewAppUi *, CSenTransportProperties *)
IMPORT_C CWSAccountManager *NewLC()
IMPORT_C CWSAccountManager *NewLC(CAknViewAppUi *)
IMPORT_C CWSAccountManager *NewLC(CAknViewAppUi *, CSenTransportProperties *)
pure virtual TInt RemoveL(CWSAccount &)
pure virtual TInt SignInL(TRequestStatus &, CWSAccount &, const MSenServiceDescription &, RWsTokenArray &, TBool)
pure virtual TInt SignInL(CWSAccount &, const MSenServiceDescription &, RWsTokenArray &, TBool)
pure virtual TInt SignOutL(TRequestStatus &, CWSAccount &, const MSenServiceDescription &)
pure virtual TInt SignOutL(CWSAccount &, const MSenServiceDescription &)
pure virtual TInt SignUpL(TRequestStatus &, CWSAccount &, TCreateStartupView)
pure virtual TInt SignUpL(CWSAccount &, TCreateStartupView)
pure virtual TInt SingleSignOutL(CWSAccount &)
pure virtual TInt TokensL(const CWSAccount &, const MSenServiceDescription &, RWsTokenArray &)
pure virtual voidUpdateAccount(CWSAccount *)
pure virtual TInt UploadAccount(TRequestStatus &, CWSAccount &)
pure virtual TInt UploadAccount(CWSAccount &)
Protected Member Functions
CWSAccountManager()
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()
MWSAccMgrMepExtendedInterface::GetExtendedInterface(TUid,const CWSAccount &)

Detailed Description

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

Below API strongly depends on plugin implementation. Plugins are loaded & managed this account manager. Plugins delivers UI layout and protocol imlpementation. Plugins are established by provided cue

See also: CWSAccMgrPluginInfo

library
wsaccountmanager.lib
Since
Series60 5.0

Member Enumeration Documentation

Enum TCreateStartupView

Since
Series60 5.0
EnumeratorValueDescription
EMain1
ENew
EUseExisting

Enum TEditorMode

Determines mode for account displaying

EnumeratorValueDescription
EReadOnly1
EWrite

Constructor & Destructor Documentation

CWSAccountManager ( )

CWSAccountManager()[protected]

Member Function Documentation

AccountsL ( RPointerArray< CWSAccount > & )

TInt AccountsL(RPointerArray< CWSAccount > &aAccounts)[pure virtual]

Provides a list of available accounts for current active user from internal Web Services framework.

Since
Series60 5.0
Parameters
aAccounts- out parameter with list of accounts. Can be empty.
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

AccountsL ( RPointerArray< CWSAccount > &, const TDesC8 & )

TInt AccountsL(RPointerArray< CWSAccount > &aAccounts,
const TDesC8 &aFrameworkId
)[pure virtual]

Provides a list of available accounts for current active user from internal Web Services framework.

Since
Series60 5.0
Parameters
aAccounts- out parameter with list of accounts. Can be empty.
aFrameworkId- indicates service invocation framework.
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

CancelAsync ( )

TInt CancelAsync()[pure virtual]

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.

CloseConnections ( )

TInt CloseConnections()[pure virtual]

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.

DisplayAccountL ( TRequestStatus &, CWSAccount &, TEditorMode )

TInt DisplayAccountL(TRequestStatus &aStatus,
CWSAccount &aAccount,
TEditorModeaMode = EReadOnly
)[pure virtual]

Asynchronous request which is used to bootup UI to view account.

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.
aAccount- class which holds all necessary information about account which is shown within UI. Account are from CreateAccount or Listing(AccountsL or OviAccount) methods.
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

DisplayAccountL ( CWSAccount &, TEditorMode )

TInt DisplayAccountL(CWSAccount &aAccount,
TEditorModeaMode = EReadOnly
)[pure virtual]

Synchronous(blocking) request which is used to bootup UI to view account.

Since
Series60 5.0
Parameters
aAccount- class which holds all necessary information about account which is shown within UI. Account are from CreateAccount or Listing(AccountsL or OviAccount) methods.
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

DownloadAccount ( TRequestStatus &, CWSAccount & )

TInt DownloadAccount(TRequestStatus &aStatus,
CWSAccount &aAccount
)[pure virtual]

Download accounts 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
aAccount- class which holds all downloaded information about account First appication has to resolve existing account to pass it here. Methods like SignUp/List account can be used to get account.
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

DownloadAccount ( CWSAccount & )

TInt DownloadAccount(CWSAccount &aAccount)[pure virtual]
Download accounts information from remote backend It is synchronous(blocking) request
Since
Series60 5.0
Parameters
aAccount- class which holds all downloaded information about account First appication has to resolve existing account to pass it here. Methods like SignUp/List account can be used to get account.
Return Value
KErrNone(successfully download from backend) or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

GetToSLinksL ( TRequestStatus & )

HBufC8 *GetToSLinksL(TRequestStatus &aStatus)[pure virtual]

IsFTU ( )

TBool IsFTU()[pure virtual]

NewL ( )

IMPORT_C CWSAccountManager *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 CWSAccountManager class instance.

NewL ( CAknViewAppUi * )

IMPORT_C CWSAccountManager *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 CWSAccountManager class instance.

NewL ( CAknViewAppUi *, CSenTransportProperties * )

IMPORT_C CWSAccountManager *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 information. That info is used when network connections are opened. Ownership is transferred.
Return Value
a pointer to new CWSAccountManager class instance.

NewLC ( )

IMPORT_C CWSAccountManager *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 CWSAccountManager class instance.

NewLC ( CAknViewAppUi * )

IMPORT_C CWSAccountManager *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 CWSAccountManager class instance.

NewLC ( CAknViewAppUi *, CSenTransportProperties * )

IMPORT_C CWSAccountManager *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 CWSAccountManager class instance.

RemoveL ( CWSAccount & )

TInt RemoveL(CWSAccount &aAccount)[pure virtual]

Deletes account from device (only device)

Since
Series60 5.0
Parameters
aAccount- class which holds information about account, which will be removed from terminal
Return Value
KErrNone or some system-wide Symbian error code.

SignInL ( TRequestStatus &, CWSAccount &, const MSenServiceDescription &, RWsTokenArray &, TBool )

TInt SignInL(TRequestStatus &aStatus,
CWSAccount &aAccount,
const MSenServiceDescription &aService,
RWsTokenArray &aTokens,
TBoolaUI = ETrue
)[pure virtual]

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.
aAccount- class which holds all necessary information about account First appication has to resolve existing account to pass it here. Methods like SignUp or Accounts can be used to get account.
aService- target service to SignIn
aTokens- an array with 0 or more tokens The ownership of the array (and Tokens) is passed to the caller so before the array goes out of scope in the client, the caller must call RPointerArray::ResetAndDestroy() on the array to close the array and delete all the Tokens in the array.
aUI- ETrue displays sign in UI while EFalse not
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

SignInL ( CWSAccount &, const MSenServiceDescription &, RWsTokenArray &, TBool )

TInt SignInL(CWSAccount &aAccount,
const MSenServiceDescription &aService,
RWsTokenArray &aTokens,
TBoolaUI = ETrue
)[pure virtual]

Synchronous(blocking) request which retrieves tokens from backend.

Since
Series60 5.0
Parameters
aAccount- class which holds all necessary information about account First appication has to resolve existing account to pass it here. Methods like SignUp or Accounts can be used to get account.
aService- target service to SignIn
aTokens- an array with 0 or more tokens The ownership of the array (and Tokens) is passed to the caller so before the array goes out of scope in the client, the caller must call RPointerArray::ResetAndDestroy() on the array to close the array and delete all the Tokens in the array.
aUI- ETrue displays sign in UI while EFalse not
Return Value
KErrNone or some system-wide Symbian error code. KErrNone means successfully fetched token and registered within internal web services framework.
Leave Codes
Somesystem-wide Symbian error code

SignOutL ( TRequestStatus &, CWSAccount &, const MSenServiceDescription & )

TInt SignOutL(TRequestStatus &aStatus,
CWSAccount &aAccount,
const MSenServiceDescription &apService
)[pure virtual]

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. User must be signed in otherwise SingleSignOutL(...) should be used for remove token from local device.

Since
Series60 5.0
Parameters
aStatus- Used by Account Manager to indicate completion of the sent request.
aAccount- class which holds all information about account First appication has to resolve existing account and performs SignIn
apService- used for deleting token
Return Value
KErrNone or some system-wide Symbian error code.

SignOutL ( CWSAccount &, const MSenServiceDescription & )

TInt SignOutL(CWSAccount &aAccount,
const MSenServiceDescription &apService
)[pure virtual]
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. User must be signed in otherwise SingleSignOutL(...) should be used for remove token from local device. It is synchronous(blocking) request
Since
Series60 5.0
Parameters
aAccount- class which holds all information about account First appication has to resolve existing account and performs SignIn
apService- used for deleting token
Return Value
KErrNone or some system-wide Symbian error code.

SignUpL ( TRequestStatus &, CWSAccount &, TCreateStartupView )

TInt SignUpL(TRequestStatus &aStatus,
CWSAccount &aAccount,
TCreateStartupViewaView = EMain
)[pure virtual]

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

Since
Series60 5.0
Parameters
aStatus- Used by Account Manager to indicate completion of the send request. Completion usually means closing UI by end user after successfully registration of remote account.
aAccount- class which will hold all necessary information about account. At the beign aAccount is empty, and step by step is filled by wizard.
aView- entry view
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

SignUpL ( CWSAccount &, TCreateStartupView )

TInt SignUpL(CWSAccount &aAccount,
TCreateStartupViewaView = EMain
)[pure virtual]

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

Since
Series60 5.0
Parameters
aAccount- class which will hold all necessary information about account. At the beign aAccount is empty, and step by step is filled by wizard.
aView- entry view
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

SingleSignOutL ( CWSAccount & )

TInt SingleSignOutL(CWSAccount &aAccount)[pure virtual]

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

Since
Series60 5.0
Parameters
aAccount- class which holds all information about account First appication has to resolve existing account and performs SignIn
Return Value
KErrNone or some system-wide Symbian error code.

TokensL ( const CWSAccount &, const MSenServiceDescription &, RWsTokenArray & )

TInt TokensL(const CWSAccount &aAccount,
const MSenServiceDescription &aService,
RWsTokenArray &aTokens
)[pure virtual]

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
aAccount- class which holds all necessary information about account
aService- target service to SignIn
aTokens- an array with 0 or more tokens The ownership of the array (and Tokens) is passed to the caller so before the array goes out of scope in the client, the caller must call RPointerArray::ResetAndDestroy() on the array to close the array and delete all the Tokens in the array.
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

UpdateAccount ( CWSAccount * )

voidUpdateAccount(CWSAccount *aAccount)[pure virtual]

UploadAccount ( TRequestStatus &, CWSAccount & )

TInt UploadAccount(TRequestStatus &aStatus,
CWSAccount &aAccount
)[pure virtual]

Upload & Update accounts 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
aAccount- class which holds all necessary information about account First appication has to resolve existing account to pass it here. Methods like SignUp/List account can be used to get account.
Return Value
KErrNone or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code

UploadAccount ( CWSAccount & )

TInt UploadAccount(CWSAccount &aAccount)[pure virtual]
Upload & Update accounts information within remote backend and local web service framework It is synchronous(blocking) request
Since
Series60 5.0
Parameters
aAccount- class which holds all necessary information about account First appication has to resolve existing account to pass it here. Methods like SignUp/List account can be used to get account.
Return Value
KErrNone(successfully upload to backend) or some system-wide Symbian error code.
Leave Codes
Somesystem-wide Symbian error code