|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This file contains the header file of the |
|
15 * : CPEContactHandlingProxy class. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CPECONTACTHANDLINGPROXY_H |
|
22 #define CPECONTACTHANDLINGPROXY_H |
|
23 |
|
24 // INCLUDES |
|
25 #include "mpecontacthandling.h" |
|
26 #include <e32base.h> |
|
27 #include <mpephonemodelinternal.h> |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * This proxy class provides for the access to contact information services. |
|
33 * The construction of contact handling component is two-fold: |
|
34 * 1) CreateFirstPhaseL() creates the proxy object along with cnt handling dummy |
|
35 * 2) CreateSecondPhaseL() creates the real subject with capability to utilize |
|
36 * contact database. |
|
37 * |
|
38 * @lib ContactHandling.lib |
|
39 * @since Series60_4.0 |
|
40 */ |
|
41 class CPEContactHandlingProxy |
|
42 : public CBase, |
|
43 public MPEContactHandling |
|
44 { |
|
45 public: |
|
46 /** |
|
47 * Create contact handling proxy and dummy implementation |
|
48 * @return pointer to log handling proxy object, i.e. the handle to |
|
49 * access log handling services |
|
50 */ |
|
51 IMPORT_C static MPEContactHandling* CreateFirstPhaseL(); |
|
52 |
|
53 /** |
|
54 * Create contact handling sub system |
|
55 * This method creates the actual log handling implementation which |
|
56 * replaces the dummy component in use. The phone model should call this |
|
57 * function as all the critical sub systems already enable emergency call |
|
58 * capabilities. |
|
59 * @param aModel, handle to the owner of this object and phone engine |
|
60 * @param aFsSession, handle to the shared file server session |
|
61 */ |
|
62 IMPORT_C void CreateSecondPhaseL( |
|
63 MPEPhoneModelInternal& aModel, |
|
64 RFs& aFsSession ); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 IMPORT_C virtual ~CPEContactHandlingProxy(); |
|
70 |
|
71 public: |
|
72 /** |
|
73 * Synchronous method for searching contact information. |
|
74 * @param aCallId call id from phone engine |
|
75 * aFindKey defines the key to search the contact data with |
|
76 * aSearchFrom search from key |
|
77 * @return possible Symbian OS error code |
|
78 */ |
|
79 IMPORT_C TInt FindContactInfoSync( |
|
80 const TInt aCallId, |
|
81 const TPEFindContactKey aFindKey ); |
|
82 |
|
83 /** |
|
84 * Fetch number from speed dial location |
|
85 * @param aLocationIndex Index to look for |
|
86 * @param aNumber Filled with speed dial location phone number |
|
87 * @param aContactItemId Contact item id. KErrNotFound if given location |
|
88 * was not set. |
|
89 * @return possible Symbian OS error code |
|
90 */ |
|
91 IMPORT_C TInt GetSpeedDialLocation( |
|
92 TInt aLocationIndex, |
|
93 TPEPhoneNumber& aNumber ); |
|
94 |
|
95 protected: |
|
96 /** |
|
97 * C++ default constructor. |
|
98 */ |
|
99 CPEContactHandlingProxy(); |
|
100 |
|
101 /** |
|
102 * Constructor, second phase. |
|
103 */ |
|
104 void ConstructL(); |
|
105 |
|
106 |
|
107 private: // Data |
|
108 // Handle to contact handling implementation |
|
109 MPEContactHandling* iContactHandling; |
|
110 // Handle to contact handling dummy implementation |
|
111 MPEContactHandling* iContactHandlingDummy; |
|
112 }; |
|
113 |
|
114 #endif // CPECONTACTHANDLINGPROXY_H |
|
115 |
|
116 // End of File |