~michael-sheldon/content-hub/qdoc-import-fix

« back to all changes in this revision

Viewing changes to import/Ubuntu/Content/qmlimportexporthandler.h

  • Committer: Tarmac
  • Author(s): Guenter Schwann
  • Date: 2013-08-22 15:16:05 UTC
  • mfrom: (8.2.3 content-qml-handler)
  • Revision ID: tarmac-20130822151605-4oifzo1faklynmvc
Add and register an import export handler.

Approved by Ken VanDine, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2013 Canonical Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU Lesser General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU Lesser General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU Lesser General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
#ifndef COM_UBUNTU_QMLIMPORTEXPORTHANDLER_H_
 
18
#define COM_UBUNTU_QMLIMPORTEXPORTHANDLER_H_
 
19
 
 
20
#include <com/ubuntu/content/import_export_handler.h>
 
21
 
 
22
namespace com {
 
23
namespace ubuntu {
 
24
namespace content {
 
25
class Transfer;
 
26
}
 
27
}
 
28
}
 
29
 
 
30
class QmlImportExportHandler : public com::ubuntu::content::ImportExportHandler
 
31
{
 
32
    Q_OBJECT
 
33
 
 
34
public:
 
35
    QmlImportExportHandler(QObject *parent = nullptr);
 
36
 
 
37
    Q_INVOKABLE virtual void handle_import(com::ubuntu::content::Transfer *transfer);
 
38
    Q_INVOKABLE virtual void handle_export(com::ubuntu::content::Transfer *transfer);
 
39
 
 
40
Q_SIGNALS:
 
41
    void importReqested(com::ubuntu::content::Transfer*);
 
42
    void exportRequested(com::ubuntu::content::Transfer*);
 
43
};
 
44
 
 
45
#endif // COM_UBUNTU_QMLIMPORTEXPORTHANDLER_H_