First public contribution.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #if (!defined __T_RBUS_DEV_COMM_DATA_H__)
20 #define __T_RBUS_DEV_COMM_DATA_H__
23 #include "T_RBusLogicalChannelData.h"
24 #include "T_ActiveCallbackIO.h"
30 * Test Active Notification class
33 class CT_RBusDevCommData : public CT_RBusLogicalChannelData
36 static CT_RBusDevCommData* NewL();
37 ~CT_RBusDevCommData();
39 virtual TAny* GetObject();
40 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
46 // CT_RHandleBaseData implementation
47 virtual RHandleBase* GetHandleBase();
49 // CT_RBusLogicalChannelData implementation
50 virtual RBusLogicalChannel* GetBusLogicalChannel();
52 // MActiveCallback implementation
53 virtual void RunL(CActive* aActive, TInt aIndex);
54 virtual void DoCancel(CActive* aActive, TInt aIndex);
59 TInt DoCmdConstructor();
60 void DoCmdDestructor();
61 void DoCmdBreak(const TDesC& aSection, const TInt aAsyncErrorIndex);
62 void DoCmdBreakCancel();
63 void DoCmdCapsL(const TDesC& aSection);
64 void DoCmdConfigL(const TDesC& aSection);
65 void DoCmdMinTurnaroundTime(const TDesC& aSection);
66 void DoCmdNotifyReceiveDataAvailable(const TDesC& aSection, const TInt aAsyncErrorIndex);
67 void DoCmdNotifyReceiveDataAvailableCancel();
68 void DoCmdNotifySignalChange(const TDesC& aSection, const TInt aAsyncErrorIndex);
69 void DoCmdNotifySignalChangeCancel();
70 TInt DoCmdOpen(const TDesC& aSection);
71 TInt DoCmdQueryReceiveBuffer(const TDesC& aSection);
72 void DoCmdReadL(const TDesC& aSection, const TInt aAsyncErrorIndex);
73 void DoCmdReadCancel();
74 void DoCmdReadOneOrMoreL(const TDesC& aSection, const TInt aAsyncErrorIndex);
75 void DoCmdReceiveBufferLength(const TDesC& aSection);
76 void DoCmdResetBuffers();
77 TInt DoCmdSetConfigL(const TDesC& aSection);
78 TInt DoCmdSetMinTurnaroundTime(const TDesC& aSection);
79 TInt DoCmdSetReceiveBufferLength(const TDesC& aSection);
80 void DoCmdSetSignals(const TDesC& aSection);
81 void DoCmdSignals(const TDesC& aSection);
82 void DoCmdVersionRequired(const TDesC& aSection);
83 void DoCmdWriteL(const TDesC& aSection, const TInt aAsyncErrorIndex);
84 void DoCmdWriteCancel();
87 void PrepareReadExpectedBufferLengthL(CT_ActiveCallbackIO& aCallback, const TDesC& aSection);
90 RBusDevComm* iBusDevComm;
93 TPtr8 iBufferReadOneOrMorePtr;
94 TInt iReadOneOrMoreLeft;
95 TBool iHasReadExpected;
97 TUint iMinTurnaroundTime;
98 TInt iReceiveBufferLength;
100 TUint iNotifySignals;
101 TBool iHasNotifySignalsExpected;
102 TUint iNotifySignalsExpected;
103 CActiveCallbackBase* iCallbackBreak;
104 CActiveCallbackBase* iCallbackNotifyReceiveDataAvailable;
105 CActiveCallbackBase* iCallbackNotifySignalChange;
106 CT_ActiveCallbackIO* iCallbackRead;
107 CT_ActiveCallbackIO* iCallbackReadOneOrMore;
108 CT_ActiveCallbackIO* iCallbackWrite;
110 static const TEnumEntryTable iEnumTableSignals[];
113 #endif /* __T_RBUS_DEV_COMM_DATA_H__ */