|
1 /* |
|
2 * Copyright (c) 2008-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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CMMPHONEFACTORYTSY_H |
|
21 #define CMMPHONEFACTORYTSY_H |
|
22 |
|
23 #include <et_phone.h> |
|
24 #include <etel.h> |
|
25 #include <ctsy/mltsyfactorybase.h> |
|
26 #include <ctsy/mltsyfactory.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CTsySatMessagingBase; |
|
30 class CMmPhoneTsy; |
|
31 class MLtsyFactoryBase; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * CMmPhoneFactoryTsy creates a new multimode phone object. |
|
37 */ |
|
38 NONSHARABLE_CLASS( CMmPhoneFactoryTsy ) : public CPhoneFactoryBase |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * return created phone object |
|
45 */ |
|
46 static CMmPhoneFactoryTsy* NewL(); |
|
47 |
|
48 /** |
|
49 * C++ default constructor. LibEntry requires that this is public |
|
50 */ |
|
51 CMmPhoneFactoryTsy(); |
|
52 |
|
53 /** |
|
54 * By default Symbian 2nd phase constructor. |
|
55 */ |
|
56 void ConstructL(); |
|
57 |
|
58 /** |
|
59 * Returns Phone instance |
|
60 */ |
|
61 CPhoneBase* NewPhoneL( const TDesC& aName ); |
|
62 |
|
63 /** |
|
64 * Returns SimAtk TSY instance |
|
65 */ |
|
66 virtual CTsySatMessagingBase* NewSimAtk( const TDesC& aName ); |
|
67 |
|
68 /** |
|
69 * Destructor. |
|
70 */ |
|
71 ~CMmPhoneFactoryTsy(); |
|
72 |
|
73 // New functions |
|
74 |
|
75 /** |
|
76 * Returns maximum number of supported phone instances. |
|
77 * |
|
78 * |
|
79 * @return Maximum number of supported phone instances. |
|
80 */ |
|
81 TInt EnumeratePhones(); |
|
82 |
|
83 /** |
|
84 * Returns phone information |
|
85 * |
|
86 * |
|
87 * @param aIndex index number of the phone |
|
88 * @param aPhoneFactoryBaseInfo info copied here |
|
89 * @return Return value to the ETel Server |
|
90 */ |
|
91 TInt GetPhoneInfo( |
|
92 const TInt aIndex, |
|
93 RTelServer::TPhoneInfo& aPhoneFactoryBaseInfo ); |
|
94 |
|
95 /** |
|
96 * Provides information about the supported functional units of |
|
97 * the TSY |
|
98 * |
|
99 * |
|
100 * @param aFunctionalUnit is this functional unit supported. |
|
101 * @return TBool ETrue if supported, EFalse if not |
|
102 */ |
|
103 TBool IsSupported( const TInt aFunctionalUnit ); |
|
104 #ifdef USING_CTSY_DISPATCHER |
|
105 protected: |
|
106 |
|
107 TBool UsingCtsyDispatcher(); |
|
108 MLtsyFactoryBase* LoadLibraryL(); |
|
109 #endif // #endif USING_CTSY_DISPATCHER |
|
110 private: // Data |
|
111 |
|
112 /** |
|
113 * Pointer to PhoneTSY |
|
114 * Not owned. |
|
115 */ |
|
116 CMmPhoneTsy* iPhoneTsy; |
|
117 |
|
118 /** |
|
119 * Pointer to messagerouter |
|
120 * Not owned. |
|
121 */ |
|
122 MMessageRouter* iMessageRouter; |
|
123 |
|
124 /** |
|
125 * Pointer to LTSY factory, used to retrieve LTSY and SIM ATK TSY |
|
126 * Not owned. |
|
127 */ |
|
128 MLtsyFactoryBase* iLtsyFactory; |
|
129 #ifdef USING_CTSY_DISPATCHER |
|
130 RLibrary iLoadedLib; //can either be LicenseeTsy or CtsyDispatcher dlls |
|
131 #endif // #ifdef USING_CTSY_DISPATCHER |
|
132 }; |
|
133 |
|
134 #endif // CMMPHONEFACTORYTSY_H |
|
135 |
|
136 // End of File |