epoc32/include/commsdatutils.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // Utility functions to retrieve comms data for specific use-cases and present it in a particular way.
    15 // 
    16 //
    17 
    18 
    19 
    20 /**
    21  @file
    22  @internalAll
    23  @released
    24 */
    25 #ifndef __COMMSDATUTILS_H__
    26 #define	__COMMSDATUTILS_H__
    27 
    28 #include <cdbcols.h>
    29 #include <dial.h>
    30 #include <metadatabase.h>
    31 
    32 class CCommsDatUtilImpl;
    33 namespace CommsDatUtils
    34 
    35 {
    36 
    37 class CCommsDatUtils : public CBase
    38 	{
    39 	public :
    40 
    41 		IMPORT_C static CCommsDatUtils* NewL();
    42 
    43 		IMPORT_C ~CCommsDatUtils();
    44 
    45 		//  Set `aDialString` to be the appropriate string based on the directory
    46 		//	number, where the dial is being performed and the chargecard to use.
    47 		//	`ResolvePhoneNumberL()` opens a comms database to perform the
    48 		//	resolution
    49 		IMPORT_C static void ResolvePhoneNumberL(TDesC& aNumber, TDes& aDialString, TParseMode aDialParseMode, TUint32 aLocationId, TUint32 aChargecardId);
    50 
    51 		// Set `aDialString` to be the appropriate string based on the directory
    52 		//	number, where the dial is being performed and the chargecard to use.
    53 		IMPORT_C static void ResolvePhoneNumberFromDatabaseL(TDesC& aNumber, TDes& aDialString, TParseMode aDialParseMode, TUint32 aLocationId, TUint32 aChargecardId);
    54 
    55     	// Check access to database fields
    56 	    IMPORT_C TInt CheckReadCapability( const TDesC& aField, const RMessagePtr2* aMessage );
    57 
    58 	    IMPORT_C TInt CheckWriteCapability( const TDesC& aField, const RMessagePtr2* aMessage );
    59 
    60 	private:
    61 		CCommsDatUtils() {};
    62 		void ConstructL();
    63 
    64 	private :
    65 
    66 		CCommsDatUtilImpl* iUtilsImpl;
    67 	};
    68 
    69 
    70 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
    71 class NameLookUp
    72 	{
    73 	public:
    74 		/** Looks up the field specified and supplies a descriptor matching the name.
    75 		@param aElementId 	The field to look up.
    76 		@param aFieldName 	returns a pointer to the HBufC containing the string.
    77 		@param aDataType 	returns the data type of the found field.
    78 		@return The reversed value. */
    79 		IMPORT_C static TInt FieldNameLookup(CommsDat::TMDBElementId aElementId, HBufC*& aFieldName, TInt& aDataType );
    80 	private:
    81 		NameLookUp() {} // no construction since we are now private.
    82 	};
    83 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
    84 
    85 
    86 
    87 } //end namespace CommsDat::utils
    88 
    89 
    90 #endif //__COMMSDATUTILS_H__