|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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: Inline functions of CPushInitiator. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // ================= MEMBER FUNCTIONS ======================= |
|
21 |
|
22 // --------------------------------------------------------- |
|
23 // CPushInitiator::Addr |
|
24 // --------------------------------------------------------- |
|
25 // |
|
26 inline const TDesC& CPushInitiator::Addr() const |
|
27 { |
|
28 return *iAddress; |
|
29 } |
|
30 |
|
31 // --------------------------------------------------------- |
|
32 // CPushInitiator::Type |
|
33 // --------------------------------------------------------- |
|
34 // |
|
35 inline CPushInitiator::TAddrType CPushInitiator::Type() const |
|
36 { |
|
37 return iType; |
|
38 } |
|
39 |
|
40 // --------------------------------------------------------- |
|
41 // CPushInitiator::SetEntryID |
|
42 // --------------------------------------------------------- |
|
43 // |
|
44 inline void CPushInitiator::SetEntryID( TUint32 aEntryID ) |
|
45 { |
|
46 iEntryID = aEntryID; |
|
47 } |
|
48 |
|
49 // --------------------------------------------------------- |
|
50 // CPushInitiator::EntryID |
|
51 // --------------------------------------------------------- |
|
52 // |
|
53 inline TUint32 CPushInitiator::EntryID() const |
|
54 { |
|
55 return iEntryID; |
|
56 } |
|
57 |
|
58 // --------------------------------------------------------- |
|
59 // CPushInitiator::AllocL |
|
60 // --------------------------------------------------------- |
|
61 // |
|
62 inline CPushInitiator* CPushInitiator::AllocL() const |
|
63 { |
|
64 CPushInitiator* temp = AllocLC(); |
|
65 CleanupStack::Pop( temp ); |
|
66 return temp; |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------- |
|
70 // CPushInitiator::AllocLC |
|
71 // --------------------------------------------------------- |
|
72 // |
|
73 inline CPushInitiator* CPushInitiator::AllocLC() const |
|
74 { |
|
75 CPushInitiator* temp = new (ELeave) CPushInitiator; |
|
76 CleanupStack::PushL( temp ); |
|
77 temp->SetAddressL( Addr(), Type() ); |
|
78 return temp; |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------- |
|
82 // CPushInitiator::operator== |
|
83 // --------------------------------------------------------- |
|
84 // |
|
85 inline TBool CPushInitiator:: |
|
86 operator==( const CPushInitiator& aOther ) const |
|
87 { |
|
88 return (Addr().Compare(aOther.Addr())==KErrNone) && |
|
89 ( (Type()==aOther.Type()) || |
|
90 Type()==ETypeAny || |
|
91 aOther.Type()==ETypeAny ); |
|
92 } |
|
93 |
|
94 // --------------------------------------------------------- |
|
95 // CPushInitiator::operator!= |
|
96 // --------------------------------------------------------- |
|
97 // |
|
98 inline TBool CPushInitiator:: |
|
99 operator!=( const CPushInitiator& aOther ) const |
|
100 { |
|
101 return (*this==aOther) == EFalse; |
|
102 } |
|
103 |
|
104 // End of File. |