williamr@2: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // Utility functions to retrieve comms data for specific use-cases and present it in a particular way. williamr@2: // williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @internalAll williamr@2: @released williamr@2: */ williamr@2: #ifndef __COMMSDATUTILS_H__ williamr@2: #define __COMMSDATUTILS_H__ williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: class CCommsDatUtilImpl; williamr@2: namespace CommsDatUtils williamr@2: williamr@2: { williamr@2: williamr@2: class CCommsDatUtils : public CBase williamr@2: { williamr@2: public : williamr@2: williamr@2: IMPORT_C static CCommsDatUtils* NewL(); williamr@2: williamr@2: IMPORT_C ~CCommsDatUtils(); williamr@2: williamr@2: // Set `aDialString` to be the appropriate string based on the directory williamr@2: // number, where the dial is being performed and the chargecard to use. williamr@2: // `ResolvePhoneNumberL()` opens a comms database to perform the williamr@2: // resolution williamr@2: IMPORT_C static void ResolvePhoneNumberL(TDesC& aNumber, TDes& aDialString, TParseMode aDialParseMode, TUint32 aLocationId, TUint32 aChargecardId); williamr@2: williamr@2: // Set `aDialString` to be the appropriate string based on the directory williamr@2: // number, where the dial is being performed and the chargecard to use. williamr@2: IMPORT_C static void ResolvePhoneNumberFromDatabaseL(TDesC& aNumber, TDes& aDialString, TParseMode aDialParseMode, TUint32 aLocationId, TUint32 aChargecardId); williamr@2: williamr@2: // Check access to database fields williamr@2: IMPORT_C TInt CheckReadCapability( const TDesC& aField, const RMessagePtr2* aMessage ); williamr@2: williamr@2: IMPORT_C TInt CheckWriteCapability( const TDesC& aField, const RMessagePtr2* aMessage ); williamr@2: williamr@2: private: williamr@2: CCommsDatUtils() {}; williamr@2: void ConstructL(); williamr@2: williamr@2: private : williamr@2: williamr@2: CCommsDatUtilImpl* iUtilsImpl; williamr@2: }; williamr@2: williamr@2: williamr@2: #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY williamr@2: class NameLookUp williamr@2: { williamr@2: public: williamr@2: /** Looks up the field specified and supplies a descriptor matching the name. williamr@2: @param aElementId The field to look up. williamr@2: @param aFieldName returns a pointer to the HBufC containing the string. williamr@2: @param aDataType returns the data type of the found field. williamr@2: @return The reversed value. */ williamr@2: IMPORT_C static TInt FieldNameLookup(CommsDat::TMDBElementId aElementId, HBufC*& aFieldName, TInt& aDataType ); williamr@2: private: williamr@2: NameLookUp() {} // no construction since we are now private. williamr@2: }; williamr@2: #endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY williamr@2: williamr@2: williamr@2: williamr@2: } //end namespace CommsDat::utils williamr@2: williamr@2: williamr@2: #endif //__COMMSDATUTILS_H__