00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 00002 // All rights reserved. 00003 // This component and the accompanying materials are made available 00004 // under the terms of "Eclipse Public License v1.0" 00005 // which accompanies this distribution, and is available 00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". 00007 // 00008 // Initial Contributors: 00009 // Nokia Corporation - initial contribution. 00010 // 00011 // Contributors: 00012 // 00013 // Description: 00014 // CCISVAPIBase.h 00015 // 00016 00017 00018 #ifndef __CISVAPIBASE_H__ 00019 #define __CISVAPIBASE_H__ 00020 00021 #include <e32base.h> 00022 #include <etel3rdparty.h> 00023 00028 enum TTelISVExampleType 00029 { 00030 KNotType = -1, 00031 KPhoneId, 00032 KSubscriberId, 00033 KBatteryInfo, 00034 KSignalInfo, 00035 KGetIndicator, 00036 KLockInfo, 00037 KNetworkInfo, 00038 KNetworkName, 00039 KOperatorName, 00040 KCallInfo, 00041 KLineStatus, 00042 KCallStatus, 00043 KFlightModeInfo, 00044 KNetworkRegInfo, 00045 KAnswerIncomingCall, 00046 KDialCall, 00047 KDynamicCaps, 00048 KHold, 00049 KResume, 00050 KSwap, 00051 KSendDTMF, 00052 KHangup, 00053 KCallWaitingStatus, 00054 KCallForwardingStatus, 00055 KCallBarringStatus, 00056 KIdentityServiceStatus 00057 }; 00058 00062 enum TState 00063 { 00064 EStart, 00065 EEnd, 00066 EDummyAnswer, 00067 00068 EGetPhoneId, 00069 EGetSubscriberId, 00070 EGetCallInfo, 00071 EGetBatteryInfo, 00072 EGetIndicator, 00073 EGetLockInfo, 00074 EGetSignalInfo, 00075 EGetNetworkInfo, 00076 EGetNetworkName, 00077 EGetOperatorName, 00078 00079 EGetFlightModeInfo, 00080 EGetNetworkRegStatus, 00081 00082 EGetLineStatus, 00083 EGetCallStatus, 00084 EAnswerIncomingCall, 00085 EDialCall, 00086 EGetDynamicCaps, 00087 EHold, 00088 EResume, 00089 ESwap, 00090 ESendDTMF, 00091 EHangup, 00092 00093 ECallForwarding, 00094 ECallWaiting, 00095 ECallBarring, 00096 EIdentityService, 00097 00098 EWaitingForKeyPress, 00099 00100 ESetNotifier 00101 }; 00102 00107 class MExecController 00108 { 00109 public: 00114 virtual void Terminate() = 0; 00115 00122 virtual CTelephony* GetTelObj() const = 0; 00123 00130 virtual CConsoleBase* GConsole() const = 0; 00131 00132 }; 00133 00138 class CISVAPIBase : public CActive 00139 { 00140 00141 public: 00142 CISVAPIBase(MExecController* aController, 00143 TTelISVExampleType aExampleType); 00144 00145 void StartRequestL(); 00146 void StartRequestL(CTelephony::TCallId aCallId); 00147 void StartRequestL(CTelephony::TCallId aCallId1, 00148 CTelephony::TCallId aCallId2); 00149 void StartRequestL(const TDesC& aTones); 00150 void RequestNotificationL(); 00151 void AppTerminate(); 00152 00153 inline void RetrieveTelephonyObject(); 00154 inline void RetrieveConsole(); 00155 00156 inline TTelISVExampleType GetExampleType() const; 00157 00158 protected: 00159 virtual void DoStartRequestL(); 00160 virtual void DoStartRequestL(CTelephony::TCallId aCallId); 00161 virtual void DoStartRequestL(CTelephony::TCallId aCallId1, 00162 CTelephony::TCallId aCallId2); 00163 virtual void DoStartRequestL(const TDesC& aNumber); 00164 virtual void DoRequestNotificationL(); 00165 00166 protected: 00172 MExecController* iController; 00177 CTelephony* iTelephony; 00182 CConsoleBase* iConsole; 00183 00184 private: 00189 const TTelISVExampleType iExampleType; 00190 00191 }; 00192 00199 inline TTelISVExampleType CISVAPIBase::GetExampleType() const 00200 { 00201 return iExampleType; 00202 }; 00203 00209 inline void CISVAPIBase::RetrieveTelephonyObject() 00210 { 00211 iTelephony = iController->GetTelObj(); 00212 } 00213 00219 inline void CISVAPIBase::RetrieveConsole() 00220 { 00221 iConsole = iController->GConsole(); 00222 } 00223 00224 00225 #endif // __CISVAPIBASE_H__
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.