|
1 /* |
|
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: HS Publisher info |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _HSPUBLISHERINFO_H |
|
20 #define _HSPUBLISHERINFO_H |
|
21 |
|
22 // System includes |
|
23 #include <e32std.h> |
|
24 |
|
25 // User includes |
|
26 |
|
27 // Forward declarations |
|
28 |
|
29 // Constants |
|
30 |
|
31 /** |
|
32 * Maximum length for Content publisher name. |
|
33 * |
|
34 * @since S60 5.2 |
|
35 */ |
|
36 const TInt KHsPublisherNameMaxLength( 128 ); |
|
37 |
|
38 /** |
|
39 * Maximum length for Content publisher namespace. |
|
40 * |
|
41 * @since S60 5.2 |
|
42 */ |
|
43 const TInt KHsPublisherNamespaceMaxLength( 32 ); |
|
44 |
|
45 // Types |
|
46 |
|
47 /** |
|
48 * Content publisher name buffer. |
|
49 * |
|
50 * @since S60 5.2 |
|
51 */ |
|
52 typedef TBuf< KHsPublisherNameMaxLength > THsPublisherName; |
|
53 |
|
54 /** |
|
55 * Content publisher namespace buffer. |
|
56 * |
|
57 * @since S60 5.2 |
|
58 */ |
|
59 typedef TBuf8< KHsPublisherNamespaceMaxLength > THsPublisherNamespace; |
|
60 |
|
61 /** |
|
62 * Content publisher information |
|
63 * |
|
64 * @since S60 5.2 |
|
65 */ |
|
66 |
|
67 /** |
|
68 * Holds content publisher plug-in information. |
|
69 * |
|
70 * @since S60 5.2 |
|
71 */ |
|
72 class THsPublisherInfo |
|
73 { |
|
74 public: |
|
75 // Constructors |
|
76 |
|
77 /** |
|
78 * C++ default contrutor |
|
79 */ |
|
80 inline THsPublisherInfo(); |
|
81 |
|
82 /** |
|
83 * C++ contrutor |
|
84 */ |
|
85 inline THsPublisherInfo( const TUid& aUid, |
|
86 const TDesC& aName, const TDesC8& aNamespace ); |
|
87 |
|
88 public: |
|
89 // new functions |
|
90 |
|
91 /** |
|
92 * Assigment operator |
|
93 * |
|
94 * @since S60 5.2 |
|
95 * @param aInfo Publisher info to assign. |
|
96 */ |
|
97 inline THsPublisherInfo& operator= ( const THsPublisherInfo& aInfo ); |
|
98 |
|
99 /** |
|
100 * Equals operator |
|
101 * |
|
102 * @since S60 5.2 |
|
103 * @param aInfo Publisher info to compare |
|
104 * @return ETrue if this and aInfo equals, EFalse otherwise. |
|
105 */ |
|
106 inline TBool operator== ( const THsPublisherInfo& aInfo ) const; |
|
107 |
|
108 /** |
|
109 * Gets Uid |
|
110 * |
|
111 * @since S60 5.2 |
|
112 * @return Uid |
|
113 */ |
|
114 inline TUid Uid() const; |
|
115 |
|
116 /** |
|
117 * Gets Name |
|
118 * |
|
119 * @since S60 5.2 |
|
120 * @return Name |
|
121 */ |
|
122 inline const TDesC& Name() const; |
|
123 |
|
124 /** |
|
125 * Gets Namespace |
|
126 * |
|
127 * @since S60 5.2 |
|
128 * @return Namespace |
|
129 */ |
|
130 inline const TDesC8& Namespace() const; |
|
131 |
|
132 private: |
|
133 // data |
|
134 |
|
135 /** Publisher implementation UID */ |
|
136 TUid iUid; |
|
137 /** Publisher name */ |
|
138 THsPublisherName iName; |
|
139 /** Publisher namespace */ |
|
140 THsPublisherNamespace iNamespace; |
|
141 |
|
142 private: |
|
143 // friend classes |
|
144 |
|
145 friend class CAiPluginFactory; |
|
146 |
|
147 #ifdef _AIFW_UNIT_TEST |
|
148 friend class UT_HsPublisherInfo; |
|
149 #endif |
|
150 }; |
|
151 |
|
152 #include <hspublisherinfo.inl> |
|
153 |
|
154 #endif // _HSPUBLISHERINFO_H |
|
155 |
|
156 // End of file |