RAccessorySingleConnection Class Reference

class RAccessorySingleConnection : public RAccessoryConnectionBase

Accessory Single Connection sub-session represents single accessory connection. The class provides methods for detecting new accessory connection and disconnection as well as observing changes in internal status of accessory connection.

Example:
  • New single accessory connection is created when wired car kit is connected to the mobile terminal.

  • Internal status of accessory connection will change when wired car kit privacy handset status changes (on-hook / off-hook).

This class is not intended for user derivation.

AccClient.lib
Since
S60 3.1
Public Member Functions
RAccessorySingleConnection ()
IMPORT_C void CancelNotifyAccessoryDisconnected ()
IMPORT_C void CancelNotifyAccessoryValueChanged (const TAccPolNameRecord &)
IMPORT_C void CancelNotifyNewAccessoryConnected ()
IMPORT_C TInt CloseSubSession ()
IMPORT_C TInt CreateSubSession ( RAccessoryServer &)
IMPORT_C void NotifyAccessoryDisconnected ( TRequestStatus &, const TAccPolGenericID &)
IMPORT_C void NotifyAccessoryValueChanged ( TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeTBool &)
IMPORT_C void NotifyAccessoryValueChanged ( TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeTInt &)
IMPORT_C void NotifyAccessoryValueChanged ( TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeObject &)
IMPORT_C void NotifyNewAccessoryConnected ( TRequestStatus &, TAccPolGenericID &)
Inherited Functions
RAccessoryConnectionBase::GetSubblockNameArrayL(const TAccPolGenericID &,CAccPolSubblockNameArray &)const
RAccessoryConnectionBase::GetValueL(const TAccPolGenericID &,const TAccPolNameRecord &,CAccPolObjectCon &)const
RAccessoryConnectionBase::GetValueL(const TAccPolGenericID &,const TAccPolNameRecord &,TAccValueTypeTBool &)const
RAccessoryConnectionBase::GetValueL(const TAccPolGenericID &,const TAccPolNameRecord &,TAccValueTypeTInt &)const
RAccessoryConnectionBase::GetValueL(const TAccPolGenericID &,const TAccPolNameRecord &,TDes8 &)const
RAccessoryConnectionBase::RAccessoryConnectionBase()
RAccessorySubsessionBase::RAccessorySubsessionBase()
RSubSessionBase::CloseSubSession(TInt)
RSubSessionBase::CreateAutoCloseSubSession(RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt)
RSubSessionBase::CreateSubSession(const RSessionBase &,TInt,const TIpcArgs &)
RSubSessionBase::RSubSessionBase()
RSubSessionBase::Send(TInt)const
RSubSessionBase::Send(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt)const
RSubSessionBase::SendReceive(TInt,TRequestStatus &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSubSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSubSessionBase::Session()const
RSubSessionBase::SubSessionHandle()const
Private Attributes
TInt iFlags
TPckg < TInt > iFlagsPckg
TAccSrvGenericIDPckgBuf iNotifyAccessoryDisconnectedGIDPckgBuf
TAccSrvGenericIDPckg iNotifyNewAccessoryConnectedGIDPckg
TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedObjectNameRecordPckgBuf
TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedTBoolNameRecordPckgBuf
TAccSrvValueTypeTBoolPckg iNotifyValueChangedTBoolValuePckg
TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedTIntNameRecordPckgBuf
TAccSrvValueTypeTIntPckg iNotifyValueChangedTIntValuePckg
TPckg < TInt > iReserved2
TPckg < TInt > iReserved3

Constructor & Destructor Documentation

RAccessorySingleConnection()

IMPORT_C RAccessorySingleConnection ( )

C++ default constructor.

Member Functions Documentation

CancelNotifyAccessoryDisconnected()

IMPORT_C void CancelNotifyAccessoryDisconnected ( ) const

Cancel NotifyAccessoryDisconnected() .

Since
S60 3.1

CancelNotifyAccessoryValueChanged(const TAccPolNameRecord &)

IMPORT_C void CancelNotifyAccessoryValueChanged ( const TAccPolNameRecord & aNameRecord ) const

Cancel NotifyAccessoryValueChanged() .

Since
S60 3.1

Parameters

const TAccPolNameRecord & aNameRecord Accessory capability, identifies the notification to be cancelled. If empty, all pending NotifyAccessoryValueChanged() requests are cancelled.

CancelNotifyNewAccessoryConnected()

IMPORT_C void CancelNotifyNewAccessoryConnected ( ) const

Cancel NotifyNewAccessoryConnected() .

Since
S60 3.1

CloseSubSession()

IMPORT_C TInt CloseSubSession ( ) [virtual]

Closes the RAccessorySingleConnection sub-session.

Since
S60 3.1
CreateSubSession()

CreateSubSession(RAccessoryServer &)

IMPORT_C TInt CreateSubSession ( RAccessoryServer & aSession ) [virtual]

Creates a new sub-session within an existing session.

Since
S60 3.1

Parameters

RAccessoryServer & aSession The session to which this sub-session will belong.

NotifyAccessoryDisconnected(TRequestStatus &, const TAccPolGenericID &)

IMPORT_C void NotifyAccessoryDisconnected ( TRequestStatus & aStatus,
const TAccPolGenericID & aGenericId
)

Issues a request for accessory disconnected notification. Request must be renewed after completion if further notifications are needed.

Note: If client needs to listen disconnection for more than one existing accessory, separate sub-session(s) need to be created for each connected accessory.

Since
S60 3.1

Parameters

TRequestStatus & aStatus Indicates the completion status of a request. KErrNone if successful, system-wide error code if failed. Specifically: KErrAlreadyExists, if request allready exist KErrCancel, if request is cancelled
const TAccPolGenericID & aGenericId Generic ID of the target accessory.

NotifyAccessoryValueChanged(TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeTBool &)

IMPORT_C void NotifyAccessoryValueChanged ( TRequestStatus & aStatus,
const TAccPolGenericID & aGenericId,
const TAccPolNameRecord & aNameRecord,
TAccValueTypeTBool & aValue
)

Issues a request for the specific accessory capability value changed notification. Request must be renewed after completion if further notifications are needed.

Note: If client needs to listen internal changes of accessory connection status for more than one existing accessory, separate sub-session(s) need to be created for each connected accessory.

Since
S60 3.1

Parameters

TRequestStatus & aStatus Indicates the completion status of a request. KErrNone if successful, system-wide error code if failed. Specifically: KErrAlreadyExists, if request for another Generic ID allready exist KErrCancel, if request is cancelled (this happens e.g. when target accessory is disconnected) KErrNotFound, if target accessory is not connected KErrNotSupported, if Accessory capability is not supported
const TAccPolGenericID & aGenericId Generic ID of the target accessory
const TAccPolNameRecord & aNameRecord Accessory capability.
TAccValueTypeTBool & aValue On return, contains the current value for the specific accessory capability.

NotifyAccessoryValueChanged(TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeTInt &)

IMPORT_C void NotifyAccessoryValueChanged ( TRequestStatus & aStatus,
const TAccPolGenericID & aGenericId,
const TAccPolNameRecord & aNameRecord,
TAccValueTypeTInt & aValue
)

Issues a request for the specific accessory capability value changed notification. Request must be renewed after completion if further notifications are needed.

Note: If client needs to listen internal changes of accessory connection status for more than one existing accessory, separate sub-session(s) need to be created for each connected accessory.

Since
S60 3.1

Parameters

TRequestStatus & aStatus Indicates the completion status of a request. KErrNone if successful, system-wide error code if failed. Specifically: KErrAlreadyExists, if request for another Generic ID allready exist KErrCancel, if request is cancelled (this happens e.g. when target accessory is disconnected) KErrNotFound, if target accessory is not connected KErrNotSupported, if accessory capability is not supported
const TAccPolGenericID & aGenericId Generic ID of the target accessory
const TAccPolNameRecord & aNameRecord Accessory capability.
TAccValueTypeTInt & aValue On return, contains the current value for the specific accessory capability.

NotifyAccessoryValueChanged(TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeObject &)

IMPORT_C void NotifyAccessoryValueChanged ( TRequestStatus & aStatus,
const TAccPolGenericID & aGenericId,
const TAccPolNameRecord & aNameRecord,
TAccValueTypeObject & aValue
)

Issues a request for the specific accessory capability value changed notification. Request must be renewed after completion if further notifications are needed.

Note: If client needs to listen internal changes of accessory connection status for more than one existing accessory, separate sub-session(s) need to be created for each connected accessory.

Since
S60 5.2
Exceptions
If

the buffer for aValue cannot be created a leave will occur.

Parameters

TRequestStatus & aStatus Indicates the completion status of a request. KErrNone if successful, system-wide error code if failed. Specifically: KErrAlreadyExists, if request for another Generic ID allready exist KErrCancel, if request is cancelled (this happens e.g. when target accessory is disconnected) KErrNotFound, if target accessory is not connected KErrNotSupported, if accessory capability is not supported
const TAccPolGenericID & aGenericId Generic ID of the target accessory
const TAccPolNameRecord & aNameRecord Accessory capability.
TAccValueTypeObject & aValue On return, contains the current value for the specific accessory capability.

NotifyNewAccessoryConnected(TRequestStatus &, TAccPolGenericID &)

IMPORT_C void NotifyNewAccessoryConnected ( TRequestStatus & aStatus,
TAccPolGenericID & aGenericId
)

Issues a request for new accessory connected notification. Request must be renewed after completion if further notifications are needed.

Since
S60 3.1

Parameters

TRequestStatus & aStatus Indicates the completion status of a request. KErrNone if successful, system-wide error code if failed. Specifically: KErrAlreadyExists, if request allready exist KErrCancel, if request is cancelled
TAccPolGenericID & aGenericId On succesful request completion, contains the updated Generic ID of the connected accessory

Member Data Documentation

TInt iFlags

TInt iFlags [private]

TPckg< TInt > iFlagsPckg

TPckg < TInt > iFlagsPckg [private]

TAccSrvGenericIDPckgBuf iNotifyAccessoryDisconnectedGIDPckgBuf

TAccSrvGenericIDPckgBuf iNotifyAccessoryDisconnectedGIDPckgBuf [private]

TAccSrvGenericIDPckg iNotifyNewAccessoryConnectedGIDPckg

TAccSrvGenericIDPckg iNotifyNewAccessoryConnectedGIDPckg [private]

TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedObjectNameRecordPckgBuf

TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedObjectNameRecordPckgBuf [private]

TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedTBoolNameRecordPckgBuf

TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedTBoolNameRecordPckgBuf [private]

TAccSrvValueTypeTBoolPckg iNotifyValueChangedTBoolValuePckg

TAccSrvValueTypeTBoolPckg iNotifyValueChangedTBoolValuePckg [private]

TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedTIntNameRecordPckgBuf

TAccSrvGIDNameRecordPckgBuf iNotifyValueChangedTIntNameRecordPckgBuf [private]

TAccSrvValueTypeTIntPckg iNotifyValueChangedTIntValuePckg

TAccSrvValueTypeTIntPckg iNotifyValueChangedTIntValuePckg [private]

TPckg< TInt > iReserved2

TPckg < TInt > iReserved2 [private]

TPckg< TInt > iReserved3

TPckg < TInt > iReserved3 [private]