[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:38:16 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=4a1f79c

The following commit has been merged in the master branch:
commit 4a1f79c8b430f1b8f17057144243c600fd6192dd
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Wed Feb 7 13:56:29 2007 +0000

    Improved consistency of handling unsupported functions across image subclasses. setExif/Iptc/Comment methods throw Error(32), writeMetadata throws Error(31) if not yet implemented or not available for an image format.
---
 src/cr2image.cpp  | 18 ++++++++++++++----
 src/cr2image.hpp  | 10 ++++++++++
 src/error.cpp     |  2 +-
 src/mrwimage.cpp  | 18 ++++++++++++++----
 src/mrwimage.hpp  | 10 ++++++++++
 src/pngimage.cpp  | 22 ++++++++++++++++------
 src/pngimage.hpp  | 15 ++++++++++++---
 src/rafimage.cpp  | 18 ++++++++++++++----
 src/rafimage.hpp  | 10 ++++++++++
 src/tiffimage.cpp | 18 ++++++++++++++----
 src/tiffimage.hpp | 16 +++++++++++++---
 11 files changed, 128 insertions(+), 29 deletions(-)

diff --git a/src/cr2image.cpp b/src/cr2image.cpp
index 9360787..78a9ea2 100644
--- a/src/cr2image.cpp
+++ b/src/cr2image.cpp
@@ -92,6 +92,18 @@ namespace Exiv2 {
     {
     } // Cr2Image::Cr2Image
 
+    void Cr2Image::setExifData(const ExifData& /*exifData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "Exif metadata", "CR2"));
+    }
+
+    void Cr2Image::setIptcData(const IptcData& /*iptcData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "IPTC metadata", "CR2"));
+    }
+
     void Cr2Image::setComment(const std::string& /*comment*/)
     {
         // not supported
@@ -120,10 +132,8 @@ namespace Exiv2 {
 
     void Cr2Image::writeMetadata()
     {
-        /*
-          Todo: implement me!
-         */
-        throw(Error(31, "metadata", "CR2"));
+        //! Todo: implement me!
+        throw(Error(31, "CR2"));
     } // Cr2Image::writeMetadata
 
     const uint16_t Cr2Header::tag_ = 42;
diff --git a/src/cr2image.hpp b/src/cr2image.hpp
index 9e7c89d..3738748 100644
--- a/src/cr2image.hpp
+++ b/src/cr2image.hpp
@@ -86,6 +86,16 @@ namespace Exiv2 {
          */
         void writeMetadata();
         /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setExifData(const ExifData& exifData);
+        /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setIptcData(const IptcData& iptcData);
+        /*!
           @brief Not supported. CR2 format does not contain a comment.
               Calling this function will throw an Error(32).
          */
diff --git a/src/error.cpp b/src/error.cpp
index ec884b8..d1a124d 100644
--- a/src/error.cpp
+++ b/src/error.cpp
@@ -73,7 +73,7 @@ namespace Exiv2 {
         ErrMsg( 28, N_("Invalid charset: `%1'")), // %1=charset name
         ErrMsg( 29, N_("Unsupported date format")),
         ErrMsg( 30, N_("Unsupported time format")),
-        ErrMsg( 31, N_("Writing %1 to %2 images is not supported")), // %1=metadata type, %2=image format
+        ErrMsg( 31, N_("Writing to %2 images is not supported")), // %2=image format
         ErrMsg( 32, N_("%1 in %2 images is not supported")), // %1=metadata type, %2=image format
         ErrMsg( 33, N_("This does not look like a CRW image")),
         ErrMsg( 34, N_("%1: Not supported")), // %1=function
diff --git a/src/mrwimage.cpp b/src/mrwimage.cpp
index 4597cb9..81b1740 100644
--- a/src/mrwimage.cpp
+++ b/src/mrwimage.cpp
@@ -59,6 +59,18 @@ namespace Exiv2 {
     {
     } // MrwImage::MrwImage
 
+    void MrwImage::setExifData(const ExifData& /*exifData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "Exif metadata", "MRW"));
+    }
+
+    void MrwImage::setIptcData(const IptcData& /*iptcData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "IPTC metadata", "MRW"));
+    }
+
     void MrwImage::setComment(const std::string& /*comment*/)
     {
         // not supported
@@ -116,10 +128,8 @@ namespace Exiv2 {
 
     void MrwImage::writeMetadata()
     {
-        /*
-          Todo: implement me!
-         */
-        throw(Error(31, "metadata", "MRW"));
+        // Todo: implement me!
+        throw(Error(31, "MRW"));
     } // MrwImage::writeMetadata
 
     // *************************************************************************
diff --git a/src/mrwimage.hpp b/src/mrwimage.hpp
index 5a32595..a81ec6f 100644
--- a/src/mrwimage.hpp
+++ b/src/mrwimage.hpp
@@ -85,6 +85,16 @@ namespace Exiv2 {
          */
         void writeMetadata();
         /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setExifData(const ExifData& exifData);
+        /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setIptcData(const IptcData& iptcData);
+        /*!
           @brief Not supported. MRW format does not contain a comment.
               Calling this function will throw an Error(32).
          */
diff --git a/src/pngimage.cpp b/src/pngimage.cpp
index d0e8a3a..dd34f3c 100644
--- a/src/pngimage.cpp
+++ b/src/pngimage.cpp
@@ -62,10 +62,22 @@ namespace Exiv2 {
     {
     } // PngImage::PngImage
 
+    void PngImage::setExifData(const ExifData& /*exifData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "Exif metadata", "PNG"));
+    }
+
+    void PngImage::setIptcData(const IptcData& /*iptcData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "IPTC metadata", "PNG"));
+    }
+
     void PngImage::setComment(const std::string& /*comment*/)
     {
-        // not yet supported
-        // TODO : Add 'iTXt' chunk 'Description' tag support here
+        // Todo: implement me!
+        // Add 'iTXt' chunk 'Description' tag support here
         throw(Error(32, "Image comment", "PNG"));
     }
 
@@ -104,10 +116,8 @@ namespace Exiv2 {
 
     void PngImage::writeMetadata()
     {
-        /*
-          Todo: implement me!
-         */
-        throw(Error(31, "metadata", "PNG"));
+        //! Todo: implement me!
+        throw(Error(31, "PNG"));
     } // PngImage::writeMetadata
 
     // *************************************************************************
diff --git a/src/pngimage.hpp b/src/pngimage.hpp
index 808466a..d0cf3ea 100644
--- a/src/pngimage.hpp
+++ b/src/pngimage.hpp
@@ -88,9 +88,18 @@ namespace Exiv2 {
          */
         void writeMetadata();
         /*!
-          @brief Not supported. PNG format does not contain a comment.
-              Calling it will throw an Error(32).<br>
-              Todo: Add 'iTXt' chunk 'Description' tag support here.
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setExifData(const ExifData& exifData);
+        /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setIptcData(const IptcData& iptcData);
+        /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
          */
         void setComment(const std::string& comment);
         //@}
diff --git a/src/rafimage.cpp b/src/rafimage.cpp
index d3b9c46..f1bf758 100644
--- a/src/rafimage.cpp
+++ b/src/rafimage.cpp
@@ -59,6 +59,18 @@ namespace Exiv2 {
     {
     } // RafImage::RafImage
 
+    void RafImage::setExifData(const ExifData& /*exifData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "Exif metadata", "RAF"));
+    }
+
+    void RafImage::setIptcData(const IptcData& /*iptcData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "IPTC metadata", "RAF"));
+    }
+
     void RafImage::setComment(const std::string& /*comment*/)
     {
         // not supported
@@ -96,10 +108,8 @@ namespace Exiv2 {
 
     void RafImage::writeMetadata()
     {
-        /*
-          Todo: implement me!
-         */
-        throw(Error(31, "metadata", "RAF"));
+        //! Todo: implement me!
+        throw(Error(31, "RAF"));
     } // RafImage::writeMetadata
 
     // *************************************************************************
diff --git a/src/rafimage.hpp b/src/rafimage.hpp
index 517971f..e3369a2 100644
--- a/src/rafimage.hpp
+++ b/src/rafimage.hpp
@@ -84,6 +84,16 @@ namespace Exiv2 {
          */
         void writeMetadata();
         /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setExifData(const ExifData& exifData);
+        /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setIptcData(const IptcData& iptcData);
+        /*!
           @brief Not supported. RAF format does not contain a comment.
               Calling this function will throw an Error(32).
          */
diff --git a/src/tiffimage.cpp b/src/tiffimage.cpp
index fc3ab87..71e4620 100644
--- a/src/tiffimage.cpp
+++ b/src/tiffimage.cpp
@@ -59,6 +59,18 @@ namespace Exiv2 {
     {
     } // TiffImage::TiffImage
 
+    void TiffImage::setExifData(const ExifData& /*exifData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "Exif metadata", "TIFF"));
+    }
+
+    void TiffImage::setIptcData(const IptcData& /*iptcData*/)
+    {
+        // Todo: implement me!
+        throw(Error(32, "IPTC metadata", "TIFF"));
+    }
+
     void TiffImage::setComment(const std::string& /*comment*/)
     {
         // not supported
@@ -84,10 +96,8 @@ namespace Exiv2 {
 
     void TiffImage::writeMetadata()
     {
-        /*
-          Todo: implement me!
-         */
-        throw(Error(31, "metadata", "TIFF"));
+        //! Todo: implement me!
+        throw(Error(31, "TIFF"));
     } // TiffImage::writeMetadata
 
     const uint16_t TiffHeade2::tag_ = 42;
diff --git a/src/tiffimage.hpp b/src/tiffimage.hpp
index cc9de85..3d08f3c 100644
--- a/src/tiffimage.hpp
+++ b/src/tiffimage.hpp
@@ -77,17 +77,27 @@ namespace Exiv2 {
 
         //! @name Manipulators
         //@{
-        void            readMetadata();
+        void readMetadata();
         /*!
           @brief Todo: Write metadata back to the image. This method is not
               yet implemented. Calling it will throw an Error(31).
          */
-        void            writeMetadata();
+        void writeMetadata();
+        /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setExifData(const ExifData& exifData);
+        /*!
+          @brief Todo: Not supported yet, requires writeMetadata(). Calling 
+              this function will throw an Error(32).
+         */
+        void setIptcData(const IptcData& iptcData);
         /*!
           @brief Not supported. TIFF format does not contain a comment.
               Calling this function will throw an Error(32).
          */
-        void            setComment(const std::string& comment);
+        void setComment(const std::string& comment);
         //@}
 
     private:

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list