homescreenpluginsrv/hspstools/inc/hspsbytebuffer.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Header for ChspsByteBuffer.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HSPS_BYTEBUFFER_H
       
    19 #define HSPS_BYTEBUFFER_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32std.h>
       
    23 #include <e32base.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28  *  ChspsByteBuffer
       
    29  * 
       
    30  */
       
    31 class ChspsByteBuffer : public CBase
       
    32     {
       
    33 public:
       
    34     /**
       
    35      * Destructor.
       
    36      */
       
    37     ~ChspsByteBuffer();
       
    38 
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      * 
       
    42      * @param aSize     Size of buffer.
       
    43      */
       
    44     static ChspsByteBuffer* NewL( const TInt aSize );
       
    45 
       
    46     /**
       
    47      * Access data.
       
    48      * 
       
    49      * @return  TUint*  Pointer to actual buffer.
       
    50      */
       
    51     TUint8* Buffer();    
       
    52     
       
    53     /**
       
    54      * Access size
       
    55      * 
       
    56      * @return  TInt    Buffer size.
       
    57      */
       
    58     TInt Size();    
       
    59     
       
    60 private:
       
    61     /**
       
    62      * Constructor for performing 1st stage construction
       
    63      */
       
    64     ChspsByteBuffer();
       
    65 
       
    66     /**
       
    67      * EPOC default constructor for performing 2nd stage construction
       
    68      * 
       
    69      * @param aSize     Size of buffer.
       
    70      */
       
    71     void ConstructL( const TInt aSize );
       
    72 
       
    73 private:
       
    74     /**
       
    75      * Size of buffer.
       
    76      */
       
    77     TInt iSize;
       
    78     
       
    79     /**
       
    80      * Pointer to actual data.
       
    81      */
       
    82     TUint8* iBuffer;    
       
    83     };
       
    84 
       
    85 #endif // HSPS_BYTEBUFFER_H