~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to core/utilities/cameragui/devices/dkcamera.h

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ============================================================
2
 
 *
3
 
 * This file is a part of digiKam project
4
 
 * http://www.digikam.org
5
 
 *
6
 
 * Date        : 2004-12-21
7
 
 * Description : abstract camera interface class
8
 
 *
9
 
 * Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
10
 
 * Copyright (C) 2006-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
 
 *
12
 
 * This program is free software; you can redistribute it
13
 
 * and/or modify it under the terms of the GNU General
14
 
 * Public License as published by the Free Software Foundation;
15
 
 * either version 2, or (at your option)
16
 
 * any later version.
17
 
 *
18
 
 * This program is distributed in the hope that it will be useful,
19
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 
 * GNU General Public License for more details.
22
 
 *
23
 
 * ============================================================ */
24
 
 
25
 
#ifndef DKCAMERA_H
26
 
#define DKCAMERA_H
27
 
 
28
 
// Qt includes
29
 
 
30
 
#include <QString>
31
 
#include <QByteArray>
32
 
 
33
 
// Local includes
34
 
 
35
 
#include "camiteminfo.h"
36
 
 
37
 
class QStringList;
38
 
class QImage;
39
 
 
40
 
namespace Digikam
41
 
{
42
 
 
43
 
class DMetadata;
44
 
 
45
 
class DKCamera
46
 
{
47
 
 
48
 
public:
49
 
 
50
 
    enum CameraDriverType
51
 
    {
52
 
        GPhotoDriver = 0,
53
 
        UMSDriver
54
 
    };
55
 
 
56
 
public:
57
 
 
58
 
    DKCamera(const QString& title, const QString& model, const QString& port, const QString& path);
59
 
    virtual ~DKCamera();
60
 
 
61
 
public:
62
 
 
63
 
    virtual bool doConnect() = 0;
64
 
    virtual void cancel() = 0;
65
 
 
66
 
    virtual void getAllFolders(const QString& folder, QStringList& subFolderList) = 0;
67
 
 
68
 
    /// If getImageDimensions is false, the camera shall set width and height to -1
69
 
    /// if the values are not immediately available
70
 
    virtual bool getItemsInfoList(const QString& folder, bool useMetadata, CamItemInfoList& infoList) = 0;
71
 
    virtual void getItemInfo(const QString& folder, const QString& itemName, CamItemInfo& info, bool useMetadata) = 0;
72
 
 
73
 
    virtual bool getThumbnail(const QString& folder, const QString& itemName, QImage& thumbnail) = 0;
74
 
    virtual bool getMetadata(const QString& folder, const QString& itemName, DMetadata& meta) = 0;
75
 
 
76
 
    virtual bool getPreview(QImage& preview) = 0;
77
 
    virtual bool capture(CamItemInfo& itemInfo) = 0;
78
 
 
79
 
    virtual bool downloadItem(const QString& folder, const QString& itemName, const QString& saveFile) = 0;
80
 
    virtual bool deleteItem(const QString& folder, const QString& itemName) = 0;
81
 
    virtual bool uploadItem(const QString& folder, const QString& itemName, const QString& localFile, CamItemInfo& itemInfo) = 0;
82
 
    virtual bool cameraSummary(QString& summary) = 0;
83
 
    virtual bool cameraManual(QString& manual) = 0;
84
 
    virtual bool cameraAbout(QString& about) = 0;
85
 
 
86
 
    virtual bool setLockItem(const QString& folder, const QString& itemName, bool lock) = 0;
87
 
 
88
 
    virtual DKCamera::CameraDriverType cameraDriverType() = 0;
89
 
 
90
 
    virtual bool getFreeSpace(unsigned long& kBSize, unsigned long& kBAvail) = 0;
91
 
 
92
 
    virtual QByteArray cameraMD5ID() = 0;
93
 
 
94
 
public:
95
 
 
96
 
    QString title() const;
97
 
    QString model() const;
98
 
    QString port()  const;
99
 
    QString path()  const;
100
 
    QString uuid()  const;
101
 
 
102
 
    bool    thumbnailSupport() const;
103
 
    bool    deleteSupport() const;
104
 
    bool    uploadSupport() const;
105
 
    bool    mkDirSupport() const;
106
 
    bool    delDirSupport() const;
107
 
    bool    captureImageSupport() const;
108
 
 
109
 
    QString mimeType(const QString& fileext) const;
110
 
 
111
 
protected:
112
 
 
113
 
    void    fillItemInfoFromMetadata(CamItemInfo& item, const DMetadata& meta) const;
114
 
 
115
 
protected:
116
 
 
117
 
    bool    m_thumbnailSupport;
118
 
    bool    m_deleteSupport;
119
 
    bool    m_uploadSupport;
120
 
    bool    m_mkDirSupport;
121
 
    bool    m_delDirSupport;
122
 
    bool    m_captureImageSupport;
123
 
 
124
 
    QString m_imageFilter;
125
 
    QString m_movieFilter;
126
 
    QString m_audioFilter;
127
 
    QString m_rawFilter;
128
 
 
129
 
    QString m_model;
130
 
    QString m_port;
131
 
    QString m_path;
132
 
    QString m_title;
133
 
    QString m_uuid;
134
 
};
135
 
 
136
 
}  // namespace Digikam
137
 
 
138
 
#endif /* DKCAMERA_H */