uiservicetab/vimpstui/inc/cvimpstuiextensionviewinfo.h
branchRCL_3
changeset 28 3104fc151679
parent 27 2b7283837edb
child 29 9a48e301e94b
equal deleted inserted replaced
27:2b7283837edb 28:3104fc151679
     1 /*
       
     2 * Copyright (c) 2008 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: Header for Extension View info
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VIMPSTUIEXTENSIONVIEWINFO_H
       
    20 #define C_VIMPSTUIEXTENSIONVIEWINFO_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <MxSPViewInfo.h>
       
    24 
       
    25 /**
       
    26  *  Extension View Info
       
    27  *
       
    28  *  This class encapsulates xSP Extension View Info data
       
    29  *
       
    30  *  @lib vimpstui.lib
       
    31  *  @since S60 v5.0
       
    32  */
       
    33 class CVIMPSTUIExtensionViewInfo : public CBase,   
       
    34                                     public MxSPViewInfo
       
    35     {
       
    36 
       
    37 public:
       
    38 
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      * @param aViewId, view id.
       
    42      * @param aIsTabbedView, ETrue if its a tabbed view, else EFlase.
       
    43      * @param aIconFile, reference to icon file used to display icon in the tab.
       
    44      * @param aIconId, icon id.
       
    45      * @param aMaskId, mask id.
       
    46      * @param aServiceName, name of the service.
       
    47      */
       
    48     static CVIMPSTUIExtensionViewInfo* NewL(
       
    49         TUint32 aViewId,
       
    50         TBool aIsTabbedView,
       
    51         const TDesC& aIconFile,
       
    52         TUint aIconId,
       
    53         TUint aMaskId,
       
    54         const TDesC& aServiceName );
       
    55 
       
    56     /**
       
    57      * Two-phased constructor.
       
    58      * @param aViewId, view id.
       
    59      * @param aIsTabbedView, ETrue if its a tabbed view, else EFlase.
       
    60      * @param aIconFile, reference to icon file used to display icon in the tab.
       
    61      * @param aIconId, icon id.
       
    62      * @param aMaskId, mask id.
       
    63      * @param aServiceName, name of the service.
       
    64      */
       
    65     static CVIMPSTUIExtensionViewInfo* NewLC(
       
    66         TUint32 aViewId,
       
    67         TBool aIsTabbedView,
       
    68         const TDesC& aIconFile,
       
    69         TUint aIconId,
       
    70         TUint aMaskId,
       
    71         const TDesC& aServiceName );
       
    72     
       
    73     /**
       
    74      * Standard C++ destructor
       
    75      */    
       
    76     ~CVIMPSTUIExtensionViewInfo();
       
    77     
       
    78 public: //MxSPViewInfo
       
    79 
       
    80     /**
       
    81      * @see MxSPViewInfo
       
    82      * Returns old view id.
       
    83      *
       
    84      * @return, TInt32, old view id
       
    85      */    
       
    86     TInt32 OldViewId() const;
       
    87 
       
    88     /**
       
    89      * @see MxSPViewInfo
       
    90      * Returns ETrue if this is tabbed view
       
    91      *
       
    92      * @return, TBool, tabbed or not
       
    93      */    
       
    94     TBool TabView() const;
       
    95     
       
    96     /**
       
    97      * @see MxSPViewInfo
       
    98      * Returns tab icon id
       
    99      *
       
   100      * @return, TInt32, tab icon id
       
   101      */            
       
   102     TInt32 TabIconId() const;
       
   103     
       
   104     /**
       
   105      * @see MxSPViewInfo
       
   106      * Returns tab mask id
       
   107      *
       
   108      * @return, TInt32, tab mask id
       
   109      */                    
       
   110     TInt32 TabMaskId() const;
       
   111 
       
   112     /**
       
   113      * @see MxSPViewInfo
       
   114      * Returns tab icon file
       
   115      *
       
   116      * @return, TDesC&, file and path of icon file
       
   117      */                    
       
   118     const TDesC& TabIconFile() const;
       
   119     
       
   120     /**
       
   121      * @see MxSPViewInfo
       
   122      * Returns tab/service name
       
   123      *
       
   124      * @return, TDesC&, tab/service name
       
   125      */                            
       
   126     const TDesC& Name() const;
       
   127     
       
   128     /**
       
   129      * @see MxSPViewInfo
       
   130      * Returns sort icon id
       
   131      *
       
   132      * @return, TInt32, sort icon id
       
   133      */                                    
       
   134     TInt32 SortIconId() const;
       
   135     
       
   136     /**
       
   137      * @see MxSPViewInfo
       
   138      * Returns sort mask id
       
   139      *
       
   140      * @return, TInt32, sort mask id
       
   141      */                                     
       
   142     TInt32 SortMaskId() const;
       
   143     
       
   144     /**
       
   145      * @see MxSPViewInfo
       
   146      * Returns sort icon file.
       
   147      *
       
   148      * @return, TDesC&, sort icon file name/path
       
   149      */                                  
       
   150     const TDesC& SortIconFile() const;       
       
   151 
       
   152 private: // Implementation
       
   153 
       
   154     /**
       
   155      * Standard C++ constructor.
       
   156      * @param aViewId, view id.
       
   157      * @param aIsTabbedView, ETrue if ita a tabbed view, else EFalse.
       
   158      * @parma aIconId, icon id.
       
   159      * @parma aMaskId, mask id.
       
   160      */    
       
   161     CVIMPSTUIExtensionViewInfo( TUint32 aViewId,
       
   162         TBool aIsTabbedView, TUint aIconId, TUint aMaskId );
       
   163     
       
   164     /**
       
   165      * Performs the 2nd phase of construction.
       
   166      * @param aIconFile, icon file path
       
   167      * @param aServiceName, name of the service
       
   168      */        
       
   169     void ConstructL( const TDesC& aIconFile,
       
   170         const TDesC& aServiceName );
       
   171 
       
   172 private: // data
       
   173 
       
   174     // own, icon file path
       
   175     HBufC*  iIconFile;
       
   176     
       
   177     // Own, service name
       
   178     HBufC*  iServiceName;
       
   179     
       
   180     // View id
       
   181     TUint32 iViewId;
       
   182     
       
   183     // Is tabbed view info or not
       
   184     TBool   iIsTabbedView;
       
   185     
       
   186     // Icon id
       
   187     TUint   iIconId;
       
   188     
       
   189     // Mask id
       
   190     TUint   iMaskId;
       
   191     };
       
   192 
       
   193 #endif // C_VIMPSTUIEXTENSIONVIEWINFO_H