phoneuis/easydialing/inc/easydialingplugin.h
branchRCL_3
changeset 7 544e34b3255a
parent 6 38529f706030
child 9 91c2fb4b78df
equal deleted inserted replaced
6:38529f706030 7:544e34b3255a
    86                            public MEDContactorObserver,
    86                            public MEDContactorObserver,
    87                            public MEikListBoxObserver,
    87                            public MEikListBoxObserver,
    88                            public MAknInputBlockCancelHandler
    88                            public MAknInputBlockCancelHandler
    89 {
    89 {
    90 public:
    90 public:
    91     
    91 
    92     /**
    92     /**
    93     * Static constructor. 
    93     * Static constructor. 
    94     * @return: Created object.
    94     * @return: Created object.
    95     */
    95     */
    96     static CEasyDialingPlugin* NewL();
    96     static CEasyDialingPlugin* NewL();
    97 
    97     
    98     /**
    98     /**
    99     * Destructor. 
    99     * Destructor. 
   100     */
   100     */
   101     virtual ~CEasyDialingPlugin();
   101     virtual ~CEasyDialingPlugin();
   102 
   102 
   104 
   104 
   105     /**
   105     /**
   106     * From CCoeControl.
   106     * From CCoeControl.
   107     */
   107     */
   108     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
   108     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
   109 
   109     
   110     /**
   110     /**
   111     * From CCoeControl
   111     * From CCoeControl
   112     */
   112     */
   113     TInt CountComponentControls() const;
   113     TInt CountComponentControls() const;
   114     
   114     
   121     * From CCoeControl
   121     * From CCoeControl
   122     */
   122     */
   123     void MakeVisible( TBool aVisible );
   123     void MakeVisible( TBool aVisible );
   124 
   124 
   125 protected:
   125 protected:
   126     
   126 
   127     /**
   127     /**
   128     * See CCoeControl
   128     * See CCoeControl
   129     */
   129     */
   130     void SizeChanged();
   130     void SizeChanged();
   131     
   131     
   132     /**
   132     /**
   133     * See CCoeControl
   133     * See CCoeControl
   134     */
   134     */
   135     void FocusChanged( TDrawNow aDrawNow );
   135     void FocusChanged( TDrawNow aDrawNow );
   136     
   136 
   137 public: // from CDialingExtensionInterface
   137 public: // from CDialingExtensionInterface
   138     
   138 
   139     /**
   139     /**
   140     * Does further initialization to component.
   140     * Does further initialization to component.
   141     * @param: parent container of this control.
   141     * @param: parent container of this control.
   142     */
   142     */
   143     virtual void InitializeL( CCoeControl& aParent );
   143     virtual void InitializeL( CCoeControl& aParent );
   168     /**
   168     /**
   169      * Returns the number of matching contacts in previous search.
   169      * Returns the number of matching contacts in previous search.
   170      * @return: number of matches.
   170      * @return: number of matches.
   171      */
   171      */
   172     TInt MatchingContactCount();
   172     TInt MatchingContactCount();
   173 
   173     
   174     /**
   174     /**
   175      * Gets the resource id of plugin's control button area resource.
   175      * Gets the resource id of plugin's control button area resource.
   176      * 
   176      * 
   177      * @return  Resource id.
   177      * @return  Resource id.
   178      */
   178      */
   202      * 
   202      * 
   203      * @param   aCommand   Command id.
   203      * @param   aCommand   Command id.
   204      * @return  ETrue if command was handled, EFalse otherwise.
   204      * @return  ETrue if command was handled, EFalse otherwise.
   205      */
   205      */
   206     TBool HandleCommandL( TInt aCommand );
   206     TBool HandleCommandL( TInt aCommand );
   207 
   207     
   208     /**
   208     /**
   209      * Tells if extension is currently enabled from settings.
   209      * Tells if extension is currently enabled from settings.
   210      * @return  ETrue if extension is enabled, EFalse otherwise.
   210      * @return  ETrue if extension is enabled, EFalse otherwise.
   211      */
   211      */
   212     TBool IsEnabled() const;
   212     TBool IsEnabled() const;
   213     
   213 
   214 public:
   214 public:
   215     
   215 
   216     /**
   216     /**
   217      * From MVPbkContactStoreListObserver.
   217      * From MVPbkContactStoreListObserver.
   218      */
   218      */
   219     void StoreReady(MVPbkContactStore& aContactStore);
   219     void StoreReady(MVPbkContactStore& aContactStore);
   220     
   220     
   266     
   266     
   267     /**
   267     /**
   268     * From MEikListBoxObserver.
   268     * From MEikListBoxObserver.
   269     */
   269     */
   270     void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
   270     void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
   271 
   271     
   272     /**
   272     /**
   273     * From MAknInputBlockCancelHandler.
   273     * From MAknInputBlockCancelHandler.
   274     */
   274     */
   275     void AknInputBlockCancel();
   275     void AknInputBlockCancel();
   276     
   276 
   277 
   277 
   278 private:
   278 private:
   279 
   279 
   280     /**
   280     /**
   281     * Constructor.
   281     * Constructor.
   282     */
   282     */
   283     CEasyDialingPlugin ();
   283     CEasyDialingPlugin ();
   284 
   284     
   285     /**
   285     /**
   286     * Second phase constructor.
   286     * Second phase constructor.
   287     */
   287     */
   288     void ConstructL ();
   288     void ConstructL ();
   289 
   289     
   290     void InitPredictiveContactSearchL();
   290     void InitPredictiveContactSearchL();
   291         
   291     
   292     void SetSortOrderL( CEasyDialingContactDataManager::TNameOrder aNameOrder );
   292     void SetSortOrderL( CEasyDialingContactDataManager::TNameOrder aNameOrder );
   293     
   293     
   294     /**
   294     /**
   295     * From MPsResultsObserver.
   295     * From MPsResultsObserver.
   296     */
   296     */
   312     /**
   312     /**
   313      * HandlePsResultsUpdateL
   313      * HandlePsResultsUpdateL
   314      * A leaving function to be trapped in HandlePsResultsUpdate.
   314      * A leaving function to be trapped in HandlePsResultsUpdate.
   315      */
   315      */
   316     void HandlePsResultsUpdateL( RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs );
   316     void HandlePsResultsUpdateL( RPointerArray<CPsClientData>& aResults, RPointerArray<CPsPattern>& aSeqs );
   317     
   317 
   318 public:
   318 public:
   319     
   319     
   320     /**
   320     /**
   321      * MCCAObserver function handling exit of CCA launcher.
   321      * MCCAObserver function handling exit of CCA launcher.
   322      */
   322      */
   374         ESendMessageCurrentContact,
   374         ESendMessageCurrentContact,
   375         ELaunchCurrentContact,
   375         ELaunchCurrentContact,
   376         ELaunchSearch,
   376         ELaunchSearch,
   377         EInitializePcs
   377         EInitializePcs
   378         };
   378         };
   379  
   379     
   380    /**
   380     /**
   381      * Initiates asynchronous callback to launch action and sets
   381      * Initiates asynchronous callback to launch action and sets
   382      * input blocker active. 
   382      * input blocker active. 
   383      */
   383      */
   384     void AsyncActionLaunchL( const TEasyDialingAction aAction );
   384     void AsyncActionLaunchL( const TEasyDialingAction aAction );
   385        
   385        
   411     
   411     
   412     /**
   412     /**
   413      * Makes contact listbox invisible. Effect is used if feasible.
   413      * Makes contact listbox invisible. Effect is used if feasible.
   414      */  
   414      */  
   415     void HideContactListBoxWithEffect();
   415     void HideContactListBoxWithEffect();
   416     
   416 
   417     
   417 
   418 private:
   418 private:
   419 
   419 
   420     /** Textual version of current search string. */
   420     /** Textual version of current search string. */
   421     TBuf<KEDMaxSearchStringLength> iSearchString;
   421     TBuf<KEDMaxSearchStringLength> iSearchString;
   422 
   422     
   423     /** Handle to predictive search engine. Owned. */
   423     /** Handle to predictive search engine. Owned. */
   424     CPSRequestHandler* iPredictiveContactSearchHandler;
   424     CPSRequestHandler* iPredictiveContactSearchHandler;
   425     
   425     
   426     /** PCS type of presentation of the current search string. Owned. */
   426     /** PCS type of presentation of the current search string. Owned. */
   427     CPsQuery* iPredictiveSearchQuery;
   427     CPsQuery* iPredictiveSearchQuery;
   440     
   440     
   441     /** Contact manager handle. Owned. */
   441     /** Contact manager handle. Owned. */
   442     CVPbkContactManager* iContactManager;
   442     CVPbkContactManager* iContactManager;
   443 	
   443 	
   444     /** Search result field index for first name field. */
   444     /** Search result field index for first name field. */
   445 	TInt iFirstNamePCSIndex;
   445     TInt iFirstNamePCSIndex;
   446     
   446     
   447     /** Search result field index for last name field. */
   447     /** Search result field index for last name field. */
   448 	TInt iLastNamePCSIndex;
   448     TInt iLastNamePCSIndex;
   449     
   449     
   450     /** Search result field index for first name field. */
   450     /** Search result field index for first name field. */
   451 	TInt iCompanyNamePCSIndex;
   451     TInt iCompanyNamePCSIndex;
   452 
   452     
   453 	/** Array containing observers to this class. Owned. */
   453     /** Array containing observers to this class. Owned. */
   454 	RPointerArray<MDialingExtensionObserver> iObservers;
   454     RPointerArray<MDialingExtensionObserver> iObservers;
   455 	
   455     
   456 	/** Contact listbox. Owned. */
   456     /** Contact listbox. Owned. */
   457 	CEasyDialingListBox* iContactListBox;
   457     CEasyDialingListBox* iContactListBox;
   458 
   458     
   459 	/** Listbox model from search results. Owned. */
   459     /** Listbox model from search results. Owned. */
   460 	CDesCArrayFlat* iListBoxModel;
   460     CDesCArrayFlat* iListBoxModel;
   461 	
   461     
   462 	/** Number of found matching contacts from most recent search. */
   462     /** Number of found matching contacts from most recent search. */
   463 	TInt iNumberOfNames;
   463     TInt iNumberOfNames;
   464 	
   464     
   465 	/** Handle to contact launcher. */
   465     /** Handle to contact launcher. */
   466     MCCAConnectionExt* iContactLauncher;
   466     MCCAConnectionExt* iContactLauncher;
   467     
   467     
   468     /** ETrue if contact launcher (a.k.a. communication launcher) is open. */
   468     /** ETrue if contact launcher (a.k.a. communication launcher) is open. */
   469     TBool iContactLauncherActive;
   469     TBool iContactLauncherActive;
   470     
   470     
   471     /** If true, contact listbox must not reset focus when contact launcher exits. */
   471     /** If true, contact listbox must not reset focus when contact launcher exits. */
   472     TBool iRememberFocus;
   472     TBool iRememberFocus;
   473     
   473     
   474 	/** Working buffer for creating contact string to listbox. */
   474     /** Working buffer for creating contact string to listbox. */
   475     TBuf<KEDMaxContactStringLength> iContactStringCreationBuffer;
   475     TBuf<KEDMaxContactStringLength> iContactStringCreationBuffer;
   476 
   476     
   477     /** Central repository listener. Owned. */
   477     /** Central repository listener. Owned. */
   478     CEasyDialingCenrepListener* iCenrepListener;
   478     CEasyDialingCenrepListener* iCenrepListener;
   479     
   479     
   480     /** Contact data manager. Owned. */
   480     /** Contact data manager. Owned. */
   481     CEasyDialingContactDataManager* iContactDataManager;
   481     CEasyDialingContactDataManager* iContactDataManager;
   482     
   482     
   483     /** Easy dialing contactor service. Owned. */
   483     /** Easy dialing contactor service. Owned. */
   484     CEDContactorService* iContactorService;
   484     CEDContactorService* iContactorService;
   485 
   485     
   486     /** Easy dialing resource file offset in current application. */
   486     /** Easy dialing resource file offset in current application. */
   487     TInt iResourceFileOffset;
   487     TInt iResourceFileOffset;
   488     
   488     
   489     /** Blocks user input when action is being launched. NULL if not active. Owned. */
   489     /** Blocks user input when action is being launched. NULL if not active. Owned. */
   490     CAknInputBlock* iInputBlocker;
   490     CAknInputBlock* iInputBlocker;