CLbsBtGpsConfigImpl Class Reference

class CLbsBtGpsConfigImpl : public CActive

LBS Bluetooth GPS Configuration API implementation

CLbsBtGpsConfig

Inherits from

Public Member Functions
~CLbsBtGpsConfigImpl ()
TInt AddDevice (const TBTDevAddr &, TInt , TLbsBtGpsEntryKey &)
TInt EmptyDeviceList ()
TAny * ExtendedInterface ( TInt , TAny *, TAny *)
TInt GetDeviceCount ( TInt &)
void GetDeviceListL ( RPointerArray < TLbsBtGpsDeviceInfo > &)
void GetDeviceRecordListL ( RPointerArray < TLbsBtGpsDeviceRecord > &)
CLbsBtGpsConfigImpl * NewL ( MLbsBtGpsConfigObserver *)
TInt RemoveDevice ( TLbsBtGpsEntryKey )
TInt ReorderDevice ( TLbsBtGpsEntryKey , TInt )
TInt UpdateDevice (const TLbsBtGpsDeviceRecord &)
Protected Member Functions
void AddDeviceL (const TBTDevAddr &, TInt , TLbsBtGpsEntryKey &)
void DoCancel ()
void EmptyDeviceListL ()
TInt EndTransaction ()
TInt MoveDeviceRecord ( TInt , TInt )
TInt ReadDeviceRecord ( TInt , TLbsBtGpsDeviceRecord &)
void RemoveDeviceL ( TLbsBtGpsEntryKey )
void ReorderDeviceL ( TLbsBtGpsEntryKey , TInt )
void RunL ()
TInt StartTransactionL ( CRepository::TTransactionMode )
void UpdateDeviceL (const TLbsBtGpsDeviceRecord &)
TInt WriteDeviceRecord ( TInt , const TLbsBtGpsDeviceRecord &)
Private Member Functions
CLbsBtGpsConfigImpl ( MLbsBtGpsConfigObserver *)
CLbsBtGpsConfigImpl (const CLbsBtGpsConfigImpl &)
void ConstructL ()
CLbsBtGpsConfigImpl & operator= (const CLbsBtGpsConfigImpl &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
Inherited Enumerations
CActive:TPriority
Private Attributes
MLbsBtGpsConfigObserver * iObserver
CRepository * iRepos
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CLbsBtGpsConfigImpl(MLbsBtGpsConfigObserver *)

CLbsBtGpsConfigImpl ( MLbsBtGpsConfigObserver * aObserver ) [private]

Class constructor

Parameters

MLbsBtGpsConfigObserver * aObserver [IN] Optional observer, which will recieve update notifications.

CLbsBtGpsConfigImpl(const CLbsBtGpsConfigImpl &)

CLbsBtGpsConfigImpl ( const CLbsBtGpsConfigImpl & ) [private]

Prohibit copy constructor

Parameters

const CLbsBtGpsConfigImpl &

~CLbsBtGpsConfigImpl()

~CLbsBtGpsConfigImpl ( ) [virtual]

Destructor

Member Functions Documentation

AddDevice(const TBTDevAddr &, TInt, TLbsBtGpsEntryKey &)

TInt AddDevice ( const TBTDevAddr & aAddress,
TInt aPosition,
TLbsBtGpsEntryKey & aKey
)

Adds a new device at the specified position index within the list

Specifying aPosition >= DeviceCount() will result in the device being added to the end of the list.

capability
LocalServices
capability
WriteDeviceData

Parameters

const TBTDevAddr & aAddress [In] Address of the new device.
TInt aPosition [In] Position in the list at which to add the device, note that any existing entries below this position will be shifted down.
TLbsBtGpsEntryKey & aKey [Out] Recieves the unique key assigned to identify the new device.

AddDeviceL(const TBTDevAddr &, TInt, TLbsBtGpsEntryKey &)

void AddDeviceL ( const TBTDevAddr & aAddress,
TInt aPosition,
TLbsBtGpsEntryKey & aKey
) [protected]

Adds a new device at the specified position index within the list - leaving version

AddDevice

Parameters

const TBTDevAddr & aAddress
TInt aPosition
TLbsBtGpsEntryKey & aKey

ConstructL()

void ConstructL ( ) [private]

Second phase constructor

DoCancel()

void DoCancel ( ) [protected, virtual]

Active object DoCancel method

EmptyDeviceList()

TInt EmptyDeviceList ( )

Empties the device list, removing all device entries

capability
LocalServices
capability
WriteDeviceData

EmptyDeviceListL()

void EmptyDeviceListL ( ) [protected]

Empties the device list, removing all device entries - leaving version

EmptyDeviceList

EndTransaction()

TInt EndTransaction ( ) [protected]

End (commit) a central repository transaction

ExtendedInterface(TInt, TAny *, TAny *)

TAny * ExtendedInterface ( TInt aFunctionNumber,
TAny * aPtr1,
TAny * aPtr2
) [virtual]

This methods is reserved for future expansion and should not be used

capability
LocalServices

Parameters

TInt aFunctionNumber Reserved for future expansion
TAny * aPtr1 Reserved for future expansion
TAny * aPtr2 Reserved for future expansion

GetDeviceCount(TInt &)

TInt GetDeviceCount ( TInt & aCount )

Returns the number of devices present in the list

leave
KErrPermissionDenied if the client does not have the required capabilities.
capability
LocalServices

Parameters

TInt & aCount

GetDeviceListL(RPointerArray< TLbsBtGpsDeviceInfo > &)

void GetDeviceListL ( RPointerArray < TLbsBtGpsDeviceInfo > & aList )

Retrieves the list of devices

leave
KErrPermissionDenied if the client does not have the required capabilities.
capability
LocalServices

Parameters

RPointerArray < TLbsBtGpsDeviceInfo > & aList [Out] Reference to an empty RPointerArray to populate with device entries from the list.

GetDeviceRecordListL(RPointerArray< TLbsBtGpsDeviceRecord > &)

void GetDeviceRecordListL ( RPointerArray < TLbsBtGpsDeviceRecord > & aRecordList )

Retrieves the list of device records

leave
KErrPermissionDenied if the client does not have the required capabilities.
capability
LocalServices

Parameters

RPointerArray < TLbsBtGpsDeviceRecord > & aRecordList

MoveDeviceRecord(TInt, TInt)

TInt MoveDeviceRecord ( TInt aOldIndex,
TInt aNewIndex
) [protected]

Move a device record from old to new position

StartTransaction should have been called.

Parameters

TInt aOldIndex [In] The new index of the device record in the list
TInt aNewIndex

NewL(MLbsBtGpsConfigObserver *)

CLbsBtGpsConfigImpl * NewL ( MLbsBtGpsConfigObserver * aObserver ) [static]

Static constructor (with observer) Creates an instance of the LBS Bluetooth GPS Configuration API implementation, specifying a callback to recieve update notifications.

capability
LocalServices

Parameters

MLbsBtGpsConfigObserver * aObserver [IN] Observer which will recieve update notifications.

ReadDeviceRecord(TInt, TLbsBtGpsDeviceRecord &)

TInt ReadDeviceRecord ( TInt aIndex,
TLbsBtGpsDeviceRecord & aDeviceRecord
) [protected]

Read a device record from cenrep by index

StartTransaction should have been called.

Parameters

TInt aIndex [In] The index of the device entry to read
TLbsBtGpsDeviceRecord & aDeviceRecord

RemoveDevice(TLbsBtGpsEntryKey)

TInt RemoveDevice ( TLbsBtGpsEntryKey aKey )

Removes a device from the list

capability
LocalServices
capability
WriteDeviceData

Parameters

TLbsBtGpsEntryKey aKey [In] The key identifying the device.

RemoveDeviceL(TLbsBtGpsEntryKey)

void RemoveDeviceL ( TLbsBtGpsEntryKey aKey ) [protected]

Removes a device from the list - leaving version

RemoveDevice

Parameters

TLbsBtGpsEntryKey aKey

ReorderDevice(TLbsBtGpsEntryKey, TInt)

TInt ReorderDevice ( TLbsBtGpsEntryKey aKey,
TInt aNewPosition
)

Reorders a device in the list by specifying a new position index

The device identified by the key will assume the specified position in the list, shifting exsiting devices as required in order to achieve this.

Specifying aNewPosition = 0 will result in the device being moved to the start of the list. Specifying aNewPosition >= DeviceCount() will result in the device being moved to the end of the list.

When a device is moved towards the start of the list, other devices located between the old and new positions will be shifted towards the end of the list by one place. For example, starting with a list {A,B,C,D,E}, moving device D to position 1 would result in {A,D,B,C,E}.

Similarly, when a device is moved towards the end of the list, other devices located between the old and new positions will be shifted towards the start of the list by one place. For example, starting with a list {A,B,C,D,E}, moving device B to position 3 would result in {A,C,D,B,E}

capability
LocalServices
capability
WriteDeviceData

Parameters

TLbsBtGpsEntryKey aKey [In] The key identifying the device.
TInt aNewPosition [In] New position index for the device in the list (where 0 indicates the start of the list).

ReorderDeviceL(TLbsBtGpsEntryKey, TInt)

void ReorderDeviceL ( TLbsBtGpsEntryKey aKey,
TInt aNewPosition
) [protected]

Reorders a device in the list by specifying a new position index - leaving version

ReorderDevice

Parameters

TLbsBtGpsEntryKey aKey
TInt aNewPosition

RunL()

void RunL ( ) [protected, virtual]

Active object RunL method

StartTransactionL(CRepository::TTransactionMode)

TInt StartTransactionL ( CRepository::TTransactionMode aMode ) [protected]

Attempt to start a central repository transaction

UpdateDevice(const TLbsBtGpsDeviceRecord &)

TInt UpdateDevice ( const TLbsBtGpsDeviceRecord & aDeviceRecord )

Updates the device information for a device in the list

capability
LocalServices
capability
WriteDeviceData

Parameters

const TLbsBtGpsDeviceRecord & aDeviceRecord

UpdateDeviceL(const TLbsBtGpsDeviceRecord &)

void UpdateDeviceL ( const TLbsBtGpsDeviceRecord & aDeviceRecord ) [protected]

Updates the device information for a device in the list - leaving version

UpdateDevice

Parameters

const TLbsBtGpsDeviceRecord & aDeviceRecord

WriteDeviceRecord(TInt, const TLbsBtGpsDeviceRecord &)

TInt WriteDeviceRecord ( TInt aIndex,
const TLbsBtGpsDeviceRecord & aDeviceRecord
) [protected]

Write a device record to cenrep by index

StartTransaction should have been called.

Parameters

TInt aIndex [In] The index of the device entry to write
const TLbsBtGpsDeviceRecord & aDeviceRecord

operator=(const CLbsBtGpsConfigImpl &)

CLbsBtGpsConfigImpl & operator= ( const CLbsBtGpsConfigImpl & ) [private]

Prohibit assigment operator

Parameters

const CLbsBtGpsConfigImpl &

Member Data Documentation

MLbsBtGpsConfigObserver * iObserver

MLbsBtGpsConfigObserver * iObserver [private]

Pointer to observer object (optional, can be NULL)

CRepository * iRepos

CRepository * iRepos [private]

Central repository object