|
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: Concrete im send message operation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include <ximpprotocolconnection.h> |
|
21 #include <cprotocolimfeatures.h> |
|
22 #include <protocolimconversation.h> |
|
23 #include "imconversationinfoimp.h" |
|
24 #include "operationsendmessage.h" |
|
25 #include "ximpobjecthelpers.h" |
|
26 //#include "ximprestrictedobjectcollectionimp.h" |
|
27 //#include "ximphost.h" |
|
28 //#include "ximpstatusimp.h" |
|
29 //#include "ximprequestcompleteeventimp.h" |
|
30 #include "protocolimdatahostimp.h" |
|
31 #include "imlogutils.h" |
|
32 #include <badesca.h> |
|
33 |
|
34 |
|
35 // ======== MEMBER FUNCTIONS ======== |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // COperationSendMessage::COperationSendMessage() |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 EXPORT_C COperationSendMessage::COperationSendMessage() |
|
42 { |
|
43 } |
|
44 // --------------------------------------------------------------------------- |
|
45 // COperationSendMessage::ConstructL |
|
46 // --------------------------------------------------------------------------- |
|
47 // |
|
48 void COperationSendMessage::ConstructL( const TDesC8& aParamPck ) |
|
49 { |
|
50 XImLogger::Log(_L("COperationSendMessage::ConstructL Started")); |
|
51 CImConversationInfoImp* convInfo = CImConversationInfoImp::NewLC(); |
|
52 TXIMPObjectPacker< CImConversationInfoImp >::UnPackL( *convInfo, |
|
53 aParamPck ); |
|
54 CleanupStack::Pop( convInfo ); |
|
55 iConvInfo = convInfo; |
|
56 XImLogger::Log(_L("COperationSendMessage::ConstructL Completed")); |
|
57 } |
|
58 |
|
59 // --------------------------------------------------------------------------- |
|
60 // COperationSendMessage::~COperationSendMessage() |
|
61 // --------------------------------------------------------------------------- |
|
62 // |
|
63 COperationSendMessage::~COperationSendMessage() |
|
64 { |
|
65 XImLogger::Log(_L("COperationSendMessage::~COperationSendMessage Started")); |
|
66 delete iConvInfo; |
|
67 XImLogger::Log(_L("COperationSendMessage::~COperationSendMessage Completed")); |
|
68 } |
|
69 |
|
70 |
|
71 // --------------------------------------------------------------------------- |
|
72 // COperationSendMessage::ProcessL() |
|
73 // --------------------------------------------------------------------------- |
|
74 // |
|
75 void COperationSendMessage::ProcessL() |
|
76 { |
|
77 XImLogger::Log(_L("COperationSendMessage::ProcessL Started")); |
|
78 CXIMPOperationBase::ProcessL(); |
|
79 |
|
80 // Call to Adaptation. |
|
81 //MProtocolImConversation& imconversation = iMyHost->GetConnection().ProtocolImFeatures()->ImConversation(); |
|
82 |
|
83 |
|
84 // Pankaj : added to support dynamic resolution |
|
85 CProtocolImFeatures* imProtocolFeature =static_cast< CProtocolImFeatures*> (iMyHost->GetConnection().GetProtocolInterface(CProtocolImFeatures::KInterfaceId)); |
|
86 |
|
87 MProtocolImConversation& imconversation = imProtocolFeature->ImConversation() ; |
|
88 |
|
89 |
|
90 imconversation.DoSendMessageL(*iConvInfo,iReqId ); |
|
91 XImLogger::Log(_L("COperationSendMessage::ProcessL Completed")); |
|
92 } |
|
93 |
|
94 // --------------------------------------------------------------------------- |
|
95 // COperationSendMessage::RequestCompleted() |
|
96 // --------------------------------------------------------------------------- |
|
97 // |
|
98 void COperationSendMessage::RequestCompletedL() |
|
99 { |
|
100 XImLogger::Log(_L("COperationSendMessage::RequestCompletedL Started")); |
|
101 CXIMPOperationBase::RequestCompletedL(); |
|
102 XImLogger::Log(_L("COperationSendMessage::RequestCompletedL Completed")); |
|
103 } |
|
104 |
|
105 // --------------------------------------------------------------------------- |
|
106 // COperationSendMessage::Type() |
|
107 // --------------------------------------------------------------------------- |
|
108 // |
|
109 TInt COperationSendMessage::Type() const |
|
110 { |
|
111 return NImOps::ESendImMessage; |
|
112 } |
|
113 |
|
114 |
|
115 // End of file |