videoutils_plat/videoconnutility_api/tsrc/VCXTestCommon/src/IptvTestUtilALR.cpp
changeset 3 bdf78597b41c
parent 1 17b6bb2b14ba
child 15 6c92a12abac0
--- a/videoutils_plat/videoconnutility_api/tsrc/VCXTestCommon/src/IptvTestUtilALR.cpp	Mon Jan 18 21:13:36 2010 +0200
+++ b/videoutils_plat/videoconnutility_api/tsrc/VCXTestCommon/src/IptvTestUtilALR.cpp	Tue Jan 26 12:55:56 2010 +0200
@@ -912,6 +912,51 @@
     }
 
 // ---------------------------------------------------------------------------
+// CIptvTestUtilALR::SetDefaultIapCenRep
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CIptvTestUtilALR::SetDefaultIapCenRep()
+    {
+    TUint32 iap( 0 );
+    iap = GetDefaultIap();
+    TInt err( 0 );
+    
+    if( iap != 0 )
+        {
+        VCXLOGLO1("CIptvTestUtilALR::SetDefaultIapCenRep Create cenrep.");
+        CRepository* cenRep = CRepository::NewLC( VCXTEST_KIptvAlrCenRepUid );
+        VCXLOGLO1("CIptvTestUtilALR::SetDefaultIapCenRep Set cenrep.");
+        User::LeaveIfError( cenRep->Set( VCXTEST_KIptvCenRepDefaultIapIdKey, (TInt)iap ) );
+        CleanupStack::PopAndDestroy( cenRep );
+        }
+    else
+        {
+        err = KErrNotFound;
+        }
+    
+    return err;   
+    }
+
+// ---------------------------------------------------------------------------
+// CIptvTestUtilALR::GetDefaultIap
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TUint32 CIptvTestUtilALR::GetDefaultIapCenRep()
+    {
+    TInt iap( 0 );
+    
+    VCXLOGLO1("CIptvTestUtilALR::GetDefaultIapCenRep Create cenrep.");
+    CRepository* cenRep = CRepository::NewLC( VCXTEST_KIptvAlrCenRepUid );
+    VCXLOGLO1("CIptvTestUtilALR::GetDefaultIapCenRep Set cenrep.");
+    User::LeaveIfError( cenRep->Get( VCXTEST_KIptvCenRepDefaultIapIdKey, iap) );
+    CleanupStack::PopAndDestroy( cenRep );
+    
+    TUint32 iapId( iap );
+    
+    return iapId;
+    }
+
+// ---------------------------------------------------------------------------
 // CIptvTestUtilALR::PrintDestinationL
 // ---------------------------------------------------------------------------
 //