~ubuntu-branches/ubuntu/raring/digikam/raring

« back to all changes in this revision

Viewing changes to core/utilities/cameragui/devices/gpcamera.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        : 2003-01-21
7
 
 * Description : Gphoto2 camera interface
8
 
 *
9
 
 * Copyright (C) 2003-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
 
 * Copyright (C) 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
12
 
 *
13
 
 * This program is free software; you can redistribute it
14
 
 * and/or modify it under the terms of the GNU General
15
 
 * Public License as published by the Free Software Foundation;
16
 
 * either version 2, or (at your option)
17
 
 * any later version.
18
 
 *
19
 
 * This program is distributed in the hope that it will be useful,
20
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 
 * GNU General Public License for more details.
23
 
 *
24
 
 * ============================================================ */
25
 
 
26
 
#ifndef GPCAMERA_H
27
 
#define GPCAMERA_H
28
 
 
29
 
// Local includes
30
 
 
31
 
#include "dkcamera.h"
32
 
 
33
 
class QImage;
34
 
 
35
 
namespace Digikam
36
 
{
37
 
 
38
 
class GPStatus;
39
 
class DMetadata;
40
 
 
41
 
/** Gphoto2 camera Implementation of abstract type DKCamera
42
 
 */
43
 
class GPCamera : public DKCamera
44
 
{
45
 
 
46
 
public:
47
 
 
48
 
    GPCamera(const QString& title, const QString& model,
49
 
             const QString& port, const QString& path);
50
 
    ~GPCamera();
51
 
 
52
 
    QByteArray cameraMD5ID();
53
 
 
54
 
    bool doConnect();
55
 
 
56
 
    void cancel();
57
 
 
58
 
    void getAllFolders(const QString& folder, QStringList& subFolderList);
59
 
    bool getSubFolders(const QString& folder, QStringList& subFolderList);
60
 
    bool getItemsList(const QString& folder, QStringList& itemsList);
61
 
    bool getItemsInfoList(const QString& folder, bool useMetadata, CamItemInfoList& items);
62
 
    void getItemInfo(const QString& folder, const QString& itemName, CamItemInfo& info, bool useMetadata);
63
 
 
64
 
    bool getThumbnail(const QString& folder, const QString& itemName, QImage& thumbnail);
65
 
    bool getMetadata(const QString& folder, const QString& itemName, DMetadata& meta);
66
 
 
67
 
    bool setLockItem(const QString& folder, const QString& itemName, bool lock);
68
 
 
69
 
    bool downloadItem(const QString& folder, const QString& itemName, const QString& saveFile);
70
 
    bool deleteItem(const QString& folder, const QString& itemName);
71
 
 
72
 
    // recursively delete all items
73
 
    bool deleteAllItems(const QString& folder);
74
 
 
75
 
    bool uploadItem(const QString& folder, const QString& itemName, const QString& localFile, CamItemInfo& itemInfo);
76
 
 
77
 
    bool cameraSummary(QString& summary);
78
 
    bool cameraManual(QString& manual);
79
 
    bool cameraAbout(QString& about);
80
 
 
81
 
    DKCamera::CameraDriverType cameraDriverType()
82
 
    {
83
 
        return DKCamera::GPhotoDriver;
84
 
    };
85
 
 
86
 
    bool getFreeSpace(unsigned long& kBSize, unsigned long& kBAvail);
87
 
    bool getPreview(QImage& preview);
88
 
    bool capture(CamItemInfo& itemInfo);
89
 
 
90
 
    // Public static methods shared with Setup Camera
91
 
 
92
 
    static int  autoDetect(QString& model, QString& port);
93
 
    static void getSupportedCameras(int& count, QStringList& clist);
94
 
    static void getSupportedPorts(QStringList& plist);
95
 
    static void getCameraSupportedPorts(const QString& model, QStringList& plist);
96
 
    static bool findConnectedUsbCamera(int vendorId, int productId, QString& model, QString& port);
97
 
 
98
 
private:
99
 
 
100
 
    /** Run getItemInfo implementation whithout to be wrapped into GPhoto context
101
 
     */
102
 
    void getItemInfoInternal(const QString& folder, const QString& itemName, CamItemInfo& info, bool useMetadata);
103
 
 
104
 
    static void printGphotoErrorDescription(int errorCode);
105
 
 
106
 
private:
107
 
 
108
 
    class GPCameraPrivate;
109
 
    GPCameraPrivate* const d;
110
 
};
111
 
 
112
 
}  // namespace Digikam
113
 
 
114
 
#endif /* GPCAMERA_H */