|
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: AiFw internal publisher info |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef _AIFWPUBLISHERINFO_H |
|
20 #define _AIFWPUBLISHERINFO_H |
|
21 |
|
22 // System includes |
|
23 #include <e32std.h> |
|
24 |
|
25 // User includes |
|
26 #include <hspublisherinfo.h> |
|
27 #include <aifwdefs.h> |
|
28 |
|
29 // Type definitions |
|
30 |
|
31 // Class declaration |
|
32 /** |
|
33 * Callback |
|
34 * |
|
35 * @since S60 5.2 |
|
36 */ |
|
37 class TAiFwCallback |
|
38 { |
|
39 public: |
|
40 // constructors |
|
41 |
|
42 /** |
|
43 * C++ default contrutor |
|
44 */ |
|
45 inline TAiFwCallback(); |
|
46 |
|
47 /** |
|
48 * C++ contrutor |
|
49 */ |
|
50 inline TAiFwCallback( void (*aFunction)( TAny* aPtr, TInt aResult ), TAny* aPtr ); |
|
51 |
|
52 public: |
|
53 // new functions |
|
54 |
|
55 /** |
|
56 * Assigment operator |
|
57 * |
|
58 * @since S60 5.2 |
|
59 * @param aCb Callback to assign. |
|
60 */ |
|
61 inline TAiFwCallback& operator= ( const TAiFwCallback& aCb ); |
|
62 |
|
63 /** |
|
64 * Callback |
|
65 * |
|
66 * @since S60 5.2 |
|
67 * @param aResult Result which is pased to callback |
|
68 */ |
|
69 inline void Callback( TInt aResult ) const; |
|
70 |
|
71 private: |
|
72 // data |
|
73 |
|
74 /** Callback function */ |
|
75 void ( *iFunction )( TAny* aPtr, TInt aResult ); |
|
76 /** A pointer to pass in callback function */ |
|
77 TAny* iPtr; |
|
78 }; |
|
79 |
|
80 class TAiFwPublisherInfo |
|
81 { |
|
82 public: |
|
83 // constructors |
|
84 |
|
85 /** |
|
86 * C++ default contrutor |
|
87 */ |
|
88 inline TAiFwPublisherInfo(); |
|
89 |
|
90 /** |
|
91 * C++ contrutor |
|
92 */ |
|
93 inline TAiFwPublisherInfo( const THsPublisherInfo& aInfo, |
|
94 const TAiFwCallback& aCb, TInt aReason ); |
|
95 |
|
96 public: |
|
97 // new functions |
|
98 |
|
99 /** |
|
100 * Assigment operator |
|
101 * |
|
102 * @since S60 5.2 |
|
103 * @param aInfo Info to assign. |
|
104 */ |
|
105 inline TAiFwPublisherInfo& operator= ( const TAiFwPublisherInfo& aInfo ); |
|
106 |
|
107 /** |
|
108 * Equals operator |
|
109 * |
|
110 * @since S60 5.2 |
|
111 * @param aInfo Info to use in comparision |
|
112 * @return Publisher info |
|
113 */ |
|
114 inline TBool operator==( const THsPublisherInfo& aInfo ) const; |
|
115 |
|
116 /** |
|
117 * Gets publisher info |
|
118 * |
|
119 * @since S60 5.2 |
|
120 * @return Publisher info |
|
121 */ |
|
122 inline const THsPublisherInfo& Info() const; |
|
123 |
|
124 /** |
|
125 * Gets reason |
|
126 * |
|
127 * @since S60 5.2 |
|
128 * @return Reason |
|
129 */ |
|
130 inline TInt Reason() const; |
|
131 |
|
132 /** |
|
133 * Calls callback functions |
|
134 * |
|
135 * @since S60 5.2 |
|
136 * @param aResult Result which is passed to callback function |
|
137 */ |
|
138 inline void Callback( TInt aResult ) const; |
|
139 |
|
140 private: |
|
141 // data |
|
142 |
|
143 /** Publisher info */ |
|
144 THsPublisherInfo iInfo; |
|
145 /** Callback */ |
|
146 TAiFwCallback iCb; |
|
147 /** Reason */ |
|
148 TInt iReason; |
|
149 }; |
|
150 |
|
151 #include <aifwpublisherinfo.inl> |
|
152 |
|
153 #endif // _AIFWPUBLISHERINFO_H |
|
154 |
|
155 // End of file |