|
1 /** @file |
|
2 * Copyright (c) 2005-2006 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: Element table data handler |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "upnptablebean.h" |
|
22 #include <d32dbms.h> |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 // ----------------------------------------------------------------------------- |
|
27 // CUpnpTableBean::CUpnpTableBean |
|
28 // C++ default constructor can NOT contain any code, that |
|
29 // might leave. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 CUpnpTableBean::CUpnpTableBean() |
|
33 { |
|
34 |
|
35 } |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CUpnpTableBean::~CUpnpTableBean |
|
38 // Destructor |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CUpnpTableBean::~CUpnpTableBean() |
|
42 { |
|
43 |
|
44 } |
|
45 |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CUpnpTableBean::ReadLongTextColL |
|
49 // (other items were commented in a header). |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 HBufC8* CUpnpTableBean::ReadLongTextColL(const RDbRowSet& aRowSet, const TInt aColNo) |
|
53 { |
|
54 // prepare buffer |
|
55 TInt colLen = aRowSet.ColLength(aColNo); |
|
56 HBufC8* tmp = HBufC8::NewLC(colLen); |
|
57 TPtr8 tmpPtr(tmp->Des()); |
|
58 |
|
59 // read |
|
60 RDbColReadStream colReadStream; |
|
61 colReadStream.OpenLC(aRowSet, aColNo); |
|
62 colReadStream.ReadL(tmpPtr, colLen); // as the length of the HBufC can be grater than requested |
|
63 |
|
64 // clean up |
|
65 CleanupStack::PopAndDestroy(&colReadStream); |
|
66 CleanupStack::Pop(tmp); |
|
67 |
|
68 return tmp; |
|
69 } |
|
70 |
|
71 // End of File |