epoc32/include/mw/brctldialogsprovider.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@2
     5
* under the terms of the License "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@2
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Handle dialogs needed for browser operation
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef BRCTLDIALOGSPROVIDER_H
williamr@2
    20
#define BRCTLDIALOGSPROVIDER_H
williamr@2
    21
williamr@2
    22
//  INCLUDES
williamr@2
    23
#include <e32std.h>
williamr@2
    24
#include <e32base.h>
williamr@2
    25
williamr@2
    26
/**
williamr@2
    27
* Type of selection list
williamr@2
    28
*/
williamr@2
    29
enum TBrCtlSelectOptionType
williamr@2
    30
    {
williamr@2
    31
    ESelectTypeMultiple,  ///< Multiple select - Display a checkbox
williamr@2
    32
    ESelectTypeSingle,    ///< Single select - Display a radio button
williamr@2
    33
    ESelectTypeNone,      ///< Single select - Do not display any button
williamr@2
    34
    /**
williamr@2
    35
    * No buttons (single selection only)
williamr@2
    36
    * OK softkey is available
williamr@2
    37
    * Cancel button is not available
williamr@2
    38
    */
williamr@4
    39
    ESelectTypeOkOnly,
williamr@4
    40
    /**
williamr@4
    41
     * Added enumeration ESelectTypeWithFindPane at offset of 0x100 so that
williamr@4
    42
     * the limit of different types of dialog boxes can be upto 256.
williamr@4
    43
     * Any user who wants a list with find pane must "|" with a defined type
williamr@4
    44
     * above like ESelectTypeNone | ESelectTypeWithFindPane to obtain a list
williamr@4
    45
     * box with find pane.
williamr@4
    46
     */
williamr@4
    47
    ESelectTypeWithFindPane = 0x100
williamr@2
    48
    };
williamr@2
    49
williamr@2
    50
/**
williamr@2
    51
* Defines the type of image if it cannot be recognized by the
williamr@2
    52
* Symbian image conversion library.
williamr@2
    53
*/
williamr@2
    54
williamr@2
    55
enum TBrCtlImageType
williamr@2
    56
    {
williamr@2
    57
    EImageTypeAny, ///< Automatically recognized by the image converter
williamr@2
    58
    EImageTypeWbmp, ///< Wireless Bitmap (WBMP) image
williamr@2
    59
    EImageTypeOta ///< Over The Air (OTA) image
williamr@2
    60
    };
williamr@2
    61
williamr@2
    62
williamr@2
    63
// FORWARD DECLARATIONS
williamr@2
    64
class TBrCtlSelectOptionData;
williamr@2
    65
class CBrCtlObjectInfo;
williamr@2
    66
class TBrCtlImageCarrier;
williamr@2
    67
williamr@2
    68
/**
williamr@2
    69
* The MBrDialogsProvider class provides functions implemented by
williamr@2
    70
* the Browser Control to display dialogs, such as error notifications,
williamr@2
    71
* authentication requests, and selection lists.
williamr@2
    72
*
williamr@2
    73
* Usage:
williamr@2
    74
*
williamr@2
    75
* @code
williamr@4
    76
*  #include <brctldialogsprovider.h>
williamr@2
    77
*
williamr@2
    78
*
williamr@2
    79
* @see S60 Platform: Browser Control API Developer's Guide Version 2.0
williamr@2
    80
* @lib BrowserEngine.lib
williamr@4
    81
* @file brctldialogsprovider.h
williamr@2
    82
* @endcode     *
williamr@2
    83
*/
williamr@2
    84
class MBrCtlDialogsProvider
williamr@2
    85
    {
williamr@2
    86
    public: // New functions
williamr@2
    87
williamr@2
    88
        /**
williamr@2
    89
        * Notifies the user of an error encountered during a download.
williamr@2
    90
        * Some examples are: insufficient memory, unrecognized URL, and DNS not found.
williamr@2
    91
        * @since 2.8
williamr@2
    92
        * @param aErrCode The error that occured
williamr@2
    93
        * @return void
williamr@2
    94
        */
williamr@2
    95
        virtual void DialogNotifyErrorL(TInt aErrCode) = 0;
williamr@2
    96
williamr@2
    97
        /**
williamr@2
    98
        * Notifies the user of an error from the HTTP server
williamr@2
    99
        * during a download. Some examples are: file not found, redirect error.
williamr@2
   100
        * @since 2.8
williamr@2
   101
        * @param aErrCode The error that occured
williamr@2
   102
        * @param aUri The uri of the request that failed
williamr@2
   103
        * @return void
williamr@2
   104
        */
williamr@2
   105
        virtual void DialogNotifyHttpErrorL(TInt aErrCode, const TDesC& aUri) = 0;
williamr@2
   106
williamr@2
   107
        /**
williamr@2
   108
        * Navigates through your file system and selects a file;
williamr@2
   109
        * analogous to the Browse command in Windows.
williamr@2
   110
        * @since 2.8
williamr@2
   111
        * @param aStartPath The initial displayed directory
williamr@2
   112
        * @param aRootPath The top most directory that the user can go up to
williamr@2
   113
        * @param aSelectedFileName The selected file name.
williamr@2
   114
        * @return ETrue if the user selected a file
williamr@2
   115
        * EFalse if the user cancelled the transaction and did not select a file.
williamr@2
   116
        * @attiontion Returned on cleanup stack. Browser control will free the buffer.
williamr@2
   117
        */
williamr@2
   118
        virtual TBool DialogFileSelectLC(const TDesC& aStartPath,
williamr@2
   119
                                         const TDesC& aRootPath,
williamr@2
   120
                                         HBufC*& aSelectedFileName) = 0;
williamr@2
   121
williamr@2
   122
        /**
williamr@2
   123
        * List selection dialog
williamr@2
   124
        * @since 2.8
williamr@2
   125
        * @param Title of the selection dialog. This is optional.
williamr@2
   126
        * @param aBrCtlSelectOptionType The type of the list box.
williamr@2
   127
        * Values: One of the following:
williamr@2
   128
        * Check boxes (multiple selections allowed)
williamr@2
   129
        * Radio buttons (single selection only). For example, highlight a URL listed
williamr@2
   130
        *   in the session History.
williamr@2
   131
        *   No buttons (single selection only)
williamr@2
   132
        * No buttons (single selection only), OK softkey available
williamr@2
   133
        * For example, if you are about to download a plug-in, you can choose
williamr@2
   134
        * to display the content in the Web page or in a viewer application.
williamr@2
   135
        * @param aOptions A list of options to display
williamr@2
   136
        * @return EFalse if the user canceled the dialog selection
williamr@2
   137
        * ETrue if the user selected an option.
williamr@2
   138
        */
williamr@2
   139
        virtual TBool DialogSelectOptionL(const TDesC& aTitle,
williamr@2
   140
                                          TBrCtlSelectOptionType aBrCtlSelectOptionType,
williamr@2
   141
                                          CArrayFix<TBrCtlSelectOptionData>& aOptions) = 0;
williamr@2
   142
williamr@2
   143
        /**
williamr@2
   144
        * User Authentication dialog.
williamr@2
   145
        * @since 2.8
williamr@2
   146
        * @param aUrl The url requiring authentication
williamr@2
   147
        * @param aRealm The realm requiring authentication
williamr@2
   148
        * @param aDefaultUserName The user name that was used before for this realm and path, if any
williamr@2
   149
        * @param aReturnedUserName The user name entered by the user
williamr@2
   150
        * @param aReturnedPasswd The password entered by the user
williamr@2
   151
        * @param aBasicAuthentication ETrue if basic authentication is required.
williamr@2
   152
        * EFalse if another type of authentication is required; for example, Digest.
williamr@2
   153
        * Default: EFalse
williamr@2
   154
        * @return EFalse if the user cancelled the selection
williamr@2
   155
        * ETrue if the user selected an option.
williamr@2
   156
        @ attiontion User name and password are returned on cleanup stack.
williamr@2
   157
        */
williamr@2
   158
        virtual TBool DialogUserAuthenticationLC(const TDesC& aUrl,
williamr@2
   159
                                                 const TDesC& aRealm,
williamr@2
   160
                                                 const TDesC& aDefaultUserName,
williamr@2
   161
                                                 HBufC*& aReturnedUserName,
williamr@2
   162
                                                 HBufC*& aReturnedPasswd,
williamr@2
   163
                                                 TBool aBasicAuthentication = EFalse) = 0;
williamr@2
   164
williamr@2
   165
        /**
williamr@2
   166
        * Displays a message to the user.
williamr@2
   167
        * For example, the message may inform the user
williamr@2
   168
        * about an error encountered while processing a request.
williamr@2
   169
        * @since 2.8
williamr@2
   170
        * @param aMessage The message to display
williamr@2
   171
        * @return void
williamr@2
   172
        * @attention Softkeys are not supported.
williamr@2
   173
        * The message disappears after a time out.
williamr@2
   174
        */
williamr@2
   175
        virtual void DialogNoteL(const TDesC& aMessage) = 0;
williamr@2
   176
williamr@2
   177
        /**
williamr@2
   178
        * Display a note to the user with ok softkey only
williamr@2
   179
        * @since 2.8
williamr@2
   180
        * @param aTitle The title, could be empty
williamr@2
   181
        * @param aMessage The message to display
williamr@2
   182
        * @return void
williamr@2
   183
        * @attention The OK softkey is supported.
williamr@2
   184
        * The message displays until the user presses OK.
williamr@2
   185
        */
williamr@2
   186
        virtual void DialogAlertL(const TDesC& aTitle, const TDesC& aMessage) = 0;
williamr@2
   187
williamr@2
   188
        /**
williamr@2
   189
        * Display confirmation message to the user.
williamr@2
   190
        * For example, Are you sure you want to delete this?
williamr@2
   191
        * @since 2.8
williamr@2
   192
        * @param aTitle The title, could be empty
williamr@2
   193
        * @param aMessage The message to display
williamr@2
   194
        * @param aYesMessage The text to display on left softkey
williamr@2
   195
        * @param aNoMessage The text to display on right softkey
williamr@2
   196
        * @return EFalse if the user cancelled the selection
williamr@2
   197
        * ETrue if the user selected an option.
williamr@2
   198
        */
williamr@2
   199
        virtual TBool DialogConfirmL(const TDesC& aTitle,
williamr@2
   200
                                     const TDesC& aMessage,
williamr@2
   201
                                     const TDesC& aYesMessage,
williamr@2
   202
                                     const TDesC& aNoMessage) = 0;
williamr@2
   203
williamr@2
   204
        /**
williamr@2
   205
        * Displays an input dialog to the user. Asks the user to input data.
williamr@2
   206
        * @since 2.8
williamr@2
   207
        * @param aTitle The title, could be empty
williamr@2
   208
        * @param aMessage The message to display
williamr@2
   209
        * @param aDefaultInput The default input if available
williamr@2
   210
        * @param aReturnedInput The input entered by the user.
williamr@2
   211
        * @return EFalse if the user cancelled the selection
williamr@2
   212
        * ETrue if the user selected an option.
williamr@2
   213
        * @attention Returned on the cleanup stack.
williamr@2
   214
        */
williamr@2
   215
        virtual TBool DialogPromptLC(const TDesC& aTitle,
williamr@2
   216
                                     const TDesC& aMessage,
williamr@2
   217
                                     const TDesC& aDefaultInput,
williamr@2
   218
                                     HBufC*& aReturnedInput) = 0;
williamr@2
   219
williamr@2
   220
        /**
williamr@2
   221
        * Displays information about the Netscape plug-in object and
williamr@2
   222
        * requests confirmation before downloading the object.
williamr@2
   223
        * @since 2.8
williamr@2
   224
        * @param aBrCtlObjectInfo Information about the object to be downloaded.
williamr@2
   225
        * The following information is passes as part of this object:
williamr@2
   226
        * Content type
williamr@2
   227
        * Size
williamr@2
   228
        * Flag to indicate whether a viewer application exists for this content
williamr@2
   229
        * Flag to indicate whether a Netscape plug-in exists that supports this content
williamr@2
   230
        * Name of the application or Netscape plug-in with which the content can
williamr@2
   231
        * be viewed on the mobile phone
williamr@2
   232
        * @return EFalse if the user cancelled the selection
williamr@2
   233
        * ETrue if the user selected an option.
williamr@2
   234
        */
williamr@2
   235
        virtual TBool DialogDownloadObjectL(CBrCtlObjectInfo* aBrCtlObjectInfo) = 0;
williamr@2
   236
williamr@2
   237
        /**
williamr@2
   238
        * Display the images that appear in the current page
williamr@2
   239
        * @since 2.8
williamr@2
   240
        * @param aPageImages Array describing the images that appear in the current page.
williamr@2
   241
        * The array contains the following elements for each image:
williamr@2
   242
        * Image data
williamr@2
   243
        * URL of the image
williamr@2
   244
        * Title for the image
williamr@2
   245
        * Image type
williamr@2
   246
        * If the image type is WBMP or OTA, it must be specified.
williamr@2
   247
        * Symbian can detect any other image type.
williamr@2
   248
        * @return void
williamr@2
   249
        */
williamr@2
   250
        virtual void DialogDisplayPageImagesL(CArrayFixFlat<TBrCtlImageCarrier>& aPageImages) = 0;
williamr@2
   251
williamr@2
   252
        /**
williamr@2
   253
        * Cancels the dialog displayed due to browser exit or destroyed pages.
williamr@2
   254
        * @since 2.8
williamr@2
   255
        * @return void
williamr@2
   256
        */
williamr@2
   257
        virtual void CancelAll() = 0;
williamr@2
   258
williamr@2
   259
        /**
williamr@2
   260
        * Displays a dialog for searching on the page.
williamr@2
   261
        * @since 3.0
williamr@2
   262
        * @return void
williamr@2
   263
        */
williamr@2
   264
       virtual void DialogFindL() = 0;
williamr@2
   265
williamr@2
   266
    };
williamr@2
   267
williamr@2
   268
williamr@2
   269
/**
williamr@2
   270
* The TBrCtlSelectOptionData class represents a list of elements
williamr@2
   271
* to display in the list box. This class is used for the List Selection Dialog.
williamr@2
   272
* @code
williamr@4
   273
*  #include <brctldialogsprovider.h>
williamr@2
   274
* @lib BrowserEngine.lib
williamr@2
   275
* @since 2.8
williamr@4
   276
* @file brctldialogsprovider.h
williamr@2
   277
* @endcode     *
williamr@2
   278
*/
williamr@2
   279
class TBrCtlSelectOptionData
williamr@2
   280
    {
williamr@2
   281
    public:
williamr@2
   282
        /**
williamr@2
   283
        * Default Constructor
williamr@2
   284
        * @return TbrCtlSelectOptionData object
williamr@2
   285
        * @since 2.8
williamr@2
   286
        */
williamr@2
   287
        inline TBrCtlSelectOptionData()
williamr@2
   288
                {
williamr@2
   289
                iText.Set(NULL, 0);
williamr@2
   290
                iIsSelected = EFalse;
williamr@2
   291
                iIsOptGroup = EFalse;
williamr@2
   292
                iHasOnPick = EFalse;
williamr@2
   293
                }
williamr@2
   294
williamr@2
   295
        /**
williamr@2
   296
        * Constructor
williamr@2
   297
        * @since 2.8
williamr@2
   298
        * @param aText The text to display with this element
williamr@2
   299
        * @param aIsSelected If the element is selected
williamr@2
   300
        * @param aIsOptGroup If a title of option group or an element
williamr@2
   301
        * @param aHasOnPick If has onPick, The dialog should close when the element is selected
williamr@2
   302
        * @return TbrCtlSelectOptionData object
williamr@2
   303
        */
williamr@2
   304
        inline TBrCtlSelectOptionData( const TDesC& aText,
williamr@2
   305
                                        TBool aIsSelected,
williamr@2
   306
                                        TBool aIsOptGroup,
williamr@2
   307
                                        TBool aHasOnPick )
williamr@2
   308
                                                            {
williamr@2
   309
                                                            iText.Set(aText);
williamr@2
   310
                                                            iIsSelected = aIsSelected;
williamr@2
   311
                                                            iIsOptGroup = aIsOptGroup;
williamr@2
   312
                                                            iHasOnPick = aHasOnPick;
williamr@2
   313
                                                            }
williamr@2
   314
        /**
williamr@2
   315
        * Gets the display text associated with a specified option.
williamr@2
   316
        * @since 2.8
williamr@2
   317
        * @return A reference to a Symbian TDesC object that
williamr@2
   318
        * contains the text associated with this option.
williamr@2
   319
        */
williamr@2
   320
        inline const TDesC& Text() const {return iText;}
williamr@2
   321
        /**
williamr@2
   322
        * Indicates whether or not an option is selected.
williamr@2
   323
        * @since 2.8
williamr@2
   324
        * @return ETrue if the option is selected
williamr@2
   325
        * EFalse if the option is not selected
williamr@2
   326
        */
williamr@2
   327
        inline TBool IsSelected() const {return iIsSelected;}
williamr@2
   328
        /**
williamr@2
   329
        * Indicates whether an option group member
williamr@2
   330
        * variable is a group title or a selectable option.
williamr@2
   331
        * @since 2.8
williamr@2
   332
        * @return ETrue if the listed item is the title of an option group
williamr@2
   333
        * EFalse if the listed item is one of the options from which to select
williamr@2
   334
        */
williamr@2
   335
        inline TBool IsOptGroup() const {return iIsOptGroup;}
williamr@2
   336
        /**
williamr@2
   337
        * Indicates whether or not the dialog closes when an option is selected.
williamr@2
   338
        * @since 2.8
williamr@2
   339
        * @return ETrue if the dialog closes when the element is selected.
williamr@2
   340
        * This is known as having OnPick capability.
williamr@2
   341
        * EFalse if the dialog does not close when the element is selected
williamr@2
   342
        */
williamr@2
   343
        inline TBool HasOnPick() const {return iHasOnPick;}
williamr@2
   344
        /**
williamr@2
   345
        * Sets the text of the option object.
williamr@2
   346
        * @since 2.8
williamr@2
   347
        * @param aText A reference to a TDesC object that contains the
williamr@2
   348
        * text to associate with a particular option.
williamr@2
   349
        * @return None
williamr@2
   350
        */
williamr@2
   351
williamr@2
   352
        inline void SetText( TDesC& aText )             { iText.Set( aText ); }
williamr@2
   353
        /**
williamr@2
   354
        * Sets the selection state of an option.
williamr@2
   355
        * @since 2.8
williamr@2
   356
        * @param aIsSelected The state of the IsSelected member variable.
williamr@2
   357
        * Value:
williamr@2
   358
        * ETrue if the option is selected
williamr@2
   359
        * EFalse if the option is not selected
williamr@2
   360
        * @return None
williamr@2
   361
        */
williamr@2
   362
        inline void SetIsSelected( TBool aIsSelected )  { iIsSelected = aIsSelected; }
williamr@2
   363
        /**
williamr@2
   364
        * Sets the state of the option group member variable.
williamr@2
   365
        * Indicates whether an option group member variable is a group title
williamr@2
   366
        * or a selectable option.
williamr@2
   367
        * @since 2.8
williamr@2
   368
        * @param aIsOptGroup The state of the option group.
williamr@2
   369
        * Value:
williamr@2
   370
        * ETrue if the listed item is the title of an option group.
williamr@2
   371
        * EFalse if the listed item is one of the options from which to select.
williamr@2
   372
        * @return None
williamr@2
   373
        */
williamr@2
   374
        inline void SetIsOptGroup( TBool aIsOptGroup )  { iIsOptGroup = aIsOptGroup; }
williamr@2
   375
        /**
williamr@2
   376
        * Sets the state of the hasOnPick member variable.
williamr@2
   377
        * Indicates whether or not the dialog closes when an option is selected.
williamr@2
   378
        * @since 2.8
williamr@2
   379
        * @param aHasOnPick
williamr@2
   380
        * ETrue if the dialog closes when the element is selected. This
williamr@2
   381
        * is known as having OnPick capability.
williamr@2
   382
        * EFalse if the dialog does not close when the element is selected
williamr@2
   383
        * @return None
williamr@2
   384
        */
williamr@2
   385
        inline void SetHasOnPick( TBool aHasOnPick )    { iHasOnPick = aHasOnPick; }
williamr@2
   386
williamr@2
   387
    private:    // Data
williamr@2
   388
        // The text associated with the element
williamr@2
   389
        TPtrC iText;
williamr@2
   390
        // Flag if the element is selected
williamr@2
   391
        TBool iIsSelected;
williamr@2
   392
        // Flag if an element or oprion group title
williamr@2
   393
        TBool iIsOptGroup;
williamr@2
   394
        // Flag if the element has onPick
williamr@2
   395
        TBool iHasOnPick;
williamr@2
   396
    };
williamr@2
   397
williamr@2
   398
/**
williamr@2
   399
* The CBrCtlObjectInfo class used to represent the information about the
williamr@2
   400
* plugin object.
williamr@2
   401
* @code
williamr@4
   402
*  #include <brctldialogsprovider.h>
williamr@2
   403
* @lib BrowserEngine.lib
williamr@2
   404
* @since 3.0
williamr@4
   405
* @file brctldialogsprovider.h
williamr@2
   406
* @endcode     *
williamr@2
   407
*/
williamr@2
   408
class CBrCtlObjectInfo : public CBase
williamr@2
   409
  {
williamr@2
   410
  public:
williamr@2
   411
        /**
williamr@2
   412
        * Default Constructor
williamr@2
   413
        * @since 2.8
williamr@2
   414
        */
williamr@2
   415
        CBrCtlObjectInfo();
williamr@2
   416
williamr@2
   417
        /**
williamr@2
   418
        * Constructor
williamr@2
   419
        * @since 3.0
williamr@2
   420
        * @param aAppSupported A flag if there is a viewer app for this object
williamr@2
   421
        * @param aPluginSupported A flag if there is a netscape plugin for this object
williamr@2
   422
        * @param aSize The size of the object
williamr@2
   423
        * @param aAppName The name of the viewer app or netscape plugin that supports this object
williamr@2
   424
        * @param aFileType The content type of the object
williamr@2
   425
        * @return CBrCtlObjectInfo object
williamr@2
   426
        */
williamr@2
   427
    CBrCtlObjectInfo(TBool aAppSupported, TBool aPluginSupported,
williamr@2
   428
                         const TDesC& aSize, const TDesC& aAppName,
williamr@2
   429
                         const TDesC& aFileType);
williamr@2
   430
  public:
williamr@2
   431
        /**
williamr@2
   432
        * Sets the flag if there is a viewer app for this object
williamr@2
   433
        * @since 3.0
williamr@2
   434
        * @param aAppSupported ETrue if there is a viewer app for this object
williamr@2
   435
        * EFalse if there is not a viewer app for this object.
williamr@2
   436
        * @return None
williamr@2
   437
        */
williamr@2
   438
        inline void SetAppSupported(TBool aAppSupported) {iAppSupported = aAppSupported;}
williamr@2
   439
        /**
williamr@2
   440
        * Sets the flag if there is a netscape plugin for this object
williamr@2
   441
        * @since 3.0
williamr@2
   442
        * @param aPluginSupported ETrue if there is a netscape plugin for this object
williamr@2
   443
        * EFalse if there is not a netscape plugin for this object.
williamr@2
   444
        * @return None
williamr@2
   445
        */
williamr@2
   446
        inline void SetPluginSupported(TBool aPluginSupported) {iPluginSupported = aPluginSupported;}
williamr@2
   447
        /**
williamr@2
   448
        * Sets the size of the object
williamr@2
   449
        * @since 3.0
williamr@2
   450
        * @param aSize Symbian descriptor containing the size of the object
williamr@2
   451
        * @return None
williamr@2
   452
        */
williamr@2
   453
        inline void SetSize(const TDesC& aSize) {iSize.Set(aSize);}
williamr@2
   454
        /**
williamr@2
   455
        * Sets the name of the viewer app or netscape plugin that supports this object
williamr@2
   456
        * @since 3.0
williamr@2
   457
        * @param aAppName  Symbian descriptor containing the name of
williamr@2
   458
        * the viewer app or netscape plugin that supports this object.
williamr@2
   459
        * @return None
williamr@2
   460
        */
williamr@2
   461
    inline void SetAppName(const TDesC& aAppName) {iAppName.Set(aAppName);}
williamr@2
   462
        /**
williamr@2
   463
        * Sets the content type of the object
williamr@2
   464
        * @since 3.0
williamr@2
   465
        * @param aFileType Symbian descriptor holding content type of the object
williamr@2
   466
        * @return None
williamr@2
   467
        */
williamr@2
   468
    inline void SetFileType(const TDesC& aFileType) {iFileType.Set(aFileType);}
williamr@2
   469
        /**
williamr@2
   470
        * Tells if there is a viewer app for this object
williamr@2
   471
        * @since 3.0
williamr@2
   472
        * @param None
williamr@2
   473
        * @return  ETrue if there is a viewer app for this object
williamr@2
   474
        * EFalse if there is not a viewer app for this object.
williamr@2
   475
        */
williamr@2
   476
        inline TBool AppSupported() {return iAppSupported;}
williamr@2
   477
        /**
williamr@2
   478
        * Tells if there is a netscape plugin for this object
williamr@2
   479
        * @since 3.0
williamr@2
   480
        * @param None
williamr@2
   481
        * @return ETrue if there is a netscape plugin for this object
williamr@2
   482
        * EFalse if there is not a netscape plugin for this object.
williamr@2
   483
        */
williamr@2
   484
        inline TBool PluginSupported() {return iPluginSupported;}
williamr@2
   485
        /**
williamr@2
   486
        * Gets the size of the object
williamr@2
   487
        * @since 3.0
williamr@2
   488
        * @param None
williamr@2
   489
        * @return Symbian descriptor containing the size of the object
williamr@2
   490
        */
williamr@2
   491
        inline const TDesC& Size() const {return iSize;}
williamr@2
   492
        /**
williamr@2
   493
        * Gets the name of the viewer app or netscape plugin that supports this object
williamr@2
   494
        * @since 3.0
williamr@2
   495
        * @param None
williamr@2
   496
        * @return Symbian descriptor containing the name of
williamr@2
   497
        * the viewer app or netscape plugin that supports this object.
williamr@2
   498
        */
williamr@2
   499
    inline const TDesC& AppName() const {return iAppName;}
williamr@2
   500
        /**
williamr@2
   501
        * Gets the content type of the object
williamr@2
   502
        * @since 3.0
williamr@2
   503
        * @param None
williamr@2
   504
        * @return Symbian descriptor holding content type of the object
williamr@2
   505
        */
williamr@2
   506
    inline const TDesC& FileType() const {return iFileType;}
williamr@2
   507
  private:
williamr@2
   508
    // A flag if there is a viewer app for this object
williamr@2
   509
        TBool iAppSupported;
williamr@2
   510
        // A flag if there is a Netscape plugin for this object
williamr@2
   511
    TBool iPluginSupported;
williamr@2
   512
        // The size of the object
williamr@2
   513
    TPtrC iSize;
williamr@2
   514
        // The name of the viewer app or Netscape plugin
williamr@2
   515
    TPtrC iAppName;
williamr@2
   516
        // The content type of the object
williamr@2
   517
    TPtrC iFileType;
williamr@2
   518
  };
williamr@2
   519
williamr@2
   520
/**
williamr@2
   521
* TheTBrCtlImageCarrier class used to give the information about the
williamr@2
   522
* image.
williamr@2
   523
* @code
williamr@4
   524
*  #include <brctldialogsprovider.h>
williamr@2
   525
* @lib BrowserEngine.lib
williamr@2
   526
* @since 2.8
williamr@4
   527
* @file brctldialogsprovider.h
williamr@2
   528
* @endcode     *
williamr@2
   529
*/
williamr@2
   530
class TBrCtlImageCarrier
williamr@2
   531
    {
williamr@2
   532
    public:
williamr@2
   533
        /**
williamr@2
   534
        * Constructor
williamr@2
   535
        * @since 2.8
williamr@2
   536
        * @param aRawData The image data
williamr@2
   537
        * @param aUrl The url of the image
williamr@2
   538
        * @param aAltText The alt text of the image
williamr@2
   539
        * @param aImageType The type of the image
williamr@2
   540
        */
williamr@2
   541
        TBrCtlImageCarrier(const TDesC8& aRawData, const TDesC& aUrl,
williamr@2
   542
            const TDesC& aAltText, TBrCtlImageType aImageType, const TDesC& aContentType ) :
williamr@2
   543
            iRawData( aRawData ),
williamr@2
   544
            iUrl( aUrl ),
williamr@2
   545
            iAltText( aAltText ),
williamr@2
   546
            iImageType(aImageType),
williamr@2
   547
      iContentType(aContentType)
williamr@2
   548
            {
williamr@2
   549
            }
williamr@2
   550
        /**
williamr@2
   551
        * Provides the image data
williamr@2
   552
        * @since 3.0
williamr@2
   553
        * @param None
williamr@2
   554
        * @return Symbian descriptor containing image data
williamr@2
   555
        */
williamr@2
   556
        inline const TDesC8& RawData() const {return iRawData;}
williamr@2
   557
        /**
williamr@2
   558
        * Provides the url of the image
williamr@2
   559
        * @since 3.0
williamr@2
   560
        * @param None
williamr@2
   561
        * @return Symbian descriptor containing url of the image
williamr@2
   562
        */
williamr@2
   563
        inline const TDesC& Url() const {return iUrl;}
williamr@2
   564
        /**
williamr@2
   565
        * Provides the alt text of the image
williamr@2
   566
        * @since 3.0
williamr@2
   567
        * @param None
williamr@2
   568
        * @return Symbian descriptor containing alt text of the image
williamr@2
   569
        */
williamr@2
   570
        inline const TDesC& AltText() const {return iAltText;}
williamr@2
   571
        /**
williamr@2
   572
        * Provides the type of the image
williamr@2
   573
        * @since 3.0
williamr@2
   574
        * @param None
williamr@2
   575
        * @return Symbian descriptor containing the type of the image
williamr@2
   576
        */
williamr@2
   577
        inline TBrCtlImageType ImageType() const {return iImageType;}
williamr@2
   578
        /**
williamr@2
   579
        * Provides the content type of the image
williamr@2
   580
        * @since 3.1
williamr@2
   581
        * @param None
williamr@2
   582
        * @return Symbian descriptor containing content type of the image
williamr@2
   583
        */
williamr@2
   584
        inline const TDesC& ContentType() const {return iContentType;}
williamr@2
   585
    private:
williamr@2
   586
        TPtrC8 iRawData;
williamr@2
   587
        TPtrC iUrl;
williamr@2
   588
        TPtrC iAltText;
williamr@2
   589
        TBrCtlImageType iImageType;
williamr@2
   590
    TPtrC iContentType;
williamr@2
   591
    };
williamr@2
   592
williamr@2
   593
williamr@2
   594
#endif      // BRCTLDIALOGSPROVIDER_H
williamr@2
   595
williamr@2
   596
// End of File