|
1 /* |
|
2 * Copyright (c) 2008 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: The source file of the CClockTimeSourceInterface class. |
|
15 * |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include <ecom.h> |
|
20 |
|
21 // User includes |
|
22 #include "clocktimesourceinterface.h" |
|
23 #include "clockpluginobserver.h" |
|
24 #include "clock_debug.h" |
|
25 |
|
26 // --------------------------------------------------------- |
|
27 // CClockTimeSourceInterface::NewL |
|
28 // rest of the details are commented in the header |
|
29 // --------------------------------------------------------- |
|
30 // |
|
31 EXPORT_C CClockTimeSourceInterface* CClockTimeSourceInterface::NewL( const TUid& aImpUid, |
|
32 MClockPluginObserver* aObserver ) |
|
33 { |
|
34 __PRINTS( "CClockTimeSourceInterface::NewL - Entry" ); |
|
35 |
|
36 // Create implementation based on UID. |
|
37 CClockTimeSourceInterface* self( NULL ); |
|
38 |
|
39 TAny* implementation( NULL ); |
|
40 TRAPD( errVal, implementation = REComSession::CreateImplementationL( aImpUid, |
|
41 _FOFF( CClockTimeSourceInterface, iDtor_ID_key ) ) ); |
|
42 if ( KErrNone == errVal ) |
|
43 { |
|
44 self = REINTERPRET_CAST( CClockTimeSourceInterface*, implementation ); |
|
45 CleanupStack::PushL( self ); |
|
46 |
|
47 self->ConstructL( aObserver ); |
|
48 |
|
49 CleanupStack::Pop( self ); |
|
50 } |
|
51 |
|
52 __PRINTS( "CClockTimeSourceInterface::NewL - Exit" ); |
|
53 |
|
54 return self; |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------- |
|
58 // CClockTimeSourceInterface::~CClockTimeSourceInterface |
|
59 // rest of the details are commented in the header |
|
60 // --------------------------------------------------------- |
|
61 // |
|
62 EXPORT_C CClockTimeSourceInterface::~CClockTimeSourceInterface() |
|
63 { |
|
64 __PRINTS( "CClockTimeSourceInterface::~CClockTimeSourceInterface - Entry" ); |
|
65 |
|
66 // Destroy the implementation. |
|
67 REComSession::DestroyedImplementation( iDtor_ID_key ); |
|
68 |
|
69 __PRINTS( "CClockTimeSourceInterface::~CClockTimeSourceInterface - Exit" ); |
|
70 } |
|
71 |
|
72 // --------------------------------------------------------- |
|
73 // CClockTimeSourceInterface::ConstructL |
|
74 // rest of the details are commented in the header |
|
75 // --------------------------------------------------------- |
|
76 // |
|
77 void CClockTimeSourceInterface::ConstructL( MClockPluginObserver* aObserver ) |
|
78 { |
|
79 __PRINTS( "CClockTimeSourceInterface::ConstructL - Entry" ); |
|
80 |
|
81 // Keep track of observer to notify. |
|
82 iObserver = aObserver; |
|
83 |
|
84 __PRINTS( "CClockTimeSourceInterface::ConstructL - Exit" ); |
|
85 } |
|
86 |
|
87 // End of file |