|
1 /* |
|
2 * Copyright (c) 2002 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: Open conversation plugin |
|
15 * Interface : Private |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef __CIMOPENCONVERSATION_H |
|
21 #define __CIMOPENCONVERSATION_H |
|
22 |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <ECom/ECom.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CPbkContactItem; |
|
32 class CPbkContactEngine; |
|
33 |
|
34 |
|
35 // CLASS DECLARATION |
|
36 |
|
37 /** |
|
38 * Plug-in interface for opening IM conversation. |
|
39 */ |
|
40 class CIMOpenConversationInterface : public CBase |
|
41 { |
|
42 public: // Constructor and destructor |
|
43 /** |
|
44 * Creates a new instance of CIMOpenConversationInterface. |
|
45 */ |
|
46 static CIMOpenConversationInterface* NewLC(); |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CIMOpenConversationInterface(); |
|
51 |
|
52 public: // Interface |
|
53 /** |
|
54 * Opens conversation with aContact. Uses a aContact's wvid |
|
55 * for identification. |
|
56 * |
|
57 * @param aContact conversation to be opened with |
|
58 * @param aPbkEngine forwarded to search |
|
59 */ |
|
60 virtual void OpenConversationL |
|
61 ( CPbkContactItem& aContact, CPbkContactEngine& aPbkEngine ) = 0; |
|
62 |
|
63 protected: // Implementation |
|
64 CIMOpenConversationInterface(); |
|
65 |
|
66 private: // Data |
|
67 TUid iDtor_ID_Key; |
|
68 }; |
|
69 |
|
70 // INLINE FUNCTIONS |
|
71 |
|
72 inline CIMOpenConversationInterface* CIMOpenConversationInterface::NewLC() |
|
73 { |
|
74 const TUid KIMOpenConversationImplementationUID = { 0x101f8595 }; |
|
75 |
|
76 TAny* ptr = REComSession::CreateImplementationL |
|
77 ( KIMOpenConversationImplementationUID, |
|
78 _FOFF( CIMOpenConversationInterface, iDtor_ID_Key ) ); |
|
79 CIMOpenConversationInterface* impl = |
|
80 reinterpret_cast<CIMOpenConversationInterface*>( ptr ); |
|
81 CleanupStack::PushL( impl ); |
|
82 return impl; |
|
83 } |
|
84 |
|
85 inline CIMOpenConversationInterface::~CIMOpenConversationInterface() |
|
86 { |
|
87 REComSession::DestroyedImplementation( iDtor_ID_Key ); |
|
88 } |
|
89 |
|
90 inline CIMOpenConversationInterface::CIMOpenConversationInterface() |
|
91 { |
|
92 } |
|
93 |
|
94 #endif |
|
95 |
|
96 // End of file |
|
97 |