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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Utility functions to retrieve comms data for specific use-cases and present it in a particular way.
25 #ifndef __COMMSDATUTILS_H__
26 #define __COMMSDATUTILS_H__
30 #include <metadatabase.h>
32 class CCommsDatUtilImpl;
33 namespace CommsDatUtils
37 class CCommsDatUtils : public CBase
41 IMPORT_C static CCommsDatUtils* NewL();
43 IMPORT_C ~CCommsDatUtils();
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
49 IMPORT_C static void ResolvePhoneNumberL(TDesC& aNumber, TDes& aDialString, TParseMode aDialParseMode, TUint32 aLocationId, TUint32 aChargecardId);
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);
55 // Check access to database fields
56 IMPORT_C TInt CheckReadCapability( const TDesC& aField, const RMessagePtr2* aMessage );
58 IMPORT_C TInt CheckWriteCapability( const TDesC& aField, const RMessagePtr2* aMessage );
66 CCommsDatUtilImpl* iUtilsImpl;
70 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
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 );
81 NameLookUp() {} // no construction since we are now private.
83 #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
87 } //end namespace CommsDat::utils
90 #endif //__COMMSDATUTILS_H__