idlefw/plugins/shortcutplugin/inc/caiscutengineext.h
branchRCL_3
changeset 9 d0529222e3f0
parent 4 1a2a00e78665
child 10 5ef93ea513cb
child 18 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
     1 /*
       
     2 * Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Shortcut plug-in engine extension
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAISCUTENGINEEXT_H
       
    20 #define CAISCUTENGINEEXT_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "caiscutengine.h"
       
    25 #include "maiscutextmessagehandler.h"
       
    26 #include "caiscutshortcutext.h"
       
    27 
       
    28 class CAiScutPlugin;
       
    29 class CAiScutExtServer;
       
    30 class CAiScutExtDataModel;
       
    31 
       
    32 /**
       
    33  *  The class extends CAiScutEngine by handling events from
       
    34  *  xSP extension server.
       
    35  *
       
    36  *  @since S60 v3.2
       
    37  */
       
    38 class CAiScutEngineExt : public CAiScutEngine,
       
    39     public MAiScutExtMessageHandler
       
    40     {
       
    41     public:
       
    42         /**
       
    43          * Factory function
       
    44          * @see CAiScutEngine
       
    45          * @since S60 v3.2
       
    46          */
       
    47         static CAiScutEngineExt* NewL( CAiScutPlugin& aPlugin );
       
    48 
       
    49         /**
       
    50          * Destructor
       
    51          * @since S60 v3.2
       
    52          */
       
    53         ~CAiScutEngineExt();
       
    54 
       
    55     private:
       
    56         /**
       
    57          * Constructor
       
    58          * @see CAiScutEngine
       
    59          * @since S60 v3.2
       
    60          */
       
    61         CAiScutEngineExt( CAiScutPlugin& aPlugin );
       
    62 
       
    63         void ConstructL();
       
    64 
       
    65     public:  // New functions
       
    66         /**
       
    67          * Publishes specific shortcut
       
    68          * @since S60 v3.2
       
    69          */
       
    70         void CheckAccessAndPublish( CAiScutShortcut& aShortcut );
       
    71 
       
    72     private: // From CAiScutEngine
       
    73         void HandleAiEventL( TInt aEvent, const TDesC& aParam );
       
    74         void ResumeL( TBool aPublishAll, TAiTransitionReason aReason );
       
    75 
       
    76     private: // From MAiScutExtMessageHandler
       
    77         void HandleSetPopupLineArrayL( const TDesC& aDefinition, CDesCArray* aLineArray );
       
    78         void HandleResetPopupLineArrayL( const TDesC& aDefinition );
       
    79         void HandleSetIconL( const TDesC& aDefinition, CGulIcon* aIcon );
       
    80         void HandleResetIconL( const TDesC& aDefinition );
       
    81         TBool HandleIsInShortcutsL( const TDesC& aDefinition ) const;
       
    82         void HandleIssuePutInShortcutsL( const TDesC& aDefinition );
       
    83 
       
    84     private: // New functions
       
    85         /**
       
    86          * Finds a shortcut of which id matches with given.
       
    87          * @param aId Target id in hexadecimal string format
       
    88          * @return Pointer to shortcut or NULL if not found
       
    89          */
       
    90         CAiScutShortcutExt* FindShortcutById( const TDesC& aId ) const;
       
    91 
       
    92         /**
       
    93          * Iterates shortcuts and sets new extension data to matching
       
    94          * ones.
       
    95          * @param aDefinition Definition
       
    96          * @param aAiScutExtData Pointer to extension data or NULL
       
    97          * @return ETrue if matching shortcut(s) found
       
    98          */
       
    99         TBool PopulateExtData( const TDesC& aDefinition,
       
   100             const MAiScutExtData* aAiScutExtData );
       
   101 
       
   102     private: // data
       
   103         /**
       
   104          * xSP extension server instance
       
   105          * Own.
       
   106          */
       
   107         CAiScutExtServer* iAiScutExtServer;
       
   108 
       
   109         /**
       
   110          * Extension data model
       
   111          * Own.
       
   112          */
       
   113         CAiScutExtDataModel* iExtDataModel;
       
   114     };
       
   115 
       
   116 #endif // CAISCUTENGINEEXT_H
       
   117 
       
   118 // End of File.