ximpfw/tsrc/tsrcutils/testcaseutils/prfwtestpresencedatautils.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     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 "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: XIMP Framework Test Code prfwtestpresencedatautils.h
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef PRFWTESTPRESENCEDATAUTILS_H
       
    19 #define PRFWTESTPRESENCEDATAUTILS_H
       
    20 
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "presenceinfoimp.h"
       
    24 #include "presenceinfofilterimp.h"
       
    25 #include "ximpidentityimp.h"
       
    26 
       
    27 
       
    28 // CLASS DESCRIPTION
       
    29 /**
       
    30  * Helper class presence data comparison and generation.
       
    31  */
       
    32 class XIMPTestPresenceDataUtils
       
    33     {
       
    34 
       
    35 public:
       
    36 /**
       
    37  * Enumeration defining the supported
       
    38  * test data groups.
       
    39  * A, B and C have unique values.
       
    40  * The combinations are unions of those.
       
    41  */
       
    42 enum TPresenceDataGroup
       
    43     {
       
    44     Group_None,
       
    45     Group_A,
       
    46     Group_B,
       
    47     Group_C,
       
    48     Group_AB,
       
    49     Group_AC,
       
    50     Group_BC,
       
    51     Group_ABC,
       
    52     };
       
    53 
       
    54 // TODO Add the defined names here (if needed for verification).
       
    55 
       
    56 public: //Generator functions
       
    57     IMPORT_C static CXIMPIdentityImp* GenerateIdentityLC( const TDesC8* aPrefix, TPresenceDataGroup aGroup = Group_None );
       
    58     IMPORT_C static CPresenceInfoImp* GenerateInfoLC( const TDesC8* aPrefix, TPresenceDataGroup aGroup = Group_None );
       
    59     IMPORT_C static CPresenceInfoFilterImp* GenerateInfoFilterLC( const TDesC8* aPrefix, TPresenceDataGroup aGroup = Group_None );
       
    60     
       
    61 public: //Comparator functions
       
    62 
       
    63     // Contains. All a1 info are in a2
       
    64     IMPORT_C TBool Contains( MPresenceInfo& a1, MPresenceInfo& a2 ) const;
       
    65 
       
    66     
       
    67     // Equality comparison
       
    68     IMPORT_C TBool Equals( CPresenceInfoImp& a1, CPresenceInfoImp& a2 ) const;
       
    69 
       
    70     // Equality assertion
       
    71     // TODO these are containment currently. Used by t_dmattrobjs. Modify...
       
    72     IMPORT_C static void AssertEquality( MPresenceInfo& a1,
       
    73                                    MPresenceInfo& a2 );
       
    74 
       
    75 //private: // Helpers
       
    76     IMPORT_C static void InsertPrefixL( const TDesC8* aPrefix, RBuf8& buf );
       
    77     };
       
    78 
       
    79 #endif //PRFWTESTPRESENCEDATAUTILS_H
       
    80 
       
    81