|
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: Test support file tool server message |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPRFWTESTFILESRVMSG_H |
|
20 #define CPRFWTESTFILESRVMSG_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <s32strm.h> |
|
24 |
|
25 /** |
|
26 * Support for servermessage files. |
|
27 * |
|
28 * @since S60 v4.0 |
|
29 */ |
|
30 class CXIMPTestFileSrvMsg : public CBase |
|
31 { |
|
32 public: |
|
33 |
|
34 enum TTestSrvMsgType |
|
35 { |
|
36 ETestSrvMsgPresenceBlockList, |
|
37 ETestSrvMsgPresenceBlocked, |
|
38 ETestSrvMsgPresenceBlockCanceled, |
|
39 ETestSrvMsgPresenceGrantRequestList, |
|
40 ETestSrvMsgPresenceGrantRequestReceived, |
|
41 ETestSrvMsgPresenceGrantRequestObsoleted, |
|
42 ETestSrvMsgPresentityGroupList, |
|
43 ETestSrvMsgPresentityGroupCreate, |
|
44 ETestSrvMsgPresentityGroupDelete, |
|
45 ETestSrvMsgPresentityGroupUpdate, |
|
46 ETestSrvMsgPresentityGroupMemberList, |
|
47 ETestCheckIfGroupMemberExists, |
|
48 ETestSrvMsgPresenceWatcherList, |
|
49 ETestSrvMsgPresentityPresence, |
|
50 ETestSrvMsgReqParamIdentity, |
|
51 }; |
|
52 |
|
53 public: |
|
54 |
|
55 IMPORT_C static CXIMPTestFileSrvMsg* NewLC(); |
|
56 |
|
57 IMPORT_C static CXIMPTestFileSrvMsg* NewL( |
|
58 TInt aSrvMsgId, |
|
59 const TDesC8& aPayload ); |
|
60 |
|
61 virtual ~CXIMPTestFileSrvMsg(); |
|
62 |
|
63 private: |
|
64 |
|
65 CXIMPTestFileSrvMsg(); |
|
66 |
|
67 void ConstructL(); |
|
68 |
|
69 CXIMPTestFileSrvMsg( TInt aSrvMsgId ); |
|
70 |
|
71 void ConstructL( const TDesC8& aPayload ); |
|
72 |
|
73 public: |
|
74 |
|
75 /** |
|
76 * Extenalizes object data to given stream. |
|
77 * @param aStream Stream to write. |
|
78 */ |
|
79 IMPORT_C void ExternalizeL( RWriteStream& aStream ) const; |
|
80 |
|
81 /** |
|
82 * Internalizes object data from given stream. |
|
83 * @param aStream Stream to read. |
|
84 */ |
|
85 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
86 |
|
87 /** |
|
88 * Getter for the data stored inside this class. |
|
89 * @return Reference to the data |
|
90 */ |
|
91 IMPORT_C TDesC8& PayloadL(); |
|
92 |
|
93 /** |
|
94 * Server message identifier specifies what kind of |
|
95 * server-originated message this is. |
|
96 * @return Server message identifier |
|
97 */ |
|
98 IMPORT_C TInt SrvMsgId(); |
|
99 |
|
100 private: // data |
|
101 |
|
102 TInt iSrvMsgId; |
|
103 HBufC8* iPayload; |
|
104 }; |
|
105 |
|
106 #endif // CPRFWTESTFILESRVMSG_H |