[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:37:27 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=a5a84bd
The following commit has been merged in the master branch:
commit a5a84bd4b3a5d3c3bdd4754d20c67b2d37507fed
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Fri Mar 10 08:43:25 2006 +0000
Added COM project by Patrice Boissonneault
---
msvc/exiv2.sln | 16 +
msvc/exiv2com/ReadMe.txt | 67 ++++
msvc/exiv2com/exif.cpp | 141 +++++++
msvc/exiv2com/exif.h | 47 +++
msvc/exiv2com/exif.rgs | 27 ++
msvc/exiv2com/exiv2com.aps | Bin 0 -> 4316 bytes
msvc/exiv2com/exiv2com.cpp | 53 +++
msvc/exiv2com/exiv2com.def | 9 +
msvc/exiv2com/exiv2com.idl | 38 ++
msvc/exiv2com/exiv2com.rc | 139 +++++++
msvc/exiv2com/exiv2com.rgs | 11 +
.../exivsimple.vcproj => exiv2com/exiv2com.vcproj} | 412 ++++++++++++---------
msvc/exiv2com/exiv2comPS.vcproj | 131 +++++++
msvc/exiv2com/exiv2comps.def | 9 +
msvc/exiv2com/resource.h | 18 +
msvc/exiv2com/sample/default.asp | 22 ++
.../exiv2com/sample/sample.jpg | Bin
msvc/exiv2com/stdafx.cpp | 5 +
msvc/exiv2com/stdafx.h | 42 +++
19 files changed, 1017 insertions(+), 170 deletions(-)
diff --git a/msvc/exiv2.sln b/msvc/exiv2.sln
index 886b0bc..3e68d48 100644
--- a/msvc/exiv2.sln
+++ b/msvc/exiv2.sln
@@ -83,6 +83,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iptceasy", "iptceasy\iptcea
{831EF580-92C8-4CA8-B0CE-3D906280A54D} = {831EF580-92C8-4CA8-B0CE-3D906280A54D}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exiv2com", "exiv2com\exiv2com.vcproj", "{6EEE7BDC-88EE-450D-B752-63DB7E50EA8E}"
+ ProjectSection(ProjectDependencies) = postProject
+ {831EF580-92C8-4CA8-B0CE-3D906280A54D} = {831EF580-92C8-4CA8-B0CE-3D906280A54D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exiv2comPS", "exiv2com\exiv2comPS.vcproj", "{E5CADAC3-4276-4231-9626-49464C79682D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {6EEE7BDC-88EE-450D-B752-63DB7E50EA8E} = {6EEE7BDC-88EE-450D-B752-63DB7E50EA8E}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@@ -157,6 +167,12 @@ Global
{D8B36F3A-34BB-4540-A731-EEABF1DC2E05}.Debug.Build.0 = Debug|Win32
{D8B36F3A-34BB-4540-A731-EEABF1DC2E05}.Release.ActiveCfg = Release|Win32
{D8B36F3A-34BB-4540-A731-EEABF1DC2E05}.Release.Build.0 = Release|Win32
+ {6EEE7BDC-88EE-450D-B752-63DB7E50EA8E}.Debug.ActiveCfg = Debug|Win32
+ {6EEE7BDC-88EE-450D-B752-63DB7E50EA8E}.Debug.Build.0 = Debug|Win32
+ {6EEE7BDC-88EE-450D-B752-63DB7E50EA8E}.Release.ActiveCfg = Release|Win32
+ {6EEE7BDC-88EE-450D-B752-63DB7E50EA8E}.Release.Build.0 = Release|Win32
+ {E5CADAC3-4276-4231-9626-49464C79682D}.Debug.ActiveCfg = Debug|Win32
+ {E5CADAC3-4276-4231-9626-49464C79682D}.Release.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/msvc/exiv2com/ReadMe.txt b/msvc/exiv2com/ReadMe.txt
new file mode 100644
index 0000000..a7dc569
--- /dev/null
+++ b/msvc/exiv2com/ReadMe.txt
@@ -0,0 +1,67 @@
+========================================================================
+ ACTIVE TEMPLATE LIBRARY : exiv2com Project Overview
+========================================================================
+
+AppWizard has created this exiv2com project for you to use as the starting point for
+writing your Dynamic Link Library (DLL).
+
+This file contains a summary of what you will find in each of the files that
+make up your project.
+
+exiv2com.vcproj
+ This is the main project file for VC++ projects generated using an Application Wizard.
+ It contains information about the version of Visual C++ that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ Application Wizard.
+
+exiv2com.idl
+ This file contains the IDL definitions of the type library, the interfaces
+ and co-classes defined in your project.
+ This file will be processed by the MIDL compiler to generate:
+ C++ interface definitions and GUID declarations (exiv2com.h)
+ GUID definitions (exiv2com_i.c)
+ A type library (exiv2com.tlb)
+ Marshaling code (exiv2com_p.c and dlldata.c)
+
+exiv2com.h
+ This file contains the C++ interface definitions and GUID declarations of the
+ items defined in exiv2com.idl. It will be regenerated by MIDL during compilation.
+exiv2com.cpp
+ This file contains the object map and the implementation of your DLL's exports.
+exiv2com.rc
+ This is a listing of all of the Microsoft Windows resources that the
+ program uses.
+
+exiv2com.def
+ This module-definition file provides the linker with information about the exports
+ required by your DLL. It contains exports for:
+ DllGetClassObject
+ DllCanUnloadNow
+ GetProxyDllInfo
+ DllRegisterServer
+ DllUnregisterServer
+
+/////////////////////////////////////////////////////////////////////////////
+Other standard files:
+
+StdAfx.h, StdAfx.cpp
+ These files are used to build a precompiled header (PCH) file
+ named exiv2com.pch and a precompiled types file named StdAfx.obj.
+
+Resource.h
+ This is the standard header file that defines resource IDs.
+
+/////////////////////////////////////////////////////////////////////////////
+Proxy/stub DLL project and module definition file:
+
+exiv2comps.vcproj
+ This file is the project file for building a proxy/stub DLL if necessary.
+ The IDL file in the main project must contain at least one interface and you must
+ first compile the IDL file before building the proxy/stub DLL. This process generates
+ dlldata.c, exiv2com_i.c and exiv2com_p.c which are required
+ to build the proxy/stub DLL.
+
+exiv2comps.def
+ This module definition file provides the linker with information about the exports
+ required by the proxy/stub.
+/////////////////////////////////////////////////////////////////////////////
diff --git a/msvc/exiv2com/exif.cpp b/msvc/exiv2com/exif.cpp
new file mode 100644
index 0000000..800d2dc
--- /dev/null
+++ b/msvc/exiv2com/exif.cpp
@@ -0,0 +1,141 @@
+// exif.cpp : Implementation of Cexif
+
+#include "stdafx.h"
+#include "exif.h"
+
+// *****************************************************************************
+// included header files
+#ifdef _MSC_VER
+# include "exv_msvc.h"
+#else
+# include "exv_conf.h"
+#endif
+
+#include "actions.hpp"
+#include "image.hpp"
+#include "jpgimage.hpp"
+#include "exiv2.hpp"
+#include "utils.hpp"
+#include "types.hpp"
+#include "exif.hpp"
+#include "canonmn.hpp"
+#include "iptc.hpp"
+#include "futils.hpp"
+#ifndef EXV_HAVE_TIMEGM
+# include "timegm.h"
+#endif
+
+// + standard includes
+#include <string>
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <sstream>
+#include <cstring>
+#include <cstdio>
+#include <ctime>
+#include <cmath>
+#include <cassert>
+#include <sys/types.h> // for stat()
+#include <sys/stat.h> // for stat()
+#ifdef EXV_HAVE_UNISTD_H
+# include <unistd.h> // for stat()
+#endif
+#ifdef _MSC_VER
+# include <sys/utime.h>
+#include ".\exif.h"
+#else
+# include <utime.h>
+#endif
+
+
+// Cexif
+
+
+char* ConvertBSTRToLPSTR (BSTR bstrIn)
+ {
+ LPSTR pszOut = NULL;
+
+ if (bstrIn != NULL)
+ {
+ int nInputStrLen = SysStringLen (bstrIn);
+
+ // Double NULL Termination
+ int nOutputStrLen = WideCharToMultiByte(CP_ACP, 0, bstrIn, nInputStrLen, NULL, 0, 0, 0) + 2;
+
+ pszOut = new char [nOutputStrLen];
+
+ if (pszOut)
+ {
+ memset (pszOut, 0x00, sizeof (char)*nOutputStrLen);
+
+ WideCharToMultiByte (CP_ACP, 0, bstrIn, nInputStrLen, pszOut, nOutputStrLen, 0, 0);
+ }
+ }
+
+ return pszOut;
+ }
+
+STDMETHODIMP Cexif::GetExif(BSTR FileName, BSTR Tag, VARIANT* OutVal)
+{
+ if (!Exiv2::fileExists(ConvertBSTRToLPSTR(FileName), true))
+ return S_FALSE;
+
+ Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(ConvertBSTRToLPSTR(FileName));
+ image->readMetadata();
+
+ Exiv2::ExifData &exifData = image->exifData();
+ if (exifData.empty())
+ return S_FALSE;
+
+ Exiv2::ExifData::iterator md = exifData.findKey(Exiv2::ExifKey(ConvertBSTRToLPSTR(Tag)));
+ if (md != exifData.end()) {
+ BSTR a = A2BSTR( (md->value().toString()).c_str() );
+ OutVal->vt = VT_BSTR;
+ OutVal->bstrVal = a;
+ }
+
+ return S_OK;
+}
+
+STDMETHODIMP Cexif::GetExifInterpreted(BSTR FileName, VARIANT* OutVal)
+{
+ if (!Exiv2::fileExists(ConvertBSTRToLPSTR(FileName), true))
+ return S_FALSE;
+
+ std::stringstream ssRetVal;
+
+ Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(ConvertBSTRToLPSTR(FileName));
+ image->readMetadata();
+
+ //exif info
+ Exiv2::ExifData &exifData = image->exifData();
+ if (!exifData.empty())
+ {
+ Exiv2::ExifData::const_iterator md;
+ for (md = exifData.begin(); md != exifData.end(); ++md)
+ {
+ ssRetVal << md->key() << ": "
+ << std::dec << *md
+ << std::endl;
+ }
+ }
+
+ //iptc
+ Exiv2::IptcData &iptcData = image->iptcData();
+ if (!iptcData.empty())
+ {
+ Exiv2::IptcData::const_iterator md;
+ for (md = iptcData.begin(); md != iptcData.end(); ++md)
+ {
+ ssRetVal << md->key() << ": "
+ << std::dec << *md
+ << std::endl;
+ }
+ }
+
+ OutVal->vt = VT_BSTR;
+ OutVal->bstrVal = A2BSTR(ssRetVal.str().c_str());
+
+ return S_OK;
+}
diff --git a/msvc/exiv2com/exif.h b/msvc/exiv2com/exif.h
new file mode 100644
index 0000000..464bbb1
--- /dev/null
+++ b/msvc/exiv2com/exif.h
@@ -0,0 +1,47 @@
+// exif.h : Declaration of the Cexif
+
+#pragma once
+#include "resource.h" // main symbols
+
+#include "exiv2com.h"
+
+
+// Cexif
+
+class ATL_NO_VTABLE Cexif :
+ public CComObjectRootEx<CComSingleThreadModel>,
+ public CComCoClass<Cexif, &CLSID_exif>,
+ public IDispatchImpl<Iexif, &IID_Iexif, &LIBID_exiv2comLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
+{
+public:
+ Cexif()
+ {
+ }
+
+DECLARE_REGISTRY_RESOURCEID(IDR_EXIF)
+
+
+BEGIN_COM_MAP(Cexif)
+ COM_INTERFACE_ENTRY(Iexif)
+ COM_INTERFACE_ENTRY(IDispatch)
+END_COM_MAP()
+
+
+ DECLARE_PROTECT_FINAL_CONSTRUCT()
+
+ HRESULT FinalConstruct()
+ {
+ return S_OK;
+ }
+
+ void FinalRelease()
+ {
+ }
+
+public:
+
+ STDMETHOD(GetExif)(BSTR FileName, BSTR Tag, VARIANT* OutVal);
+ STDMETHOD(GetExifInterpreted)(BSTR FileName, VARIANT* OutVal);
+};
+
+OBJECT_ENTRY_AUTO(__uuidof(exif), Cexif)
diff --git a/msvc/exiv2com/exif.rgs b/msvc/exiv2com/exif.rgs
new file mode 100644
index 0000000..8f9c8f2
--- /dev/null
+++ b/msvc/exiv2com/exif.rgs
@@ -0,0 +1,27 @@
+HKCR
+{
+ exiv2com.exif.1 = s 'exif Class'
+ {
+ CLSID = s '{2528ECB1-2A9F-4A03-936D-627266DE6E09}'
+ }
+ exiv2com.exif = s 'exif Class'
+ {
+ CLSID = s '{2528ECB1-2A9F-4A03-936D-627266DE6E09}'
+ CurVer = s 'exiv2com.exif.1'
+ }
+ NoRemove CLSID
+ {
+ ForceRemove {2528ECB1-2A9F-4A03-936D-627266DE6E09} = s 'exif Class'
+ {
+ ProgID = s 'exiv2com.exif.1'
+ VersionIndependentProgID = s 'exiv2com.exif'
+ ForceRemove 'Programmable'
+ InprocServer32 = s '%MODULE%'
+ {
+ val ThreadingModel = s 'Apartment'
+ }
+ val AppID = s '%APPID%'
+ 'TypeLib' = s '{F5740DA3-D13F-438C-86FC-7EE18908F2CC}'
+ }
+ }
+}
diff --git a/msvc/exiv2com/exiv2com.aps b/msvc/exiv2com/exiv2com.aps
new file mode 100644
index 0000000..87e3420
Binary files /dev/null and b/msvc/exiv2com/exiv2com.aps differ
diff --git a/msvc/exiv2com/exiv2com.cpp b/msvc/exiv2com/exiv2com.cpp
new file mode 100644
index 0000000..a2874f2
--- /dev/null
+++ b/msvc/exiv2com/exiv2com.cpp
@@ -0,0 +1,53 @@
+// exiv2com.cpp : Implementation of DLL Exports.
+
+#include "stdafx.h"
+#include "resource.h"
+#include "exiv2com.h"
+
+class Cexiv2comModule : public CAtlDllModuleT< Cexiv2comModule >
+{
+public :
+ DECLARE_LIBID(LIBID_exiv2comLib)
+ DECLARE_REGISTRY_APPID_RESOURCEID(IDR_EXIV2COM, "{FA8DF9AF-3029-491A-8757-2E3DE2D7793C}")
+};
+
+Cexiv2comModule _AtlModule;
+
+
+// DLL Entry Point
+extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+{
+ hInstance;
+ return _AtlModule.DllMain(dwReason, lpReserved);
+}
+
+
+// Used to determine whether the DLL can be unloaded by OLE
+STDAPI DllCanUnloadNow(void)
+{
+ return _AtlModule.DllCanUnloadNow();
+}
+
+
+// Returns a class factory to create an object of the requested type
+STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
+{
+ return _AtlModule.DllGetClassObject(rclsid, riid, ppv);
+}
+
+
+// DllRegisterServer - Adds entries to the system registry
+STDAPI DllRegisterServer(void)
+{
+ // registers object, typelib and all interfaces in typelib
+ HRESULT hr = _AtlModule.DllRegisterServer();
+ return hr;
+}
+
+
+// DllUnregisterServer - Removes entries from the system registry
+STDAPI DllUnregisterServer(void)
+{
+ HRESULT hr = _AtlModule.DllUnregisterServer();
+ return hr;
+}
diff --git a/msvc/exiv2com/exiv2com.def b/msvc/exiv2com/exiv2com.def
new file mode 100644
index 0000000..5a4f40d
--- /dev/null
+++ b/msvc/exiv2com/exiv2com.def
@@ -0,0 +1,9 @@
+; exiv2com.def : Declares the module parameters.
+
+LIBRARY "exiv2com.DLL"
+
+EXPORTS
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/msvc/exiv2com/exiv2com.idl b/msvc/exiv2com/exiv2com.idl
new file mode 100644
index 0000000..2cf1bc4
--- /dev/null
+++ b/msvc/exiv2com/exiv2com.idl
@@ -0,0 +1,38 @@
+// exiv2com.idl : IDL source for exiv2com
+//
+
+// This file will be processed by the MIDL tool to
+// produce the type library (exiv2com.tlb) and marshalling code.
+
+import "oaidl.idl";
+import "ocidl.idl";
+
+[
+ object,
+ uuid(0EFCEA47-65BD-454D-AF18-610869226CFB),
+ dual,
+ nonextensible,
+ helpstring("Iexif Interface"),
+ pointer_default(unique)
+]
+interface Iexif : IDispatch{
+ [id(3), helpstring("method GetExif")] HRESULT GetExif([in] BSTR FileName, [in] BSTR Tag, [out,retval] VARIANT* OutVal);
+ [id(4), helpstring("method GetExifInterpreted")] HRESULT GetExifInterpreted([in] BSTR FileName, [out,retval] VARIANT* OutVal);
+};
+[
+ uuid(F5740DA3-D13F-438C-86FC-7EE18908F2CC),
+ version(1.0),
+ helpstring("exiv2com 1.0 Type Library")
+]
+library exiv2comLib
+{
+ importlib("stdole2.tlb");
+ [
+ uuid(2528ECB1-2A9F-4A03-936D-627266DE6E09),
+ helpstring("exif Class")
+ ]
+ coclass exif
+ {
+ [default] interface Iexif;
+ };
+};
diff --git a/msvc/exiv2com/exiv2com.rc b/msvc/exiv2com/exiv2com.rc
new file mode 100644
index 0000000..408d0f2
--- /dev/null
+++ b/msvc/exiv2com/exiv2com.rc
@@ -0,0 +1,139 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list