filemanager/bkupengine/src/CMMCScBkupDataOwnerInfo.cpp
changeset 0 6a9f87576119
equal deleted inserted replaced
-1:000000000000 0:6a9f87576119
       
     1 /*
       
     2 * Copyright (c) 2005 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: CMMCScBkupDataOwnerInfo implementation
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 #include "CMMCScBkupDataOwnerInfo.h"
       
    20 
       
    21 // System includes
       
    22 #include <s32strm.h>
       
    23 
       
    24 // User includes
       
    25 #include "MMCScBkupLogger.h"
       
    26 #include "MMCScBkupSBEUtils.h"
       
    27 #include "MMMCScBkupArchiveDataInterface.h"
       
    28 #include "CMMCScBkupDriveDataSizeManager.h"
       
    29 
       
    30 // Constants
       
    31 _LIT_SECURE_ID(KMMCScBkupUninitialisedSecureId, 0);
       
    32 
       
    33 
       
    34 // ========================= MEMBER FUNCTIONS ================================
       
    35 
       
    36 // ---------------------------------------------------------------------------
       
    37 // CMMCScBkupDataOwnerInfo::CMMCScBkupDataOwnerInfo()
       
    38 // 
       
    39 // C++ constructor.
       
    40 // ---------------------------------------------------------------------------
       
    41 CMMCScBkupDataOwnerInfo::CMMCScBkupDataOwnerInfo( CDataOwnerInfo* aOwner )
       
    42 :   iDataOwner(aOwner), iVersion(EStreamFormatVersionLatest-1)
       
    43     {
       
    44     SetStatus(EUnset);
       
    45     //
       
    46     iSecureId = KMMCScBkupUninitialisedSecureId;
       
    47     }
       
    48 
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CMMCScBkupDataOwnerInfo::~CMMCScBkupDataOwnerInfo()
       
    52 // 
       
    53 // Destructor.
       
    54 // ---------------------------------------------------------------------------
       
    55 CMMCScBkupDataOwnerInfo::~CMMCScBkupDataOwnerInfo()
       
    56     {
       
    57     delete iDataOwner;
       
    58     delete iOperationalSize;
       
    59     }
       
    60 
       
    61 
       
    62 // ---------------------------------------------------------------------------
       
    63 // CMMCScBkupDataOwnerInfo::ConstructL()
       
    64 // 
       
    65 // 
       
    66 // ---------------------------------------------------------------------------
       
    67 void CMMCScBkupDataOwnerInfo::ConstructL()
       
    68     {
       
    69     if  ( iOperationalSize == NULL )
       
    70         {
       
    71         iOperationalSize = CMMCScBkupDataTypeSizer::NewL();
       
    72         }
       
    73 
       
    74     // Try and extract the SID if its a package or a SID type
       
    75     const TSBDerivedType type = iDataOwner->Identifier().DerivedTypeL();
       
    76     //
       
    77     if  (type == ESIDDerivedType || type == EPackageDerivedType)
       
    78         {
       
    79         iSecureId = MMCScBkupSBEUtils::SecureIdFromGenericL(iDataOwner->Identifier());
       
    80         if( iSecureId.iId == KNullUid.iUid && iVersion > EStreamFormatVersion1 )
       
    81             {
       
    82             iSecureId = MMCScBkupSBEUtils::PackageIdFromGenericL(iDataOwner->Identifier());
       
    83             }
       
    84         }
       
    85 
       
    86     // The following code sets the completion status to ETrue
       
    87     // for any irrelevant items associated with a data owner. I.e. if
       
    88     // a data owner doesn't support active backup, then it sets the completion
       
    89     // of active backup to ETrue. This makes writing the logic inside the
       
    90     // active/passive/system backup items a little easier (active in particular)
       
    91     const TBool hasJavaData = HasJavaDataL();
       
    92     const TBool hasActiveData = HasActiveDataL();
       
    93     const TBool hasPassiveData = HasPassiveDataL();
       
    94     const TBool hasPublicData = HasPublicDataL();
       
    95     const TBool hasSystemData = HasSystemDataL();
       
    96 
       
    97     // Update completion statuses (i.e. "what work must be done")
       
    98     SetCompletionStatus( EMMCScBkupOwnerDataTypeJavaData, !hasJavaData );
       
    99     SetCompletionStatus( EMMCScBkupOwnerDataTypeActiveData, !hasActiveData );
       
   100     SetCompletionStatus( EMMCScBkupOwnerDataTypePassiveData, !hasPassiveData );
       
   101     SetCompletionStatus( EMMCScBkupOwnerDataTypePublicData, !hasPublicData );
       
   102     SetCompletionStatus( EMMCScBkupOwnerDataTypeSystemData, !hasSystemData );
       
   103     
       
   104     // Be aware that CMMCScBkupStateRequestSizeOfDataOwner::GetJavaDataSizesL() can
       
   105     // manipulate the passive data completion status depending on whether the midlet
       
   106     // has associated data files.
       
   107     
       
   108     // If we're logging, then we write out some useful debugging info that shows
       
   109     // which operations must be performed for each D.O.
       
   110 #ifdef __MMCSCBKUPLOGGING_ENABLED__
       
   111     TBuf<256> drivePrint;
       
   112     const TDriveList& driveList = iDataOwner->DriveList();
       
   113     
       
   114     for(TInt i=0; i<KMaxDrives; i++)
       
   115         {
       
   116         if  (driveList[i] != 0)
       
   117             {
       
   118             const TDriveUnit driveUnit(i);
       
   119             const TDriveName name(driveUnit.Name());
       
   120             drivePrint.Append(name);
       
   121             if  (i < KMaxDrives - 1)
       
   122                 {
       
   123                 drivePrint.Append(_L(", "));
       
   124                 }
       
   125             }
       
   126         }
       
   127 
       
   128     if ( hasJavaData )
       
   129         {
       
   130         HBufC* hash = MMCScBkupSBEUtils::JavaHashFromGenericLC( iDataOwner->Identifier() );
       
   131         __LOG7("CMMCScBkupDataOwnerInfo::ConstructL() - PubD: %d, ActD: %d, PasD: %d, JavD: %d, SysD: %d, drives: %S, hash: %S", hasPublicData, hasActiveData, hasPassiveData, hasJavaData, hasSystemData, &drivePrint, hash);
       
   132         CleanupStack::PopAndDestroy( hash );
       
   133         }
       
   134     else
       
   135         {
       
   136         __LOG8("CMMCScBkupDataOwnerInfo::ConstructL() - PubD: %d, ActD: %d, PasD: %d, JavD: %d, SysD: %d, drives: %S, SID : 0x%08x %S", hasPublicData, hasActiveData, hasPassiveData, hasJavaData, hasSystemData, &drivePrint, iSecureId.iId, &MMCScBkupLogger::FriendlyNameForSID( iSecureId ));
       
   137         }
       
   138 #endif
       
   139     }
       
   140 
       
   141 
       
   142 // ---------------------------------------------------------------------------
       
   143 // CMMCScBkupDataOwnerInfo::New()
       
   144 // 
       
   145 // 
       
   146 // ---------------------------------------------------------------------------
       
   147 CMMCScBkupDataOwnerInfo* CMMCScBkupDataOwnerInfo::New( TSecureId aSecureId )
       
   148     {
       
   149     CMMCScBkupDataOwnerInfo* self = new CMMCScBkupDataOwnerInfo( NULL );
       
   150     if  (self)
       
   151         {
       
   152         self->iSecureId = aSecureId;
       
   153         }
       
   154     return self;
       
   155     }
       
   156 
       
   157 
       
   158 // ---------------------------------------------------------------------------
       
   159 // CMMCScBkupDataOwnerInfo::NewLC()
       
   160 // 
       
   161 // 
       
   162 // ---------------------------------------------------------------------------
       
   163 CMMCScBkupDataOwnerInfo* CMMCScBkupDataOwnerInfo::NewLC( CDataOwnerInfo* aOwner )
       
   164     {
       
   165     CleanupStack::PushL(aOwner);
       
   166     CMMCScBkupDataOwnerInfo* self = new(ELeave) CMMCScBkupDataOwnerInfo( aOwner );
       
   167     CleanupStack::Pop(aOwner);
       
   168     CleanupStack::PushL(self);
       
   169     self->ConstructL();
       
   170     return self;
       
   171     }
       
   172 
       
   173 
       
   174 // ---------------------------------------------------------------------------
       
   175 // CMMCScBkupDataOwnerInfo::NewLC()
       
   176 // 
       
   177 // 
       
   178 // ---------------------------------------------------------------------------
       
   179 CMMCScBkupDataOwnerInfo* CMMCScBkupDataOwnerInfo::NewLC( RReadStream& aStream )
       
   180     {
       
   181     CMMCScBkupDataOwnerInfo* self = new(ELeave) CMMCScBkupDataOwnerInfo();
       
   182     CleanupStack::PushL(self);
       
   183     aStream >> *self;
       
   184     self->ConstructL();
       
   185     return self;
       
   186     }
       
   187 
       
   188 
       
   189 // ---------------------------------------------------------------------------
       
   190 // CMMCScBkupDataOwnerInfo::Owner()
       
   191 // 
       
   192 // 
       
   193 // ---------------------------------------------------------------------------
       
   194 CDataOwnerInfo& CMMCScBkupDataOwnerInfo::Owner()
       
   195     {
       
   196     return *iDataOwner;
       
   197     }
       
   198 
       
   199 
       
   200 // ---------------------------------------------------------------------------
       
   201 // CMMCScBkupDataOwnerInfo::Owner()
       
   202 // 
       
   203 // 
       
   204 // ---------------------------------------------------------------------------
       
   205 const CDataOwnerInfo& CMMCScBkupDataOwnerInfo::Owner() const
       
   206     {
       
   207     return *iDataOwner;
       
   208     }
       
   209 
       
   210 
       
   211 // ---------------------------------------------------------------------------
       
   212 // CMMCScBkupDataOwnerInfo::Status()
       
   213 // 
       
   214 // 
       
   215 // ---------------------------------------------------------------------------
       
   216 TDataOwnerStatus CMMCScBkupDataOwnerInfo::Status() const
       
   217     {
       
   218     return iStatus;
       
   219     }
       
   220 
       
   221 
       
   222 // ---------------------------------------------------------------------------
       
   223 // CMMCScBkupDataOwnerInfo::SetStatus()
       
   224 // 
       
   225 // 
       
   226 // ---------------------------------------------------------------------------
       
   227 void CMMCScBkupDataOwnerInfo::SetStatus(TDataOwnerStatus aStatus)
       
   228     {
       
   229     iStatus = aStatus;
       
   230     }
       
   231 
       
   232 
       
   233 // ---------------------------------------------------------------------------
       
   234 // CMMCScBkupDataOwnerInfo::AddToOperationalSizeL()
       
   235 // 
       
   236 // 
       
   237 // ---------------------------------------------------------------------------
       
   238 void CMMCScBkupDataOwnerInfo::AddToOperationalSizeL( TMMCScBkupOwnerDataType aType, TDriveNumber aDrive, TInt64 aSize )
       
   239     {
       
   240     iOperationalSize->AddToSizeL( aType, aSize, aDrive );
       
   241 
       
   242 #if defined(__MMCSCBKUPLOGGING_ENABLED__)
       
   243     const TInt64 newSize = iOperationalSize->Size( aType, aDrive );
       
   244     __LOG5("CMMCScBkupDataOwnerInfo::AddToOperationalSizeL() - [0x%08x] - aSize: %8Ld, newSize: %8Ld, aDrive: %c:, aType: %S", iSecureId.iId, aSize, newSize, aDrive + 'A', &MMCScBkupLogger::DataType( aType ) );
       
   245 #endif
       
   246     }
       
   247 
       
   248 
       
   249 // ---------------------------------------------------------------------------
       
   250 // CMMCScBkupDataOwnerInfo::SetOperationalSizeL()
       
   251 // 
       
   252 // 
       
   253 // ---------------------------------------------------------------------------
       
   254 void CMMCScBkupDataOwnerInfo::SetOperationalSizeL( TMMCScBkupOwnerDataType aType, TDriveNumber aDrive, TInt64 aSize )
       
   255     {
       
   256     iOperationalSize->Reset( aType, aDrive );
       
   257     iOperationalSize->AddToSizeL( aType, aSize, aDrive );
       
   258 
       
   259     __LOG4("CMMCScBkupDataOwnerInfo::SetOperationalSizeL()   - [0x%08x] - aSize: %8Ld, aDrive: %c:, aType: %S", iSecureId.iId, aSize, aDrive + 'A', &MMCScBkupLogger::DataType( aType ) );
       
   260     }
       
   261 
       
   262 
       
   263 // ---------------------------------------------------------------------------
       
   264 // CMMCScBkupDataOwnerInfo::ResetOperationalSize()
       
   265 // 
       
   266 // 
       
   267 // ---------------------------------------------------------------------------
       
   268 void CMMCScBkupDataOwnerInfo::ResetOperationalSize( TMMCScBkupOwnerDataType aType )
       
   269     {
       
   270     iOperationalSize->Reset( aType );
       
   271     __LOG2("CMMCScBkupDataOwnerInfo::ResetOperationalSize()  - [0x%08x] - aType: %S", iSecureId.iId, &MMCScBkupLogger::DataType( aType ) );
       
   272     }
       
   273 
       
   274 
       
   275 // ---------------------------------------------------------------------------
       
   276 // CMMCScBkupDataOwnerInfo::OperationalSize()
       
   277 // 
       
   278 // 
       
   279 // ---------------------------------------------------------------------------
       
   280 TInt64 CMMCScBkupDataOwnerInfo::OperationalSize( TMMCScBkupOwnerDataType aType, TDriveNumber aDrive ) const
       
   281     {
       
   282     const TInt64 size = iOperationalSize->Size( aType, aDrive );
       
   283 
       
   284     __LOG4("CMMCScBkupDataOwnerInfo::OperationalSize()       - [0x%08x] - size: %8Ld, aDrive: %c:, aType: %S", iSecureId.iId, size, aDrive + 'A', &MMCScBkupLogger::DataType( aType ) );
       
   285 
       
   286     return size;
       
   287     }
       
   288 
       
   289 
       
   290 // ---------------------------------------------------------------------------
       
   291 // CMMCScBkupDataOwnerInfo::OperationalSize()
       
   292 // 
       
   293 // 
       
   294 // ---------------------------------------------------------------------------
       
   295 TInt64 CMMCScBkupDataOwnerInfo::OperationalSize( TMMCScBkupOwnerDataType aType ) const
       
   296     {
       
   297     const TInt64 size = iOperationalSize->Size( aType );
       
   298 
       
   299     //__LOG3("CMMCScBkupDataOwnerInfo::OperationalSize()       - [0x%08x] - size: %8Ld, aType: %S", iSecureId.iId, size, &MMCScBkupLogger::DataType( aType ) );
       
   300 
       
   301     return size;
       
   302     }
       
   303 
       
   304 
       
   305 // ---------------------------------------------------------------------------
       
   306 // CMMCScBkupDataOwnerInfo::OperationalSize()
       
   307 // 
       
   308 // 
       
   309 // ---------------------------------------------------------------------------
       
   310 TInt64 CMMCScBkupDataOwnerInfo::OperationalSize( TDriveNumber aDrive ) const
       
   311     {
       
   312     const TInt64 size = iOperationalSize->CombinedSize( aDrive );
       
   313 
       
   314     //__LOG3("CMMCScBkupDataOwnerInfo::OperationalSize()       - [0x%08x] - size: %8Ld, aDrive: %c:", iSecureId.iId, size, aDrive + 'A' );
       
   315 
       
   316     return size;
       
   317     }
       
   318 
       
   319 
       
   320 // ---------------------------------------------------------------------------
       
   321 // CMMCScBkupDataOwnerInfo::OperationalSizesL()
       
   322 // 
       
   323 // 
       
   324 // ---------------------------------------------------------------------------
       
   325 void CMMCScBkupDataOwnerInfo::OperationalSizesL( RArray<TMMCScBkupDriveAndSize>& aSizes ) const
       
   326     {
       
   327     iOperationalSize->GetSizesL( aSizes );
       
   328     }
       
   329 
       
   330 
       
   331 // ---------------------------------------------------------------------------
       
   332 // CMMCScBkupDataOwnerInfo::SetCompletionStatus()
       
   333 // 
       
   334 // 
       
   335 // ---------------------------------------------------------------------------
       
   336 void CMMCScBkupDataOwnerInfo::SetCompletionStatus( TMMCScBkupOwnerDataType aType, TBool aCompleted )
       
   337     {
       
   338     iCompletionStatus[aType] = aCompleted;
       
   339     }
       
   340 
       
   341 
       
   342 // ---------------------------------------------------------------------------
       
   343 // CMMCScBkupDataOwnerInfo::CompletionStatus()
       
   344 // 
       
   345 // 
       
   346 // ---------------------------------------------------------------------------
       
   347 TBool CMMCScBkupDataOwnerInfo::CompletionStatus( TMMCScBkupOwnerDataType aType ) const
       
   348     {
       
   349     return iCompletionStatus[aType];
       
   350     }
       
   351 
       
   352 
       
   353 // ---------------------------------------------------------------------------
       
   354 // CMMCScBkupDataOwnerInfo::ActiveDataRetryCount()
       
   355 // 
       
   356 // 
       
   357 // ---------------------------------------------------------------------------
       
   358 TInt CMMCScBkupDataOwnerInfo::ActiveDataRetryCount() const
       
   359     {
       
   360     return iActiveDataRetryCount;
       
   361     }
       
   362 
       
   363 
       
   364 // ---------------------------------------------------------------------------
       
   365 // CMMCScBkupDataOwnerInfo::SetActiveDataRetryCount()
       
   366 // 
       
   367 // 
       
   368 // ---------------------------------------------------------------------------
       
   369 void CMMCScBkupDataOwnerInfo::SetActiveDataRetryCount(TInt aCount)
       
   370     {
       
   371     iActiveDataRetryCount = aCount;
       
   372     }
       
   373 
       
   374 
       
   375 // ---------------------------------------------------------------------------
       
   376 // CMMCScBkupDataOwnerInfo::InternalizeL()
       
   377 // 
       
   378 // 
       
   379 // ---------------------------------------------------------------------------
       
   380 void CMMCScBkupDataOwnerInfo::InternalizeL(RReadStream& aStream)
       
   381     {
       
   382     iVersion = aStream.ReadInt32L(); // EStreamFormatVersionX
       
   383     aStream.ReadInt32L(); // spare1
       
   384     aStream.ReadInt32L(); // spare2
       
   385     aStream.ReadInt32L(); // spare3
       
   386 
       
   387     // Secure ID
       
   388     iSecureId = aStream.ReadInt32L();
       
   389     
       
   390     // Data sizes
       
   391     CMMCScBkupDataTypeSizer* operationalSize = CMMCScBkupDataTypeSizer::NewLC( aStream );
       
   392     delete iOperationalSize;
       
   393     iOperationalSize = operationalSize;
       
   394     CleanupStack::Pop( operationalSize );
       
   395    
       
   396     // Read data owner buffer length
       
   397     TCardinality dataOwnerLength;
       
   398     aStream >> dataOwnerLength;
       
   399 
       
   400     // Internalize the data owner (as raw descriptor)
       
   401     HBufC8* dataOwnerBuffer = HBufC8::NewLC( dataOwnerLength );
       
   402     TPtr8 pDataOwnerBuffer( dataOwnerBuffer->Des() );
       
   403     aStream.ReadL( pDataOwnerBuffer, dataOwnerLength );
       
   404     //
       
   405     CDataOwnerInfo* dataOwner = CDataOwnerInfo::NewL( *dataOwnerBuffer );
       
   406     delete iDataOwner;
       
   407     iDataOwner = dataOwner;
       
   408     CleanupStack::PopAndDestroy( dataOwnerBuffer );
       
   409     }
       
   410 
       
   411 
       
   412 // ---------------------------------------------------------------------------
       
   413 // CMMCScBkupDataOwnerInfo::ExternalizeL()
       
   414 // 
       
   415 // 
       
   416 // ---------------------------------------------------------------------------
       
   417 void CMMCScBkupDataOwnerInfo::ExternalizeL(RWriteStream& aStream) const
       
   418     {
       
   419     aStream.WriteInt32L( EStreamFormatVersion2 );
       
   420     aStream.WriteInt32L( 0 ); // spare1
       
   421     aStream.WriteInt32L( 0 ); // spare2
       
   422     aStream.WriteInt32L( 0 ); // spare3
       
   423 
       
   424     // Always write secure id
       
   425     aStream.WriteInt32L( iSecureId );
       
   426 
       
   427     // ... and always write the data sizes
       
   428     aStream << *iOperationalSize;
       
   429 
       
   430     // Externalize the data owner to an HBufC8
       
   431     HBufC8* dataOwnerBuffer = iDataOwner->ExternaliseL();
       
   432     CleanupStack::PushL( dataOwnerBuffer );
       
   433 
       
   434     // Write leading byte count - helps us when it comes to internalising
       
   435     const TCardinality dataOwnerLength( dataOwnerBuffer->Length() );
       
   436     aStream << dataOwnerLength;
       
   437     
       
   438     // Now write the data owner buffer - not using chevrons just in case it
       
   439     // does funny unicode compression stuff...
       
   440     aStream.WriteL( *dataOwnerBuffer );
       
   441 
       
   442     CleanupStack::PopAndDestroy(dataOwnerBuffer);
       
   443     }
       
   444 
       
   445 
       
   446 // ---------------------------------------------------------------------------
       
   447 // CMMCScBkupDataOwnerInfo::CompareDataOwnerBySIDL()
       
   448 // 
       
   449 // 
       
   450 // ---------------------------------------------------------------------------
       
   451 TBool CMMCScBkupDataOwnerInfo::CompareDataOwnerBySIDL(const CMMCScBkupDataOwnerInfo& aLeft, const CMMCScBkupDataOwnerInfo& aRight)
       
   452     {
       
   453     TBool same = EFalse;
       
   454     
       
   455     // If we have an owner object, then we first compare the derived types.
       
   456     // If not, we just directly compare the SIDs
       
   457     if  ( aLeft.iDataOwner && aRight.iDataOwner )
       
   458         {
       
   459         const TSBDerivedType leftType = aLeft.Owner().Identifier().DerivedTypeL();
       
   460         const TSBDerivedType rightType = aRight.Owner().Identifier().DerivedTypeL();
       
   461         //
       
   462         same = ((leftType == rightType) || 
       
   463                 (leftType == ESIDDerivedType && rightType == EPackageDerivedType) || 
       
   464                 (leftType == EPackageDerivedType && rightType == ESIDDerivedType)
       
   465                );
       
   466         }
       
   467     else if ( aRight.iDataOwner )
       
   468         {
       
   469         // Check that it is not Java data owner in question. Java DOs all have
       
   470         // secure id 0x0, but it could also be the case for certain package
       
   471         // data owners (see for KDummyId in SBE implementation).
       
   472         if( !MMCScBkupSBEUtils::HasJavaDataL( aRight.Owner() ) )
       
   473             {
       
   474             // ..set to ETrue to trip next if-statement
       
   475             same = ETrue;
       
   476             }
       
   477         }
       
   478 
       
   479     // Now compare the SID's themselves 
       
   480     if  ( same )
       
   481         {
       
   482         same = (aLeft.SecureId() == aRight.SecureId());
       
   483         }
       
   484     //
       
   485     return same;
       
   486     }
       
   487 
       
   488 
       
   489 // ---------------------------------------------------------------------------
       
   490 // CMMCScBkupDataOwnerInfo::HasJavaDataL()
       
   491 // 
       
   492 // 
       
   493 // ---------------------------------------------------------------------------
       
   494 TBool CMMCScBkupDataOwnerInfo::HasJavaDataL() const
       
   495     {
       
   496     const TBool hasJavaData = MMCScBkupSBEUtils::HasJavaDataL( *iDataOwner );
       
   497     const TInt64 opSize = OperationalSize( EMMCScBkupOwnerDataTypeJavaData );
       
   498     //
       
   499     return hasJavaData || (opSize > 0 );
       
   500     }
       
   501 
       
   502 
       
   503 // ---------------------------------------------------------------------------
       
   504 // CMMCScBkupDataOwnerInfo::HasActiveDataL()
       
   505 // 
       
   506 // 
       
   507 // ---------------------------------------------------------------------------
       
   508 TBool CMMCScBkupDataOwnerInfo::HasActiveDataL() const
       
   509     {
       
   510     const TBool hasActiveData = MMCScBkupSBEUtils::HasActiveDataL( *iDataOwner );
       
   511     const TInt64 opSize = OperationalSize( EMMCScBkupOwnerDataTypeActiveData );
       
   512     //
       
   513     return hasActiveData || (opSize > 0 );
       
   514     }
       
   515 
       
   516 
       
   517 // ---------------------------------------------------------------------------
       
   518 // CMMCScBkupDataOwnerInfo::HasPassiveDataL()
       
   519 // 
       
   520 // 
       
   521 // ---------------------------------------------------------------------------
       
   522 TBool CMMCScBkupDataOwnerInfo::HasPassiveDataL() const
       
   523     {
       
   524     const TBool hasPassiveData = MMCScBkupSBEUtils::HasPassiveDataL( *iDataOwner );
       
   525     const TInt64 opSize = OperationalSize( EMMCScBkupOwnerDataTypePassiveData );
       
   526     //
       
   527     return hasPassiveData || (opSize > 0 );
       
   528     }
       
   529 
       
   530 
       
   531 // ---------------------------------------------------------------------------
       
   532 // CMMCScBkupDataOwnerInfo::HasPublicDataL()
       
   533 // 
       
   534 // 
       
   535 // ---------------------------------------------------------------------------
       
   536 TBool CMMCScBkupDataOwnerInfo::HasPublicDataL() const
       
   537     {
       
   538     const TBool hasPublicData = MMCScBkupSBEUtils::HasPublicDataL( *iDataOwner );
       
   539     const TInt64 opSize = OperationalSize( EMMCScBkupOwnerDataTypePublicData );
       
   540     //
       
   541     return hasPublicData || (opSize > 0 );
       
   542     }
       
   543 
       
   544 
       
   545 // ---------------------------------------------------------------------------
       
   546 // CMMCScBkupDataOwnerInfo::HasSystemDataL()
       
   547 // 
       
   548 // 
       
   549 // ---------------------------------------------------------------------------
       
   550 TBool CMMCScBkupDataOwnerInfo::HasSystemDataL() const
       
   551     {
       
   552     const TBool hasSystemData = MMCScBkupSBEUtils::HasSystemDataL( *iDataOwner );
       
   553     const TInt64 opSize = OperationalSize( EMMCScBkupOwnerDataTypeSystemData );
       
   554     //
       
   555     return hasSystemData || (opSize > 0 );
       
   556     }
       
   557 
       
   558 
       
   559 
       
   560