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: helper class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_UPNPAVCPENGINEHELPER_H |
|
20 #define C_UPNPAVCPENGINEHELPER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include "upnpmdebug.h" |
|
24 |
|
25 namespace UpnpAVCPEngine |
|
26 { |
|
27 |
|
28 static const TInt KHttpGetStarted = 800; // HTTP get started ( port number ) |
|
29 static const TInt KHttpPostStarted = 801; // HTTP post started ( port number ) |
|
30 |
|
31 static const TInt KRequestedCountLimit = 20; |
|
32 |
|
33 _LIT8( KContentDirectory, "ContentDirectory:1" ); |
|
34 |
|
35 _LIT8(KDefaultBrowseFilter, "res,res@protocolInfo,res@size,res@importUri,dc:date"); |
|
36 |
|
37 _LIT8(KRootId,"0"); |
|
38 _LIT8(KRootName,"Root"); |
|
39 _LIT8(KBrowseDirectChildren, "BrowseDirectChildren"); |
|
40 _LIT8(KBrowseMetadata, "BrowseMetadata" ); |
|
41 _LIT8(KResult, "Result"); |
|
42 _LIT8(KNumberReturned, "NumberReturned" ); |
|
43 _LIT8(KTotalMatches, "TotalMatches" ); |
|
44 _LIT8(KStartingIndex, "StartingIndex"); |
|
45 _LIT8(KRequestedCount, "RequestedCount"); |
|
46 _LIT8(KSystemUpdateID, "SystemUpdateID"); |
|
47 |
|
48 _LIT8(KContainer,"container"); |
|
49 _LIT8(KItem,"item"); |
|
50 _LIT8(KRes,"res"); |
|
51 _LIT8(KRestricted,"restricted"); |
|
52 _LIT8(KDate,"date"); |
|
53 _LIT8(KTitle,"title"); |
|
54 _LIT8(KId,"id"); |
|
55 _LIT8(KSize,"size"); |
|
56 _LIT8(KParentId,"parentID"); |
|
57 _LIT8(KImportUri,"importUri"); |
|
58 _LIT8(KProtocolInfo,"protocolInfo"); |
|
59 _LIT8(KProtocolInfoBegin,"http-get"); |
|
60 |
|
61 _LIT8(KOne, "1"); |
|
62 _LIT8(KTrue, "true"); |
|
63 |
|
64 |
|
65 /** |
|
66 * Convert descriptor into integer, if some problem leaves |
|
67 * |
|
68 * @param aValue value to be converted |
|
69 * @return integer value |
|
70 */ |
|
71 TInt StrToIntL(const TDesC8& aValue); |
|
72 /** |
|
73 * Get last path element from pathname. |
|
74 * From aPath last path element will be removed |
|
75 * |
|
76 * @param aPath original pathname |
|
77 * @return last path element |
|
78 */ |
|
79 HBufC8* GetLastPathElementL(TDes8& aPath); |
|
80 /** |
|
81 * Parse path into elements |
|
82 */ |
|
83 void ParsePathToElementsL(TPtr8 aPath, RPointerArray<TPtrC8>& aArray ); |
|
84 /** |
|
85 * Removes slashes from path |
|
86 * |
|
87 * @param aPath original pathname , path will be updated |
|
88 */ |
|
89 void RemoveSlashes(TDes8& aPath); |
|
90 |
|
91 } |
|
92 |
|
93 #endif // C_UPNPAVCPENGINEHELPER_H |
|
94 |
|
95 // End Of File |
|