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 #ifndef __CISVAPIBASE_H__
00033 #define __CISVAPIBASE_H__
00034 
00035 #include <e32base.h>
00036 #include <etel3rdparty.h>
00037 
00042 enum TTelISVExampleType
00043         {
00044         KNotType = -1,
00045         KPhoneId,
00046         KSubscriberId,
00047         KBatteryInfo,
00048         KSignalInfo,
00049         KGetIndicator,
00050         KLockInfo,
00051         KNetworkInfo,
00052         KNetworkName,
00053         KOperatorName,
00054         KCallInfo,
00055         KLineStatus,
00056         KCallStatus,
00057         KFlightModeInfo,
00058         KNetworkRegInfo,
00059         KAnswerIncomingCall,
00060         KDialCall,
00061         KDynamicCaps,
00062         KHold,
00063         KResume,
00064         KSwap,
00065         KSendDTMF,
00066         KHangup,
00067         KCallWaitingStatus,
00068         KCallForwardingStatus,
00069         KCallBarringStatus,
00070         KIdentityServiceStatus
00071         };
00072 
00076 enum TState
00077         {
00078         EStart,
00079         EEnd,
00080         EDummyAnswer,
00081 
00082         EGetPhoneId,
00083         EGetSubscriberId,
00084         EGetCallInfo,
00085         EGetBatteryInfo,
00086         EGetIndicator,
00087         EGetLockInfo,
00088         EGetSignalInfo,
00089         EGetNetworkInfo,
00090         EGetNetworkName,
00091         EGetOperatorName,
00092 
00093         EGetFlightModeInfo,
00094         EGetNetworkRegStatus,
00095 
00096         EGetLineStatus,
00097         EGetCallStatus,
00098         EAnswerIncomingCall,
00099         EDialCall,
00100         EGetDynamicCaps,
00101         EHold,
00102         EResume,
00103         ESwap,
00104         ESendDTMF,
00105         EHangup,
00106 
00107         ECallForwarding,
00108         ECallWaiting,
00109         ECallBarring,
00110         EIdentityService,
00111 
00112         EWaitingForKeyPress,
00113 
00114         ESetNotifier
00115         };
00116 
00121 class MExecController
00122         {
00123 public:
00128         virtual void Terminate() = 0;
00129 
00136         virtual CTelephony* GetTelObj() const = 0;
00137 
00144         virtual CConsoleBase* GConsole() const = 0;
00145 
00146         };
00147 
00152 class CISVAPIBase : public CActive
00153         {
00154 
00155 public:
00156         CISVAPIBase(MExecController* aController,
00157                             TTelISVExampleType aExampleType);
00158 
00159         void StartRequestL();
00160         void StartRequestL(CTelephony::TCallId aCallId);
00161         void StartRequestL(CTelephony::TCallId aCallId1,
00162                            CTelephony::TCallId aCallId2);
00163         void StartRequestL(const TDesC& aTones);
00164         void RequestNotificationL();
00165         void AppTerminate();
00166 
00167         inline void RetrieveTelephonyObject();
00168         inline void RetrieveConsole();
00169 
00170         inline TTelISVExampleType GetExampleType() const;
00171 
00172 protected:
00173         virtual void DoStartRequestL();
00174         virtual void DoStartRequestL(CTelephony::TCallId aCallId);
00175         virtual void DoStartRequestL(CTelephony::TCallId aCallId1,
00176                                      CTelephony::TCallId aCallId2);
00177         virtual void DoStartRequestL(const TDesC& aNumber);
00178         virtual void DoRequestNotificationL();
00179 
00180 protected:
00186         MExecController* iController;
00191         CTelephony* iTelephony;
00196         CConsoleBase* iConsole;
00197 
00198 private:
00203         const TTelISVExampleType iExampleType;
00204 
00205         };
00206 
00213 inline TTelISVExampleType CISVAPIBase::GetExampleType() const
00214         {
00215         return iExampleType;
00216         };
00217 
00223 inline void CISVAPIBase::RetrieveTelephonyObject()
00224         {
00225         iTelephony = iController->GetTelObj();
00226         }
00227 
00233 inline void CISVAPIBase::RetrieveConsole()
00234         {
00235         iConsole = iController->GConsole();
00236         }
00237 
00238 
00239 #endif // __CISVAPIBASE_H__

Generated by  doxygen 1.6.2