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