|
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 HFavouritesSrvBuf |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 |
|
23 #include "FavouritesSrvBuf.h" |
|
24 |
|
25 // CONSTANTS |
|
26 |
|
27 /// Buffer granularity. |
|
28 LOCAL_D const TInt KFavouritesSrvBufGranularity = 512; |
|
29 |
|
30 // ================= MEMBER FUNCTIONS ======================= |
|
31 |
|
32 // --------------------------------------------------------- |
|
33 // HFavouritesSrvBuf::NewL() |
|
34 // --------------------------------------------------------- |
|
35 // |
|
36 HFavouritesSrvBuf* HFavouritesSrvBuf::NewL() |
|
37 { |
|
38 HFavouritesSrvBuf* buf = NewLC(); |
|
39 CleanupStack::Pop(); // buf |
|
40 return buf; |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------- |
|
44 // HFavouritesSrvBuf::NewLC() |
|
45 // --------------------------------------------------------- |
|
46 // |
|
47 HFavouritesSrvBuf* HFavouritesSrvBuf::NewLC() |
|
48 { |
|
49 HFavouritesSrvBuf* buf = new (ELeave) HFavouritesSrvBuf; |
|
50 buf->PushL(); |
|
51 buf->ConstructL(); |
|
52 return buf; |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------- |
|
56 // HFavouritesSrvBuf::ConstructL() |
|
57 // --------------------------------------------------------- |
|
58 // |
|
59 void HFavouritesSrvBuf::ConstructL() |
|
60 { |
|
61 iBuf = CBufSeg::NewL( KFavouritesSrvBufGranularity ); |
|
62 Set( *iBuf, 0, ERead | EWrite ); |
|
63 } |
|
64 |
|
65 // --------------------------------------------------------- |
|
66 // HFavouritesSrvBuf::DoRelease() |
|
67 // --------------------------------------------------------- |
|
68 // |
|
69 void HFavouritesSrvBuf::DoRelease() |
|
70 { |
|
71 delete this; |
|
72 } |
|
73 |
|
74 // End of File |