|
1 /* |
|
2 * Copyright (c) 2005 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: CXcapTestAppUsage |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __XCAPTESTAPPUSAGE__ |
|
22 #define __XCAPTESTAPPUSAGE__ |
|
23 |
|
24 #include "XcapAppUsage.h" |
|
25 |
|
26 // CONSTANTS |
|
27 // Define here literals for element names if they |
|
28 // aren't already defined in AppUsageDef.h |
|
29 // _LIT( KExample, "example" ); |
|
30 // _LIT( KExampleElement, "example-element" ); |
|
31 // _LIT( KExampleElement2, "example-element2" ); |
|
32 // _LIT( KExampleElement3, "example-element3" ); |
|
33 // _LIT( KExampleAttr1, "exampleAttr1" ); |
|
34 // _LIT( KExampleAttr2, "exampleAttr2" ); |
|
35 |
|
36 // CLASS DECLARATION |
|
37 class CXcapTestAppUsage : public CXcapAppUsage |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Symbian OS constructor |
|
43 * @param TXcapAppUsageParams Parameters |
|
44 * @return CXcapTestAppUsage* |
|
45 */ |
|
46 static CXcapTestAppUsage* NewL( const TXcapAppUsageParams& aParameters ); |
|
47 |
|
48 /** |
|
49 * Destructor |
|
50 */ |
|
51 virtual ~CXcapTestAppUsage(); |
|
52 |
|
53 public: //From CXcapAppUsage |
|
54 |
|
55 /** |
|
56 * AUID for this usage |
|
57 * @return AUID |
|
58 */ |
|
59 TPtrC8 AUID() const; |
|
60 |
|
61 /** |
|
62 * MIME type for this usage |
|
63 * @return MIME type |
|
64 */ |
|
65 TPtrC8 ContentType() const; |
|
66 |
|
67 /** |
|
68 * Default namespace for this usage |
|
69 * @return Default namespace definition |
|
70 */ |
|
71 TPtrC8 DefaultNamespace() const; |
|
72 |
|
73 /** |
|
74 * Validate the node in the parameter |
|
75 * Leaves with system wide error codes or |
|
76 * with error defined in XdmErrors.h |
|
77 * @param CXdmDocumentNode& reference to the node |
|
78 * @return ETrue, if the node belongs to the appusage's namespace |
|
79 */ |
|
80 TBool ValidateNodeL( CXdmDocumentNode& aXdmNode ); |
|
81 |
|
82 /** |
|
83 * Validate the attribute in the parameter |
|
84 * Leaves with system wide error codes or |
|
85 * with error defined in XdmErrors.h |
|
86 * @param CXdmNodeAttribute& reference to the attribute |
|
87 */ |
|
88 void ValidateAttributeL( const CXdmNodeAttribute& aXdmNodeAttr ); |
|
89 |
|
90 /** |
|
91 * Add namespaces and namespace prefixes used in document |
|
92 * @param CXdmDocument& reference to the document |
|
93 */ |
|
94 void AddNamespaceInformationL( CXdmDocument& aXdmDocument ); |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * Second phase construction |
|
100 */ |
|
101 void ConstructL(); |
|
102 |
|
103 /** |
|
104 * Prohibit copy costructor |
|
105 */ |
|
106 CXcapTestAppUsage( const CXdmEngine& aXdmEngine ); |
|
107 |
|
108 private: // Data |
|
109 |
|
110 }; |
|
111 |
|
112 #endif //__XCAPTESTAPPUSAGE__ |
|
113 |
|
114 // End of File |