|
1 /* |
|
2 * Copyright (c) 2005-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef CSTATMessageCOM_H |
|
22 #define CSTATMessageCOM_H |
|
23 |
|
24 #include <mpsdrc.h> |
|
25 #include <mpsdrc_i.c> |
|
26 #include <ECENG.H> |
|
27 #include "CSTATLogFile.h" |
|
28 |
|
29 class CSTATMessageCOM : public CCmdTarget |
|
30 { |
|
31 DECLARE_DYNCREATE(CSTATMessageCOM) |
|
32 |
|
33 public : |
|
34 CSTATMessageCOM(); |
|
35 virtual ~CSTATMessageCOM(); |
|
36 int Connect(CString& platformtype, CSTATLogFile *theLog); |
|
37 bool Disconnect(); |
|
38 HRESULT SendMsg(BYTE id); |
|
39 HRESULT SendMsg(BYTE id, VARIANT data); |
|
40 |
|
41 //pointers to interfaces - need to be public so that CommandDecoderCOM can access and send the messages |
|
42 LPECENGINES m_pIECEngineS; |
|
43 LPECMACHINE m_pIECMachine; |
|
44 LPECDRIVE m_pIECDrive; |
|
45 EDFILEREQ From; |
|
46 EDFILEREQ To; |
|
47 EDDRIVEREQ Drive; |
|
48 |
|
49 bool Connected; |
|
50 |
|
51 private : |
|
52 DECLARE_INTERFACE_MAP() |
|
53 BEGIN_INTERFACE_PART(CommonSink, ICommonSink) |
|
54 STDMETHOD(ProcessResponse)(BYTE* Response, DWORD bufsize); |
|
55 END_INTERFACE_PART(CommonSink) |
|
56 DECLARE_MESSAGE_MAP() |
|
57 |
|
58 //non-interface part, called from interface |
|
59 STDMETHOD(ProcessResponse)(BYTE* Response, DWORD bufsize); |
|
60 |
|
61 void CopyResponseData(BYTE* pResponse, DWORD bufsize); |
|
62 |
|
63 //used for processing device response data |
|
64 BYTE* m_pResponseData; |
|
65 |
|
66 // COM interfaces for EPOC Connect |
|
67 ISendRequest* m_pISendReq; |
|
68 ICommonSink* m_pICommonSink; |
|
69 |
|
70 CSTATLogFile *pLog; |
|
71 bool bExternalInterface; |
|
72 }; |
|
73 |
|
74 #endif |