|
1 /* |
|
2 * Copyright (c) 2004 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 the License "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: |
|
15 * Implementation of class CFavouritesSrvDbIncremental |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "FavouritesSrvDbIncremental.h" |
|
24 #include "FavouritesSrvDb.h" |
|
25 #include "FavouritesPanic.h" |
|
26 |
|
27 // ================= MEMBER FUNCTIONS ======================= |
|
28 |
|
29 // --------------------------------------------------------- |
|
30 // CFavouritesSrvDbIncremental::RecoverL |
|
31 // --------------------------------------------------------- |
|
32 // |
|
33 void CFavouritesSrvDbIncremental::RecoverL |
|
34 ( CFavouritesSrvDb& aDb, TInt& aStep ) |
|
35 { |
|
36 __ASSERT_DEBUG( !iStep, FavouritesPanic( EFavouritesAlreadyOpen ) ); |
|
37 User::LeaveIfError( iIncremental.Recover( aDb.Database(), iStep ) ); |
|
38 aStep = iStep; |
|
39 } |
|
40 |
|
41 // --------------------------------------------------------- |
|
42 // CFavouritesSrvDbIncremental::CompactL |
|
43 // --------------------------------------------------------- |
|
44 // |
|
45 void CFavouritesSrvDbIncremental::CompactL |
|
46 ( CFavouritesSrvDb& aDb, TInt& aStep ) |
|
47 { |
|
48 __ASSERT_DEBUG( !iStep, FavouritesPanic( EFavouritesAlreadyOpen ) ); |
|
49 User::LeaveIfError( iIncremental.Compact( aDb.Database(), iStep ) ); |
|
50 aStep = iStep; |
|
51 } |
|
52 |
|
53 // --------------------------------------------------------- |
|
54 // CFavouritesSrvDbIncremental::NextL |
|
55 // --------------------------------------------------------- |
|
56 // |
|
57 void CFavouritesSrvDbIncremental::NextL( TInt& aStep ) |
|
58 { |
|
59 __ASSERT_DEBUG( iStep == aStep && aStep > 0, \ |
|
60 FavouritesPanic( EFavouritesInternal ) ); |
|
61 User::LeaveIfError( iIncremental.Next( iStep ) ); |
|
62 aStep = iStep; |
|
63 } |
|
64 |
|
65 // End of File |