pushmtm/Plugins/PushContentHandler/PushMtmCacheDataSupplier.cpp
branchRCL_3
changeset 69 4455192101e4
parent 65 8e6fa1719340
equal deleted inserted replaced
65:8e6fa1719340 69:4455192101e4
     1 /*
       
     2 * Copyright (c) 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 the License "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:  Data supplier for responses loaded from cache
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 // INCLUDE FILES
       
    21 #include "PushMtmCacheDataSupplier.h"
       
    22 
       
    23 // EXTERNAL DATA STRUCTURES
       
    24 
       
    25 // EXTERNAL FUNCTION PROTOTYPES
       
    26 
       
    27 // CONSTANTS
       
    28 
       
    29 // MACROS
       
    30 
       
    31 // LOCAL CONSTANTS AND MACROS
       
    32 
       
    33 // MODULE DATA STRUCTURES
       
    34 
       
    35 // LOCAL FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 
       
    39 // ============================= LOCAL FUNCTIONS ===============================
       
    40 
       
    41 
       
    42 // ============================ MEMBER FUNCTIONS ===============================
       
    43 
       
    44 // -----------------------------------------------------------------------------
       
    45 // CPushMtmCacheDataSupplier::CPushMtmCacheDataSupplier
       
    46 // C++ default constructor can NOT contain any code, that
       
    47 // might leave.
       
    48 // -----------------------------------------------------------------------------
       
    49 //
       
    50 CPushMtmCacheDataSupplier::CPushMtmCacheDataSupplier(
       
    51     HBufC8* aBody ) 
       
    52     : iBody( aBody )
       
    53     {
       
    54     }
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 // CPushMtmCacheDataSupplier::NewL
       
    58 // Two-phased constructor.
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 CPushMtmCacheDataSupplier* CPushMtmCacheDataSupplier::NewL(
       
    62     HBufC8* aBody )
       
    63     {
       
    64     CPushMtmCacheDataSupplier* self = new(ELeave) CPushMtmCacheDataSupplier( aBody );
       
    65     return self;
       
    66     }
       
    67 
       
    68 // Destructor
       
    69 CPushMtmCacheDataSupplier::~CPushMtmCacheDataSupplier()
       
    70     {
       
    71     ReleaseData();
       
    72     }
       
    73 
       
    74 // -----------------------------------------------------------------------------
       
    75 // CPushMtmCacheDataSupplier::GetNextDataPart
       
    76 // Return the next chunk of response body from the Cache
       
    77 // -----------------------------------------------------------------------------
       
    78 //
       
    79 TBool CPushMtmCacheDataSupplier::GetNextDataPart(
       
    80     TPtrC8 &aDataChunk )
       
    81     {
       
    82     aDataChunk.Set( *iBody );
       
    83     return ETrue;
       
    84     }
       
    85 
       
    86 //  End of File