|
1 /* |
|
2 * Copyright (c) 2007 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: MImConversationEvent API object implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CIMCONVERSATIONEVENTIMP_H |
|
19 #define CIMCONVERSATIONEVENTIMP_H |
|
20 |
|
21 #include <s32strm.h> |
|
22 #include "ximpapieventbase.h" |
|
23 #include <imconversationevent.h> |
|
24 //#include "ximpdatasubscriptionstateimp.h" |
|
25 #include "imapiobjbase.h" |
|
26 |
|
27 |
|
28 class RReadStream; |
|
29 class CXIMPIdentityImp; |
|
30 class CImConversationInfoImp; |
|
31 class CXIMPDataSubscriptionStateImp; |
|
32 |
|
33 |
|
34 /** |
|
35 * MImConversationEvent API object implementation. |
|
36 * |
|
37 * @lib Imdatamodel.dll |
|
38 * |
|
39 */ |
|
40 NONSHARABLE_CLASS( CImConversationEventImp ): public CXIMPApiEventBase,public MImConversationEvent |
|
41 { |
|
42 public: |
|
43 /** The class ID. */ |
|
44 enum { KClassId = IMIMP_CLSID_CIMCONVERSATIONEVENTIMP }; |
|
45 |
|
46 public: |
|
47 /** |
|
48 * Exported instantiation method for initializing |
|
49 * new event object. |
|
50 */ |
|
51 IMPORT_C static CImConversationEventImp* NewLC( |
|
52 CImConversationInfoImp* aConvinfo |
|
53 ); |
|
54 |
|
55 /** |
|
56 * Instantiation method for event automation. |
|
57 * Method signature must be exactly this to work |
|
58 * with event delivery automation system. |
|
59 * |
|
60 * Event implementation must be registered to |
|
61 * ImEventCodec KImEventConstructorTable. |
|
62 */ |
|
63 static CXIMPApiEventBase* NewFromStreamLC( RReadStream& aStream ); |
|
64 |
|
65 virtual ~CImConversationEventImp(); |
|
66 |
|
67 private: |
|
68 CImConversationEventImp(); |
|
69 |
|
70 void ConstructL( CImConversationInfoImp* aConvinfo ); |
|
71 |
|
72 |
|
73 void ConstructL( RReadStream& aStream ); |
|
74 |
|
75 |
|
76 |
|
77 /** |
|
78 * Helper for internalize |
|
79 */ |
|
80 void InternalizeL( RReadStream& aStream ) ; |
|
81 |
|
82 |
|
83 |
|
84 public: // From API base interfaces |
|
85 |
|
86 /** |
|
87 * Implementation of MXIMPBase interface methods |
|
88 * @see MXIMPBase |
|
89 */ |
|
90 XIMPIMP_DECLARE_IF_BASE_METHODS |
|
91 |
|
92 /** |
|
93 * Implementation of MImEventBase interface and |
|
94 * CImApiEventBase methods |
|
95 * |
|
96 * @see MImEventBase |
|
97 * @see CImApiEventBase |
|
98 */ |
|
99 XIMPIMP_DECLARE_EVENT_BASE_METHODS |
|
100 |
|
101 |
|
102 public: // From MImConversationEvent |
|
103 /** |
|
104 * |
|
105 * @see MImConversationEvent |
|
106 */ |
|
107 |
|
108 TInt NewTextMessageCount() const; |
|
109 const MImConversationInfo& NewTextMessage( TInt aIndex ) const ; |
|
110 |
|
111 |
|
112 |
|
113 private: // data |
|
114 |
|
115 /** |
|
116 * Conversation Info |
|
117 * Own. |
|
118 */ |
|
119 CImConversationInfoImp* iConvInfo; |
|
120 |
|
121 }; |
|
122 |
|
123 |
|
124 #endif // CIMCONVERSATIONEVENTIMP_H |