|
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: MImConversationInfo API object implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CIMCONVERSATIONINFOIMP_H |
|
19 #define CIMCONVERSATIONINFOIMP_H |
|
20 |
|
21 |
|
22 #include <s32strm.h> |
|
23 #include <badesca.h> |
|
24 #include <imconversationinfo.h> |
|
25 #include "ximpapidataobjbase.h" |
|
26 #include "imapiobjbase.h" |
|
27 |
|
28 |
|
29 class CImConversationInfoImp; |
|
30 class CXIMPIdentityImp; |
|
31 /** |
|
32 * MImConversationInfo API object implementation. |
|
33 * |
|
34 * @lib Imdatamodel.dll |
|
35 * |
|
36 */ |
|
37 NONSHARABLE_CLASS( CImConversationInfoImp ): public CXIMPApiDataObjBase,public MImConversationInfo |
|
38 { |
|
39 public: |
|
40 /** The class ID. */ |
|
41 enum { KClassId = IMIMP_CLSID_CIMCONVERSATIONINFOIMP }; |
|
42 |
|
43 public: |
|
44 IMPORT_C static CImConversationInfoImp* NewLC(); |
|
45 IMPORT_C static CImConversationInfoImp* NewL(); |
|
46 virtual ~CImConversationInfoImp(); |
|
47 |
|
48 private: |
|
49 |
|
50 CImConversationInfoImp(); |
|
51 void ConstructL(); |
|
52 |
|
53 public: // From CXIMPApiDataObjBase |
|
54 |
|
55 /** |
|
56 * @see CXIMPApiDataObjBase |
|
57 */ |
|
58 XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS |
|
59 XIMPIMP_DECLARE_IF_BASE_METHODS |
|
60 |
|
61 public: // From MImConversationInfo |
|
62 |
|
63 const MXIMPIdentity& MessageId() const; |
|
64 const TDesC16& TextMessage() const; |
|
65 const MDesCArray& RecipientL() const; |
|
66 /* const TDesC16& TextMessageSubject() const; |
|
67 const TMessageTypes& MessageType() const; |
|
68 const TDesC16& ContentMessage() const; |
|
69 const TInt DeliveryReportResult() const; |
|
70 const TDesC16& DeliveryReportDescription() const; |
|
71 const MXIMPIdentity& ExtConvId() const; |
|
72 const TDesC16& ExtConvGroupId() const; |
|
73 const MXIMPIdentity& BlockedEntityId() const; |
|
74 const TDesC16& BlockedEntityDisplayName() const; |
|
75 */ |
|
76 |
|
77 void SetMessageIdL( MXIMPIdentity* aIdentity ); |
|
78 void SetTextMessageL( const TDesC16& aMessage ); |
|
79 void SetRecipientL(const MDesCArray* aRecipients); |
|
80 |
|
81 /*void SetMessageSubjectL( const TDesC16& aMessageSubject ); |
|
82 void SetMessageTypeL( const TDesC16& aMessageType ); |
|
83 void SetContentMessageL( const TDesC16& aContMessage ); |
|
84 void SetExtConvIdL( MXIMPIdentity* aExIdentity ); |
|
85 void SetDeliveryReportResultL( const TInt aResult ); |
|
86 void SetDeliveryReportDescriptionL( const TDesC16& aDescription ); |
|
87 void SetExtConvGroupIdL( const TDesC16& aGroupId ); |
|
88 void SetBlockedEntityIdL( MXIMPIdentity* aBlkIdentity ); |
|
89 void SetBlockedEntityDisplayNameL( const TDesC16& aDisplayName ); |
|
90 */ |
|
91 public: // New functions |
|
92 |
|
93 /** |
|
94 * Internalizes object data from given stream. |
|
95 * @param aStream Stream to read. |
|
96 */ |
|
97 IMPORT_C void InternalizeL( RReadStream& aStream ); |
|
98 |
|
99 /** |
|
100 * Set identity |
|
101 */ |
|
102 IMPORT_C void SetIdentity( CXIMPIdentityImp* aIdentity ); |
|
103 |
|
104 /** |
|
105 * TLinearOrder for ordering based on stored group id, |
|
106 * when this class is used within an RPointerArray or derivatives. |
|
107 */ |
|
108 IMPORT_C static TInt IdLinearOrder( |
|
109 const CImConversationInfoImp& aA, |
|
110 const CImConversationInfoImp& aB ); |
|
111 |
|
112 /** |
|
113 * Access to identity object |
|
114 * @return Identity |
|
115 */ |
|
116 IMPORT_C const CXIMPIdentityImp& IdentityImp() const; |
|
117 |
|
118 private: // data |
|
119 |
|
120 /** |
|
121 * Identity |
|
122 */ |
|
123 CXIMPIdentityImp* iIdentity; |
|
124 |
|
125 /** |
|
126 * TextMessage |
|
127 */ |
|
128 RBuf16 iTextMessage; |
|
129 |
|
130 /** |
|
131 * Receipient(s) of the Message |
|
132 */ |
|
133 CDesCArray* iRecipients ; |
|
134 |
|
135 |
|
136 }; |
|
137 |
|
138 |
|
139 #endif // CIMCONVERSATIONINFOIMP_H |