phonebookui/Phonebook/Engine/inc/MPbkCompressionStrategy.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 2002 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 *      Interface for Phonebook database compression strategy.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __MPbkCompressionStrategy_H__
       
    21 #define __MPbkCompressionStrategy_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32def.h>
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MPbkCompressUi;
       
    29 
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * Abstract interface for Phonebook database compression strategy.
       
    35  */
       
    36 class MPbkCompressionStrategy
       
    37     {
       
    38     public: // Interface
       
    39         /**
       
    40          * Sets the compress UI.
       
    41 		 * @param aComressUi the compress UI
       
    42          */
       
    43         virtual void SetCompressUi(MPbkCompressUi* aCompressUi) =0;
       
    44 
       
    45         /**
       
    46          * Returns ETrue if the database could use a compression.
       
    47          */
       
    48         virtual TBool CheckCompress() =0;
       
    49 
       
    50         /**
       
    51          * Returns true if compression is currently enabled.
       
    52          */
       
    53         virtual TBool IsCompressionEnabled() =0;
       
    54 
       
    55         /**
       
    56          * Compresses the database asynchronously. Implementation can decide
       
    57          * whether to start compression or not. Calls back the compress UI on 
       
    58          * the compression progress.
       
    59          */
       
    60         virtual void CompressL() =0;
       
    61 
       
    62         /**
       
    63          * Stops any compression currently executing.
       
    64          */
       
    65         virtual void CancelCompress() =0;
       
    66 
       
    67         /**
       
    68          * Releases this object and any resources it owns.
       
    69          */
       
    70         virtual void Release() =0;
       
    71 
       
    72     protected:
       
    73         /**
       
    74          * Protected destructor. Clients of this interface should call
       
    75          * Release() when they no longer need it.
       
    76          */
       
    77         virtual ~MPbkCompressionStrategy() { }
       
    78     };
       
    79 
       
    80 
       
    81 #endif // __MPbkCompressionStrategy_H__
       
    82 
       
    83 // End of File