epoc32/include/app/spdiacontrol.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/app/spdiacontrol.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/app/spdiacontrol.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,670 @@
     1.4 -spdiacontrol.h
     1.5 +/*
     1.6 +* Copyright (c) 2002 - 2005 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  A utility that provides services to both the Speeddial and
    1.19 +*                PhoneBook applications for getting and setting speeddial
    1.20 +*                number configuration.
    1.21 +*
    1.22 +*/
    1.23 +
    1.24 +
    1.25 +
    1.26 +#ifndef SPDIACONTROL_H
    1.27 +#define SPDIACONTROL_H
    1.28 +
    1.29 +// INCLUDES
    1.30 +#include <coecntrl.h>
    1.31 +#include <TPbkContactItemField.h>
    1.32 +#include <aknutils.h>
    1.33 +#include <MPbkContactDbObserver.h>
    1.34 +#include <MPbkThumbnailOperationObservers.h>
    1.35 +
    1.36 +// FORWARD DECLARATIONS
    1.37 +class CAknGrid;
    1.38 +class CGulIcon;
    1.39 +class CEikonEnv;
    1.40 +class TSpdiaIndexData;
    1.41 +class CPbkContactEngine;
    1.42 +class RPbkViewResourceFile;
    1.43 +class CEikStatusPane;
    1.44 +class CPAlbImageData;
    1.45 +class CSpdiaGridDlg;
    1.46 +class CPbkContactChangeNotifier;
    1.47 +class CPbkSingleItemFetchDlg;
    1.48 +class CAknQueryDialog;
    1.49 +
    1.50 +class CPAlbImageFactory;
    1.51 +class CPbkThumbnailManager;
    1.52 +
    1.53 +class CAknsBasicBackgroundControlContext;
    1.54 +#include <AknsConstants.h>
    1.55 +
    1.56 +// CLASS DECLARATION
    1.57 +
    1.58 +/**
    1.59 +*  A utility that provides services to both the Speeddial and PhoneBook
    1.60 +*  applications for getting and setting speeddial number configuration.
    1.61 +*
    1.62 +*  @lib SpdCtrl.DLL
    1.63 +*  @deprecated
    1.64 +*  @since
    1.65 +*/
    1.66 +// one line code added for build ver 2.6
    1.67 +const TInt KArraySize =9; 
    1.68 +class CSpdiaControl    : public CCoeControl,
    1.69 +                         public MPbkContactDbObserver,
    1.70 +                         private MPbkThumbnailGetObserver
    1.71 +    {
    1.72 +    public:     // SpdiaControl APIs
    1.73 +        /**
    1.74 +        * Creates a new instace of this class.
    1.75 +        */
    1.76 +        IMPORT_C static CSpdiaControl* NewL();
    1.77 +
    1.78 +        /**
    1.79 +        * Creates a new instace of this class.
    1.80 +        *
    1.81 +        * @param aPbkEngine     reference of CPbkContactEngine.
    1.82 +        */
    1.83 +        IMPORT_C static CSpdiaControl* NewL(
    1.84 +                                CPbkContactEngine& aPbkEngine);
    1.85 +
    1.86 +        /**
    1.87 +        * Puts a query on the screen asking for '...Assign it now'.
    1.88 +        * When the user goes through, it will assign speed dial.
    1.89 +        *
    1.90 +        * @param aLocation      a location to assign speed dial.
    1.91 +        * @param aStatusPane    not used.
    1.92 +        * @reutn    ETrue if success.
    1.93 +        */
    1.94 +        IMPORT_C TBool AssignDialNumberL(TInt aLocation,
    1.95 +                            CEikStatusPane* aStatusPane = NULL);
    1.96 +
    1.97 +        /**
    1.98 +        * Runs the Speed Dial Selection Grid Dialog.
    1.99 +        * If accepted sets speed dial key to aItem's aFieldId.
   1.100 +        * Note: Calls CPbkContactEngine::SetFieldAsSpeedDialL().
   1.101 +        *       If necessary, calls CPbkContactEngine::RemoveSpeedDialFieldL().
   1.102 +        *
   1.103 +        * @param aId        a contact item id. (Don't open)
   1.104 +        * @param aFieldId   index to aItems field set.
   1.105 +        * @return   nonzero if accepted, zero if canceled.
   1.106 +        */
   1.107 +        IMPORT_C TInt ExecuteLD(TContactItemId aId, TInt aFieldIdx);
   1.108 +
   1.109 +        /**
   1.110 +        * Cancels and dismisses this dialog. In other words makes
   1.111 +        * ExecuteLD return just like cancel was pressed.
   1.112 +        * Used when user switches a application and all modal
   1.113 +        * dialogs are closed.
   1.114 +        */
   1.115 +        IMPORT_C void Cancel();
   1.116 +
   1.117 +        /**
   1.118 +        * The assigned number of the location is obtained.
   1.119 +        * Note: Voice mail number will be returned if the location
   1.120 +        *       is the position of Voice mail.
   1.121 +        * Note: If the location is empty, required dialog
   1.122 +        *       will be displayed and a location will be assigned.
   1.123 +        *
   1.124 +        * @param aLocation      a location of speed dial.
   1.125 +        * @param aPhonenumber   reference of phonenumber.
   1.126 +        * @param aStatusPane    not used.
   1.127 +        * @return   EFalse if user cancel or failed.
   1.128 +        */
   1.129 +        IMPORT_C TBool DialNumberL(TInt aLocation, TDes& aPhoneNumber,
   1.130 +                            CEikStatusPane* aStatusPane = NULL);
   1.131 +
   1.132 +    private:  // Constructors
   1.133 +        /**
   1.134 +        * C++ default constructor.
   1.135 +        */
   1.136 +        CSpdiaControl();
   1.137 +
   1.138 +        /**
   1.139 +        * C++ constructor.
   1.140 +        */
   1.141 +        CSpdiaControl(CPbkContactEngine* aPbkEngine);
   1.142 +        
   1.143 +        /**
   1.144 +        * Gets actual size of thumbnial to be drawn.
   1.145 +        * @return  size of thumbnail.
   1.146 +        */
   1.147 +        TSize GetThumbnailSize();
   1.148 +
   1.149 +    public:  // Destructor
   1.150 +
   1.151 +        /**
   1.152 +        * Destructor.
   1.153 +        */
   1.154 +        IMPORT_C virtual ~CSpdiaControl();
   1.155 +
   1.156 +    public:     // New function
   1.157 +        /**
   1.158 +        * The number of voice mail returned, if voice mail is assigned.
   1.159 +        * Note: If the location is empty, required dialog
   1.160 +        * will be displayed and voice mail will be defined.
   1.161 +        *
   1.162 +        * @param aNumber    reference of phone number.
   1.163 +        * @retunr   EFalse if user cancel or failed.
   1.164 +        */
   1.165 +        IMPORT_C TBool VoiceMailL(TDes& aNumber);
   1.166 +
   1.167 +        /**
   1.168 +        * Returns the owned Phone Book Engine.
   1.169 +        */
   1.170 +        IMPORT_C CPbkContactEngine* PbkEngine() const;
   1.171 +
   1.172 +        /**
   1.173 +        * The value converted into the index of an array from
   1.174 +        * the location of speeddial is returned.
   1.175 +        *
   1.176 +        * @param aDial      a location of speed dial.
   1.177 +        * @return   the index of a speeddial index data, if not found -1
   1.178 +        */
   1.179 +        IMPORT_C TInt Index(TInt aDial) const;
   1.180 +
   1.181 +        /**
   1.182 +        * The value converted into the the location of speeddial
   1.183 +        * from index of an array is returned.
   1.184 +        *
   1.185 +        * @param aIndex     a index of array.
   1.186 +        * @return   location of speed dial(1-9), if not found -1
   1.187 +        */
   1.188 +        IMPORT_C TInt Number(TInt aIndex) const;
   1.189 +
   1.190 +        /**
   1.191 +        * Returns the phone book contact item's id.
   1.192 +        *
   1.193 +        * @param aIndex     a index of array.
   1.194 +        * @return   a contact item's id, if not found -1
   1.195 +        */
   1.196 +        IMPORT_C TContactItemId ContactId(TInt aIndex) const;
   1.197 +
   1.198 +        /**
   1.199 +        * Returns the phone number of a speed dial contact.
   1.200 +        * Note: A character invalid as a phone number is removed.
   1.201 +        *
   1.202 +        * @param aDial      a location of speeddial.
   1.203 +        * @return   phone number
   1.204 +        */
   1.205 +        IMPORT_C const TDesC& PhoneDialNumber(TInt aDial) const;
   1.206 +
   1.207 +        /**
   1.208 +        * Returns the phone number of a speed dial contact.
   1.209 +        * Note: left and right spaces are removed.
   1.210 +        *
   1.211 +        * @param aIndex     a index of array.
   1.212 +        */
   1.213 +        IMPORT_C const TDesC& PhoneNumber(TInt aIndex) const;
   1.214 +
   1.215 +    public:   // SpeedDial internal API
   1.216 +        /**
   1.217 +        * Gets a title text from contact item's id.
   1.218 +        * Note:  calls CPbkContactItem::GetContactTitleOrNullL()
   1.219 +        *              or CPbkContactEngine::UnnamedTitle()
   1.220 +        *
   1.221 +        * @param aCid       contact item's id
   1.222 +        * @param aUnnamed   if title is empty, unname or NULL.
   1.223 +        * @return   a buffer containing the title. An unnametitle will
   1.224 +        *           be set if a title is empty.
   1.225 +        */
   1.226 +        IMPORT_C HBufC* ContactTitleL(TContactItemId aCid, TBool aUnnamed);
   1.227 +
   1.228 +        /**
   1.229 +        * Returns the icon index of a grid array.
   1.230 +        *
   1.231 +        * @param aIndex     a index of array.
   1.232 +        */
   1.233 +        IMPORT_C TInt IconIndex(TInt aIndex) const;
   1.234 +
   1.235 +        /**
   1.236 +        * Returns the thumbnail index of a grid array.
   1.237 +        *
   1.238 +        * @param aIndex     a index of array.
   1.239 +        */
   1.240 +        IMPORT_C TInt ThumbIndex(TInt aIndex) const;
   1.241 +
   1.242 +        /**
   1.243 +        * Returns the array of icons
   1.244 +        */
   1.245 +        IMPORT_C CArrayPtr<CGulIcon>* IconArray() const;
   1.246 +
   1.247 +        /**
   1.248 +        * Icons, thumbnails and text array for the grid are created.
   1.249 +        * Note: If a aIndex parameter is set, only the data of the value
   1.250 +        *       will be set up.
   1.251 +        * Note: CreateDataL() is used if App to be used is except SD.
   1.252 +        *
   1.253 +        * @param aGrid      the grid to set up
   1.254 +        * @param aIndex     (TInt) if <-1, All values are set up.
   1.255 +        */
   1.256 +        IMPORT_C TBool CreateGridDataL(CAknGrid* aGrid, TBool aIndex);
   1.257 +
   1.258 +        /**
   1.259 +        * Assigns the index data at the index in the phone book's contact entry.
   1.260 +        *
   1.261 +        * @param aIndex     a index of array.
   1.262 +        */
   1.263 +        IMPORT_C TBool AssignDialIndexL(TInt aIndex);
   1.264 +
   1.265 +        /**
   1.266 +        * Removes a speed dial from the phone book's contact entry.
   1.267 +        *
   1.268 +        * @param aIndex         a index of array.
   1.269 +        * @param aConfirmation  when remove, confirm is displayed.
   1.270 +        * @reutn    ETrue if success
   1.271 +        */
   1.272 +        IMPORT_C TBool RemoveDialIndexL(TInt aIndex,
   1.273 +                            TBool aConfirmation = ETrue);
   1.274 +        /**
   1.275 +        * deprecated - do not use
   1.276 +        */
   1.277 +        IMPORT_C TBool AssignNumberL(TInt aIndex,
   1.278 +                            CEikStatusPane* aStatusPane,
   1.279 +                            CCoeControl* aContainer,
   1.280 +                            TBool aConfirmation);
   1.281 +        IMPORT_C void ApplyCellSpdiaPaneStyleL(CAknGrid& aListBox, TSize& aSize);
   1.282 +        IMPORT_C void DrawShadow(CWindowGc& aGc, const TSize& aSize);
   1.283 +
   1.284 +        /**
   1.285 +        * The position which a shadow draws is set up.
   1.286 +        *
   1.287 +        * @param aRect
   1.288 +        */
   1.289 +        IMPORT_C void SetLayout(const TRect& aRect);
   1.290 +
   1.291 +        /**
   1.292 +        * deprecated - do not use
   1.293 +        */
   1.294 +        IMPORT_C TInt Size() const;
   1.295 +
   1.296 +        /**
   1.297 +        * Returns the position of voice mail box
   1.298 +        */
   1.299 +        IMPORT_C TInt VMBoxPosition() const;
   1.300 +
   1.301 +        /**
   1.302 +        * Returns the icon index of grid array.
   1.303 +        */
   1.304 +        IMPORT_C TInt SpdIconIndex(TInt aIndex) const;
   1.305 +
   1.306 +        /**
   1.307 +        * Returns type of the phone number.
   1.308 +        */
   1.309 +        IMPORT_C TInt NumberType(TInt aIndex) const;
   1.310 +		/**
   1.311 +        * Build ver 2.6 . Deletes the old icon array.
   1.312 +        */
   1.313 +		IMPORT_C void DeleteIconArray();
   1.314 +		/**
   1.315 +        * Build ver 2.6 .  Reloads the new skin icons
   1.316 +        */
   1.317 +		IMPORT_C void ReloadIconArray();
   1.318 +		
   1.319 +		IMPORT_C TInt VoiceMailType();
   1.320 +		/**
   1.321 +        * Returns last error.
   1.322 +        */
   1.323 +		IMPORT_C TInt GetSpdCtrlLastError();
   1.324 +		/**
   1.325 +        * Internal rutine to check if pop up has to be shown
   1.326 +        * to enable the One-Key-Dialling setting.
   1.327 +        * @return   bool value of one key calling status on or off.
   1.328 +        */
   1.329 +       IMPORT_C  TBool CheckingIfPopUpNeeded();
   1.330 +		
   1.331 +	private:
   1.332 +		/**
   1.333 +        * Internal rutine to check if pop up has to be shown
   1.334 +        * to enable the One-Key-Dialling setting.
   1.335 +        * @return   bool value of one key calling status on or off.
   1.336 +        */
   1.337 +		TBool CheckingIfPopUpNeededL();
   1.338 +		
   1.339 +		/**
   1.340 +        * Build ver 2.6 .  Reloads the new skin icons
   1.341 +        */
   1.342 +		 void ReloadIconArrayL();
   1.343 +		
   1.344 +    public:
   1.345 +        /**
   1.346 +        * Creates a grid itemArray.
   1.347 +        * Note: It calls, when using a grid except SDM.
   1.348 +        *
   1.349 +        * @param aGrid      the grid to set up
   1.350 +        * @param aUpdate    updates in an event.
   1.351 +        */
   1.352 +        TBool CreateDataL(const CAknGrid& aGrid);
   1.353 +
   1.354 +        /**
   1.355 +        * Returns the size of grid.
   1.356 +        */
   1.357 +//        TSize GridSize() const;  // not referenced...
   1.358 +
   1.359 +        /**
   1.360 +        * Display confirmation dialog from id's
   1.361 +        *
   1.362 +        * @param aIndex     a index of array.
   1.363 +        * @param aId        resource id
   1.364 +        * @param aPromptId  prompt id
   1.365 +        */
   1.366 +        TBool ConfirmationNumberL(TInt aIndex,
   1.367 +                        TInt aId,
   1.368 +                        TInt aPromptId);
   1.369 +
   1.370 +        /**
   1.371 +        * Thumbnail's shadow is drawn.
   1.372 +        *
   1.373 +        * @param aGc    window gc
   1.374 +        */
   1.375 +        void DrawShadow(CWindowGc& aGc) const;
   1.376 +
   1.377 +    private:    // Functions from base classes
   1.378 +        // from MpblThumbnailOperation
   1.379 +        /**
   1.380 +        * Called when thumbnail loading is completed.
   1.381 +        *
   1.382 +        * @param aOperation    the completed operation.
   1.383 +        * @param aBitmap       The loaded bitmap. Callee is responsible of
   1.384 +        *                      the bitmap.
   1.385 +        */
   1.386 +        void PbkThumbnailGetComplete(MPbkThumbnailOperation& aOperation,
   1.387 +                                     CFbsBitmap* aBitmap);
   1.388 +
   1.389 +        /**
   1.390 +        * Called if the thumbnail loading fails.
   1.391 +        *
   1.392 +        * @param aOperation     the failed operation.
   1.393 +        * @param aError         error code of the failure.
   1.394 +        */
   1.395 +        void PbkThumbnailGetFailed
   1.396 +            (MPbkThumbnailOperation& aOperation, TInt aError);
   1.397 +
   1.398 +        /**
   1.399 +        * Passes skin information when needed.
   1.400 +        **/
   1.401 +        TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   1.402 +
   1.403 +    private:
   1.404 +    	 
   1.405 +        /**
   1.406 +        * Called when thumbnail loading is completed.
   1.407 +        *
   1.408 +        * @param aOperation    the completed operation.
   1.409 +        * @param aBitmap       The loaded bitmap. Callee is responsible of
   1.410 +        *                      the bitmap.
   1.411 +        */
   1.412 +    	 void PbkThumbnailGetCompleteL(MPbkThumbnailOperation& aOperation,
   1.413 +                                     CFbsBitmap* aBitmap);
   1.414 +
   1.415 +    private:  // from CCoeControl
   1.416 +        /**
   1.417 +         * Draw this control
   1.418 +         */
   1.419 +        void Draw(const TRect& aRect) const;
   1.420 +
   1.421 +        /**
   1.422 +         * Set size for the skin background context.
   1.423 +         */
   1.424 +        void SizeChanged();
   1.425 +
   1.426 +    private:
   1.427 +        /**
   1.428 +        * From MContactDbObserver, Handles an event of type aEventType.
   1.429 +        */
   1.430 +        void HandleDatabaseEventL(TContactDbObserverEvent aEvent);
   1.431 +
   1.432 +    private:    // functions
   1.433 +        /**
   1.434 +        * Constructor
   1.435 +        */
   1.436 +        void ConstructL();
   1.437 +
   1.438 +        /**
   1.439 +        * Index data are initialized.
   1.440 +        */
   1.441 +        void InitIndexDataL();
   1.442 +
   1.443 +        /**
   1.444 +        * Updates data set to match index of the owned index data array.
   1.445 +        */
   1.446 +        TBool UpdateIndexDataL(TInt aIndex);
   1.447 +
   1.448 +        /**
   1.449 +        * Searches icon of grid array for a match.
   1.450 +        *
   1.451 +        * @param aId     phone book icon id to match to.
   1.452 +        * @return   the matching index, -1 if not found.
   1.453 +        */
   1.454 +        TInt FindIconIndex(TInt aId) const;
   1.455 +
   1.456 +        /**
   1.457 +        * Returns the thumbnail type.
   1.458 +        *
   1.459 +        * @param aIndex     a index of array.
   1.460 +        */
   1.461 +        TInt ThumbType(TInt aIndex) const;
   1.462 +
   1.463 +        /**
   1.464 +        * Returns the thumbnail size.
   1.465 +        *
   1.466 +        * @param aIndex     a index of array.
   1.467 +        */
   1.468 +        TSize ThumbSize(TInt aIndex) const;
   1.469 +
   1.470 +        /**
   1.471 +        * Set phonebook contact itmes'id.
   1.472 +        *
   1.473 +        * @param aIndex     a index of array.
   1.474 +        * @param aCid       phone book contact item's id.
   1.475 +        */
   1.476 +        void SetContactId(TInt aIndex, TContactItemId aCid);  // not referenced...
   1.477 +
   1.478 +        /**
   1.479 +        * The position on the array that a grid uses from
   1.480 +        * an item and a phone number is returned.
   1.481 +        *
   1.482 +        * @param aItem      contacd item
   1.483 +        * @param aDial      phone number
   1.484 +        */
   1.485 +        TInt IconPositionL(const CPbkContactItem& aItem, TInt aDial, TInt& aFieldId);
   1.486 +
   1.487 +        /**
   1.488 +        * An icon array is created and set.
   1.489 +        *
   1.490 +        * @retunr   if need loadthumbL ETrue
   1.491 +        */
   1.492 +        TInt SetIconArrayL(CArrayPtrFlat<CGulIcon>* aArray);
   1.493 +
   1.494 +        /**
   1.495 +        * Gets Item's descriptor for Grid.
   1.496 +        *
   1.497 +        * @param aIndex     a index of array.
   1.498 +        * @param aSdmData   reference to the data currently used.
   1.499 +        * @return   a buffer containing the descriptor text.
   1.500 +        */
   1.501 +        HBufC* ItemDescriptorLC(TInt aIndex, const TSpdiaIndexData& aSdmData);
   1.502 +
   1.503 +        /**
   1.504 +        * Creates Item's descriptor for Grid.
   1.505 +        *
   1.506 +        * @param aSdmData   reference to the data currently used.
   1.507 +        * @returen  a buffer containing the descriptor text.
   1.508 +        */
   1.509 +        HBufC* CreateItemDescriptorLC(const TSpdiaIndexData& aSdmData);
   1.510 +
   1.511 +        /**
   1.512 +        * A descriptor is added to a text.
   1.513 +        *
   1.514 +        * @param aSdmData   reference to the data currently used.
   1.515 +        * @param aText      the text for storing
   1.516 +        */
   1.517 +        void AppendTextL(const TSpdiaIndexData& aSdmData, TPtr& aText);
   1.518 +
   1.519 +        /**
   1.520 +        * Searches contact item's fiels of this contact for a match.
   1.521 +        *
   1.522 +        * @param aItem      contact item to search.
   1.523 +        * @param aFieldId   field id to search.
   1.524 +        * @return   first field matching aFieldId, NULL if none found.
   1.525 +        */
   1.526 +        TPbkContactItemField* FindFieldL(CPbkContactItem& aItem,
   1.527 +                                    TPbkFieldId aFieldId);
   1.528 +
   1.529 +        /**
   1.530 +        * The descriptor for thumbnail is added.
   1.531 +        *
   1.532 +        * @param aSdmData           reference to the data currently used.
   1.533 +        * @param aText
   1.534 +        * @param aFixedLocation
   1.535 +        */
   1.536 +        void AppendThumbnail(const TSpdiaIndexData& aSdmData,
   1.537 +                            TPtr& aText,
   1.538 +                            TBool aFixedLocation);
   1.539 +
   1.540 +        /**
   1.541 +        * Returns the type from a size of thumbnail.
   1.542 +        *
   1.543 +        * @param aSize  a thumbnail size
   1.544 +        */
   1.545 +        TInt ConvThumbType(const TSize& aSize) const;
   1.546 +
   1.547 +        /**
   1.548 +        * Operations to a CPbkThumbnailManager are set.
   1.549 +        * Note: call GetThumbnailAsyncL().
   1.550 +        */
   1.551 +        void SetOperationsL();
   1.552 +
   1.553 +        /**
   1.554 +        * The data of items are added to an array.
   1.555 +        *
   1.556 +        * @param aArray
   1.557 +        */
   1.558 +        void SetItemDataL(CDesCArray& aArray);
   1.559 +
   1.560 +        /**
   1.561 +        * Assigns the index data at aDial in the phone book's contact entry
   1.562 +        *
   1.563 +        * @param aId
   1.564 +        * @param aDial
   1.565 +        */
   1.566 +        void AssignDialL(TContactItemId aId, TInt aFieldIdx, TInt aDial);
   1.567 +
   1.568 +        /**
   1.569 +        * Checks if the Flash File System storage will fall below
   1.570 +        * Critical Level. Warning will be displayed if sotrage
   1.571 +        * is below Critical Level.
   1.572 +        *
   1.573 +        * @return   ETrue   Below critical level
   1.574 +        */
   1.575 +        TBool CheckSpaceBelowCriticalLevelL();
   1.576 +
   1.577 +        /**
   1.578 +        * Does it have a thumbnail operation object to match?
   1.579 +        *
   1.580 +        * @param aOperation     a thumbnail operation object to match to.
   1.581 +        * @return   index of speeddial index data array.
   1.582 +        */
   1.583 +        TInt HasOperation(const MPbkThumbnailOperation& aOperation);
   1.584 +
   1.585 +        /**
   1.586 +        * A text array that a grid has is erased.
   1.587 +        */
   1.588 +        void ResetArray();
   1.589 +
   1.590 +        /**
   1.591 +        * Speeddial index data is set by the data of parameters.
   1.592 +        *
   1.593 +        * @param aIndex     a index of array.
   1.594 +        * @param aSdmData   reference to the data currently used.
   1.595 +        */
   1.596 +        void SetIndexDataL(TInt aIndex, TSpdiaIndexData& aSdmData);
   1.597 +
   1.598 +        /**
   1.599 +        * Speeddial index data is changed by the data of parameters.
   1.600 +        *
   1.601 +        * @param aIndex     a index of array.
   1.602 +        * @param aSdmData   reference to the data currently used.
   1.603 +        */
   1.604 +        void ChangeIndexDataL(TInt aIndex, const TSpdiaIndexData& aSdmData);
   1.605 +
   1.606 +        /**
   1.607 +        * Creates icon data for SDM control data by the data of parameters.
   1.608 +        *
   1.609 +        * @param aIndex             a index of array.
   1.610 +        * @param aSdmData           reference to the data currently used.
   1.611 +        * @param aSetUpdateThumb    thumbnail load start parameter set in index data
   1.612 +        */
   1.613 +        TBool CreateIndexIconL(TInt aIndex, TSpdiaIndexData& aSdmData,
   1.614 +                            TBool aSetUpdateThumb);
   1.615 +
   1.616 +	    
   1.617 +		private:
   1.618 +			//code added for build ver 2.6
   1.619 +			void InitializeArray();
   1.620 +
   1.621 +    private:    // Data
   1.622 +        // The type of the caller application.
   1.623 +        enum TGridUse
   1.624 +            {
   1.625 +            EGridUse,               // SpeedDial
   1.626 +            EGridUseAndUpdate,      // PhoneBook
   1.627 +            EGridNoUse              // PhoneClient
   1.628 +            };
   1.629 +        CPbkContactEngine* iEngine;                 // owned by this
   1.630 +        TBool iExEngine;                            // engine owned flags
   1.631 +        TGridUse iGridUsed;
   1.632 +
   1.633 +        TInt iSdmCount;                             // Grid cell count(Row * col)
   1.634 +
   1.635 +        CArrayFixFlat<TSpdiaIndexData>* iSdmArray;  // owned by this
   1.636 +        CArrayFixFlat<TAknLayoutRect>* iShadowLayout;     // owned by this
   1.637 +
   1.638 +        CPbkContactChangeNotifier* iPbkNotifier;    // owned by this
   1.639 +        CPbkSingleItemFetchDlg* iPbkSingleItem;     // owned by this
   1.640 +        CAknQueryDialog* iQueryDialog;              // owned by this
   1.641 +        RPbkViewResourceFile* iPbkResourceFile;     // owned by this
   1.642 +        CSpdiaGridDlg* iGridDlg;                    // owned by this
   1.643 +
   1.644 +        /// Own: thumbnail manager
   1.645 +        CPbkThumbnailManager* iManager;
   1.646 +        /// Own: factory for scaling to Thumbnails
   1.647 +        CPAlbImageFactory* iThumbFactory;
   1.648 +
   1.649 +        CAknGrid* iGrid;
   1.650 +        TInt    iFileOffset;
   1.651 +        CArrayPtrFlat<CGulIcon>* iIconArray;
   1.652 +
   1.653 +        CAknsBasicBackgroundControlContext* iBgContext;
   1.654 +	
   1.655 +		// Variable used to know if the popup dialog has to be shown
   1.656 +		// according to the release.
   1.657 +		TBool iBooleanVarForAddingDialogVariation;
   1.658 +		//Code added for build ver 2.6.
   1.659 +		RArray<TAknsItemID>*iDialSkinBmp;
   1.660 +		RArray<TAknsItemID>*iSkinIcons;
   1.661 +		TAknLayoutRect icellLayout[KArraySize];
   1.662 +		TBuf<254> iBmpPath;
   1.663 +		TBuf<254> iRscPath;
   1.664 +		TInt iType;
   1.665 +		TInt iError;
   1.666 +		TBool iPopupDialog;
   1.667 +		CAknQueryDialog* iSaveChangesDialog;
   1.668 +		TBool iSaveDlg;
   1.669 +    };
   1.670 +
   1.671 +#endif // SPDIACONTROL_H
   1.672 +
   1.673 +// End of File
   1.674 +