1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 #ifndef CXEHARVESTERCONTROLSYMBIAN_H_ |
|
18 #define CXEHARVESTERCONTROLSYMBIAN_H_ |
|
19 |
|
20 #include <QObject> |
|
21 #include <QString> |
|
22 #include <harvesterclient.h> |
|
23 #include "cxeerror.h" |
|
24 |
|
25 |
|
26 class CxeHarvesterControlSymbian : public QObject, |
|
27 private MHarvestObserver |
|
28 { |
|
29 Q_OBJECT |
|
30 |
|
31 public: |
|
32 |
|
33 CxeHarvesterControlSymbian(); |
|
34 ~CxeHarvesterControlSymbian(); |
|
35 |
|
36 public slots: |
|
37 // slot that does the harvest file using the mds harvester |
|
38 CxeError::Id harvestFile(const QString& filename, bool addLocation, quint32 albumId); |
|
39 |
|
40 signals: |
|
41 /** |
|
42 * Signal for file harvesting completed. |
|
43 * @param error Status code for the harvesting. |
|
44 * @param filename Path of the file that was harvested. |
|
45 */ |
|
46 void fileHarvested(CxeError::Id error, const QString& filename); |
|
47 |
|
48 private: // MHarvestObserver |
|
49 void HarvestingComplete(TDesC& aURI, TInt aError); |
|
50 |
|
51 |
|
52 private: // helper methods |
|
53 void deRegisterHarverterClientEvents(); |
|
54 void registerForHarvesterEvents(); |
|
55 |
|
56 private: |
|
57 RHarvesterClient mHarvesterClient; |
|
58 bool mHarvesterClientConnected; |
|
59 bool mRegisteredForHarvesterEvents; |
|
60 }; |
|
61 |
|
62 #endif /* CXEHARVESTERCONTROLSYMBIAN_H_ */ |
|