|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Upload cenrep watcher |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __GLXUPLOADCENREPWATCHER_H__ |
|
19 #define __GLXUPLOADCENREPWATCHER_H__ |
|
20 |
|
21 |
|
22 class CGlxCommandHandlerUpload; |
|
23 |
|
24 /** |
|
25 * CGlxUploadCenRepWatcher |
|
26 * CGlxCommandHandlerUpload containted class for observing changes in central |
|
27 * repository values |
|
28 */ |
|
29 NONSHARABLE_CLASS( CGlxUploadCenRepWatcher ) : public CActive |
|
30 { |
|
31 public: // Constructors and destructor |
|
32 |
|
33 /** |
|
34 * Symbian Constructor. |
|
35 * @param aObserver obersver - only supplied when the owner is |
|
36 * interested in changes in key value |
|
37 * @param aRepositoryUid uid of Central Repository file |
|
38 * @param aId id of the Central Repository key |
|
39 * @return contructed object |
|
40 */ |
|
41 static CGlxUploadCenRepWatcher* NewL(MGlxUploadIconObserver& aUploadIconObserver, |
|
42 const TUid& aRepositoryUid, |
|
43 TUint32 aId ); |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CGlxUploadCenRepWatcher(); |
|
48 |
|
49 public: // API |
|
50 |
|
51 /** |
|
52 * Get current value as 16 bit descriptor. |
|
53 * @param return value of the key in the descriptor |
|
54 */ |
|
55 void KeyValueL(TDes& aKeyValue) const; |
|
56 |
|
57 private: // Implementation |
|
58 |
|
59 /** |
|
60 * C++ constructor. |
|
61 * @param aObserver obersver |
|
62 * @param aRepositoryUid uid of CenRep file |
|
63 * @param aId id of the key |
|
64 * @return contructed object |
|
65 */ |
|
66 CGlxUploadCenRepWatcher(MGlxUploadIconObserver& aUploadIconObserver, |
|
67 const TUid& aRepositoryUid, TUint32 aId ); |
|
68 |
|
69 /** |
|
70 * 2nd phase constructor |
|
71 */ |
|
72 void ConstructL(); |
|
73 |
|
74 protected: // from CActive |
|
75 |
|
76 /** |
|
77 * @ref CActive::RunL |
|
78 */ |
|
79 void RunL(); |
|
80 |
|
81 /** |
|
82 * @ref CActive::DoCancel |
|
83 */ |
|
84 void DoCancel(); |
|
85 |
|
86 /** |
|
87 * @ref CActive::RunError |
|
88 */ |
|
89 TInt RunError( TInt aError ); |
|
90 |
|
91 private: // Implementation |
|
92 // Not Owned: the upload icon observer |
|
93 MGlxUploadIconObserver& iUploadIconObserver; |
|
94 // Own: the central repository API |
|
95 CRepository* iRepository; |
|
96 // the central repository identifier |
|
97 TUid iRepositoryUid; |
|
98 // the key id |
|
99 TUint32 iId; |
|
100 |
|
101 }; |
|
102 |
|
103 #endif //__GLXUPLOADCENREPWATCHER_H__ |