|
1 /* |
|
2 * Copyright (c) 2002-2004 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: This module contains the implementation of CTask class member |
|
15 * functions. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 using namespace SwiUI; |
|
21 |
|
22 // ============================ MEMBER FUNCTIONS =============================== |
|
23 |
|
24 // ----------------------------------------------------------------------------- |
|
25 // CTask::NewL |
|
26 // Two-phased constructor. |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 inline CTask* CTask::NewL( const TUid& aImplUid, TBool aIsPersistent ) |
|
30 { |
|
31 TAny* ptr = REComSession::CreateImplementationL( aImplUid, |
|
32 _FOFF( CTask, |
|
33 iDestructKey ) ); |
|
34 CTask* impl = reinterpret_cast<CTask*> ( ptr ); |
|
35 impl->iImplementationUid = aImplUid; |
|
36 impl->iIsPersistent = aIsPersistent; |
|
37 |
|
38 return impl; |
|
39 } |
|
40 |
|
41 // Destructor |
|
42 inline CTask::~CTask() |
|
43 { |
|
44 REComSession::DestroyedImplementation( iDestructKey ); |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CTask::ImplementationUid |
|
49 // Return the ECOM implementation uid of this task. |
|
50 // (other items were commented in a header). |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 inline const TUid& CTask::ImplementationUid() const |
|
54 { |
|
55 return iImplementationUid; |
|
56 } |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // CTask::IsPersistent |
|
60 // Indicate if this task is persistent or not. |
|
61 // (other items were commented in a header). |
|
62 // ----------------------------------------------------------------------------- |
|
63 // |
|
64 inline TBool CTask::IsPersistent() const |
|
65 { |
|
66 return iIsPersistent; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CTask::Id |
|
71 // Gets the id of the task. |
|
72 // (other items were commented in a header). |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 inline TInt CTask::Id() const |
|
76 { |
|
77 return iId; |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CTask::SetId |
|
82 // Sets the id of the task. |
|
83 // (other items were commented in a header). |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 inline void CTask::SetId( TInt aId ) |
|
87 { |
|
88 iId = aId; |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CTask::ExternalizeL |
|
93 // Externalizes the task. |
|
94 // (other items were commented in a header). |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 inline void CTask::ExternalizeL( RWriteStream& aStream ) const |
|
98 { |
|
99 aStream.WriteInt32L( iId ); |
|
100 DoExternalizeL( aStream ); |
|
101 } |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // CTask::InternalizeL |
|
105 // Internalizes the task. |
|
106 // (other items were commented in a header). |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 inline void CTask::InternalizeL( RReadStream& aStream ) |
|
110 { |
|
111 iId = aStream.ReadInt32L(); |
|
112 iIsPersistent = ETrue; |
|
113 DoInternalizeL( aStream ); |
|
114 } |
|
115 |
|
116 |
|
117 // End of File |