1 /* |
|
2 * Copyright (c) 2010 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 #include "apibehavior.h" |
|
19 |
|
20 EXPORT_C TApiBehavior::TApiBehavior() |
|
21 : iLib(0), iApi(0), iCompleteCode(0), iAsyncCompleteCode(0), iOutput(KNullDesC8) |
|
22 { |
|
23 } |
|
24 |
|
25 EXPORT_C TApiBehavior::TApiBehavior(TUint aLib, TUint aApi) |
|
26 : iLib(aLib), iApi(aApi), iCompleteCode(0), iAsyncCompleteCode(0), iOutput(KNullDesC8) |
|
27 { |
|
28 } |
|
29 |
|
30 EXPORT_C TApiBehavior::TApiBehavior(TUint aLib, TUint aApi, |
|
31 TInt aCompleteCode, TInt aAsyncCompleteCode, const TDesC8& aOutput) |
|
32 : iLib(aLib), iApi(aApi), iCompleteCode(aCompleteCode), |
|
33 iAsyncCompleteCode(aAsyncCompleteCode), iOutput(aOutput) |
|
34 { |
|
35 } |
|
36 |
|
37 EXPORT_C TBool TApiBehavior::MatchId(TUint aLib, TUint aApi) const |
|
38 { |
|
39 return iLib == aLib && iApi == aApi; |
|
40 } |
|
41 |
|
42 EXPORT_C TBool TApiBehavior::MatchId(const TApiBehavior& aBeh) const |
|
43 { |
|
44 return MatchId(aBeh.iLib, aBeh.iApi); |
|
45 } |
|
46 |
|
47 EXPORT_C TBool TApiBehavior::operator==(const TApiBehavior& aBeh) const |
|
48 { |
|
49 return |
|
50 (iLib == aBeh.iLib && |
|
51 iApi == aBeh.iApi && |
|
52 iCompleteCode == aBeh.iCompleteCode && |
|
53 iAsyncCompleteCode == aBeh.iAsyncCompleteCode && |
|
54 iOutput == aBeh.iOutput); |
|
55 } |
|
56 |
|
57 EXPORT_C TBool TApiBehavior::operator!=(const TApiBehavior& aBeh) const |
|
58 { |
|
59 return !(*this == aBeh); |
|
60 } |
|