|
1 /* |
|
2 * Copyright (c) 2009 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: UPnP framework custom periodic timer |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 #include "upnpperiodic.h" |
|
24 |
|
25 |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS =============================== |
|
28 |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CUPnPPeriodic::CUPnPPeriodic |
|
32 // Constructor. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 CUPnPPeriodic::CUPnPPeriodic( TInt aPriority ) : |
|
36 CPeriodic( aPriority ) |
|
37 { |
|
38 } |
|
39 |
|
40 |
|
41 // ----------------------------------------------------------------------------- |
|
42 // CUPnPPeriodic::CUPnPPeriodic |
|
43 // Destructor. |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 CUPnPPeriodic::~CUPnPPeriodic() |
|
47 { |
|
48 Cancel(); |
|
49 } |
|
50 |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CUPnPPeriodic::ConstructL |
|
54 // Symbian 2nd phase constructor can leave. |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 void CUPnPPeriodic::ConstructL() |
|
58 { |
|
59 CPeriodic::ConstructL(); |
|
60 CActiveScheduler::Add( this ); |
|
61 } |
|
62 |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CUPnPPeriodic::NewL |
|
66 // Two-phased constructor. |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 EXPORT_C CUPnPPeriodic* CUPnPPeriodic::NewL( TInt aPriority ) |
|
70 { |
|
71 CUPnPPeriodic* self = new( ELeave ) CUPnPPeriodic( aPriority ); |
|
72 CleanupStack::PushL( self ); |
|
73 self->ConstructL(); |
|
74 CleanupStack::Pop( self ); |
|
75 return self; |
|
76 } |
|
77 |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CUPnPPeriodic::RunError |
|
81 // Called if CUPnPPeriodic function RunL() leaves. |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 TInt CUPnPPeriodic::RunError( TInt aError ) |
|
85 |
|
86 { |
|
87 |
|
88 if( aError == KErrNoMemory ) |
|
89 return KErrNone; |
|
90 else |
|
91 return aError; |
|
92 } |
|
93 |
|
94 // End of file |