contentpublishingsrv/contentpublishingutils/pluginvalidator/inc/cblacklisthandler.h
changeset 73 4bc7b118b3df
parent 66 32469d7d46ff
child 80 397d00875918
child 81 5ef31a21fdd5
equal deleted inserted replaced
66:32469d7d46ff 73:4bc7b118b3df
     1 /*
       
     2 * Copyright (c) 2006-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:  
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef CBLACKLISTHANDLER_H_
       
    19 #define CBLACKLISTHANDLER_H_
       
    20 
       
    21 //INCLUDES
       
    22 #include <e32base.h>
       
    23 
       
    24 //FORWARD DECLARATIONS
       
    25 class CRepository;
       
    26 
       
    27 /*
       
    28  * Blacklist Handler 
       
    29  */
       
    30 NONSHARABLE_CLASS( CBlacklistHandler ): public CBase
       
    31     {
       
    32 public:
       
    33 
       
    34     /**
       
    35      * Two-phased constructor.
       
    36      * 
       
    37      */     
       
    38     static CBlacklistHandler* NewL(  );
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      * 
       
    43      */     
       
    44     static CBlacklistHandler* NewLC( );
       
    45     
       
    46     /**
       
    47      * Desctructor.
       
    48      */     
       
    49     ~CBlacklistHandler();
       
    50 
       
    51      /*
       
    52       * Appends plugin UID to blacklist
       
    53       * @param aUid uid of the plugin
       
    54       */
       
    55      void AppendL( TUid aUid );    
       
    56 
       
    57      /*
       
    58       * Removes plugin UID from blacklist
       
    59       * @param aUid uid of the plugin
       
    60       */
       
    61      void RemoveL( TUid aUid );    
       
    62        
       
    63      /*
       
    64       * Checks if plugin with provided UID is on the blacklist
       
    65       * @param aUid uid of the plugin
       
    66       */
       
    67      TBool IsPresentL( TUid aUid );    
       
    68 
       
    69      /*
       
    70       * Copies blacklist unofficial blacklist to official 
       
    71       * 	if flag is set to EFalse and official to unofficial if flag = ETrue
       
    72       * @param aUnofficialToOfficial flag indicating which blacklist 
       
    73       * 	should be copied
       
    74       */
       
    75      void CopyBlacklistL( TBool aOfficialToUnofficial );
       
    76     
       
    77 private:
       
    78 
       
    79     /**
       
    80      * C++ default constructor.
       
    81      */    
       
    82 	CBlacklistHandler( );
       
    83 
       
    84     /**
       
    85      * Perform the second phase construction of a CPluginValidator object.
       
    86      */    
       
    87     void ConstructL();
       
    88      
       
    89     /*
       
    90      * Gets blacklist array from CPS 
       
    91      */
       
    92     void GetArrayL( RArray<TUid>& aArray, TBool aOfficial );
       
    93 
       
    94     /*
       
    95      * Stores blacklist array in CPS
       
    96      */
       
    97     void StoreArrayL( const RArray<TUid>& aArray, TBool aOfficial );   
       
    98 
       
    99 private:
       
   100     
       
   101     /**
       
   102      * Provides access to repository
       
   103      * Own
       
   104      */
       
   105     CRepository* iRepository;
       
   106 	};
       
   107 
       
   108 #endif /* CBLACKLISTHANDLER_H_ */