|
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 __CUPNPSERVICECOMPOSER_H_ |
|
17 #define __CUPNPSERVICECOMPOSER_H_ |
|
18 |
|
19 #include "cpnpserviceparam.h" |
|
20 #include "cstringpoolmanager.h" |
|
21 |
|
22 /** |
|
23 CUPnPServiceXmlComposer is used to compose the parsed xml device description file back into a compatible format |
|
24 @publishedPartner |
|
25 @prototype |
|
26 */ |
|
27 // Composes the parsed xml file |
|
28 class CUPnPServiceXmlComposer: public CBase |
|
29 { |
|
30 public: |
|
31 static CUPnPServiceXmlComposer* NewL( const RStringPool& aStringPool); |
|
32 ~CUPnPServiceXmlComposer(); |
|
33 void ComposeServiceXmlL(const CUPnPServiceDescription *aServDescObj, RBuf8 &aXmlData); |
|
34 |
|
35 private: |
|
36 // Helper functions |
|
37 CUPnPServiceXmlComposer( const RStringPool& aStringPool ); |
|
38 const TStringTable& GetTable(); |
|
39 void AppendLiteralL(TInt aTag, RBuf8& aBuf, TInt& aCount, TBool aIsStart ); |
|
40 void AppendLiteralL(const TDesC8& aLiteral, RBuf8& aBuf, TInt& aCount); |
|
41 void AppendLiteralL(const RString& aString, RBuf8& aBuf, TInt& count, TBool aIsStart ); |
|
42 void AppendActionL(const CUPnPAction* aUPnPAction, RBuf8 &aXmlData, TInt &aCount); |
|
43 void AppendStateVariableL(const CUPnPStateVariable* aUPnPStateVariable, RBuf8 &aXmlData, TInt &aCount); |
|
44 |
|
45 private: |
|
46 const RStringPool& iStringPool; |
|
47 TInt iError; |
|
48 |
|
49 }; |
|
50 #endif /*CUPNPSERVICECOMPOSER_H_*/ |