datasourcemodules/bluetoothgpspositioningmodule/btgpsconfig/src/lbsbtgpsconfiginternal.cpp
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // LBS Bluetooth GPS Configuration API: Internal version
       
    15 //
       
    16 
       
    17 #include "lbsbtgpsconfiginternal.h"
       
    18 #include "lbsbtgpsconfigimpl.h"
       
    19 #include "lbsbtgpsdevicerecord.h"
       
    20 
       
    21 
       
    22 /** Static constructor (without observer)
       
    23 Creates an instance of the LBS Bluetooth GPS Configuration API.
       
    24 This version is for clients that do not require configuration update notifications.
       
    25 
       
    26 @return A newly constructed CLbsBtGpsConfig object.
       
    27 
       
    28 @leave KErrPermissionDenied Client does not have the required capabilities.
       
    29 
       
    30 @capability LocalServices
       
    31 
       
    32 @see CLbsBtGpsConfig
       
    33 
       
    34 @internalTechnology
       
    35 @prototype
       
    36 */
       
    37 EXPORT_C CLbsBtGpsConfigInternal* CLbsBtGpsConfigInternal::NewL()
       
    38 	{
       
    39 	CLbsBtGpsConfigInternal* self = new (ELeave) CLbsBtGpsConfigInternal();
       
    40     CleanupStack::PushL(self);
       
    41     self->ConstructL(NULL);
       
    42     CleanupStack::Pop(self);
       
    43     return self;
       
    44 	}
       
    45 
       
    46 
       
    47 /** Static constructor (with observer)
       
    48 Creates an instance of the LBS Bluetooth GPS Configuration API, specifying a callback
       
    49 to recieve update notifications.
       
    50 
       
    51 @param aObserver [IN] Observer which will recieve update notifications.
       
    52 
       
    53 @return A newly constructed CLbsBtGpsConfig object.
       
    54 
       
    55 @leave KErrPermissionDenied Client does not have the required capabilities.
       
    56 
       
    57 @capability LocalServices
       
    58 
       
    59 @see CLbsBtGpsConfig
       
    60 
       
    61 @internalTechnology
       
    62 @prototype
       
    63 */
       
    64 EXPORT_C CLbsBtGpsConfigInternal* CLbsBtGpsConfigInternal::NewL(MLbsBtGpsConfigObserver& aObserver)
       
    65 	{
       
    66 	CLbsBtGpsConfigInternal* self = new (ELeave) CLbsBtGpsConfigInternal();
       
    67     CleanupStack::PushL(self);
       
    68     self->ConstructL(&aObserver);
       
    69     CleanupStack::Pop(self);
       
    70     return self;
       
    71 	}
       
    72 
       
    73 
       
    74 /** Destructor 
       
    75 @internalTechnology
       
    76 @prototype
       
    77 */
       
    78 EXPORT_C CLbsBtGpsConfigInternal::~CLbsBtGpsConfigInternal()
       
    79 	{
       
    80 
       
    81 	}
       
    82 
       
    83 
       
    84 /** Updates the device information for a device in the list
       
    85 
       
    86 @param aDeviceInfo [In] The updated device information. The key should identify an existing device in the list.
       
    87 
       
    88 @return KErrNone if the operation completed succesfully.
       
    89 		KErrNotFound if the specified device is not present in the list.
       
    90 		KErrPermissionDenied if the client does not have the required capabilities.
       
    91 
       
    92 @capability LocalServices
       
    93 @capability WriteDeviceData
       
    94 
       
    95 @internalTechnology
       
    96 @prototype
       
    97 */
       
    98 EXPORT_C TInt CLbsBtGpsConfigInternal::UpdateDevice(const TLbsBtGpsDeviceRecord& aDeviceRecord)
       
    99 	{
       
   100 	return iImpl->UpdateDevice(aDeviceRecord);
       
   101 	}
       
   102 
       
   103 
       
   104 /** Retrieves the list of device records
       
   105 
       
   106 @param aList [Out] Reference to an empty RPointerArray to populate with device records from the list.
       
   107 
       
   108 @leave KErrPermissionDenied if the client does not have the required capabilities.
       
   109 
       
   110 @capability LocalServices
       
   111 
       
   112 @internalComponent
       
   113 */
       
   114 EXPORT_C void CLbsBtGpsConfigInternal::GetDeviceRecordListL(RPointerArray<TLbsBtGpsDeviceRecord>& aRecordList)
       
   115 	{
       
   116 	iImpl->GetDeviceRecordListL(aRecordList);
       
   117 	}
       
   118 
       
   119 
       
   120 /** Class constructor 
       
   121 @internalComponent
       
   122 @prototype
       
   123 */
       
   124 CLbsBtGpsConfigInternal::CLbsBtGpsConfigInternal()
       
   125 	{
       
   126 	
       
   127 	}
       
   128 
       
   129 
       
   130 /** Second phase constructor 
       
   131 
       
   132 @param aObserver [IN] Optional observer, which will recieve update notifications.
       
   133 
       
   134 @internalComponent
       
   135 @prototype
       
   136 */
       
   137 void CLbsBtGpsConfigInternal::ConstructL(MLbsBtGpsConfigObserver* aObserver)
       
   138 	{
       
   139 	CLbsBtGpsConfig::ConstructL(aObserver);
       
   140 	}