|
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: |
|
15 * SMS Details Ecom Plugin definition. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __SMSDETAILSPLUGIN_H |
|
22 #define __SMSDETAILSPLUGIN_H |
|
23 |
|
24 |
|
25 // INCLUDES |
|
26 |
|
27 #include <e32std.h> |
|
28 #include <csmsgetdetdescinterface.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 class RFs; |
|
33 class CSmsMessage; |
|
34 class CContactMatcher; |
|
35 class CStringResourceReader; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * An ECOM plugin to create the details and description values for an SMS |
|
41 * Overrides the default implementation by Symbian. |
|
42 * |
|
43 * @since S60 3.2 |
|
44 */ |
|
45 class CSmsDetailsPlugin : public CSmsGetDetDescInterface |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Constructor |
|
51 */ |
|
52 static CSmsDetailsPlugin* NewL(); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 virtual ~CSmsDetailsPlugin(); |
|
58 |
|
59 /** |
|
60 * From CSmsGetDetDescInterface |
|
61 */ |
|
62 virtual TInt GetDetails(RFs& aFs, const CSmsMessage& aMessage, TDes& aDetails, TInt aMaxLength); |
|
63 |
|
64 /** |
|
65 * From CSmsGetDetDescInterface |
|
66 */ |
|
67 virtual TInt GetDetails(RFs& aFs, const TDesC& aFromAddress, TDes& aDetails, TInt aMaxLength); |
|
68 |
|
69 /** |
|
70 * From CSmsGetDetDescInterface |
|
71 */ |
|
72 virtual TInt GetDescription(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Constructor |
|
78 */ |
|
79 CSmsDetailsPlugin(); |
|
80 |
|
81 /** |
|
82 * CreateResourceReaderL |
|
83 */ |
|
84 void CreateResourceReaderL( RFs* aFs ); |
|
85 |
|
86 /** |
|
87 * DoGetDetailsL |
|
88 */ |
|
89 void DoGetDetailsL(RFs& aFs, const TDesC& aFromAddress, TDes& aDetails, TInt aMaxLength); |
|
90 |
|
91 /** |
|
92 * DoGetDescriptionL |
|
93 */ |
|
94 TBool DoGetDescriptionL(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength); |
|
95 |
|
96 /** |
|
97 * ExtractDescriptionFromMessage |
|
98 */ |
|
99 void ExtractDescriptionFromMessage(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength); |
|
100 |
|
101 private: // Threading related |
|
102 static TInt CntMatchThreadFunction( TAny* aRequestData ); |
|
103 static void CntMatchThreadFunctionL( TAny* aRequestData ); |
|
104 |
|
105 private: |
|
106 CStringResourceReader* iResourceReader; |
|
107 CContactMatcher* iContactMatcher; |
|
108 RThread iCntMatchThread; |
|
109 }; |
|
110 |
|
111 #endif // __SMSDETAILSPLUGIN_H |