|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================ 00003 * Name : BrCtlSampleAppLoadEventObserver.cpp 00004 * Part of : BrCtlSampleApp 00005 * Interface : Browser Control API 00006 * Description : Handle load progress events 00007 * Version : 00008 * 00009 * Copyright (c) 2005-2006 Nokia Corporation. 00010 * This material, including documentation and any related 00011 * computer programs, is protected by copyright controlled by 00012 * Nokia Corporation. 00013 * ============================================================================ 00014 */ 00015 00016 // INCLUDE FILES 00017 #include "BrCtlSampleAppContainer.h" 00018 #include "BrCtlSampleAppLoadEventObserver.h" 00019 00020 // ================= MEMBER FUNCTIONS ======================= 00021 00022 // --------------------------------------------------------- 00023 // CBrCtlSampleAppLoadEventObserver::HandleBrowserLoadEventL 00024 // --------------------------------------------------------- 00025 // 00026 void 00027 CBrCtlSampleAppLoadEventObserver::HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, 00028 TUint aSize, 00029 TUint16 aTransactionId) 00030 { 00031 // Here we are creating a text string to be displayed on the screen, but if 00032 // you were implementing this method, you would most likely be displaying a 00033 // progress bar. 00034 00035 TBuf16<256> tgt; 00036 00037 _LIT(KHandleBrowserLoadEvent, "Load event = %d, size = %d, trId = %d"); 00038 00039 tgt.AppendFormat(KHandleBrowserLoadEvent, aLoadEvent, aSize, aTransactionId); 00040 00041 iContainer->SetText(tgt); 00042 00043 iContainer->DrawNow(); 00044 00045 } 00046 00047 // --------------------------------------------------------- 00048 // CBrCtlSampleAppLoadEventObserver::ConstructL 00049 // --------------------------------------------------------- 00050 // 00051 void 00052 CBrCtlSampleAppLoadEventObserver::ConstructL(CBrCtlSampleAppContainer* aContainer) 00053 { 00054 iContainer = aContainer; 00055 } 00056 00057 // --------------------------------------------------------- 00058 // CBrCtlSampleAppLoadEventObserver::~CBrCtlSampleAppLoadEventObserver 00059 // --------------------------------------------------------- 00060 // 00061 CBrCtlSampleAppLoadEventObserver::~CBrCtlSampleAppLoadEventObserver() 00062 { 00063 } 00064 00065 00066 // --------------------------------------------------------- 00067 // CBrCtlSampleAppLoadEventObserver::NewL 00068 // --------------------------------------------------------- 00069 // 00070 CBrCtlSampleAppLoadEventObserver* 00071 CBrCtlSampleAppLoadEventObserver::NewL(CBrCtlSampleAppContainer* aContainer) 00072 { 00073 CBrCtlSampleAppLoadEventObserver* self = new(ELeave)CBrCtlSampleAppLoadEventObserver; 00074 CleanupStack::PushL(self); 00075 self->ConstructL(aContainer); 00076 CleanupStack::Pop(); 00077 return self; 00078 } 00079 00080 00081 // End of File 00082
|
© Nokia 2006 |