diff -r f345bda72bc4 -r 43e37759235e Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/bluetoothrefreshtimer_8h_source.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/bluetoothrefreshtimer_8h_source.html Tue Mar 30 16:16:55 2010 +0100 @@ -0,0 +1,89 @@ + + +
+ +00001 /* +00002 * Copyright © 2008 Nokia Corporation. +00003 */ +00004 +00005 +00006 #ifndef __BT_REFRESH_TIMER_H__ +00007 #define __BT_REFRESH_TIMER_H__ +00008 +00009 // INCLUDES +00010 #include "e32base.h" //CTimer +00011 #include <badesca.h> +00012 #include "SharedIntermediator.h" +00013 #include "BluetoothRefreshTimer.h" +00014 +00015 //FORWARD DECLARATIONS +00016 class CBTDiscoverer; +00017 +00018 const TInt KRefreshTimeMin = 5; +00019 const TInt KRefreshTimeDefault = 20; +00020 +00021 // CLASS DECLARATION +00022 +00026 class CBluetoothRefreshTimer : +00027 public CTimer +00028 { +00029 public: +00030 +00039 static CBluetoothRefreshTimer* NewL( CSharedIntermediator* aSMediator, +00040 CActiveSchedulerWait* aWait ); +00041 +00045 static CBluetoothRefreshTimer* NewLC( CSharedIntermediator* aSMediator, +00046 CActiveSchedulerWait* aWait ); +00047 +00051 ~CBluetoothRefreshTimer(); +00052 +00058 void DoCancel(); +00059 +00066 void RunL(); +00067 +00075 TInt RunError(TInt aError); +00076 +00082 void StartL(); +00083 +00089 void StopWaitLoop(); +00090 +00097 void SetRefreshTime(TInt aRefreshTime); +00098 +00099 private: // Basic two-phase Symbian OS constructors +00100 +00104 void ConstructL(); +00105 +00113 CBluetoothRefreshTimer( CSharedIntermediator* aSMediator, +00114 CActiveSchedulerWait* aWait ); +00115 +00116 private: // data members +00117 +00118 // Scheduler loop owner +00119 CActiveSchedulerWait* iWait; +00120 +00121 // Data intermediator +00122 CSharedIntermediator* iSMediator; +00123 +00124 // Bluetooth device discoverer +00125 CBTDiscoverer* iBTDiscoverer; +00126 +00127 // Time between refresh +00128 TInt iRefreshTime; +00129 +00130 // Time that has passed from the previous refresh +00131 TInt iTime; +00132 }; +00133 +00134 #endif // __BT_REFRESH_TIMER_H__ +