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

« back to all changes in this revision

Viewing changes to core/utilities/cameragui/devices/umscamera.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 : USB Mass Storage camera interface
8
 
 *
9
 
 * Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
10
 
 * Copyright (C) 2005-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 UMSCAMERA_H
26
 
#define UMSCAMERA_H
27
 
 
28
 
// Qt includes
29
 
 
30
 
#include <QStringList>
31
 
 
32
 
// Local includes
33
 
 
34
 
#include "dkcamera.h"
35
 
 
36
 
namespace Digikam
37
 
{
38
 
 
39
 
class DMetadata;
40
 
 
41
 
/** USB Mass Storage camera Implementation of abstract type DKCamera
42
 
 */
43
 
class UMSCamera : public DKCamera
44
 
{
45
 
public:
46
 
 
47
 
    UMSCamera(const QString& title, const QString& model, const QString& port, const QString& path);
48
 
    ~UMSCamera();
49
 
 
50
 
    QByteArray cameraMD5ID();
51
 
 
52
 
    bool doConnect();
53
 
    void cancel();
54
 
 
55
 
    void getAllFolders(const QString& folder, QStringList& subFolderList);
56
 
    bool getItemsInfoList(const QString& folder, bool useMetadata, CamItemInfoList& infoList);
57
 
    void getItemInfo(const QString& folder, const QString& itemName, CamItemInfo& info, bool useMetadata);
58
 
 
59
 
    bool getThumbnail(const QString& folder, const QString& itemName, QImage& thumbnail);
60
 
    bool getMetadata(const QString& folder, const QString& itemName, DMetadata& meta);
61
 
 
62
 
    bool setLockItem(const QString& folder, const QString& itemName, bool lock);
63
 
 
64
 
    bool downloadItem(const QString& folder, const QString& itemName, const QString& saveFile);
65
 
    bool deleteItem(const QString& folder, const QString& itemName);
66
 
    bool uploadItem(const QString& folder, const QString& itemName, const QString& localFile, CamItemInfo& info);
67
 
 
68
 
    bool cameraSummary(QString& summary);
69
 
    bool cameraManual(QString& manual);
70
 
    bool cameraAbout(QString& about);
71
 
 
72
 
    bool getFreeSpace(unsigned long& kBSize, unsigned long& kBAvail);
73
 
 
74
 
    // Methods not supported by UMS camera.
75
 
    bool getPreview(QImage& /*preview*/)
76
 
    {
77
 
        return false;
78
 
    };
79
 
    bool capture(CamItemInfo& /*itemInfo*/)
80
 
    {
81
 
        return false;
82
 
    };
83
 
 
84
 
    DKCamera::CameraDriverType cameraDriverType()
85
 
    {
86
 
        return DKCamera::UMSDriver;
87
 
    };
88
 
 
89
 
private:
90
 
 
91
 
    void listFolders(const QString& folder, QStringList& subFolderList);
92
 
 
93
 
    /** Try to find UUID of UMS camera media using Solid interface.
94
 
        Search use mount path as reference. Return UUID as string
95
 
        else an empty string
96
 
     */
97
 
    void getUUIDFromSolid();
98
 
 
99
 
private:
100
 
 
101
 
    bool m_cancel;
102
 
};
103
 
 
104
 
}  // namespace Digikam
105
 
 
106
 
#endif /* UMSCAMERA_H */