1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : Gphoto2 camera interface
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>
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)
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.
24
* ============================================================ */
41
/** Gphoto2 camera Implementation of abstract type DKCamera
43
class GPCamera : public DKCamera
48
GPCamera(const QString& title, const QString& model,
49
const QString& port, const QString& path);
52
QByteArray cameraMD5ID();
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);
64
bool getThumbnail(const QString& folder, const QString& itemName, QImage& thumbnail);
65
bool getMetadata(const QString& folder, const QString& itemName, DMetadata& meta);
67
bool setLockItem(const QString& folder, const QString& itemName, bool lock);
69
bool downloadItem(const QString& folder, const QString& itemName, const QString& saveFile);
70
bool deleteItem(const QString& folder, const QString& itemName);
72
// recursively delete all items
73
bool deleteAllItems(const QString& folder);
75
bool uploadItem(const QString& folder, const QString& itemName, const QString& localFile, CamItemInfo& itemInfo);
77
bool cameraSummary(QString& summary);
78
bool cameraManual(QString& manual);
79
bool cameraAbout(QString& about);
81
DKCamera::CameraDriverType cameraDriverType()
83
return DKCamera::GPhotoDriver;
86
bool getFreeSpace(unsigned long& kBSize, unsigned long& kBAvail);
87
bool getPreview(QImage& preview);
88
bool capture(CamItemInfo& itemInfo);
90
// Public static methods shared with Setup Camera
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);
100
/** Run getItemInfo implementation whithout to be wrapped into GPhoto context
102
void getItemInfoInternal(const QString& folder, const QString& itemName, CamItemInfo& info, bool useMetadata);
104
static void printGphotoErrorDescription(int errorCode);
108
class GPCameraPrivate;
109
GPCameraPrivate* const d;
112
} // namespace Digikam
114
#endif /* GPCAMERA_H */