examples/Telephony/ETel3rdPartyExample/Shared/CISVAPIBase.h

00001 /*
00002 Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
00003 
00004 Redistribution and use in source and binary forms, with or without
00005 modification, are permitted provided that the following conditions are met:
00006 
00007 * Redistributions of source code must retain the above copyright notice, this
00008   list of conditions and the following disclaimer.
00009 * Redistributions in binary form must reproduce the above copyright notice,
00010   this list of conditions and the following disclaimer in the documentation
00011   and/or other materials provided with the distribution.
00012 * Neither the name of Nokia Corporation nor the names of its contributors
00013   may be used to endorse or promote products derived from this software
00014   without specific prior written permission.
00015 
00016 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00017 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00018 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00019 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
00020 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00021 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00022 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00023 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00024 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00025 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00026 
00027 Description:  
00028 */
00029  CCISVAPIBase.h
00030 //
00031 
00032 
00033 #ifndef __CISVAPIBASE_H__
00034 #define __CISVAPIBASE_H__
00035 
00036 #include <e32base.h>
00037 #include <etel3rdparty.h>
00038 
00043 enum TTelISVExampleType
00044         {
00045         KNotType = -1,
00046         KPhoneId,
00047         KSubscriberId,
00048         KBatteryInfo,
00049         KSignalInfo,
00050         KGetIndicator,
00051         KLockInfo,
00052         KNetworkInfo,
00053         KNetworkName,
00054         KOperatorName,
00055         KCallInfo,
00056         KLineStatus,
00057         KCallStatus,
00058         KFlightModeInfo,
00059         KNetworkRegInfo,
00060         KAnswerIncomingCall,
00061         KDialCall,
00062         KDynamicCaps,
00063         KHold,
00064         KResume,
00065         KSwap,
00066         KSendDTMF,
00067         KHangup,
00068         KCallWaitingStatus,
00069         KCallForwardingStatus,
00070         KCallBarringStatus,
00071         KIdentityServiceStatus
00072         };
00073 
00077 enum TState
00078         {
00079         EStart,
00080         EEnd,
00081         EDummyAnswer,
00082 
00083         EGetPhoneId,
00084         EGetSubscriberId,
00085         EGetCallInfo,
00086         EGetBatteryInfo,
00087         EGetIndicator,
00088         EGetLockInfo,
00089         EGetSignalInfo,
00090         EGetNetworkInfo,
00091         EGetNetworkName,
00092         EGetOperatorName,
00093 
00094         EGetFlightModeInfo,
00095         EGetNetworkRegStatus,
00096 
00097         EGetLineStatus,
00098         EGetCallStatus,
00099         EAnswerIncomingCall,
00100         EDialCall,
00101         EGetDynamicCaps,
00102         EHold,
00103         EResume,
00104         ESwap,
00105         ESendDTMF,
00106         EHangup,
00107 
00108         ECallForwarding,
00109         ECallWaiting,
00110         ECallBarring,
00111         EIdentityService,
00112 
00113         EWaitingForKeyPress,
00114 
00115         ESetNotifier
00116         };
00117 
00122 class MExecController
00123         {
00124 public:
00129         virtual void Terminate() = 0;
00130 
00137         virtual CTelephony* GetTelObj() const = 0;
00138 
00145         virtual CConsoleBase* GConsole() const = 0;
00146 
00147         };
00148 
00153 class CISVAPIBase : public CActive
00154         {
00155 
00156 public:
00157         CISVAPIBase(MExecController* aController,
00158                             TTelISVExampleType aExampleType);
00159 
00160         void StartRequestL();
00161         void StartRequestL(CTelephony::TCallId aCallId);
00162         void StartRequestL(CTelephony::TCallId aCallId1,
00163                            CTelephony::TCallId aCallId2);
00164         void StartRequestL(const TDesC& aTones);
00165         void RequestNotificationL();
00166         void AppTerminate();
00167 
00168         inline void RetrieveTelephonyObject();
00169         inline void RetrieveConsole();
00170 
00171         inline TTelISVExampleType GetExampleType() const;
00172 
00173 protected:
00174         virtual void DoStartRequestL();
00175         virtual void DoStartRequestL(CTelephony::TCallId aCallId);
00176         virtual void DoStartRequestL(CTelephony::TCallId aCallId1,
00177                                      CTelephony::TCallId aCallId2);
00178         virtual void DoStartRequestL(const TDesC& aNumber);
00179         virtual void DoRequestNotificationL();
00180 
00181 protected:
00187         MExecController* iController;
00192         CTelephony* iTelephony;
00197         CConsoleBase* iConsole;
00198 
00199 private:
00204         const TTelISVExampleType iExampleType;
00205 
00206         };
00207 
00214 inline TTelISVExampleType CISVAPIBase::GetExampleType() const
00215         {
00216         return iExampleType;
00217         };
00218 
00224 inline void CISVAPIBase::RetrieveTelephonyObject()
00225         {
00226         iTelephony = iController->GetTelObj();
00227         }
00228 
00234 inline void CISVAPIBase::RetrieveConsole()
00235         {
00236         iConsole = iController->GConsole();
00237         }
00238 
00239 
00240 #endif // __CISVAPIBASE_H__

Generated by  doxygen 1.6.2