phonebookengines/VirtualPhonebook/inc/VPbkEngUtils.h
branchRCL_3
changeset 20 f4a778e096c2
parent 0 e686773b3f54
equal deleted inserted replaced
19:5b6f26637ad3 20:f4a778e096c2
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Virtual phonebook engine utils
       
    15 *
       
    16 */
       
    17 
       
    18 // Generic Virtual Phonebook utility classes and functions
       
    19 
       
    20 #ifndef VPBKENGUTILS_H
       
    21 #define VPBKENGUTILS_H
       
    22 
       
    23 #include <e32std.h>
       
    24 
       
    25 namespace VPbkEngUtils {
       
    26 
       
    27 // FUNCTIONS
       
    28 
       
    29     /**
       
    30      * Allocates or reallocates a buffer descriptor.
       
    31      *
       
    32      * @param aBuffer	the buffer descriptor to allocate or reallocate.
       
    33      * @param aLength	the minimum length required for the buffer descriptor.
       
    34      */
       
    35     void ExpandL(HBufC*& aBuffer, TInt aLength);
       
    36 
       
    37     /**
       
    38      * Reverses a descriptor.
       
    39      *
       
    40      * @param aBuffer   buffer to use for reversing. The buffer is allocated or
       
    41      *                  expaneded if needed.
       
    42      * @param aText     the descriptor to reverse.
       
    43      * @return the reversed descriptor.
       
    44      */
       
    45     const TDesC& ReverseL(HBufC*& aBuffer, const TDesC& aText);
       
    46 
       
    47     /**
       
    48      * Counts and returns the number of decimal digit characters in aText.
       
    49      */
       
    50     TInt CountDigits(const TDesC& aText);
       
    51 
       
    52 } // namespace VPbkEngUtils
       
    53 
       
    54 
       
    55 #endif //VPBKENGUTILS_H
       
    56 //End of file
       
    57 
       
    58