|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // datamonitormessagesecom.h |
|
15 // |
|
16 // |
|
17 |
|
18 #if !defined(DATAMONMESSAGESECOM_H_INCLUDED) |
|
19 #define DATAMONMESSAGESECOM_H_INCLUDED |
|
20 |
|
21 #include <e32std.h> |
|
22 #include <comms-infras/metadata.h> |
|
23 #include <comms-infras/api_ext_msg.h> |
|
24 #include <comms-infras/datamonitormessages.h> |
|
25 |
|
26 namespace ESock |
|
27 { |
|
28 |
|
29 const TInt KDataMonitoringMessagesImplementationUid = 0x102744D3; |
|
30 |
|
31 /** |
|
32 Types of the data monitoring message interface represented by CMessage. |
|
33 |
|
34 @internalTechnology |
|
35 */ |
|
36 enum TDataMonitorMsgImplementations |
|
37 { |
|
38 EDataMonitorMsgAny = Meta::KNetMetaTypeAny, // Any data monitoring message type |
|
39 EDataMonitoringMsgDataTransferred = 0x00000001, |
|
40 EDataMonitoringMsgDataSentNotification = 0x00000002, |
|
41 EDataMonitoringMsgDataReceivedNotification = 0x00000004, |
|
42 }; |
|
43 |
|
44 /** |
|
45 Data monitoring message factory for response messages. |
|
46 |
|
47 @internalComponent |
|
48 @released since v9.2 |
|
49 */ |
|
50 class CDataMonitoringMsgFactory : public CBase |
|
51 { |
|
52 public: |
|
53 static Meta::SMetaDataECom* NewMessageL(TAny* aParams); |
|
54 }; |
|
55 |
|
56 /*------------------------------------------------------- |
|
57 Server -> Client messages |
|
58 -------------------------------------------------------*/ |
|
59 |
|
60 /** |
|
61 Response message containing the total volume of data transferred in either |
|
62 direction. |
|
63 |
|
64 @internalTechnology |
|
65 */ |
|
66 class CDataTransferred : public CCommsDataMonitorApiExtResp |
|
67 { |
|
68 public: |
|
69 void DispatchL(MDataMonitorProtocolResp& aProtocol); |
|
70 |
|
71 inline static CDataTransferred* NewL(); |
|
72 |
|
73 // Accessors to member data |
|
74 inline TUint ReceivedBytes() const; |
|
75 inline void SetReceivedBytes(TUint aReceivedBytes); |
|
76 |
|
77 inline TUint SentBytes() const; |
|
78 inline void SetSentBytes(TUint aSentBytes); |
|
79 |
|
80 DATA_VTABLE |
|
81 |
|
82 protected: |
|
83 TUint iReceivedBytes; |
|
84 TUint iSentBytes; |
|
85 }; |
|
86 |
|
87 /** |
|
88 Response message indicating that the volume of data received has reached or |
|
89 exceeded a specified threshold. |
|
90 |
|
91 @internalTechnology |
|
92 */ |
|
93 class CDataReceived : public CCommsDataMonitorApiExtResp |
|
94 { |
|
95 public: |
|
96 void DispatchL(MDataMonitorProtocolResp& aProtocol); |
|
97 |
|
98 inline static CDataReceived* NewL(); |
|
99 |
|
100 inline TUint ReceivedBytes() const; |
|
101 inline void SetReceivedBytes(TUint aReceivedBytes); |
|
102 |
|
103 DATA_VTABLE |
|
104 |
|
105 protected: |
|
106 TUint iReceivedBytes; |
|
107 }; |
|
108 |
|
109 /** |
|
110 Response message indicating that the volume of data sent has reached or |
|
111 exceeded a specified threshold. |
|
112 |
|
113 @internalTechnology |
|
114 */ |
|
115 class CDataSent : public CCommsDataMonitorApiExtResp |
|
116 { |
|
117 public: |
|
118 void DispatchL(MDataMonitorProtocolResp& aProtocol); |
|
119 |
|
120 inline static CDataSent* NewL(); |
|
121 |
|
122 inline TUint SentBytes() const; |
|
123 inline void SetSentBytes(TUint aSentBytes); |
|
124 |
|
125 DATA_VTABLE |
|
126 |
|
127 protected: |
|
128 TUint iSentBytes; |
|
129 }; |
|
130 |
|
131 #include <comms-infras/datamonmessagesecom.inl> |
|
132 |
|
133 } //namespace ESock |
|
134 |
|
135 #endif // DATAMONMESSAGESECOM_H_INCLUDED |
|
136 |