devicediagnosticsfw/diagresultsdb/client/inc/diagresultsdbrecordinfoarraypacked.h
branchRCL_3
changeset 26 19bba8228ff0
parent 0 b497e44ab2fc
equal deleted inserted replaced
25:b183ec05bd8c 26:19bba8228ff0
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:  Contains functions to pack or unpack test record info array.
       
    15 *  libraries   : DiagResultsDatabase.lib DiagResultsDatabase.dll
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef DIAGNOSTICS_RESULTS_DB_RECORD_INFO_ARRAY_PACKED_H
       
    21 #define DIAGNOSTICS_RESULTS_DB_RECORD_INFO_ARRAY_PACKED_H
       
    22 
       
    23 #include "diagresultsdatabasetestrecordinfo.h"
       
    24 
       
    25 class CBufFlat;
       
    26 
       
    27 /**
       
    28 * Pack or unpack a CBufFlat buffer. This can be used to deliver data
       
    29 * across process boundaries using a flat buffer.
       
    30 *
       
    31 * @since S60 v5.0
       
    32 **/
       
    33 class TDiagResultsDbRecordInfoArrayPacked
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38     * Constructor
       
    39     * @param aBuffer Flat buffer where the array of test records is written.
       
    40     **/
       
    41     IMPORT_C TDiagResultsDbRecordInfoArrayPacked(CBufFlat*& aBuffer);
       
    42 
       
    43     /**
       
    44     * Packs a test record into the flat buffer.
       
    45     * @param aInfoArray An array of test records that are written into the buffer.
       
    46     **/
       
    47     IMPORT_C void PackArrayL(const CArrayFixFlat<TDiagResultsDatabaseTestRecordInfo>& aInfoArray);
       
    48     
       
    49     /**
       
    50     * Unpack array from the buffer.
       
    51     * @param aInfoArray Contains the unpacked array after function finishes.
       
    52     **/
       
    53     IMPORT_C void UnpackArrayL(CArrayFixFlat<TDiagResultsDatabaseTestRecordInfo>& aInfoArray);
       
    54         
       
    55 private:
       
    56 
       
    57     // Buffer that contains data.
       
    58     CBufFlat *& iBuffer;
       
    59     
       
    60     };
       
    61     
       
    62 #endif