00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #ifndef BRCTLINTERFACE_H
00045 #define BRCTLINTERFACE_H
00046
00047
00048 #include <e32std.h>
00049 #include <e32base.h>
00050 #include <coecntrl.h>
00051 #include <eikmenup.h>
00052 #include <ssl.h>
00053
00054 #include <BrCtlDialogsProvider.h>
00055 #include <BrCtlLayoutObserver.h>
00056 #include <BrCtlLinkResolver.h>
00057 #include <BrCtlSoftkeysObserver.h>
00058 #include <BrCtlSpecialLoadObserver.h>
00059 #include <BrCtlWindowObserver.h>
00060 #include <BrCtlDownloadObserver.h>
00061 #include <BrCtlDefs.h>
00062
00063
00064
00065
00066 class MBrCtlDataLoadSupplier;
00067 class MBrCtlDataLoadConsumer;
00068 class MBrCtlLoadEventObserver;
00069 class MBrCtlDialogsProvider;
00070 class TBrCtlWmlServiceOption;
00071 class TBrCtlSubscribeTo;
00072 class MBrCtlStateChangeObserver;
00073 class MBrCtlCommandObserver;
00074 class MWidgetCallback;
00075 class MWidgetExtension;
00076 class CBrCtlInterface;
00077 class CPluginInfo;
00078 class TBrCtlImageCarrier;
00079
00113 IMPORT_C CBrCtlInterface* CreateBrowserControlL(CCoeControl* aParent, TRect aRect,
00114 TUint aBrCtlCapabilities, TUint aCommandIdBase = TBrCtlDefs::ECommandIdBase,
00115 MBrCtlSoftkeysObserver* aBrCtlSoftkeysObserver = NULL,
00116 MBrCtlLinkResolver* aBrCtlLinkResolver = NULL,
00117 MBrCtlSpecialLoadObserver* aBrCtlSpecialLoadObserver = NULL,
00118 MBrCtlLayoutObserver* aBrCtlLayoutObserver = NULL,
00119 MBrCtlDialogsProvider* aBrCtlDialogsProvider = NULL,
00120 MBrCtlWindowObserver* aBrCtlWindowObserver = NULL,
00121 MBrCtlDownloadObserver* aBrCtlDownloadObserver = NULL );
00122
00178 class CBrCtlInterface : public CCoeControl
00179 {
00180 public:
00181
00185 inline virtual ~CBrCtlInterface() {}
00186
00187 public:
00188
00196 IMPORT_C virtual void HandleCommandL(TInt aCommand) = 0;
00197
00203 IMPORT_C virtual TSize ContentSize() = 0;
00204
00213 IMPORT_C virtual void SetBrowserSettingL(TUint aSetting, TUint aValue) = 0;
00214
00222 IMPORT_C virtual TUint BrowserSettingL(TUint aSetting) = 0;
00223
00238 IMPORT_C virtual void LoadDataL(const TDesC& aUrl,
00239 const TDesC8& aData,
00240 const TDataType& aDataType,
00241 TUid aCharsetUid) = 0;
00242
00259
00260 IMPORT_C virtual void InitLoadDataL(const TDesC& aUrl,
00261 const TDataType& aDataType,
00262 TUid aCharsetUid,
00263 TUint aContentLength,
00264 MBrCtlDataLoadSupplier* aBrCtlDataLoadSupplier,
00265 MBrCtlDataLoadConsumer** aBrCtlDataLoadConsumer) = 0;
00266
00281 IMPORT_C virtual void LoadUrlL( const TDesC& aUrl,
00282 TInt aApId = -1,
00283 TBrCtlDefs::TBrCtlCacheMode aBrCtlCacheMode = TBrCtlDefs::ECacheModeNormal) = 0;
00284
00291 IMPORT_C virtual void LoadFileL(const TDesC& aFileName) = 0;
00292
00299 IMPORT_C virtual void LoadFileL(RFile& aFileHandle) = 0;
00300
00307 IMPORT_C virtual RPointerArray<TBrCtlWmlServiceOption>* WMLOptionMenuItemsL() = 0;
00308
00317 IMPORT_C virtual void AddOptionMenuItemsL(CEikMenuPane& aMenuPane, TInt aResourceId, TInt aAfter=-1 ) = 0;
00318
00324 IMPORT_C virtual TUint ClearCache() = 0;
00325
00333 IMPORT_C virtual TBool IsUrlInCache(TDesC& aUrl) = 0;
00334
00342 IMPORT_C virtual TInt ClearItemInCache(TDesC& aUrl) = 0;
00343
00351 IMPORT_C virtual HBufC* PageInfoLC(TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo ) = 0;
00352
00364 IMPORT_C virtual TBool NavigationAvailable( TBrCtlDefs::TBrCtlNavigationDirection aDirection ) = 0;
00365
00372 IMPORT_C virtual TUint16 SaveToFileL(const TDesC& aFileName) = 0;
00373
00379 IMPORT_C virtual const TCertInfo* CertInfo() = 0;
00380
00390 IMPORT_C virtual void AddLoadEventObserverL(MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) = 0;
00391
00401 IMPORT_C virtual void RemoveLoadEventObserver(MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) = 0;
00402
00409 IMPORT_C virtual TInt ImageCountL() = 0;
00410
00418 IMPORT_C virtual TBrCtlDefs::TBrCtlElementType FocusedElementType() = 0;
00419
00427 IMPORT_C virtual void AddStateChangeObserverL(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) = 0;
00428
00435 IMPORT_C virtual void RemoveStateChangeObserver(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) = 0;
00436
00444 IMPORT_C virtual HBufC* VersionInfoLC(TBrCtlDefs::TBrCtlVersionInfo aVersionInfo) = 0;
00445
00456 IMPORT_C virtual void SetSelfDownloadContentTypesL(TDesC& aContentTypes) = 0;
00457
00476 IMPORT_C virtual void SetParamL(TBrCtlDefs::TBrCtlParams aParam, const TDesC& aValue) = 0;
00477
00485 IMPORT_C virtual void LoadSavedPageL(const TDesC& aUid, TDesC& aSavedPageBuffer) = 0;
00486
00492 IMPORT_C virtual RArray<TUint>* ZoomLevels() const = 0;
00493
00500 IMPORT_C virtual int FindKeyword( const TDesC& aKeyword ) = 0;
00501
00512 IMPORT_C virtual TBrCtlDefs::TBrCtlFindResponse FindKeywordAgain( TBool aFowardDirection ) = 0;
00513
00521 IMPORT_C virtual const RPointerArray<TBrCtlSubscribeTo>& SubscribeToMenuItemsL() = 0;
00522
00523
00524
00525 public:
00526
00527
00528
00535 IMPORT_C virtual TSize MinimumSize() = 0;
00536
00545 IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) = 0;
00546
00555 IMPORT_C virtual void SetFocus(TBool aFocus, TDrawNow aDrawNow = ENoDrawNow) = 0;
00556
00557
00558
00559
00560
00561
00562
00563 IMPORT_C virtual TBool OkToExit() = 0;
00564
00565
00573 IMPORT_C virtual void HandleDownloadCommandL(TUint16 aTransId, TBrCtlDefs::TBrCtlDownloadCmd aCommand) = 0;
00574
00582 IMPORT_C virtual CGulIcon* GetBitmapData(const TDesC& aUrl, TBrCtlDefs::TBrCtlBitmapInfo aBitmapInfo) = 0;
00583
00590 IMPORT_C virtual void AddCommandObserverL(MBrCtlCommandObserver* aBrCtlCommandObserver) = 0;
00591
00598 IMPORT_C virtual void RemoveCommandObserver(MBrCtlCommandObserver* aBrCtlCommandObserver) = 0;
00599
00606 IMPORT_C virtual MWidgetExtension* CreateWidgetExtensionL(MWidgetCallback& aWidgetCallback) = 0;
00607
00614 IMPORT_C virtual TBrCtlImageCarrier* FocusedImageLC() = 0;
00615 };
00616
00617
00636 class MBrCtlDataLoadSupplier
00637 {
00638 public:
00644 virtual void CancelLoad() = 0;
00645 };
00646
00647
00648
00661 class MBrCtlDataLoadConsumer
00662 {
00663 public:
00670 virtual void HandleNextDataChunk(const TDesC8& aData) = 0;
00671
00677 virtual void HandleLoadComplete() = 0;
00678
00686 virtual void HandleError(TInt aError) = 0;
00687 };
00688
00701 class MBrCtlLoadEventObserver
00702 {
00703 public:
00712 virtual void HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, TUint aSize, TUint16 aTransactionId) = 0;
00713 };
00714
00725 class TBrCtlWmlServiceOption
00726 {
00727 public:
00736 TBrCtlWmlServiceOption(HBufC* aText, TUint aElemID, TUint aActualElemID);
00742 inline const TDesC& Text() {return *iText;}
00748 inline TUint ElemID(){return iElemID;}
00756 inline TUint ActualElemID(){return iActualElemID;}
00757
00761 ~TBrCtlWmlServiceOption();
00762
00763 private:
00768 TBrCtlWmlServiceOption() {};
00769
00770
00771 HBufC* iText;
00772
00773 TUint iElemID;
00774
00775 TUint iActualElemID;
00776 };
00777
00787 class TBrCtlSubscribeTo
00788 {
00789 public:
00797 TBrCtlSubscribeTo(const TPtrC& aTitle, const TPtrC& aUrl, TUint aCommandID);
00798
00804 inline const TPtrC& Title() {return iTitle;}
00805
00811 inline const TPtrC& Url() {return iUrl;}
00812
00818 inline TUint CommandID() {return iCommandID;}
00819
00820 private:
00825 TBrCtlSubscribeTo();
00826
00827 private:
00828 const TPtrC iTitle;
00829 const TPtrC iUrl;
00830
00831 TUint iCommandID;
00832 };
00833
00849 class MBrCtlStateChangeObserver
00850 {
00851 public:
00863 virtual void StateChanged(TBrCtlDefs::TBrCtlState aState, TInt aValue) = 0;
00864 };
00865
00866
00873 class MBrCtlCommandObserver
00874 {
00875 public:
00884 virtual void HandleCommandL(TBrCtlDefs::TBrCtlClientCommands aCommand, const CArrayFix<TPtrC>& aAttributesNames,
00885 const CArrayFix<TPtrC>& aAttributeValues) = 0;
00886 };
00887
00888
00895 class MWidgetCallback
00896 {
00897 public:
00908 virtual TBool DialogMimeFileSelectLC(HBufC*& aSelectedFileName,
00909 const TDesC& aMimeType) = 0;
00910
00916 virtual void SetSoftkeysVisible(TBool aVisible) = 0;
00917
00922 virtual void SetDisplayMode(TBrCtlDefs::TBrCtlOrientation aOrientation) = 0;
00923
00924
00925 virtual TInt Reserved_1(TAny*& a0, TAny* a1, TAny* a2) = 0;
00926 virtual TInt Reserved_2(TAny*& a0, TAny* a1, TAny* a2) = 0;
00927 virtual TInt Reserved_3(TAny*& a0, TAny* a1, TAny* a2) = 0;
00928 virtual TInt Reserved_4(TAny*& a0, TAny* a1, TAny* a2) = 0;
00929 virtual TInt Reserved_5(TAny*& a0, TAny* a1, TAny* a2) = 0;
00930 virtual TInt Reserved_6(TAny*& a0, TAny* a1, TAny* a2) = 0;
00931 virtual TInt Reserved_7(TAny*& a0, TAny* a1, TAny* a2) = 0;
00932 virtual TInt Reserved_8(TAny*& a0, TAny* a1, TAny* a2) = 0;
00933 virtual TInt Reserved_9(TAny*& a0, TAny* a1, TAny* a2) = 0;
00934 virtual TInt Reserved_10(TAny*& a0, TAny* a1, TAny* a2) = 0;
00935 };
00936
00937
00944 class MWidgetExtension
00945 {
00946 public:
00954 virtual void SetParamL(TBrCtlDefs::TBrCtlWidgetParams aParam, const TDesC& aValue) = 0;
00955
00963 virtual void SetParamL(TBrCtlDefs::TBrCtlWidgetParams aParam, TUint aValue) = 0;
00964
00971 virtual TBool HandleCommandL( TInt aCommandId ) = 0;
00972
00973 };
00974
00975 #endif
00976
00977