|
1 /* |
|
2 * Copyright (c) 2006-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: Composer image plug-in |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <mdeobject.h> |
|
20 |
|
21 #include "composerplugin.h" |
|
22 #include "imagecomposerao.h" |
|
23 #include "locationrelationobserver.h" |
|
24 #include "imagepresentobserver.h" |
|
25 #include "mdeharvestersession.h" |
|
26 |
|
27 #ifndef __CCOMPOSERIMAGEPLUGIN_H__ |
|
28 #define __CCOMPOSERIMAGEPLUGIN_H__ |
|
29 |
|
30 /** |
|
31 * Composer image plugin. |
|
32 * This class implements the composer plugin interface. |
|
33 * Actual composing is done in class CComposerImagePluginAO. |
|
34 */ |
|
35 class CComposerImagePlugin : public CComposerPlugin |
|
36 { |
|
37 friend class CLocationRelationObserver; |
|
38 friend class CImagePresentObserver; |
|
39 |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Construction. |
|
44 */ |
|
45 static CComposerImagePlugin* NewL(); |
|
46 |
|
47 /** |
|
48 * Destruction. |
|
49 */ |
|
50 virtual ~CComposerImagePlugin(); |
|
51 |
|
52 /** |
|
53 * Checks if composing is complete. |
|
54 */ |
|
55 TBool IsComposingComplete(); |
|
56 |
|
57 protected: |
|
58 |
|
59 /** |
|
60 * Set observers that will be notified of composing events. |
|
61 */ |
|
62 void SetObservers(); |
|
63 |
|
64 /** |
|
65 * Remove observers. |
|
66 */ |
|
67 void RemoveObservers(); |
|
68 |
|
69 /** |
|
70 * Handle object modifications |
|
71 */ |
|
72 void HandleObjectNotification(CMdESession& aSession, |
|
73 TObserverNotificationType aType, |
|
74 const RArray<TItemId>& aObjectIdArray); |
|
75 |
|
76 void WriteGPSTagsL( TItemId aObjectId, TItemId locationId ); |
|
77 |
|
78 void HandlePendingObjects( const RArray<TItemId>& aObjectIdArray ); |
|
79 |
|
80 private: |
|
81 |
|
82 /** |
|
83 * Private constructor. |
|
84 */ |
|
85 CComposerImagePlugin(); |
|
86 |
|
87 /** |
|
88 * 2nd phase construction. |
|
89 */ |
|
90 void ConstructL(); |
|
91 |
|
92 /** |
|
93 * Private, leaving set observers method that is called by the public version of this method. |
|
94 */ |
|
95 void SetObserversL(); |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * Pointer to the active object that implements the asyncronous functionality |
|
101 * of this plug-in. |
|
102 */ |
|
103 CImageComposerAO* iImageComposerAO; |
|
104 |
|
105 /** |
|
106 * Pointer to the observer listening for location relation changes in Mde. |
|
107 */ |
|
108 CLocationRelationObserver* iLocationRelationObserver; |
|
109 |
|
110 CImagePresentObserver* iImagePresentObserver; |
|
111 |
|
112 CMdEHarvesterSession* iMdEHarvesterSession; |
|
113 }; |
|
114 |
|
115 #endif // __CCOMPOSERIMAGEPLUGIN_H__ |