author | samhuttu |
Mon, 01 Nov 2010 12:37:49 +0200 | |
branch | new development branch with rendering state machine and other goodies |
changeset 38 | 5360b7ddc251 |
parent 27 | 03808033c9a2 |
permissions | -rw-r--r-- |
38
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
1 |
/** @file |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
2 |
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
3 |
* All rights reserved. |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
8 |
* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
9 |
* Initial Contributors: |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
11 |
* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
12 |
* Contributors: |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
13 |
* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
14 |
* Description: ContentDirectory utils, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
15 |
* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
16 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
17 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
18 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
19 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
20 |
#ifndef CDUTILS_H |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
21 |
#define CDUTILS_H |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
22 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
23 |
// INCLUDES |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
24 |
#include <xmlengdom.h> |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
25 |
#include <e32base.h> |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
26 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
27 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
28 |
// CLASS DECLARATION |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
29 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
30 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
31 |
* Set of utils functions. |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
32 |
* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
33 |
* @lib AVContentDirectory.lib |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
34 |
* @since Series60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
35 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
36 |
class UpnpCdUtils |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
37 |
{ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
38 |
public: |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
39 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
40 |
static void ValidateFilePath(TDes8& aPath); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
41 |
static void ValidateFilePath(TDes& aPath); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
42 |
static void ValidateSrcUriL(TDesC8& aPath,TDesC8& aIp); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
43 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
44 |
* Removes white spaces (and '\r \n \t and space') from the given descriptor |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
45 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
46 |
* @param aString descriptor to be processed |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
47 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
48 |
static void RemoveWhiteSpacesL(TDes8& aString); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
49 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
50 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
51 |
* Checking if there are white spaces(and '\r \n \t and space' ) in the given descriptor |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
52 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
53 |
* @param aString |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
54 |
* @return boolean |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
55 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
56 |
static TBool IsWhiteString(const TDesC8& aString); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
57 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
58 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
59 |
* Gets element |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
60 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
61 |
* @param aFragment |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
62 |
* @return TXmlEngElement |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
63 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
64 |
static TXmlEngElement GetObjectElementL(RXmlEngDocument& aFragment); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
65 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
66 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
67 |
* Checks if Ref id value exists |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
68 |
* @since Series S60 5.0 HN |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
69 |
* @param aFragment |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
70 |
* @return TBool |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
71 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
72 |
static TBool HasRefIdL( RXmlEngDocument& aFragment ); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
73 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
74 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
75 |
* Encodes Xml |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
76 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
77 |
* @param aString |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
78 |
* @return descriptor pointer |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
79 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
80 |
static HBufC8* EncodeXmlStringL(const TDesC8& aString); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
81 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
82 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
83 |
static HBufC* Des8ToDesL(const TDesC8& aString); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
84 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
85 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
86 |
* Conversion from TDes8 to TDes16 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
87 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
88 |
* @param aString |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
89 |
* @return descriptor pointer |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
90 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
91 |
static HBufC* Des8ToDesLC(const TDesC8& aString); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
92 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
93 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
94 |
* Conversion from TDes16 to TDes8 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
95 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
96 |
* @param aString |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
97 |
* @return descrptor pointer |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
98 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
99 |
static HBufC8* DesToDes8LC(const TDesC& aString); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
100 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
101 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
102 |
* Getter |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
103 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
104 |
* @param aUri |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
105 |
* @return TInt |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
106 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
107 |
static TInt64 ResIdFromUriL(const TDesC8& aUri); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
108 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
109 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
110 |
* Getter |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
111 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
112 |
* @param aUri |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
113 |
* @return TPtrC8 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
114 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
115 |
static TPtrC8 ResIdFromUriDesL(const TDesC8& aUri); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
116 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
117 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
118 |
* Sets Object Id |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
119 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
120 |
* @param aElement TXmlEngElement of the element |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
121 |
* @param aId Id |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
122 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
123 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
124 |
static void SetObjectIdL(TXmlEngElement aElement, TInt aId); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
125 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
126 |
* Sets refID |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
127 |
* @since Series S60 5.0 HN |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
128 |
* @param aElement TXmlEngElement of the element |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
129 |
* @param aRefId |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
130 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
131 |
static void SetObjectRefIdL(TXmlEngElement aElement, TInt aRefId); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
132 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
133 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
134 |
* Sets parentID |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
135 |
* @since Series S60 5.0 HN |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
136 |
* @param aElement TXmlEngElement of the element |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
137 |
* @param aRefId |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
138 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
139 |
static void SetObjectParentIdL(TXmlEngElement aElement, TInt aParentId); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
140 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
141 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
142 |
* Sets restricted field |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
143 |
* @since Series S60 5.0 HN |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
144 |
* @param aElement TXmlEngElement of the element |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
145 |
* @param aRestrictedFlag |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
146 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
147 |
static void SetRestrictedFieldL( TXmlEngElement aElement, TBool aRestrictedFlag ); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
148 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
149 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
150 |
* Sets Container Id |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
151 |
* @since Series S60 3.1 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
152 |
* @param aElement TXmlEngElement of the element |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
153 |
* @param aParentId ParentId |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
154 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
155 |
static void SetContainerIdL(TXmlEngElement aElement, TInt aParentId); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
156 |
static HBufC8* BuildImportUriLC(TInt aResId); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
157 |
static HBufC8* BuildImportUriShorterLC(TInt64 aResId); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
158 |
static HBufC8* BuildContentUriL(TInt aResId, const TDesC& aFileExten, TDesC8& aObjectId); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
159 |
static HBufC8* UpnpCdUtils::RandomizeL(TInt aRange); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
160 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
161 |
* Checks whether the element is required and removes the attribute notifying it |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
162 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
163 |
* @param aElement TXmlEngElement of the element |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
164 |
* @param aObjId aCd pointer to the ContentDirectory object - it provides a function which deletes |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
165 |
* a file from the private directory |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
166 |
* @param ETrue if the element is required, otherwise EFalse |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
167 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
168 |
static TBool IsElementRequiredL(TXmlEngElement aElement); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
169 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
170 |
* Replaces the the first occurrence of true/false sequence with 1/0 within given descriptor |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
171 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
172 |
* @param aBuf descriptor pointer |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
173 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
174 |
static void ReplaceTrueFalse(HBufC8* aBuf); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
175 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
176 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
177 |
* Gets the full name with namespace of the given element. |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
178 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
179 |
* @param aElement an element to get the name of |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
180 |
* @return descriptor with the namespace:name of the element, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
181 |
* the caller should delete it when it is no longer needed |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
182 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
183 |
static HBufC8* GetElmNameWithNsL(TXmlEngElement aElement); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
184 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
185 |
static HBufC* EscapeAposL(const TDesC& aValue); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
186 |
static TBool ValidateDateL( TPtrC8 aValue ); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
187 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
188 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
189 |
* Converts TDesC8 to TUint |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
190 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
191 |
static TInt StringToTUint(const TDesC8& aStr, TUint* aInt); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
192 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
193 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
194 |
* Checks whether input string contains a specific number of digits and whether whole number fit into specific range |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
195 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
196 |
* @param aInput input descriptor [a number] |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
197 |
* @param aNumber number of digits the descriptor should contain |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
198 |
* @param aExactDigitsNumber should the number have exact number of digits or not |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
199 |
* @param aRange the number mustn't exceed the specified range |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
200 |
* @return ETrue if condition is fulfilled |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
201 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
202 |
static TBool AreDigitsInSpecificRange(const TDesC8& aInput, TInt aNumber, TBool aExactDigitsNumber, TUint32 aRange); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
203 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
204 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
205 |
* Validates res@duration attribute |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
206 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
207 |
* @param aInput descriptor containing duration value to validate |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
208 |
* @return ETrue if res@duration has proper format |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
209 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
210 |
static TBool ValidateDurationValue(const TDesC8& aInput); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
211 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
212 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
213 |
* Split string into pieces with delimeter |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
214 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
215 |
* @param aLexeme a lexer to parse |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
216 |
* @param aDelimeter delimeter |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
217 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
218 |
static void SplitStringByDelimeter(TLex8& aLexeme, TChar aDelimeter); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
219 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
220 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
221 |
* Skip characters in lexer |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
222 |
* @since Series S60 3.0 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
223 |
* @param aLexer a lexer to parse |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
224 |
* @param aValue number of characters to skip |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
225 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
226 |
static void Skip(TLex8& aLexer, TInt aValue); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
227 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
228 |
/** |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
229 |
* Extracts integer value from descriptor |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
230 |
* @param aStr descriptor to be extracted |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
231 |
* @param aInt integer to be fill in |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
232 |
* @return error status |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
233 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
234 |
static TInt StringToInteger(const TDesC8& aStr, TInt* aInt); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
235 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
236 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
237 |
private: |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
238 |
static TBool ValidateDateLength(TInt aDateLength); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
239 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
240 |
private: |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
241 |
enum TPlaces |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
242 |
{ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
243 |
EYear = 4, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
244 |
EMonth = 7, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
245 |
EDay = 10, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
246 |
EHour = 13, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
247 |
EMinute = 16, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
248 |
ESecond = 19, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
249 |
EZone1 = 20, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
250 |
EHourOffset1 = 22, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
251 |
EMiliSecond = 23, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
252 |
EZone2 = 24, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
253 |
ETimeOffset1 = 25, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
254 |
EHourOffset2 = 26, |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
255 |
ETimeOffset2 = 29 |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
256 |
}; |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
257 |
/* |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
258 |
* C++ default constructor. |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
259 |
*/ |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
260 |
UpnpCdUtils(); |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
261 |
}; |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
262 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
263 |
#endif // CDUTILS_H |
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
264 |
|
5360b7ddc251
New development branch with e.g. rendering state machine and a simple Qt example application using it.
samhuttu
parents:
27
diff
changeset
|
265 |
// End of File |