23
|
1 |
/*
|
|
2 |
* Copyright (c) 2002 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: Data structure class for profile settings.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
// CLASS HEADER
|
|
21 |
#include "CProfileStruct.h"
|
|
22 |
|
|
23 |
// EXTERNAL INCLUDES
|
|
24 |
#include <MProfileExtended.h>
|
|
25 |
#include <MProfileTones.h>
|
|
26 |
#include <MProfileExtraTones.h>
|
|
27 |
#include <DRMHelper.h>
|
|
28 |
#include <coemain.h>
|
|
29 |
|
|
30 |
// ============================ LOCAL FUNCTIONS ================================
|
|
31 |
|
|
32 |
void DoCompare( const TDesC& aOldFile, const TDesC& aNewFile, CDRMHelper& aDRMHelper )
|
|
33 |
{
|
|
34 |
if( aOldFile.CompareF( aNewFile ) != 0 )
|
|
35 |
{
|
|
36 |
// The file has been changed.
|
|
37 |
// Remove the old file from the automated content list.
|
|
38 |
// Ignore any error value. Also non-drm files are tried to be removed
|
|
39 |
// so the error might be KErrNotFound.
|
|
40 |
//
|
|
41 |
// Note:
|
|
42 |
// RemoveAutomatedPassive may leave even if it is not an L-method!
|
|
43 |
TRAP_IGNORE( aDRMHelper.RemoveAutomatedPassive( aOldFile ) ); // CSI: 59 # See the note above.
|
|
44 |
}
|
|
45 |
}
|
|
46 |
|
|
47 |
// ============================ MEMBER FUNCTIONS ===============================
|
|
48 |
|
|
49 |
// -----------------------------------------------------------------------------
|
|
50 |
// CProfileStruct::RemoveAutomatedContentL
|
|
51 |
// -----------------------------------------------------------------------------
|
|
52 |
//
|
|
53 |
void CProfileStruct::RemoveAutomatedContentL( MProfileExtended* aProfile ) const
|
|
54 |
{
|
|
55 |
CDRMHelper* drmHelper = CDRMHelper::NewLC( *CCoeEnv::Static() );
|
|
56 |
const MProfileTones& tones = aProfile->ProfileTones();
|
|
57 |
const MProfileExtraTones& extra = aProfile->ProfileExtraTones();
|
|
58 |
DoCompare( tones.RingingTone1(), *iRingingTone, *drmHelper );
|
|
59 |
DoCompare( tones.RingingTone2(), *iRingingToneLine2, *drmHelper );
|
|
60 |
DoCompare( extra.VideoCallRingingTone(), *iVideoCallTone, *drmHelper );
|
|
61 |
DoCompare( tones.MessageAlertTone(), *iMessageAlertTone, *drmHelper );
|
|
62 |
DoCompare( extra.EmailAlertTone(), *iEmailAlertTone, *drmHelper );
|
|
63 |
CleanupStack::PopAndDestroy( drmHelper );
|
|
64 |
}
|
|
65 |
|
|
66 |
// End of File
|