ximpfw/tsrc/tsrcutils/testcaseutils/prfwtestpresencedatautils.cpp
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.cpp
       
    15 *
       
    16 */
       
    17 
       
    18 #include "prfwtestpresencedatautils.h"
       
    19 #include "prfwtestcaseutilspanics.h"
       
    20 #include <eunitmacros.h>
       
    21 
       
    22 #include "ximprbufhelpers.h"
       
    23 
       
    24 // ============================ MEMBER FUNCTIONS ===============================
       
    25 
       
    26 
       
    27 // Generation
       
    28 // -----------------------------------------------------------------------------
       
    29 // XIMPTestPresenceDataUtils::GenerateIdentityLC()
       
    30 // -----------------------------------------------------------------------------
       
    31 //
       
    32 EXPORT_C CXIMPIdentityImp*
       
    33     XIMPTestPresenceDataUtils::GenerateIdentityLC(
       
    34                             const TDesC8* aPrefix,
       
    35                             TPresenceDataGroup aGroup )
       
    36     {
       
    37     // According to Group:
       
    38     //   Generate uri
       
    39     _LIT16( KUri, "http://google.com" );
       
    40 
       
    41     //   Generate protocolAddr
       
    42     _LIT16( KProtocolAddress, "protocollll" );
       
    43     
       
    44     CXIMPIdentityImp* pres = CXIMPIdentityImp::NewLC( KUri );
       
    45     return pres;    
       
    46     }
       
    47 
       
    48 
       
    49 
       
    50 // -----------------------------------------------------------------------------
       
    51 // XIMPTestPresenceDataUtils::GenerateInfoLC()
       
    52 // -----------------------------------------------------------------------------
       
    53 //
       
    54 EXPORT_C CPresenceInfoImp*
       
    55     XIMPTestPresenceDataUtils::GenerateInfoLC(
       
    56                             const TDesC8* aPrefix,
       
    57                             TPresenceDataGroup aGroup )
       
    58     {
       
    59     CPresenceInfoImp* doc = CPresenceInfoImp::NewLC();
       
    60     return doc;
       
    61     }
       
    62     
       
    63 // -----------------------------------------------------------------------------
       
    64 // XIMPTestPresenceDataUtils::GenerateInfoFilterLC()
       
    65 // -----------------------------------------------------------------------------
       
    66 //        
       
    67 EXPORT_C CPresenceInfoFilterImp* 
       
    68     XIMPTestPresenceDataUtils::GenerateInfoFilterLC( const TDesC8* aPrefix, 
       
    69                                                      TPresenceDataGroup aGroup )
       
    70     {
       
    71     CPresenceInfoFilterImp* pif = CPresenceInfoFilterImp::NewLC();
       
    72     return pif;
       
    73     }
       
    74     
       
    75 
       
    76 
       
    77 
       
    78 // -----------------------------------------------------------------------------
       
    79 // XIMPTestPresenceDataUtils::InsertPrefixL
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 EXPORT_C void XIMPTestPresenceDataUtils::InsertPrefixL( const TDesC8* aPrefix, RBuf8& buf )
       
    83     {
       
    84     if ( aPrefix )
       
    85         {
       
    86         XIMPRBuf8Helper::GrowIfNeededL( buf, aPrefix->Length() + buf.Length() );
       
    87         buf.Insert( 0, *aPrefix );
       
    88         }
       
    89     }
       
    90 
       
    91 // -----------------------------------------------------------------------------
       
    92 // XIMPTestPresenceDataUtils::Contains()
       
    93 // -----------------------------------------------------------------------------
       
    94 //
       
    95 EXPORT_C TBool XIMPTestPresenceDataUtils::Contains( MPresenceInfo& a1,
       
    96                                                     MPresenceInfo& a2 ) const
       
    97     {
       
    98     return ETrue;
       
    99     }
       
   100 
       
   101 
       
   102 
       
   103 // -----------------------------------------------------------------------------
       
   104 // XIMPTestPresenceDataUtils::Equals()
       
   105 // -----------------------------------------------------------------------------
       
   106 //
       
   107 EXPORT_C TBool XIMPTestPresenceDataUtils::Equals( CPresenceInfoImp& a1,
       
   108                                                   CPresenceInfoImp& a2 ) const
       
   109     {
       
   110     return ETrue;
       
   111     }
       
   112 
       
   113 
       
   114 
       
   115 // -----------------------------------------------------------------------------
       
   116 // XIMPTestPresenceDataUtils::AssertEquality()
       
   117 // -----------------------------------------------------------------------------
       
   118 //
       
   119 EXPORT_C void XIMPTestPresenceDataUtils::AssertEquality(
       
   120     MPresenceInfo& a1,
       
   121     MPresenceInfo& a2 )
       
   122     {
       
   123     }
       
   124 
       
   125 
       
   126 
       
   127 
       
   128 // end of file
       
   129