1 /* |
|
2 * Copyright (c) 2007-2008 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: message creater interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MIMCVENGINEMESSAGECREATOR_H__ |
|
20 #define __MIMCVENGINEMESSAGECREATOR_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <bamdesca.h> |
|
24 |
|
25 #include "mimcvenginemessage.h" |
|
26 // FORWARD CLASS DECLERATIONS |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Interface for creating message |
|
32 * |
|
33 * @lib imcvengine.dll |
|
34 * @since 5.0 |
|
35 */ |
|
36 class MIMCVEngineMessageCreator |
|
37 { |
|
38 public: // Definitions |
|
39 |
|
40 /** |
|
41 * SMessageData |
|
42 * Struct to contain data of message |
|
43 */ |
|
44 struct SMessageData |
|
45 { |
|
46 TInt iVersion; |
|
47 const TDesC& iSenderId; |
|
48 const TDesC& iTargetId; |
|
49 const TDesC& iText; |
|
50 const MIMCVEngineMessage::TContentType iContentType; |
|
51 MIMCVEngineMessage::TMessagerType iMessager; |
|
52 }; |
|
53 |
|
54 public: |
|
55 |
|
56 /** |
|
57 * Create message. |
|
58 * @param aData, Structure to contain data for message. |
|
59 * @return New message. |
|
60 */ |
|
61 virtual MIMCVEngineMessage* CreateMessageL( const SMessageData& aData ) const = 0; |
|
62 |
|
63 /** |
|
64 * Create failed text message. |
|
65 * @param MIMCVEngineMessage, which has been failed to deliver |
|
66 * @return new MIMCVEngineMessage. Ownership is passed to caller |
|
67 */ |
|
68 virtual MIMCVEngineMessage* CreateFailedMessageL( |
|
69 const MIMCVEngineMessage* pSource ) const = 0 ; |
|
70 |
|
71 /** |
|
72 * Virtual destructor |
|
73 */ |
|
74 virtual ~MIMCVEngineMessageCreator(){} |
|
75 }; |
|
76 |
|
77 /// Current version of message creator messages. |
|
78 const TInt KMessageDataVersion = 0; |
|
79 |
|
80 #endif // __MIMCVENGINEMESSAGECREATOR_H__ |
|
81 |
|
82 // End of File |
|