added version info, refs #4

This commit is contained in:
Marc Wäckerlin
2010-08-03 13:48:47 +00:00
parent 83b451a156
commit 8101619fdc
12 changed files with 50 additions and 9 deletions

View File

@@ -79,6 +79,10 @@
#endif
#endif
namespace pcsc {
std::string version();
}
//! @see gcryptoki
namespace cryptoki {

View File

@@ -17,8 +17,11 @@ EXTRA_DIST = $(pkgconfig_DATA).in $(shell ls -1 *.doc)
lib_LTLIBRARIES = libcryptoki++.la
libcryptoki___la_SOURCES = cryptoki.cxx cryptoki.hxx
libcryptoki___la_SOURCES = cryptoki.cxx cryptoki.hxx version.cxx
libcryptoki___la_LIBADD = -lssl
if !MINGW32
libcryptoki___la_LIBADD += -lpcsclite
endif
clean-local:
-rm -r ${QMAKE_TARGET}.app

View File

@@ -23,6 +23,10 @@
#include <cstdio>
#include <cassert>
namespace pcsc {
std::string version();
}
#ifndef OPENSSL_LOG
#include <iostream>
#if __GNUC__ >= 2
@@ -51,7 +55,6 @@
//! @see gopenssl
namespace openssl {
//============================================================================
//! @addtogroup opensslexceptions
//@{

View File

@@ -41,6 +41,7 @@
#define MAX_ATR_SIZE 33
#endif
namespace pcsc {
#ifdef UNICODE
inline std::wstring strconv(std::string s) {
return std::wstring(s.begin(), s.end());
@@ -76,6 +77,10 @@
#include <map>
#include <memory>
namespace pcsc {
std::string version();
}
#include <sstream>
#include <iomanip>

16
src/version.cxx Normal file
View File

@@ -0,0 +1,16 @@
/*! @file
@id $Id$
*/
// 1 2 3 4 5 6 7 8
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
#include <string>
namespace pcsc {
std::string version() {
return PACKAGENAME "-" PACKAGEVERSION;
}
const std::string IDENT("$Id: " PACKAGENAME "-" PACKAGEVERSION " $");
const std::string WHAT("#(@)" PACKAGENAME "-" PACKAGEVERSION);
}