1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/commsdatutils.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,90 @@
1.4 +// Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 +// Utility functions to retrieve comms data for specific use-cases and present it in a particular way.
1.18 +//
1.19 +//
1.20 +
1.21 +
1.22 +
1.23 +/**
1.24 + @file
1.25 + @internalAll
1.26 + @released
1.27 +*/
1.28 +#ifndef __COMMSDATUTILS_H__
1.29 +#define __COMMSDATUTILS_H__
1.30 +
1.31 +#include <cdbcols.h>
1.32 +#include <dial.h>
1.33 +#include <metadatabase.h>
1.34 +
1.35 +class CCommsDatUtilImpl;
1.36 +namespace CommsDatUtils
1.37 +
1.38 +{
1.39 +
1.40 +class CCommsDatUtils : public CBase
1.41 + {
1.42 + public :
1.43 +
1.44 + IMPORT_C static CCommsDatUtils* NewL();
1.45 +
1.46 + IMPORT_C ~CCommsDatUtils();
1.47 +
1.48 + // Set `aDialString` to be the appropriate string based on the directory
1.49 + // number, where the dial is being performed and the chargecard to use.
1.50 + // `ResolvePhoneNumberL()` opens a comms database to perform the
1.51 + // resolution
1.52 + IMPORT_C static void ResolvePhoneNumberL(TDesC& aNumber, TDes& aDialString, TParseMode aDialParseMode, TUint32 aLocationId, TUint32 aChargecardId);
1.53 +
1.54 + // Set `aDialString` to be the appropriate string based on the directory
1.55 + // number, where the dial is being performed and the chargecard to use.
1.56 + IMPORT_C static void ResolvePhoneNumberFromDatabaseL(TDesC& aNumber, TDes& aDialString, TParseMode aDialParseMode, TUint32 aLocationId, TUint32 aChargecardId);
1.57 +
1.58 + // Check access to database fields
1.59 + IMPORT_C TInt CheckReadCapability( const TDesC& aField, const RMessagePtr2* aMessage );
1.60 +
1.61 + IMPORT_C TInt CheckWriteCapability( const TDesC& aField, const RMessagePtr2* aMessage );
1.62 +
1.63 + private:
1.64 + CCommsDatUtils() {};
1.65 + void ConstructL();
1.66 +
1.67 + private :
1.68 +
1.69 + CCommsDatUtilImpl* iUtilsImpl;
1.70 + };
1.71 +
1.72 +
1.73 +#ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
1.74 +class NameLookUp
1.75 + {
1.76 + public:
1.77 + /** Looks up the field specified and supplies a descriptor matching the name.
1.78 + @param aElementId The field to look up.
1.79 + @param aFieldName returns a pointer to the HBufC containing the string.
1.80 + @param aDataType returns the data type of the found field.
1.81 + @return The reversed value. */
1.82 + IMPORT_C static TInt FieldNameLookup(CommsDat::TMDBElementId aElementId, HBufC*& aFieldName, TInt& aDataType );
1.83 + private:
1.84 + NameLookUp() {} // no construction since we are now private.
1.85 + };
1.86 +#endif // SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
1.87 +
1.88 +
1.89 +
1.90 +} //end namespace CommsDat::utils
1.91 +
1.92 +
1.93 +#endif //__COMMSDATUTILS_H__