|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : BrCtlSampleAppDialogsProvider.h 00004 * Part of : BrCtlSampleApp 00005 * Interface : Browser Control API 00006 * Description : Override dialogs provided by the Browser Control 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 00017 #ifndef BRCTLSAMPLEAPPDIALOGSPROVIDER_H 00018 #define BRCTLSAMPLEAPPDIALOGSPROVIDER_H 00019 00020 // INCLUDES 00021 #include <BrCtlInterface.h> 00022 00023 // FORWARD DECLARATIONS 00024 class CBrCtlSampleAppContainer; 00025 00026 // CLASS DECLARATION 00027 00028 /** 00029 * CBrCtlSampleAppDialogsProvider class. 00030 * This class inherits from the MBrCtlDialogsProvider and is used to modify the default 00031 * dialogs that the Browser Control provides 00032 */ 00033 class CBrCtlSampleAppDialogsProvider : public CBase, public MBrCtlDialogsProvider 00034 { 00035 public: // Constructors and destructor 00036 00037 /** 00038 * Two-phased constructor. 00039 */ 00040 static CBrCtlSampleAppDialogsProvider* NewL(CBrCtlSampleAppContainer* aContainer); 00041 00042 /** 00043 * Destructor. 00044 */ 00045 ~CBrCtlSampleAppDialogsProvider(); 00046 00047 /** 00048 * Notify the user of an error 00049 * @since 2.8 00050 * @param aErrCode The error that occured 00051 * @return void 00052 */ 00053 virtual void DialogNotifyErrorL(TInt /*aErrCode*/) 00054 { 00055 }; 00056 00057 /** 00058 * Notify the user of an http error 00059 * @since 2.8 00060 * @param aErrCode The error that occured 00061 * @param aUri The uri of the request that failed 00062 * @return void 00063 */ 00064 virtual void DialogNotifyHttpErrorL(TInt /*aErrCode*/, const TDesC& /*aUri*/) 00065 { 00066 }; 00067 00068 /** 00069 * File selection dialog 00070 * @since 2.8 00071 * @param aStartPath The initial displayed directory (drive and path) 00072 * @param aRootPath The top most directory that the user can go up to (currently set to NULL indicating no restriction) 00073 * @param aSelectedFileName The selected file name. Returned on cleanup stack. Browser control will free the buffer 00074 * @return ETrue if file selected; else EFalse (user canceled, etc) 00075 */ 00076 virtual TBool DialogFileSelectLC(const TDesC& /*aStartPath*/, 00077 const TDesC& /*aRootPath*/, 00078 HBufC*& /*aSelectedFileName*/) 00079 { 00080 return EFalse; 00081 } 00082 00083 /** 00084 * List selection dialog 00085 * @since 2.8 00086 * @param aTitle The title, could be empty 00087 * @param aBrCtlSelectOptionType The type of the list box 00088 * @param aOptions A list of options to display 00089 * @return EFalse if the user canceled, ETrue otherwise 00090 */ 00091 virtual TBool DialogSelectOptionL(const TDesC& /*aTitle*/, 00092 TBrCtlSelectOptionType /*aBrCtlSelectOptionType*/, 00093 CArrayFix<TBrCtlSelectOptionData>& /*aOptions*/) 00094 { 00095 return EFalse; 00096 } 00097 00098 /** 00099 * User Authentication dialog. User name and password are returned on cleanup stack 00100 * @since 2.8 00101 * @param aUrl The url requiring authentication 00102 * @param aRealm The realm requiring authentication 00103 * @param aDefaultUserName The user name that was used before for this realm and path, if any 00104 * @param aReturnedUserName The user name entered by the user 00105 * @param aReturnedPasswd The password entered by the user 00106 * @param aBasicAuthentication A flag if basic authentication was used 00107 * @return EFalse if the user canceled, ETrue otherwise 00108 */ 00109 virtual TBool DialogUserAuthenticationLC(const TDesC& /*aUrl*/, 00110 const TDesC& /*aRealm*/, 00111 const TDesC& /*aDefaultUserName*/, 00112 HBufC*& /*aReturnedUserName*/, 00113 HBufC*& /*aReturnedPasswd*/, 00114 TBool /*aBasicAuthentication*/ = EFalse) 00115 { 00116 return EFalse; 00117 } 00118 00119 00120 /** 00121 * Display a note to the user. No softkeys 00122 * @since 2.8 00123 * @param aMessage The message to display 00124 * @return void 00125 */ 00126 virtual void DialogNoteL(const TDesC& /*aMessage*/) 00127 { 00128 } 00129 00130 /** 00131 * Display a note to the user with ok softkey only 00132 * @since 2.8 00133 * @param aTitle The title, could be empty 00134 * @param aMessage The message to display 00135 * @return void 00136 */ 00137 void DialogAlertL(const TDesC& aTitle, const TDesC& aMessage); 00138 00139 /** 00140 * Display confirmation message to the user 00141 * @since 2.8 00142 * @param aTitle The title, could be empty 00143 * @param aMessage The message to display 00144 * @param aYesMessage The text to display on left softkey 00145 * @param aNoMessage The text to display on right softkey 00146 * @return EFalse if the user canceled, ETrue otherwise 00147 */ 00148 virtual TBool DialogConfirmL(const TDesC& /*aTitle*/, 00149 const TDesC& /*aMessage*/, 00150 const TDesC& /*aYesMessage*/, 00151 const TDesC& /*aNoMessage*/) 00152 { 00153 return EFalse; 00154 } 00155 00156 /** 00157 * Display input dialog to the user 00158 * @since 2.8 00159 * @param aTitle The title, could be empty 00160 * @param aMessage The message to display 00161 * @param aDefaultInput The default input if available 00162 * @param aReturnedInput The input entered by the user. Returned on the cleanup stack 00163 * @return EFalse if the user canceled, ETrue otherwise 00164 */ 00165 virtual TBool DialogPromptLC(const TDesC& /*aTitle*/, 00166 const TDesC& /*aMessage*/, 00167 const TDesC& /*aDefaultInput*/, 00168 HBufC*& /*aReturnedInput*/) 00169 { 00170 return EFalse; 00171 } 00172 00173 /** 00174 * Display object info and ask confirmation before download 00175 * @since 2.8 00176 * @param aBrCtlObjectInfo The object info 00177 * @return EFalse if the user canceled, ETrue otherwise 00178 */ 00179 virtual TBool DialogDownloadObjectL(CBrCtlObjectInfo* /*aBrCtlObjectInfo*/) 00180 { 00181 return EFalse; 00182 } 00183 00184 /** 00185 * DIsplay the images that appear in the current page 00186 * @since 2.8 00187 * @param aPageImages The images that appear in this page 00188 * @return vois 00189 */ 00190 virtual void DialogDisplayPageImagesL(CArrayFixFlat<TBrCtlImageCarrier>& /*aPageImages*/) 00191 { 00192 } 00193 00194 /** 00195 * Cancel any dialog that is being displayed due to e.g. Browser exit or page was destroyed 00196 * @since 2.8 00197 * @return void 00198 */ 00199 virtual void CancelAll() 00200 { 00201 } 00202 00203 /** 00204 * Display search on page dialog 00205 * @since 3.0 00206 * @return void 00207 */ 00208 virtual void DialogFindL() 00209 { 00210 } 00211 00212 private: 00213 /** 00214 * By default Symbian 2nd phase constructor is private. 00215 */ 00216 void ConstructL(CBrCtlSampleAppContainer* aContainer); 00217 00218 private: // data 00219 CBrCtlSampleAppContainer* iContainer; 00220 }; 00221 00222 #endif // BRCTLSAMPLEAPPOBSERVER_H 00223 00224 // End of File 00225
|
© Nokia 2006 |