1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/comms-infras/ss_connsettings.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,92 @@
1.4 +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +/**
1.20 + @file
1.21 + @internalTechnology
1.22 +*/
1.23 +
1.24 +#if !defined(__SS_CONNSETTINGS_H__)
1.25 +#define __SS_CONNSETTINGS_H__
1.26 +
1.27 +#include <e32def.h>
1.28 +#include <e32base.h>
1.29 +
1.30 +/**
1.31 + Base class that any client wishing to access underlying comms database settings
1.32 + @internalTechnology
1.33 + @released Since 9.1
1.34 + @see CConnectionProvider
1.35 + */
1.36 +class CConnectionSettings : public CBase
1.37 + {
1.38 +public:
1.39 + IMPORT_C CConnectionSettings();
1.40 +
1.41 + IMPORT_C void GetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage );
1.42 + IMPORT_C void GetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage );
1.43 + IMPORT_C void GetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage );
1.44 + IMPORT_C void GetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage );
1.45 + IMPORT_C HBufC* GetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage );
1.46 +
1.47 +protected:
1.48 + /**
1.49 + Override this to retrieve a boolean value from the database with the given field name
1.50 +
1.51 + @param aSettingName Field name
1.52 + @param aValue Reference to a boolean that will contain the value on call success
1.53 + @param aMessage RMessage pointer required for secure session communication
1.54 + */
1.55 + virtual void DoGetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage ) = 0;
1.56 +
1.57 + /**
1.58 + Override this to retrieve a unicode string value from the database with the given field name
1.59 +
1.60 + @param aSettingName Field name
1.61 + @param aValue Reference to a string that will contain the value on call success
1.62 + @param aMessage RMessage pointer required for secure session communication
1.63 + */
1.64 + virtual void DoGetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage ) = 0;
1.65 +
1.66 + /**
1.67 + Override this to retrieve a 8-bit string value from the database with the given field name
1.68 +
1.69 + @param aSettingName Field name
1.70 + @param aValue Reference to a string that will contain the value on call success
1.71 + @param aMessage RMessage pointer required for secure session communication
1.72 + */
1.73 + virtual void DoGetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage ) = 0;
1.74 +
1.75 + /**
1.76 + Override this to retrieve a unsigned 32-bit int value from the database with the given field name
1.77 +
1.78 + @param aSettingName Field name
1.79 + @param aValue Reference to a TUint32 that will contain the value on call success
1.80 + @param aMessage RMessage pointer required for secure session communication
1.81 + */
1.82 + virtual void DoGetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage ) = 0;
1.83 +
1.84 + /**
1.85 + Override this to retrieve a string value as a heap allocated buffer from the database with the given field name
1.86 +
1.87 + @param aSettingName Field name
1.88 + @param aMessage RMessage pointer required for secure session communication
1.89 + @return Pointer to the dynamically allocated string
1.90 + */
1.91 + virtual HBufC* DoGetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage ) = 0;
1.92 + };
1.93 +
1.94 +#endif // __SS_CONNSETTINGS_H__
1.95 +