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 <../bidi.h>
00049 #include <e32std.h>
00050 #include <e32base.h>
00051 #include <coecntrl.h>
00052 #include <eikmenup.h>
00053 #include <ssl.h>
00054
00055 #include <BrCtlDialogsProvider.h>
00056 #include <BrCtlLayoutObserver.h>
00057 #include <BrCtlLinkResolver.h>
00058 #include <BrCtlSoftkeysObserver.h>
00059 #include <BrCtlSpecialLoadObserver.h>
00060 #include <BrCtlWindowObserver.h>
00061 #include <BrCtlDownloadObserver.h>
00062 #include <BrCtlDefs.h>
00063
00064
00065
00066
00067 class MBrCtlDataLoadSupplier;
00068 class MBrCtlDataLoadConsumer;
00069 class MBrCtlLoadEventObserver;
00070 class MBrCtlDialogsProvider;
00071 class TBrCtlWmlServiceOption;
00072 class TBrCtlSubscribeTo;
00073 class MBrCtlStateChangeObserver;
00074 class MBrCtlCommandObserver;
00075 class MWidgetCallback;
00076 class MWidgetExtension;
00077 class CBrCtlInterface;
00078 class CPluginInfo;
00079 class TBrCtlImageCarrier;
00080
00114 IMPORT_C CBrCtlInterface* CreateBrowserControlL(CCoeControl* aParent, TRect aRect,
00115 TUint aBrCtlCapabilities, TUint aCommandIdBase = TBrCtlDefs::ECommandIdBase,
00116 MBrCtlSoftkeysObserver* aBrCtlSoftkeysObserver = NULL,
00117 MBrCtlLinkResolver* aBrCtlLinkResolver = NULL,
00118 MBrCtlSpecialLoadObserver* aBrCtlSpecialLoadObserver = NULL,
00119 MBrCtlLayoutObserver* aBrCtlLayoutObserver = NULL,
00120 MBrCtlDialogsProvider* aBrCtlDialogsProvider = NULL,
00121 MBrCtlWindowObserver* aBrCtlWindowObserver = NULL,
00122 MBrCtlDownloadObserver* aBrCtlDownloadObserver = NULL );
00123
00179 class CBrCtlInterface : public CCoeControl
00180 {
00181 public:
00182
00186 inline virtual ~CBrCtlInterface() {}
00187
00188 public:
00189
00197 IMPORT_C virtual void HandleCommandL(TInt aCommand) = 0;
00198
00204 IMPORT_C virtual TSize ContentSize() = 0;
00205
00214 IMPORT_C virtual void SetBrowserSettingL(TUint aSetting, TUint aValue) = 0;
00215
00223 IMPORT_C virtual TUint BrowserSettingL(TUint aSetting) = 0;
00224
00239 IMPORT_C virtual void LoadDataL(const TDesC& aUrl,
00240 const TDesC8& aData,
00241 const TDataType& aDataType,
00242 TUid aCharsetUid) = 0;
00243
00260
00261 IMPORT_C virtual void InitLoadDataL(const TDesC& aUrl,
00262 const TDataType& aDataType,
00263 TUid aCharsetUid,
00264 TUint aContentLength,
00265 MBrCtlDataLoadSupplier* aBrCtlDataLoadSupplier,
00266 MBrCtlDataLoadConsumer** aBrCtlDataLoadConsumer) = 0;
00267
00282 IMPORT_C virtual void LoadUrlL( const TDesC& aUrl,
00283 TInt aApId = -1,
00284 TBrCtlDefs::TBrCtlCacheMode aBrCtlCacheMode = TBrCtlDefs::ECacheModeNormal) = 0;
00285
00292 IMPORT_C virtual void LoadFileL(const TDesC& aFileName) = 0;
00293
00300 IMPORT_C virtual void LoadFileL(RFile& aFileHandle) = 0;
00301
00302
00303
00304
00305
00306
00307
00308 IMPORT_C virtual RPointerArray<TBrCtlWmlServiceOption>* WMLOptionMenuItemsL() = 0;
00309
00318 IMPORT_C virtual void AddOptionMenuItemsL(CEikMenuPane& aMenuPane, TInt aResourceId, TInt aAfter=-1 ) = 0;
00319
00325 IMPORT_C virtual TUint ClearCache() = 0;
00326
00334 IMPORT_C virtual TBool IsUrlInCache(TDesC& aUrl) = 0;
00335
00343 IMPORT_C virtual TInt ClearItemInCache(TDesC& aUrl) = 0;
00344
00352 IMPORT_C virtual HBufC* PageInfoLC(TBrCtlDefs::TBrCtlPageInfo aBrCtlPageInfo ) = 0;
00353
00365 IMPORT_C virtual TBool NavigationAvailable( TBrCtlDefs::TBrCtlNavigationDirection aDirection ) = 0;
00366
00373 IMPORT_C virtual TUint16 SaveToFileL(const TDesC& aFileName) = 0;
00374
00380 IMPORT_C virtual const TCertInfo* CertInfo() = 0;
00381
00391 IMPORT_C virtual void AddLoadEventObserverL(MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) = 0;
00392
00402 IMPORT_C virtual void RemoveLoadEventObserver(MBrCtlLoadEventObserver* aBrCtlLoadEventObserver) = 0;
00403
00410 IMPORT_C virtual TInt ImageCountL() = 0;
00411
00419 IMPORT_C virtual TBrCtlDefs::TBrCtlElementType FocusedElementType() = 0;
00420
00428 IMPORT_C virtual void AddStateChangeObserverL(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) = 0;
00429
00436 IMPORT_C virtual void RemoveStateChangeObserver(MBrCtlStateChangeObserver* aBrCtlStateChangeObserver) = 0;
00437
00445 IMPORT_C virtual HBufC* VersionInfoLC(TBrCtlDefs::TBrCtlVersionInfo aVersionInfo) = 0;
00446
00457 IMPORT_C virtual void SetSelfDownloadContentTypesL(TDesC& aContentTypes) = 0;
00458
00477 IMPORT_C virtual void SetParamL(TBrCtlDefs::TBrCtlParams aParam, const TDesC& aValue) = 0;
00478
00486 IMPORT_C virtual void LoadSavedPageL(const TDesC& aUid, TDesC& aSavedPageBuffer) = 0;
00487
00493 IMPORT_C virtual RArray<TUint>* ZoomLevels() const = 0;
00494
00501 IMPORT_C virtual int FindKeyword( const TDesC& aKeyword ) = 0;
00502
00513 IMPORT_C virtual TBrCtlDefs::TBrCtlFindResponse FindKeywordAgain( TBool aFowardDirection ) = 0;
00514
00522 IMPORT_C virtual const RPointerArray<TBrCtlSubscribeTo>& SubscribeToMenuItemsL() = 0;
00523
00524
00525
00526 public:
00527
00528
00529
00536 IMPORT_C virtual TSize MinimumSize() = 0;
00537
00546 IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) = 0;
00547
00556 IMPORT_C virtual void SetFocus(TBool aFocus, TDrawNow aDrawNow = ENoDrawNow) = 0;
00557
00558
00559
00560
00561
00562
00563
00564 IMPORT_C virtual TBool OkToExit() = 0;
00565
00566
00574 IMPORT_C virtual void HandleDownloadCommandL(TUint16 aTransId, TBrCtlDefs::TBrCtlDownloadCmd aCommand) = 0;
00575
00583 IMPORT_C virtual CGulIcon* GetBitmapData(const TDesC& aUrl, TBrCtlDefs::TBrCtlBitmapInfo aBitmapInfo) = 0;
00584
00591 IMPORT_C virtual void AddCommandObserverL(MBrCtlCommandObserver* aBrCtlCommandObserver) = 0;
00592
00599 IMPORT_C virtual void RemoveCommandObserver(MBrCtlCommandObserver* aBrCtlCommandObserver) = 0;
00600
00607 IMPORT_C virtual MWidgetExtension* CreateWidgetExtensionL(MWidgetCallback& aWidgetCallback) = 0;
00608
00615 IMPORT_C virtual TBrCtlImageCarrier* FocusedImageLC() = 0;
00616
00627 IMPORT_C virtual void PostUrlL (const TDesC& aUrl,
00628 const TDesC8& aContentType,
00629 const TDesC8& aPostData,
00630 const TDesC8* aBoundary,
00631 TAny* aReserved) = 0;
00638 IMPORT_C virtual void TakeSnapshotL(CFbsBitmap& snapshot) = 0;
00639 };
00640
00641
00660 class MBrCtlDataLoadSupplier
00661 {
00662 public:
00668 virtual void CancelLoad() = 0;
00669 };
00670
00671
00672
00685 class MBrCtlDataLoadConsumer
00686 {
00687 public:
00694 virtual void HandleNextDataChunk(const TDesC8& aData) = 0;
00695
00701 virtual void HandleLoadComplete() = 0;
00702
00710 virtual void HandleError(TInt aError) = 0;
00711 };
00712
00725 class MBrCtlLoadEventObserver
00726 {
00727 public:
00736 virtual void HandleBrowserLoadEventL(TBrCtlDefs::TBrCtlLoadEvent aLoadEvent, TUint aSize, TUint16 aTransactionId) = 0;
00737 };
00738
00749 class TBrCtlWmlServiceOption
00750 {
00751 public:
00760 TBrCtlWmlServiceOption(HBufC* aText, TUint aElemID, TUint aActualElemID);
00766 inline const TDesC& Text() {return *iText;}
00772 inline TUint ElemID(){return iElemID;}
00780 inline TUint ActualElemID(){return iActualElemID;}
00781
00785 ~TBrCtlWmlServiceOption();
00786
00787 private:
00792 TBrCtlWmlServiceOption() {};
00793
00794
00795 HBufC* iText;
00796
00797 TUint iElemID;
00798
00799 TUint iActualElemID;
00800 };
00801
00811 class TBrCtlSubscribeTo
00812 {
00813 public:
00821 TBrCtlSubscribeTo(const TPtrC& aTitle, const TPtrC& aUrl, TUint aCommandID);
00822
00828 inline const TPtrC& Title() {return iTitle;}
00829
00835 inline const TPtrC& Url() {return iUrl;}
00836
00842 inline TUint CommandID() {return iCommandID;}
00843
00844 private:
00849 TBrCtlSubscribeTo();
00850
00851 private:
00852 const TPtrC iTitle;
00853 const TPtrC iUrl;
00854
00855 TUint iCommandID;
00856 };
00857
00873 class MBrCtlStateChangeObserver
00874 {
00875 public:
00887 virtual void StateChanged(TBrCtlDefs::TBrCtlState aState, TInt aValue) = 0;
00888 };
00889
00890
00897 class MBrCtlCommandObserver
00898 {
00899 public:
00908 virtual void HandleCommandL(TBrCtlDefs::TBrCtlClientCommands aCommand, const CArrayFix<TPtrC>& aAttributesNames,
00909 const CArrayFix<TPtrC>& aAttributeValues) = 0;
00910 };
00911
00912
00919 class MWidgetCallback
00920 {
00921 public:
00932 virtual TBool DialogMimeFileSelectLC(HBufC*& aSelectedFileName,
00933 const TDesC& aMimeType) = 0;
00934
00940 virtual void SetSoftkeysVisible(TBool aVisible) = 0;
00941
00946 virtual void SetDisplayMode(TBrCtlDefs::TBrCtlOrientation aOrientation) = 0;
00947
00948
00949 virtual TInt Reserved_1(TAny*& a0, TAny* a1, TAny* a2) = 0;
00950 virtual TInt Reserved_2(TAny*& a0, TAny* a1, TAny* a2) = 0;
00951 virtual TInt Reserved_3(TAny*& a0, TAny* a1, TAny* a2) = 0;
00952 virtual TInt Reserved_4(TAny*& a0, TAny* a1, TAny* a2) = 0;
00953 virtual TInt Reserved_5(TAny*& a0, TAny* a1, TAny* a2) = 0;
00954 virtual TInt Reserved_6(TAny*& a0, TAny* a1, TAny* a2) = 0;
00955 virtual TInt Reserved_7(TAny*& a0, TAny* a1, TAny* a2) = 0;
00956 virtual TInt Reserved_8(TAny*& a0, TAny* a1, TAny* a2) = 0;
00957 virtual TInt Reserved_9(TAny*& a0, TAny* a1, TAny* a2) = 0;
00958 virtual TInt Reserved_10(TAny*& a0, TAny* a1, TAny* a2) = 0;
00959 };
00960
00961
00968 class MWidgetExtension
00969 {
00970 public:
00978 virtual void SetParamL(TBrCtlDefs::TBrCtlWidgetParams aParam, const TDesC& aValue) = 0;
00979
00987 virtual void SetParamL(TBrCtlDefs::TBrCtlWidgetParams aParam, TUint aValue) = 0;
00988
00995 virtual TBool HandleCommandL( TInt aCommandId ) = 0;
00996
00997 };
00998 #endif // BRCTLINTERFACE_H
00999
01000