epoc32/include/comms-infras/ss_connsettings.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2005-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 //
    15 
    16 /**
    17  @file 
    18  @internalTechnology 
    19 */
    20 
    21 #if !defined(__SS_CONNSETTINGS_H__)
    22 #define __SS_CONNSETTINGS_H__
    23 
    24 #include <e32def.h>
    25 #include <e32base.h>
    26 
    27 /**
    28  Base class that any client wishing to access underlying comms database settings
    29  @internalTechnology
    30  @released Since 9.1
    31  @see CConnectionProvider
    32  */
    33 class CConnectionSettings : public CBase
    34 	{
    35 public:
    36 	IMPORT_C CConnectionSettings();
    37 	
    38 	IMPORT_C void GetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage );
    39 	IMPORT_C void GetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage );
    40 	IMPORT_C void GetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage );
    41 	IMPORT_C void GetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage );
    42 	IMPORT_C HBufC* GetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage );
    43 
    44 protected:
    45 	/**
    46 	 Override this to retrieve a boolean value from the database with the given field name
    47 	 
    48 	 @param aSettingName Field name
    49 	 @param aValue Reference to a boolean that will contain the value on call success
    50 	 @param aMessage RMessage pointer required for secure session communication
    51 	 */
    52 	virtual void DoGetBoolSettingL(const TDesC& aSettingName, TBool& aValue, const RMessagePtr2* aMessage ) = 0;
    53 	
    54 	/**
    55 	 Override this to retrieve a unicode string value from the database with the given field name
    56 	 
    57 	 @param aSettingName Field name
    58 	 @param aValue Reference to a string that will contain the value on call success
    59 	 @param aMessage RMessage pointer required for secure session communication
    60 	 */
    61 	virtual void DoGetDes16SettingL(const TDesC& aSettingName, TDes16& aValue, const RMessagePtr2* aMessage ) = 0;
    62 	
    63 	/**
    64 	 Override this to retrieve a 8-bit string value from the database with the given field name
    65 	 
    66 	 @param aSettingName Field name
    67 	 @param aValue Reference to a string that will contain the value on call success
    68 	 @param aMessage RMessage pointer required for secure session communication
    69 	 */
    70 	virtual void DoGetDes8SettingL(const TDesC& aSettingName, TDes8& aValue, const RMessagePtr2* aMessage ) = 0;
    71 	
    72 	/**
    73 	 Override this to retrieve a unsigned 32-bit int value from the database with the given field name
    74 	 
    75 	 @param aSettingName Field name
    76 	 @param aValue Reference to a TUint32 that will contain the value on call success
    77 	 @param aMessage RMessage pointer required for secure session communication
    78 	 */	
    79 	virtual void DoGetIntSettingL(const TDesC& aSettingName, TUint32& aValue, const RMessagePtr2* aMessage ) = 0;
    80 	
    81 	/**
    82 	 Override this to retrieve a string value as a heap allocated buffer from the database with the given field name
    83 	 
    84 	 @param aSettingName Field name	 
    85 	 @param aMessage RMessage pointer required for secure session communication
    86 	 @return Pointer to the dynamically allocated string
    87 	 */
    88 	virtual HBufC* DoGetLongDesSettingLC(const TDesC& aSettingName, const RMessagePtr2* aMessage ) = 0;
    89 	};
    90 	
    91 #endif	// __SS_CONNSETTINGS_H__
    92