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

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/photivointegration/xmpmm.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 kipi-plugins project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2012-07-01
 
7
 * Description : Integration of the Photivo RAW-Processor.
 
8
 *
 
9
 * Copyright (C) 2012 by Dominic Lyons <domlyons at googlemail dot com>
 
10
 *
 
11
 * This program is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU General
 
13
 * Public License as published by the Free Software Foundation;
 
14
 * either version 2, or (at your option) any later version.
 
15
 * 
 
16
 * This program is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 * GNU General Public License for more details.
 
20
 *
 
21
 * ============================================================ */
 
22
 
 
23
#ifndef XMPMM_H
 
24
#define XMPMM_H
 
25
 
 
26
// C++ includes
 
27
 
 
28
#include <vector>
 
29
 
 
30
// local includes
 
31
 
 
32
#include "kpmetadata.h"
 
33
 
 
34
using std::vector;
 
35
using namespace KIPIPlugins;
 
36
 
 
37
namespace KIPIPhotivoIntegrationPlugin
 
38
{
 
39
 
 
40
/* NOTE: As we only need to use known properties for this purpose we can use 
 
41
 * simple structs. This simple, fast and less error prone.
 
42
 * For more generic requirements a hash map could be used instead. */
 
43
 
 
44
// forward declarations for some data structs declared below
 
45
struct XmpMMHistory;
 
46
struct XmpMMDerivedFrom;
 
47
 
 
48
/*!****************************************************************************
 
49
 * Encapsulate and manage xmpMM data
 
50
 */
 
51
class XmpMM
 
52
{
 
53
 
 
54
 
 
55
public:
 
56
 
 
57
    XmpMM()
 
58
    {
 
59
    };
 
60
 
 
61
    XmpMM(const KPMetadata meta)
 
62
    {
 
63
        load(meta);
 
64
    };
 
65
 
 
66
    void    load(const KPMetadata& meta);
 
67
    QString pureID(const QString& id) const;
 
68
 
 
69
public:
 
70
 
 
71
    QString                  originalDocumentID;
 
72
    QString                  documentID;
 
73
    QString                  instanceID;
 
74
    vector<XmpMMDerivedFrom> derivedFrom;
 
75
    vector<XmpMMHistory>     history;
 
76
 
 
77
private:
 
78
 
 
79
    void loadHistory(const KExiv2::MetaDataMap& mmMap);
 
80
    void loadIDs(const KExiv2::MetaDataMap& mmMap);
 
81
};
 
82
 
 
83
/*!****************************************************************************
 
84
 * Simple data-only struct to encapsulate a single xmpMM "history" item
 
85
 */
 
86
struct XmpMMHistory
 
87
{
 
88
    QString action;
 
89
    QString instanceID;
 
90
    QString when;
 
91
};
 
92
 
 
93
/*!****************************************************************************
 
94
 *Simple data-only struct to encapsulate a single xmpMM "derivedFrom" item
 
95
 */
 
96
struct XmpMMDerivedFrom
 
97
{
 
98
    QString documentID;
 
99
    QString instanceID;
 
100
};
 
101
 
 
102
} // namespace KIPIPhotivoIntegrationPlugin
 
103
 
 
104
#endif // XMPMM_H