24
|
1 |
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
// Dummy phone
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
*/
|
|
21 |
|
|
22 |
#include "sattsy.h"
|
|
23 |
#include "Etelsat.h"
|
|
24 |
#include <et_clsvr.h>
|
|
25 |
#include "Dsatlog.h"
|
|
26 |
#include <satcs.h>
|
|
27 |
#include "testdef.h"
|
|
28 |
|
|
29 |
#include "coretsy.h"
|
|
30 |
|
|
31 |
|
|
32 |
//
|
|
33 |
// First Ordinal Functions
|
|
34 |
//
|
|
35 |
extern "C"
|
|
36 |
{
|
|
37 |
IMPORT_C CPhoneFactoryBase* LibEntry(); // Force "Proper Name" export
|
|
38 |
}
|
|
39 |
|
|
40 |
EXPORT_C CPhoneFactoryBase* LibEntry()
|
|
41 |
{
|
|
42 |
CPhoneFactoryDSatTsy* factory = NULL;
|
|
43 |
TRAP_IGNORE(factory = CPhoneFactoryDSatTsy::NewL());
|
|
44 |
return factory;
|
|
45 |
}
|
|
46 |
|
|
47 |
/**************************************************************************/
|
|
48 |
//
|
|
49 |
// CPhoneFactoryDSatTsy
|
|
50 |
//
|
|
51 |
/**************************************************************************/
|
|
52 |
|
|
53 |
CPhoneFactoryDSatTsy::CPhoneFactoryDSatTsy()
|
|
54 |
{
|
|
55 |
iVersion=TVersion( KTsyEtelMajorVersionNumber,
|
|
56 |
KTsyEtelMinorVersionNumber,
|
|
57 |
KTsyEtelBuildVersionNumber);
|
|
58 |
}
|
|
59 |
|
|
60 |
CPhoneFactoryDSatTsy* CPhoneFactoryDSatTsy::NewL()
|
|
61 |
{
|
|
62 |
CPhoneFactoryDSatTsy *This = new (ELeave) CPhoneFactoryDSatTsy;
|
|
63 |
CleanupStack::PushL(This);
|
|
64 |
This->ConstructL();
|
|
65 |
CleanupStack::Pop();
|
|
66 |
return This;
|
|
67 |
}
|
|
68 |
|
|
69 |
CPhoneFactoryDSatTsy::~CPhoneFactoryDSatTsy()
|
|
70 |
{
|
|
71 |
LOGDESTROY();
|
|
72 |
}
|
|
73 |
|
|
74 |
CPhoneBase * CPhoneFactoryDSatTsy::NewPhoneL(const TDesC& aName)
|
|
75 |
{
|
|
76 |
if (aName.Compare(DSATTSY_PHONE_NAME)==KErrNone)
|
|
77 |
return CPhoneDSatTsy::NewL(this);
|
|
78 |
return NULL;
|
|
79 |
}
|
|
80 |
|
|
81 |
TBool CPhoneFactoryDSatTsy::IsSupported(const TInt /*aMixin*/)
|
|
82 |
{
|
|
83 |
return EFalse;
|
|
84 |
}
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
/**************************************************************************/
|
|
89 |
//
|
|
90 |
// CPhoneDSatTsy
|
|
91 |
//
|
|
92 |
/**************************************************************************/
|
|
93 |
|
|
94 |
CPhoneDSatTsy* CPhoneDSatTsy::NewL(CPhoneFactoryDummyBase* aFac)
|
|
95 |
{
|
|
96 |
CPhoneDSatTsy* phone=new(ELeave) CPhoneDSatTsy(aFac);
|
|
97 |
CleanupStack::PushL(phone);
|
|
98 |
phone->ConstructL();
|
|
99 |
CleanupStack::Pop();
|
|
100 |
return phone;
|
|
101 |
}
|
|
102 |
|
|
103 |
CPhoneDSatTsy::CPhoneDSatTsy(CPhoneFactoryDummyBase* aFac)
|
|
104 |
:CPhoneDummyBase(aFac)
|
|
105 |
{}
|
|
106 |
|
|
107 |
void CPhoneDSatTsy::ConstructL()
|
|
108 |
{
|
|
109 |
CPhoneDummyBase::ConstructL();
|
|
110 |
LOGTEXT(_L8("CPhoneDSatTsy created"));
|
|
111 |
}
|
|
112 |
|
|
113 |
CPhoneDSatTsy::~CPhoneDSatTsy()
|
|
114 |
{
|
|
115 |
LOGTEXT(_L8("CPhoneDSatTsy destroyed"));
|
|
116 |
}
|
|
117 |
|
|
118 |
void CPhoneDSatTsy::Init()
|
|
119 |
/**
|
|
120 |
* Server calls this function once it has created the sub-session
|
|
121 |
* it gives the TSY chance to do any initialisation it may need to do for
|
|
122 |
* this sub-session
|
|
123 |
*/
|
|
124 |
{}
|
|
125 |
|
|
126 |
CTelObject* CPhoneDSatTsy::OpenNewObjectByNameL(const TDesC& aName)
|
|
127 |
/**
|
|
128 |
* Server calls this function when a client is opening an object from the phone
|
|
129 |
* for the first time.
|
|
130 |
* Multiple clients opening handles to the same sub-session object will be dealt with
|
|
131 |
* by the server - i.e. by reference counting
|
|
132 |
*/
|
|
133 |
{
|
|
134 |
|
|
135 |
|
|
136 |
if(aName.Compare(DSATTSY_SAT_NAME)==KErrNone)
|
|
137 |
return REINTERPRET_CAST(CTelObject*,CSatDSatTsy::NewL(FacPtr()));
|
|
138 |
|
|
139 |
return NULL;
|
|
140 |
}
|
|
141 |
|
|
142 |
CTelObject* CPhoneDSatTsy::OpenNewObjectL(TDes& /*aNewName*/)
|
|
143 |
{
|
|
144 |
User::Leave(KErrNotSupported);
|
|
145 |
return NULL;
|
|
146 |
}
|
|
147 |
|
|
148 |
|
|
149 |
CTelObject::TReqMode CPhoneDSatTsy::ReqModeL(const TInt /*aIpc*/)
|
|
150 |
{
|
|
151 |
User::Leave(KErrNotSupported);
|
|
152 |
return NULL;
|
|
153 |
}
|
|
154 |
|
|
155 |
TInt CPhoneDSatTsy::RegisterNotification(const TInt /*aIpc*/)
|
|
156 |
{
|
|
157 |
return(KErrNotSupported);
|
|
158 |
}
|
|
159 |
|
|
160 |
TInt CPhoneDSatTsy::DeregisterNotification(const TInt /*aIpc*/)
|
|
161 |
{
|
|
162 |
return(KErrNotSupported);
|
|
163 |
}
|
|
164 |
|
|
165 |
TInt CPhoneDSatTsy::NumberOfSlotsL(const TInt /*aIpc*/)
|
|
166 |
{
|
|
167 |
User::Leave(KErrNotSupported);
|
|
168 |
return NULL;
|
|
169 |
}
|
|
170 |
|
|
171 |
|
|
172 |
TInt CPhoneDSatTsy::ExtFunc(const TTsyReqHandle /*aTsyReqHandle*/,const TInt /*aIpc*/,
|
|
173 |
const TDataPackage& /*aPackage*/)
|
|
174 |
{
|
|
175 |
return(KErrNotSupported);
|
|
176 |
}
|
|
177 |
|
|
178 |
TInt CPhoneDSatTsy::CancelService(const TInt /*aIpc*/,const TTsyReqHandle /*aTsyReqHandle*/)
|
|
179 |
{
|
|
180 |
return(KErrNotSupported);
|
|
181 |
}
|
|
182 |
|
|
183 |
|
|
184 |
CPhoneDSatTsy* CPhoneDSatTsy::This(TAny* aPtr)
|
|
185 |
{
|
|
186 |
return REINTERPRET_CAST(CPhoneDSatTsy*,aPtr);
|
|
187 |
}
|