phonebookui/Phonebook2/ccapplication/ccapp/inc/tccapluginsorderinfo.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Range that is allocated for a plug-in.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef TCCAPluginsOrderInfo_H
       
    22 
       
    23 #define TCCAPluginsOrderInfo_H
       
    24 
       
    25 
       
    26 
       
    27 // INCLUDES
       
    28 
       
    29 #include <e32std.h>
       
    30 
       
    31 
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 
       
    35 class CImplementationInformation;
       
    36 
       
    37 
       
    38 
       
    39 /**
       
    40 
       
    41  * stores plugins order
       
    42 
       
    43  */
       
    44 
       
    45 struct TCCAPluginsOrderInfo
       
    46 
       
    47     { 
       
    48 
       
    49     
       
    50 
       
    51     public: 
       
    52 
       
    53         
       
    54 
       
    55     // CCA plugins can be seperated two 3 groups.
       
    56 
       
    57     //
       
    58 
       
    59     // group ECCAInHousePlugins: in-house CCAsXPExtension plugins impelemented by ourself
       
    60 
       
    61     // group ECCAPluginsInBothCCAAndNameList: CCA service plugins, whose corresponding
       
    62 
       
    63     //                                        phonebook main view sXP plugins exists.
       
    64 
       
    65     // group ECCAPluginsOnlyInCCA:  CCA service plugins, which exists only in CCA.
       
    66 
       
    67     enum TCCAPluginGroup
       
    68 
       
    69         {
       
    70 
       
    71         ECCAInHousePlugins = 0,
       
    72 
       
    73         ECCAPlugindInBothCCAAndNameList = 1,
       
    74 
       
    75         ECCAPluginsOnlyInCCA = 2
       
    76 
       
    77         };
       
    78 
       
    79     
       
    80 
       
    81     public: // Construction
       
    82 
       
    83        
       
    84 
       
    85         inline TCCAPluginsOrderInfo() : iPluginInfor(0),iOrder(0)
       
    86 
       
    87             {
       
    88 
       
    89             }
       
    90 
       
    91       
       
    92 
       
    93         static inline TInt SortByOrder( const TCCAPluginsOrderInfo& aFirst, 
       
    94 
       
    95                 const TCCAPluginsOrderInfo& aSecond )
       
    96 
       
    97             {
       
    98 
       
    99             if( aFirst.iOrder < aSecond.iOrder )
       
   100 
       
   101                 {
       
   102 
       
   103                 return -1;
       
   104 
       
   105                 }
       
   106 
       
   107             else if( aFirst.iOrder == aSecond.iOrder )
       
   108 
       
   109                 {
       
   110 
       
   111                 return 0;
       
   112 
       
   113                 }
       
   114 
       
   115             else
       
   116 
       
   117                 {
       
   118 
       
   119                 return 1;
       
   120 
       
   121                 }
       
   122 
       
   123             }
       
   124 
       
   125 
       
   126 
       
   127     public: // Data
       
   128 
       
   129 
       
   130 
       
   131         CImplementationInformation* iPluginInfor;
       
   132 
       
   133 
       
   134 
       
   135         // the order is opaque value after object just created,
       
   136 
       
   137         // array of TCCAPluginsOrderInfo will be sorted by this iOrder;
       
   138 
       
   139         TInt iOrder; 
       
   140 
       
   141         
       
   142 
       
   143         // store plugins group infor, CCA sXPExtension plugins are seperated into 3 groups.
       
   144 
       
   145         // ECCAInHousePlugins, ECCAPlugindInBothCCAAndNameList and ECCAPluginsOnlyInCCA
       
   146 
       
   147         TCCAPluginGroup iGroupInfo;
       
   148 
       
   149         //ETrue for legacy interface implementations        
       
   150         TBool iOldInterFaceType;
       
   151 
       
   152        
       
   153 
       
   154     };
       
   155 
       
   156     
       
   157 
       
   158 #endif // TCCAPluginsOrderInfo_H
       
   159 
       
   160 //End of file
       
   161