|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Logs call in case of Do Not Disturb |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef SVPSSLOGCALL_H |
|
21 #define SVPSSLOGCALL_H |
|
22 |
|
23 // INCLUDES |
|
24 // logs |
|
25 #include <logwrap.h> |
|
26 #include <logcli.h> |
|
27 #include <logeng.h> |
|
28 #include <f32file.h> |
|
29 #include <e32base.h> |
|
30 #include <cntdef.h> |
|
31 #include <centralrepository.h> |
|
32 #include "svputdefs.h" |
|
33 |
|
34 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
35 #include <logwraplimits.h> |
|
36 #include <logengdurations.h> |
|
37 #endif |
|
38 |
|
39 /** |
|
40 * Logs call in case of Do Not Disturb. |
|
41 * |
|
42 * @lib svp.dll |
|
43 * @since S60 3.2 |
|
44 */ |
|
45 class CSVPSSLogCall : public CActive |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CSVPSSLogCall* NewL(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CSVPSSLogCall(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * Logs call |
|
63 * @since Series 60 3.0 |
|
64 * @param aFrom Caller address |
|
65 * @return None |
|
66 */ |
|
67 void HandleCallLoggingL( const TDesC8& aFrom ); |
|
68 |
|
69 /** |
|
70 * Resets LogEvent |
|
71 * @since Series 60 3.0 |
|
72 */ |
|
73 void Reset(); |
|
74 |
|
75 public: // Functions from CActive |
|
76 |
|
77 /** |
|
78 * From CActive Called when an aychronic request cancelled. |
|
79 * @since Series 60 3.0 |
|
80 */ |
|
81 void DoCancel(); |
|
82 |
|
83 /** |
|
84 * From CActive Called when an aychronic request is completed. |
|
85 * @since Series 60 3.0 |
|
86 */ |
|
87 void RunL(); |
|
88 |
|
89 |
|
90 private: |
|
91 |
|
92 /** |
|
93 * C++ default constructor. |
|
94 */ |
|
95 CSVPSSLogCall(); |
|
96 |
|
97 /** |
|
98 * By default Symbian 2nd phase constructor is private. |
|
99 */ |
|
100 void ConstructL(); |
|
101 |
|
102 /** |
|
103 * Finds contact title from phonebook if one exists |
|
104 * @since Series 60 3.0 |
|
105 * @param aSipUri Caller address |
|
106 * @return contact title if match found, null otherwise |
|
107 */ |
|
108 HBufC* FindContactTitleL( const TDesC& aSipUri ); |
|
109 |
|
110 /* |
|
111 * Removes some unused characters from SIP address. Firstly, |
|
112 * display name, '<' and '>' are removed. Secondly, the "sip:" |
|
113 * prefix is removed if needed. |
|
114 * Since Series60 3.0 |
|
115 * @param aAddress for SIP URI descriptor. |
|
116 */ |
|
117 void RemoveUnusedCharsFromSipAddress( TDes& aAddress ); |
|
118 |
|
119 /* |
|
120 * Compares plain SIP URIs. |
|
121 * Username part is case sensitive but uri path isn't. |
|
122 * Since Series60 3.0 |
|
123 * @param aTelNumber contains number to compare. |
|
124 * @param aPbookNumber contains phonebook number to compare. |
|
125 * @return ETrue if match found, EFalse otherwise. |
|
126 */ |
|
127 TBool CompareSipUri( const TDesC& aTelNumber, |
|
128 const TDesC& aPbookNumber ); |
|
129 |
|
130 /* |
|
131 * Parses and compares SIP URI username parts. |
|
132 * Since Series60 3.0 |
|
133 * @param aTelNumber contains number to compare. |
|
134 * @param aPbookNumber contains phonebook number to compare. |
|
135 * @return ETrue if match found, EFalse otherwise. |
|
136 */ |
|
137 TBool CompareUsernamePart( const TDesC& aTelNumber, |
|
138 const TDesC& aPbookNumber ); |
|
139 |
|
140 |
|
141 private: // Data |
|
142 |
|
143 // A handle to a file server session |
|
144 RFs iFs; |
|
145 |
|
146 // Instance of Log Event |
|
147 CLogEvent* iLogEvent; |
|
148 |
|
149 // Instance of Log Client |
|
150 CLogClient* iLogClient; |
|
151 |
|
152 // A CR session & notifier for logs |
|
153 CRepository* iLogsSession; |
|
154 |
|
155 private: |
|
156 |
|
157 // For testing |
|
158 SVP_UT_DEFS |
|
159 |
|
160 }; |
|
161 |
|
162 #endif // SVPSSLOGCALL_H |
|
163 |
|
164 // End of File |