uiservicetab/vimpststorage/inc/vimpststorageutils.h
branchRCL_3
changeset 29 9a48e301e94b
parent 0 5e5d6b214f4f
equal deleted inserted replaced
28:3104fc151679 29:9a48e301e94b
       
     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:  Utils for vimpststorage
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __VIMPSTSTORAGEUTILS_H__
       
    20 #define __VIMPSTSTORAGEUTILS_H__
       
    21 
       
    22 #include    <e32base.h>
       
    23 #include    <s32strm.h>
       
    24 #include    <badesca.h>
       
    25 
       
    26 // FORWARD CLASS DECLERATIONS
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31  *  Utils for IMUiServiceTab modules. 
       
    32  */
       
    33 class VIMPSTStorageUtils   
       
    34 	{
       
    35 	public: // new methods
       
    36 
       
    37         /**
       
    38          * Case insensitive comparison of WVIDs, using protocol ("wv:") neutral
       
    39          * comparison.  The "wv:" part (actually everything up to the first
       
    40          * ":") is ignored in the comparison. If aDomainNeutral is ETrue, does
       
    41          * domain-neutral comparison with the following logic:
       
    42          *   - If only one of aId1 or aId2 (but not both) contains domain,
       
    43          *     domain-neutral comparison is done
       
    44          *   - If both or none of aId1 and aId2 contain domain, ordinary 
       
    45          *     wv-neutral comparison is done
       
    46          * If aDomainNeutral is EFalse, then falls back to the old way of 
       
    47          * comparing, i.e. wv-neutral only
       
    48          * @param aId1 The first id to compare (network-given)
       
    49          * @param aId2 The second id to compare
       
    50          * @param aDomainNeutral Do domain neutral comparison (ETrue, default)
       
    51          * @return -1, 0 or +1, like CompareC.
       
    52          * @since 2.5
       
    53          */
       
    54         static TInt NeutralCompare( const TDesC& aId1, const TDesC& aId2, TBool 
       
    55         	aDomainNeutral = ETrue );
       
    56         /**
       
    57          * Process userid/groupid/listid so that the "wv:" part is hidden,
       
    58          * depending on the branded setting coming from the UI.
       
    59          * @param aId The id to process
       
    60          * @return The id with the "wv:" (userid, groupid) or "wv:user" (listid) 
       
    61          * part hidden
       
    62          */
       
    63         static TPtrC DisplayId( const TDesC& aId, TBool aListHiding = EFalse );        
       
    64         
       
    65         
       
    66 	};
       
    67 
       
    68 #endif      // __VIMPSTSTORAGEUTILS_H__
       
    69 
       
    70 // End of File