|
1 /* |
|
2 * Copyright (c) 2005 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: Provides interface to register and unregister all interfaces. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "TCAInterfaceSignaller.h" |
|
22 #include "MCAImpsFactory.h" |
|
23 #include <E32STD.H> |
|
24 |
|
25 // ============================ MEMBER FUNCTIONS =============================== |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // TCAInterfaceSignaller::TCAInterfaceSignaller |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 TCAInterfaceSignaller::TCAInterfaceSignaller() |
|
34 { |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // TCAInterfaceSignaller::ConnectL |
|
39 // Calls factory to connect to IMPS engine |
|
40 // (other items were commented in a header). |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 void TCAInterfaceSignaller::ConnectL() |
|
44 { |
|
45 MCAImpsFactory *factory = static_cast<MCAImpsFactory*> ( Dll::Tls() ); |
|
46 if ( ! factory ) |
|
47 { |
|
48 User::Leave( KErrNotFound ); |
|
49 } |
|
50 factory->ConnectL(); |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // TCAInterfaceSignaller::RegisterAllL |
|
55 // Calls factory to register all interfaces |
|
56 // (other items were commented in a header). |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 void TCAInterfaceSignaller::RegisterAllL() |
|
60 { |
|
61 MCAImpsFactory *factory = static_cast<MCAImpsFactory*> ( Dll::Tls() ); |
|
62 if ( ! factory ) |
|
63 { |
|
64 User::Leave( KErrNotFound ); |
|
65 } |
|
66 factory->RegisterL(); |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // TCAInterfaceSignaller::UnregisterAllL |
|
71 // Calls factory to unregister all interfaces |
|
72 // (other items were commented in a header). |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 void TCAInterfaceSignaller::UnregisterAllL() |
|
76 { |
|
77 MCAImpsFactory *factory = static_cast<MCAImpsFactory*> ( Dll::Tls() ); |
|
78 if ( ! factory ) |
|
79 { |
|
80 User::Leave( KErrNotFound ); |
|
81 } |
|
82 factory->Unregister(); |
|
83 } |
|
84 |
|
85 // End of File |