bluetoothmgmt/btmgr/BTManServer/BTRegistryDB.h
branchRCL_3
changeset 11 20fda83a6398
parent 0 29b1cd4cb562
equal deleted inserted replaced
10:8a27654f7b62 11:20fda83a6398
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   104 // Version history:
   104 // Version history:
   105 // 1.0 - Baseline
   105 // 1.0 - Baseline
   106 // 1.1 - Adjusted the Time/Date fields for 64 bit integers (remote device table).
   106 // 1.1 - Adjusted the Time/Date fields for 64 bit integers (remote device table).
   107 // 1.2 - Added additional fields Link-key type and UI cookie (remote device table).
   107 // 1.2 - Added additional fields Link-key type and UI cookie (remote device table).
   108 
   108 
       
   109 // Note: Any changes to the registry version will also require changes to the CBTRegistryBURData class.
       
   110 
   109 // Useful SQL literals
   111 // Useful SQL literals
   110 _LIT(KSQLIsNotNull, " IS NOT NULL");
   112 _LIT(KSQLIsNotNull, " IS NOT NULL");
   111 _LIT(KSQLCommaSpace, ", ");
   113 _LIT(KSQLCommaSpace, ", ");
   112 _LIT(KSQLQuote, "'");
   114 _LIT(KSQLQuote, "'");
   113 _LIT(KSQLHash, "#");
   115 _LIT(KSQLHash, "#");
   171 	void DeleteViewL(RDbRowSet& aRowSet, TBool aDeleteAll, const TSecureId& aSecureId);
   173 	void DeleteViewL(RDbRowSet& aRowSet, TBool aDeleteAll, const TSecureId& aSecureId);
   172 
   174 
   173 	void UpdateNameL(const TBTDevAddr& aAddress, const TDesC8& aName, TBTManServerRequest aRequest);
   175 	void UpdateNameL(const TBTDevAddr& aAddress, const TDesC8& aName, TBTManServerRequest aRequest);
   174 // for local device table
   176 // for local device table
   175 	TBTLocalDevice* GetLocalDeviceLC();
   177 	TBTLocalDevice* GetLocalDeviceLC();
       
   178 	TBTLocalDevice* GetLocalDeviceL();
   176 	void UpdateLocalDeviceL(const TBTLocalDevice& aDevice);
   179 	void UpdateLocalDeviceL(const TBTLocalDevice& aDevice);
   177 // CSY table
   180 // CSY table
   178 	const TBTCommPortSettings* GetCommPortSettingsLC(const TBTCommPortSettings& aPort);
   181 	const TBTCommPortSettings* GetCommPortSettingsLC(const TBTCommPortSettings& aPort);
   179 
   182 
   180 	void AddCommPortSettingsL(const TBTCommPortSettings& aSettings, const TSecureId& aClientSID);
   183 	void AddCommPortSettingsL(const TBTCommPortSettings& aSettings, const TSecureId& aClientSID);
   181 
   184 
   182 	void UpdateCommPortSettingsL(RDbView& aView, const TBTCommPortSettings& aSettings);
   185 	void UpdateCommPortSettingsL(RDbView& aView, const TBTCommPortSettings& aSettings);
   183 	void DeleteCommPortSettingsL(RDbView& aCommPortSettingsView);
   186 	void DeleteCommPortSettingsL(RDbView& aCommPortSettingsView);
   184 	RDbView* OpenCommPortLC(const TBTCommPortSettings& aSettings);
   187 	RDbView* OpenCommPortLC(const TBTCommPortSettings& aSettings);
   185 	RDbView* OpenCommPortL(const TBTCommPortSettings& aSettings);
   188 	RDbView* OpenCommPortL(const TBTCommPortSettings& aSettings);
       
   189 
       
   190 	void GetDefaultDeviceFromIniL(TBTLocalDevice& aDevice);
   186 
   191 
   187 private:
   192 private:
   188 	RDbTable* OpenTableL(const TDesC& aTable);	// opens and transfers ownership
   193 	RDbTable* OpenTableL(const TDesC& aTable);	// opens and transfers ownership
   189 	RDbTable* OpenPersistTableL();	// opens and transfers ownership
   194 	RDbTable* OpenPersistTableL();	// opens and transfers ownership
   190 	RDbTable* OpenDeviceTableL();	// opens and transfers ownership
   195 	RDbTable* OpenDeviceTableL();	// opens and transfers ownership
   207 	void CleanPutL(RDbRowSet& aRowSet);
   212 	void CleanPutL(RDbRowSet& aRowSet);
   208 	void ConstructL();
   213 	void ConstructL();
   209 	CBTRegistry();
   214 	CBTRegistry();
   210 	void DeleteCorruptRegistryL();
   215 	void DeleteCorruptRegistryL();
   211 	void SetupDefaultRegistryL();
   216 	void SetupDefaultRegistryL();
   212 	void GetDefaultDeviceFromIniL(TBTLocalDevice& aDevice);
       
   213 	TBool FindVar(const TDesC8& aPtr, const TDesC8& aVarName, TPtrC8& aResult) const;
   217 	TBool FindVar(const TDesC8& aPtr, const TDesC8& aVarName, TPtrC8& aResult) const;
   214 	TBool FindVar(const TDesC8& aPtr, const TDesC8& aVarName, TInt& aResult) const;
   218 	TBool FindVar(const TDesC8& aPtr, const TDesC8& aVarName, TInt& aResult) const;
   215 	TInt SetDeviceName(const TDesC& aDeviceName, TBTLocalDevice& aDevice);
   219 	TInt SetDeviceName(const TDesC& aDeviceName, TBTLocalDevice& aDevice);
   216 	TBool SetDeviceNameFromIniFile(TBTLocalDevice& aDevice, RBuf8& bufPtr);
   220 	TBool SetDeviceNameFromIniFile(TBTLocalDevice& aDevice, RBuf8& bufPtr);
   217 private:
   221 private: