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 voidCancelNotifyAccessoryDisconnected()
IMPORT_C voidCancelNotifyAccessoryValueChanged(const TAccPolNameRecord &)
IMPORT_C voidCancelNotifyNewAccessoryConnected()
IMPORT_C TIntCloseSubSession()
IMPORT_C TIntCreateSubSession(RAccessoryServer &)
IMPORT_C voidNotifyAccessoryDisconnected(TRequestStatus &, const TAccPolGenericID &)
IMPORT_C voidNotifyAccessoryValueChanged(TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeTBool &)
IMPORT_C voidNotifyAccessoryValueChanged(TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeTInt &)
IMPORT_C voidNotifyAccessoryValueChanged(TRequestStatus &, const TAccPolGenericID &, const TAccPolNameRecord &, TAccValueTypeObject &)
IMPORT_C voidNotifyNewAccessoryConnected(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_CRAccessorySingleConnection()

C++ default constructor.

Member Functions Documentation

CancelNotifyAccessoryDisconnected()

IMPORT_C voidCancelNotifyAccessoryDisconnected()const

Cancel NotifyAccessoryDisconnected().

Since
S60 3.1

CancelNotifyAccessoryValueChanged(const TAccPolNameRecord &)

IMPORT_C voidCancelNotifyAccessoryValueChanged(const TAccPolNameRecord &aNameRecord)const

Cancel NotifyAccessoryValueChanged().

Since
S60 3.1

Parameters

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

CancelNotifyNewAccessoryConnected()

IMPORT_C voidCancelNotifyNewAccessoryConnected()const

Cancel NotifyNewAccessoryConnected().

Since
S60 3.1

CloseSubSession()

IMPORT_C TIntCloseSubSession()[virtual]

Closes the RAccessorySingleConnection sub-session.

Since
S60 3.1
CreateSubSession()

CreateSubSession(RAccessoryServer &)

IMPORT_C TIntCreateSubSession(RAccessoryServer &aSession)[virtual]

Creates a new sub-session within an existing session.

Since
S60 3.1

Parameters

RAccessoryServer & aSessionThe session to which this sub-session will belong.

NotifyAccessoryDisconnected(TRequestStatus &, const TAccPolGenericID &)

IMPORT_C voidNotifyAccessoryDisconnected(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 & aStatusIndicates 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 & aGenericIdGeneric ID of the target accessory.

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

IMPORT_C voidNotifyAccessoryValueChanged(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 & aStatusIndicates 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 & aGenericIdGeneric ID of the target accessory
const TAccPolNameRecord & aNameRecordAccessory capability.
TAccValueTypeTBool & aValueOn return, contains the current value for the specific accessory capability.

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

IMPORT_C voidNotifyAccessoryValueChanged(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 & aStatusIndicates 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 & aGenericIdGeneric ID of the target accessory
const TAccPolNameRecord & aNameRecordAccessory capability.
TAccValueTypeTInt & aValueOn return, contains the current value for the specific accessory capability.

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

IMPORT_C voidNotifyAccessoryValueChanged(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 & aStatusIndicates 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 & aGenericIdGeneric ID of the target accessory
const TAccPolNameRecord & aNameRecordAccessory capability.
TAccValueTypeObject & aValueOn return, contains the current value for the specific accessory capability.

NotifyNewAccessoryConnected(TRequestStatus &, TAccPolGenericID &)

IMPORT_C voidNotifyNewAccessoryConnected(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 & aStatusIndicates 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 & aGenericIdOn 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]