|
1 // Copyright (c) 1996-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 inline TBool DChannelComm::IsReading() const |
|
18 // Return TRUE if a read request is pending. |
|
19 { return(iIsReading); } |
|
20 |
|
21 inline TBool DChannelComm::IsWriting() const |
|
22 // Return TRUE if a write request is pending. |
|
23 { return(iIsWriting); } |
|
24 |
|
25 inline TBool DChannelComm::AreAnyPending() const |
|
26 // Return TRUE if any requests are pending. |
|
27 #ifdef _EARLY_WRITE_COMPLETE |
|
28 { return(IsReading() || (!(iConfig.iHandshake&KConfigWriteBufferedComplete)?IsWriting():iIsClientWriting)); } |
|
29 #else |
|
30 { return(IsReading() || IsWriting()); } |
|
31 #endif |
|
32 |
|
33 inline TBool DChannelComm::IsPowerGood() |
|
34 { return(iPowerHandler->PowerGood()); } |
|
35 |
|
36 inline void DChannelComm::SetStatus(TState aStatus) |
|
37 {iStatus=aStatus;} |
|
38 |
|
39 inline void DChannelComm::CompleteAllReqs(TInt aReason) |
|
40 {DLogicalChannel::CompleteAll(aReason);} |
|
41 |
|
42 inline TCommSeqNum& TCommSeqNum::operator++(TInt) |
|
43 { TCommSeqNum seq = *this; iNum += 1; return *this; } |
|
44 inline TCommSeqNum& TCommSeqNum::operator++() |
|
45 { iNum += 1; return *this; } |
|
46 inline TCommSeqNum& TCommSeqNum::operator--(TInt) |
|
47 { TCommSeqNum seq = *this; iNum -= 1; return *this; } |
|
48 inline TCommSeqNum& TCommSeqNum::operator--() |
|
49 { iNum -= 1; return *this; } |
|
50 inline TCommSeqNum& TCommSeqNum::operator=(TUint aVal) |
|
51 { iNum = aVal; return *this; } |
|
52 inline TCommSeqNum& TCommSeqNum::operator=(const TCommSeqNum& aVal) |
|
53 { iNum = aVal.iNum; return *this; } |
|
54 inline TCommSeqNum& TCommSeqNum::operator+=(TInt aVal) |
|
55 { iNum += aVal; return *this; } |
|
56 inline TCommSeqNum& TCommSeqNum::operator-=(TInt aVal) |
|
57 { iNum += aVal; return *this; } |
|
58 inline TBool TCommSeqNum::operator==(const TCommSeqNum& aVal) const |
|
59 { return iNum==aVal.iNum; } |
|
60 inline TBool TCommSeqNum::operator!=(const TCommSeqNum& aVal) const |
|
61 { return iNum==aVal.iNum; } |
|
62 inline TBool TCommSeqNum::operator<(const TCommSeqNum& aVal) const |
|
63 { return ((TInt)(iNum-aVal.iNum))<0; } |
|
64 inline TBool TCommSeqNum::operator<=(const TCommSeqNum& aVal) const |
|
65 { return ((TInt)(iNum-aVal.iNum))<=0; } |
|
66 inline TBool TCommSeqNum::operator>(const TCommSeqNum& aVal) const |
|
67 { return ((TInt)(iNum-aVal.iNum))>0; } |
|
68 inline TBool TCommSeqNum::operator>=(const TCommSeqNum& aVal) const |
|
69 { return ((TInt)(iNum-aVal.iNum))>=0; } |
|
70 inline TCommSeqNum TCommSeqNum::operator+(TInt aVal) |
|
71 { TCommSeqNum tmp; tmp.iNum = iNum+aVal; return *this; } |
|
72 inline TCommSeqNum TCommSeqNum::operator-(TInt aVal) |
|
73 { TCommSeqNum tmp; tmp.iNum = iNum-aVal; return *this; } |
|
74 inline TInt TCommSeqNum::operator-(const TCommSeqNum& aVal) |
|
75 { return iNum-aVal.iNum; } |
|
76 inline TUint TCommSeqNum::Int() const |
|
77 { return iNum; } |