|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CUPNPDEVICECOMPOSER_H_ |
|
17 #define __CUPNPDEVICECOMPOSER_H_ |
|
18 |
|
19 #include <e32cons.h> |
|
20 #include <e32debug.h> |
|
21 #include "cpnpdeviceparam.h" |
|
22 #include "cstringpoolmanager.h" |
|
23 /** |
|
24 CUPnPDeviceXmlComposer is used to compose the parsed xml device description file back into a compatible format |
|
25 @publishedPartner |
|
26 @prototype |
|
27 */ |
|
28 |
|
29 class CUPnPDeviceXmlComposer: public CBase |
|
30 { |
|
31 public: |
|
32 static CUPnPDeviceXmlComposer* NewL( const RStringPool& aStringPool ); |
|
33 ~CUPnPDeviceXmlComposer(); |
|
34 void ComposeDeviceXmlL(const CUPnPDeviceDescription *aDeviceDescObj, RBuf8 &aXmlData); |
|
35 |
|
36 |
|
37 private: |
|
38 CUPnPDeviceXmlComposer( const RStringPool& aStringPool ); |
|
39 |
|
40 // Helper functions to construct the XML |
|
41 void AppendDeviceXmlL(const CUPnPDevice* aDevObj, RBuf8 &aXmlData, TInt &aCount); |
|
42 void AppendDeviceAttributesL(const CUPnPDevice* aDeviceAttribute, RBuf8 &aXmlData, TInt &aCount); |
|
43 void AppendDeviceIconL(const CUPnPIconInfo* aIconInfo, RBuf8 &aXmlData, TInt &aCount); |
|
44 void AppendServiceL(const CUPnPServiceInfo* aServInfo, RBuf8 &aXmlData, TInt &aCount); |
|
45 void AppendLiteralL(TInt aTag, RBuf8& aBuf, TInt& aCount, TBool aIsStart = EFalse); |
|
46 void AppendLiteralL(const TDesC8& aLiteral, RBuf8& aBuf, TInt& aCount); |
|
47 void AppendLiteralL(const RString& aString, RBuf8& aBuf, TInt& count, TBool aIsStart ); |
|
48 const TStringTable& GetTable(); |
|
49 |
|
50 TInt iError; |
|
51 const RStringPool& iStringPool; |
|
52 |
|
53 }; |
|
54 |
|
55 #endif /*CUPNPDEVICECOMPOSER_H_*/ |