phonebookui/Phonebook2/ccapplication/ccapp/inc/ccappplugindata.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Class for handling the view plugin data
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CCAPPLUGINDATA_H__
       
    20 #define __CCAPPLUGINDATA_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CCCAppViewPluginBase;
       
    25 class CCCAppPluginLoader;
       
    26 
       
    27 /**
       
    28  *  Class for handling data related to one plugin
       
    29  *
       
    30  *  Todo; When CCApp was supporting UI Accelerator, this
       
    31  *  class had more functionality. Now you can think is it
       
    32  *  really still needed. 
       
    33  *
       
    34  *  @code
       
    35  *   ?good_class_usage_example(s)
       
    36  *  @endcode
       
    37  *
       
    38  *  @lib ccaapp.exe
       
    39  *  @since S60 v5.0
       
    40  */
       
    41 class CCCAppPluginData : public CBase
       
    42 {
       
    43 public:
       
    44 
       
    45     /**
       
    46      * Two phased constructor.
       
    47      */
       
    48     static CCCAppPluginData* NewLC( 
       
    49         CCCAppViewPluginBase& aPlugin );
       
    50 
       
    51     /**
       
    52      * Destructor.
       
    53      */
       
    54     ~CCCAppPluginData();
       
    55 
       
    56 public:
       
    57 
       
    58     /**
       
    59      * Returns pointer to actual plugin.
       
    60      *
       
    61      * @since S60 v5.0
       
    62      * @return pointer to plugin
       
    63      */
       
    64     CCCAppViewPluginBase& Plugin();
       
    65 
       
    66     /**
       
    67      * This sets the flag indicating the preparation of plugin is done.
       
    68      *
       
    69      * @since S60 v5.0
       
    70      */   
       
    71     void PluginIsPrepared();
       
    72 
       
    73     /**
       
    74      * Boolean indicating is the Plugin already prepared.
       
    75      *
       
    76      * @since S60 v5.0
       
    77      * @return Boolean indicating is the Plugin already prepared.
       
    78      */     
       
    79     TBool IsPluginPrepared();
       
    80 
       
    81     /**
       
    82      * Enum for controlling plugin visiblity.
       
    83      *
       
    84      * @since S60 v5.0
       
    85      */    
       
    86     enum TPluginVisibility
       
    87         {
       
    88         EPluginVisibilityUnDefined = KErrNotFound,
       
    89         EPluginHidden,
       
    90         EPluginVisible
       
    91         };    
       
    92     
       
    93     /**
       
    94      * Getter for plugin visiblity.
       
    95      *
       
    96      * @since S60 v5.0
       
    97      * @return plugin visibility, see TPluginVisibility.
       
    98      */     
       
    99     TInt PluginVisibility();
       
   100 
       
   101     /**
       
   102      * Setter for plugin visiblity.
       
   103      *
       
   104      * @since S60 v5.0
       
   105      * @param aPluginVisibility, see enum TPluginVisibility.
       
   106      */    
       
   107     void SetPluginVisibility( TInt aPluginVisibility );    
       
   108     
       
   109 private:
       
   110     
       
   111     CCCAppPluginData( 
       
   112         CCCAppViewPluginBase& aPlugin );
       
   113     void ConstructL();    
       
   114 
       
   115 public:     
       
   116     /**
       
   117      * Cache for plugin bitmaps.
       
   118      */    
       
   119     CFbsBitmap* iPluginBitmap;
       
   120     CFbsBitmap* iPluginBitmapMask;
       
   121     
       
   122 private:
       
   123 
       
   124     /**
       
   125      * Pointer to actual plugin
       
   126      * Own.
       
   127      */
       
   128     CCCAppViewPluginBase& iPlugin;
       
   129     /**
       
   130      * To indicate if plugin is already prepared.
       
   131      * Own.
       
   132      */
       
   133     TBool iPluginIsPrepared;
       
   134 
       
   135     /**
       
   136      * Plugin visiblity, see enum TPluginVisibility.
       
   137      */    
       
   138     TInt iPluginVisibility;
       
   139 };
       
   140 
       
   141 #endif // __CCAPPLUGINDATA_H__
       
   142 //End of file