|
1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #ifndef LOGSEVENTDATA_H |
|
19 #define LOGSEVENTDATA_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <QString> |
|
23 |
|
24 // FORWARD DECLARATION |
|
25 class CLogEvent; |
|
26 |
|
27 // CLASS DECLARATION |
|
28 |
|
29 /** |
|
30 * |
|
31 */ |
|
32 class LogsEventData |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Constructor. |
|
39 */ |
|
40 LogsEventData(); |
|
41 |
|
42 /** |
|
43 * Copy constructor. |
|
44 */ |
|
45 LogsEventData( const LogsEventData& data ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~LogsEventData(); |
|
51 |
|
52 |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Parses event data from given data |
|
57 * @param source data |
|
58 * @return 0 if parsed succesfully |
|
59 **/ |
|
60 int parse( const CLogEvent& source ); |
|
61 |
|
62 bool isCNAP() const; |
|
63 bool isVT() const; |
|
64 bool isPoC() const; |
|
65 bool isVoIP() const; |
|
66 long long dataReceived() const; |
|
67 long long dataSent() const; |
|
68 bool isEmerg() const; |
|
69 int msgPartsNumber() const; |
|
70 unsigned int serviceId() const; |
|
71 QString remoteUrl() const; |
|
72 QString localUrl() const; |
|
73 |
|
74 /** |
|
75 * Checks whether event data can be used in CS context. |
|
76 * @return true if CS compatible. |
|
77 */ |
|
78 bool isCsCompatible(); |
|
79 |
|
80 unsigned int contactLocalId() const; |
|
81 |
|
82 private: |
|
83 |
|
84 void setContactLocalId( unsigned int id ); |
|
85 |
|
86 private: // data |
|
87 |
|
88 // Calling Name Presentation service flag |
|
89 bool mIsCNAP; |
|
90 bool mIsVT; |
|
91 bool mIsPoC; |
|
92 bool mIsVoIP; |
|
93 |
|
94 //Flag that indicates whether this is an emergency related event (i.e emerg call) |
|
95 bool mIsEmerg; |
|
96 |
|
97 //Sent and received data where applicable (in bytes) |
|
98 long long mDataSent; |
|
99 long long mDataReceived; |
|
100 |
|
101 //Message parts. Meaningful only for sms |
|
102 int mMsgPartsNumber; |
|
103 |
|
104 unsigned int mServiceId; |
|
105 unsigned int mContactLocalId; |
|
106 |
|
107 QString mRemoteUrl; |
|
108 QString mLocalUrl; |
|
109 |
|
110 private: |
|
111 |
|
112 friend class LogsEventDataParser; |
|
113 friend class LogsEvent; |
|
114 |
|
115 private: // Testing related friend definitions |
|
116 |
|
117 friend class UT_LogsEventData; |
|
118 friend class UT_LogsEvent; |
|
119 friend class UT_LogsEventParser; |
|
120 friend class UT_LogsEventDataParser; |
|
121 friend class UT_LogsCall; |
|
122 friend class UT_LogsContact; |
|
123 friend class UT_LogsMessage; |
|
124 friend class UT_LogsDetailsModel; |
|
125 friend class UT_LogsModel; |
|
126 friend class UT_LogsCustomFilter; |
|
127 friend class UT_LogsMatchesModel; |
|
128 |
|
129 }; |
|
130 |
|
131 #endif // LOGSEVENTDATA_H |
|
132 |
|
133 |
|
134 // End of File |