|
1 /* |
|
2 * Copyright (c) 2004 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: Interface for handling one message |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MCAMESSAGECREATOR_H__ |
|
20 #define __MCAMESSAGECREATOR_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <bamdesca.h> |
|
24 |
|
25 #include "MCAMessage.h" |
|
26 // FORWARD CLASS DECLERATIONS |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Interface for creating message |
|
32 * |
|
33 * @lib CAEngine.dll |
|
34 * @since 3.0 |
|
35 */ |
|
36 class MCAMessageCreator |
|
37 { |
|
38 public: // Definitions |
|
39 |
|
40 /** |
|
41 * SMessageData |
|
42 * Struct to contain data of message |
|
43 */ |
|
44 struct SMessageData |
|
45 { |
|
46 TInt iVersion; |
|
47 TInt iOpId; |
|
48 const TDesC& iSapId; |
|
49 const TDesC& iUserId; |
|
50 const TDesC& iSender; |
|
51 const TDesC& iTargetId; |
|
52 const MDesCArray* iRecipients; |
|
53 const MDesCArray* iScreenNames; |
|
54 const TDesC& iText; |
|
55 const TDesC8& iContentType; |
|
56 const TDesC8& iContentData; |
|
57 MCAMessage::TMessagerType iMessager; |
|
58 }; |
|
59 |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Create message. |
|
64 * @param aData, Structure to contain data for message. |
|
65 * @return New message. |
|
66 */ |
|
67 virtual MCAMessage* CreateMessageL( const SMessageData& aData ) const = 0; |
|
68 |
|
69 /** |
|
70 * Create failed message |
|
71 * @param pSource, Source message which is used as base for new failed message |
|
72 * @return New failed message. |
|
73 */ |
|
74 virtual MCAMessage* CreateFailedMessageL( const MCAMessage* pSource ) const = 0; |
|
75 |
|
76 /** |
|
77 * Create system message |
|
78 * @param aType, Type of system message. |
|
79 * @param aText, Textual data for message creation. |
|
80 * @return New system message |
|
81 */ |
|
82 virtual MCAMessage* CreateSystemMessageL( MCAMessage::TSystemMessage aType, const TDesC& aText ) const = 0; |
|
83 |
|
84 /** |
|
85 * Create a clone from source message |
|
86 * @param pSource, source message |
|
87 * @return New cloned message |
|
88 */ |
|
89 virtual MCAMessage* CloneMessageL( const MCAMessage* pSource ) const = 0; |
|
90 |
|
91 /** |
|
92 * Virtual destructor |
|
93 */ |
|
94 virtual ~MCAMessageCreator() {} |
|
95 }; |
|
96 |
|
97 /// Current version of message creator messages. |
|
98 const TInt KMessageDataVersion = 0; |
|
99 |
|
100 #endif // __MCAMESSAGE_H__ |
|
101 |
|
102 // End of File |