RUsbWatcher Class Reference

class RUsbWatcher : public RSessionBase

RUsbWatcher class

This class offers access to UsbWatcher server to make personality related operations.

usbwatcher.lib
Since
S60 v3.2

Inherits from

Public Member Functions
RUsbWatcher ()
~RUsbWatcher ()
IMPORT_C void CancelSetPersonality ()
IMPORT_C void CancelSetPreviousPersonality ()
IMPORT_C TInt Connect ()
IMPORT_C void SetPersonality ( TRequestStatus &, TInt , TBool , TBool )
IMPORT_C void SetPreviousPersonality ( TRequestStatus &)
IMPORT_C void SetPreviousPersonality ()
IMPORT_C void SetPreviousPersonalityOnDisconnect ()
IMPORT_C TVersion Version ()
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RUsbWatcher()

IMPORT_C RUsbWatcher ( )

~RUsbWatcher()

IMPORT_C ~RUsbWatcher ( )

Member Functions Documentation

CancelSetPersonality()

IMPORT_C void CancelSetPersonality ( )

Cancel pending set personality request.

Since
S60 3.2

CancelSetPreviousPersonality()

IMPORT_C void CancelSetPreviousPersonality ( )

This service cancels pending SetPreviousPersonality() request.

Since
S60 3.2

Connect()

IMPORT_C TInt Connect ( )

Connect to the server

Since
S60 3.2

SetPersonality(TRequestStatus &, TInt, TBool, TBool)

IMPORT_C void SetPersonality ( TRequestStatus & aStatus,
TInt aId,
TBool aForce = EFalse,
TBool aNonBlocking = EFalse
)

Set and select personality Personality is saved to central repository and if there is an active USB connection also current personality is changed to new one.

If the aForce parameter is set ETrue, the Ask on connection mode query is not shown at the following cable connections until
  • the session is closed

  • or aForce is set EFalse in subsequent SetPersonality

  • or CancelSetPersonality is called for outstanding SetPersonality

  • or SetPreviousPersonality or SetPreviousPersonalitySync is called

  • or SetPreviousPersonalityOnDisconnect is called. The Ask on connection is suppressed until all the sessions using aForce have been closed or have been resetted the suppression with one of the function calls listed above. Do not leave session open without resetting aForce, if Ask on connection needs to work normally.

Note that if KErrDiskFull is returned in aStatus, while the cable is connected, the personality was loaded, but the new personality was not stored to Central Repository.

Since
S60 3.2

Parameters

TRequestStatus & aStatus The completion status of the request.
TInt aId Identifies personality to set.
TBool aForce = EFalse If this parameter has value ETrue, USB mode is not asked from the user.
TBool aNonBlocking = EFalse If ETrue, no personality switch blocking queries are shown.

SetPreviousPersonality(TRequestStatus &)

IMPORT_C void SetPreviousPersonality ( TRequestStatus & aStatus )

Set to previous personality. Central repository key is updated with the previous one and if USB is connected current personality is replaced with previous one.

Since
S60 3.2

Parameters

TRequestStatus & aStatus The completion status of the request.

SetPreviousPersonality()

IMPORT_C void SetPreviousPersonality ( )

This service is same as previous one. Except that this one is comleted before it is ready.

Since
S60 3.2

SetPreviousPersonalityOnDisconnect()

IMPORT_C void SetPreviousPersonalityOnDisconnect ( )

This service will set the previous personality on cable disconnect. If cable is disconnected already when this service is used, nothing will happen.

Since
S60 3.2

Version()

IMPORT_C TVersion Version ( ) const

Return version of the server.

Since
S60 3.2