Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename library to cdoc #13

Merged
merged 1 commit into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ endif()

find_package(Doxygen)
if( DOXYGEN_FOUND )
configure_file(${CMAKE_SOURCE_DIR}/etc/Doxyfile.in Doxyfile @ONLY )
configure_file(${CMAKE_SOURCE_DIR}/etc/Doxyfile.in Doxyfile @ONLY)
add_custom_target(docs ALL
Doxygen::doxygen Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR} )
install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR} )
install(DIRECTORY ${CMAKE_BINARY_DIR}/doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR})
install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DOCDIR})
endif()

add_subdirectory(libcdoc)
add_subdirectory(cdoc)

find_package(Boost COMPONENTS unit_test_framework QUIET)
if (TARGET Boost::unit_test_framework)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion libcdoc/CDocException.java → cdoc/CDocException.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ee.ria.libcdoc;
package ee.ria.cdoc;

public class CDocException extends java.lang.Exception {
CDocException(String msg) {
Expand Down
12 changes: 6 additions & 6 deletions libcdoc/CDocReader.h → cdoc/CDocReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
*
*/

#include <libcdoc/Configuration.h>
#include <libcdoc/CryptoBackend.h>
#include <libcdoc/Exports.h>
#include <libcdoc/Io.h>
#include <libcdoc/Lock.h>
#include <libcdoc/NetworkBackend.h>
#include <cdoc/Configuration.h>
#include <cdoc/CryptoBackend.h>
#include <cdoc/Exports.h>
#include <cdoc/Io.h>
#include <cdoc/Lock.h>
#include <cdoc/NetworkBackend.h>

namespace libcdoc {

Expand Down
12 changes: 6 additions & 6 deletions libcdoc/CDocWriter.h → cdoc/CDocWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
*
*/

#include <libcdoc/Recipient.h>
#include <libcdoc/Io.h>
#include <cdoc/Recipient.h>
#include <cdoc/Io.h>

#include <libcdoc/Configuration.h>
#include <libcdoc/CryptoBackend.h>
#include <libcdoc/Exports.h>
#include <libcdoc/NetworkBackend.h>
#include <cdoc/Configuration.h>
#include <cdoc/CryptoBackend.h>
#include <cdoc/Exports.h>
#include <cdoc/NetworkBackend.h>

namespace libcdoc {

Expand Down
24 changes: 12 additions & 12 deletions libcdoc/CMakeLists.txt → cdoc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ set_target_properties(cdoc PROPERTIES
PUBLIC_HEADER "${PUBLIC_HEADERS}"
FRAMEWORK_VERSION 1
FRAMEWORK "${FRAMEWORK}"
MACOSX_FRAMEWORK_IDENTIFIER "ee.ria.libcdoc"
MACOSX_FRAMEWORK_IDENTIFIER "ee.ria.cdoc"
MACOSX_RPATH YES
COMPILE_DEFINITIONS TARGET_NAME="$<TARGET_NAME:cdoc>"
)
Expand All @@ -99,7 +99,7 @@ set_target_properties(cdoc_static PROPERTIES
PUBLIC_HEADER "${PUBLIC_HEADERS}"
FRAMEWORK_VERSION 1
FRAMEWORK "${FRAMEWORK}"
MACOSX_FRAMEWORK_IDENTIFIER "ee.ria.libcdoc"
MACOSX_FRAMEWORK_IDENTIFIER "ee.ria.cdoc"
MACOSX_RPATH YES
COMPILE_DEFINITIONS TARGET_NAME="$<TARGET_NAME:cdoc>"
)
Expand Down Expand Up @@ -134,7 +134,7 @@ if(SWIG_FOUND)
if(JAVA_INCLUDE_PATH)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/CDocException.java DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/java)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/IStreamSource.java DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/java)
set(CMAKE_SWIG_FLAGS -package ee.ria.libcdoc)
set(CMAKE_SWIG_FLAGS -package ee.ria.cdoc)
set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}/java)
swig_add_library(cdoc_java LANGUAGE java SOURCES ../libcdoc.i)
target_include_directories(cdoc_java PRIVATE ${JAVA_INCLUDE_PATH} $<$<BOOL:${JAVA_INCLUDE_PATH2}>:${JAVA_INCLUDE_PATH2}>)
Expand All @@ -145,7 +145,7 @@ if(SWIG_FOUND)
SWIG_COMPILE_DEFINITIONS $<$<PLATFORM_ID:Windows>:SWIGWIN>
)
install(TARGETS cdoc_java DESTINATION $<IF:$<PLATFORM_ID:Darwin>,/Library/Java/Extensions,${CMAKE_INSTALL_LIBDIR}>)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/java/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ee/ria/libcdoc FILES_MATCHING PATTERN "*.java")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/java/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ee/ria/cdoc FILES_MATCHING PATTERN "*.java")
if(WIN32)
install(FILES $<TARGET_PDB_FILE:cdoc_java> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
endif()
Expand Down Expand Up @@ -192,12 +192,12 @@ ${MODULE_LIST}
endif()

install(TARGETS cdoc
EXPORT libcdocExport
EXPORT cdocExport
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
RESOURCE DESTINATION ${CDOC_CONFIG_DIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libcdoc
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cdoc
FRAMEWORK DESTINATION ${FRAMEWORK_DESTINATION}
)

Expand All @@ -207,19 +207,19 @@ install(TARGETS cdoc_static
)

if(NOT ANDROID)
install(EXPORT libcdocExport
FILE libcdoc-config.cmake
install(EXPORT cdocExport
FILE cdoc-config.cmake
NAMESPACE cdoc::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libcdoc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cdoc
)
include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/libcdoc-config-version.cmake"
${CMAKE_CURRENT_BINARY_DIR}/cdoc-config-version.cmake
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libcdoc-config-version.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libcdoc
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cdoc-config-version.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cdoc
)
endif()

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions libcdoc/Configuration.h → cdoc/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*
*/

#include <libcdoc/Exports.h>
#include <libcdoc/CDoc.h>
#include <cdoc/Exports.h>
#include <cdoc/CDoc.h>

#include <cstdint>
#include <string>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions libcdoc/CryptoBackend.h → cdoc/CryptoBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*
*/

#include <libcdoc/CDoc.h>
#include <libcdoc/Exports.h>
#include <libcdoc/Lock.h>
#include <cdoc/CDoc.h>
#include <cdoc/Exports.h>
#include <cdoc/Lock.h>

#include <cstdint>
#include <string>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion libcdoc/ILogger.h → cdoc/ILogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <string>

#include <libcdoc/Exports.h>
#include <cdoc/Exports.h>

#ifdef __GNUC__
#define FMT_HEADER_ONLY
Expand Down
2 changes: 1 addition & 1 deletion libcdoc/IStreamSource.java → cdoc/IStreamSource.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ee.ria.libcdoc;
package ee.ria.cdoc;

import java.io.IOException;
import java.io.InputStream;
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions libcdoc/Io.h → cdoc/Io.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef __IO_H__
#define __IO_H__

#include <libcdoc/Exports.h>
#include <cdoc/Exports.h>

#include <libcdoc/CDoc.h>
#include <cdoc/CDoc.h>

#include <cstdint>
#include <filesystem>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion libcdoc/Lock.h → cdoc/Lock.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

#include <libcdoc/Exports.h>
#include <cdoc/Exports.h>

#include <cstdint>
#include <string>
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions libcdoc/NetworkBackend.h → cdoc/NetworkBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*
*/

#include <libcdoc/CryptoBackend.h>
#include <libcdoc/Exports.h>
#include <libcdoc/Recipient.h>
#include <cdoc/CryptoBackend.h>
#include <cdoc/Exports.h>
#include <cdoc/Recipient.h>

#include <vector>

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion libcdoc/PKCS11Backend.h → cdoc/PKCS11Backend.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __PKCS11_BACKEND_H__
#define __PKCS11_BACKEND_H__

#include <libcdoc/CryptoBackend.h>
#include <cdoc/CryptoBackend.h>

#include <memory>

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion libcdoc/Recipient.h → cdoc/Recipient.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
*/

#include <libcdoc/Exports.h>
#include <cdoc/Exports.h>

#include <map>
#include <string>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion libcdoc/Tar.h → cdoc/Tar.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef TAR_H
#define TAR_H

#include <libcdoc/Io.h>
#include <cdoc/Io.h>

#include <cstring>
#include <string>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion libcdoc/WinBackend.h → cdoc/WinBackend.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __LIBCDOC_WINBACKEND_H__
#define __LIBCDOC_WINBACKEND_H__

#include <libcdoc/CryptoBackend.h>
#include <cdoc/CryptoBackend.h>

#include <memory>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions debian/libcdoc-dev.install
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
usr/include/libcdoc/
usr/include/ee/ria/libcdoc/*
usr/include/cdoc_csharp/*
usr/include/cdoc
usr/include/ee/ria/cdoc
usr/include/cdoc_csharp
usr/lib/*/libcdoc.so
usr/lib/*/cmake
usr/share/doc/libcdoc
1 change: 0 additions & 1 deletion debian/not-installed

This file was deleted.

6 changes: 3 additions & 3 deletions etc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -943,9 +943,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

#INPUT = @CMAKE_SOURCE_DIR@/libcdoc \
# @CMAKE_SOURCE_DIR@/libcdoc.dox
INPUT = @CMAKE_SOURCE_DIR@/libcdoc
#INPUT = @CMAKE_SOURCE_DIR@/cdoc \
# @CMAKE_SOURCE_DIR@/cdoc.dox
INPUT = @CMAKE_SOURCE_DIR@/cdoc

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
2 changes: 1 addition & 1 deletion examples/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ base {
}
jar {
manifest {
attributes 'Main-Class': 'ee.ria.libcdoc.CDocTool'
attributes 'Main-Class': 'ee.ria.cdoc.CDocTool'
}
}
2 changes: 1 addition & 1 deletion examples/java/src/main/java/ee/ria/libcdoc/CDocTool.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ee.ria.libcdoc;
package ee.ria.cdoc;

import java.io.File;
import java.io.FileInputStream;
Expand Down
18 changes: 9 additions & 9 deletions libcdoc.i
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
$action;
if (result < 0) {
std::string err_str = arg1->getLastErrorStr();
jclass clazz = jenv->FindClass("ee/ria/libcdoc/CDocException");
jclass clazz = jenv->FindClass("ee/ria/cdoc/CDocException");
jenv->ThrowNew(clazz, err_str.c_str());
return $null;
}
Expand Down Expand Up @@ -188,8 +188,8 @@
%}
%typemap(in) std::vector<uint8_t>& dst %{
// DataBuffer in
jclass $1_class = jenv->FindClass("ee/ria/libcdoc/DataBuffer");
jmethodID $1_mid = jenv->GetStaticMethodID($1_class, "getCPtr", "(Lee/ria/libcdoc/DataBuffer;)J");
jclass $1_class = jenv->FindClass("ee/ria/cdoc/DataBuffer");
jmethodID $1_mid = jenv->GetStaticMethodID($1_class, "getCPtr", "(Lee/ria/cdoc/DataBuffer;)J");
jlong $1_cptr = jenv->CallStaticLongMethod($1_class, $1_mid, $input);
libcdoc::DataBuffer *$1_db = (libcdoc::DataBuffer *) $1_cptr;
$1 = $1_db->data;
Expand All @@ -199,7 +199,7 @@
%typemap(jni) std::vector<uint8_t>& dst "jobject"
%typemap(javaout) std::vector<uint8_t>& dst "$jnicall"
%typemap(javain) std::vector<uint8_t>& dst "$javainput"
%typemap(directorin,descriptor="Lee/ria/libcdoc/DataBuffer;") std::vector<uint8_t>& dst %{
%typemap(directorin,descriptor="Lee/ria/cdoc/DataBuffer;") std::vector<uint8_t>& dst %{
// DataBuffer directorin

// Use scope guard to reset DataBuffer after Java call
Expand All @@ -209,7 +209,7 @@
};
std::unique_ptr<libcdoc::DataBuffer, decltype(del)> $1_db(new libcdoc::DataBuffer(&$1), del);

jclass buf_class = jenv->FindClass("ee/ria/libcdoc/DataBuffer");
jclass buf_class = jenv->FindClass("ee/ria/cdoc/DataBuffer");
jmethodID mid = jenv->GetMethodID(buf_class, "<init>", "(JZ)V");
jobject obj = jenv->NewObject(buf_class, mid, (jlong) $1_db.get(), JNI_FALSE);
$input = obj;
Expand Down Expand Up @@ -278,8 +278,8 @@
%typemap(in) std::vector<std::vector<uint8_t>>& %{
// CertificateList in
std::cerr << "%typemap(in) std::vector<std::vector<uint8_t>>&" << std::endl;
jclass $1_class = jenv->FindClass("ee/ria/libcdoc/CertificateList");
jmethodID $1_mid = jenv->GetStaticMethodID($1_class, "getCPtr", "(Lee/ria/libcdoc/CertificateList;)J");
jclass $1_class = jenv->FindClass("ee/ria/cdoc/CertificateList");
jmethodID $1_mid = jenv->GetStaticMethodID($1_class, "getCPtr", "(Lee/ria/cdoc/CertificateList;)J");
jlong $1_cptr = jenv->CallStaticLongMethod($1_class, $1_mid, $input);
libcdoc::CertificateList *$1_db = (libcdoc::CertificateList *) $1_cptr;
$1 = $1_db->data;
Expand All @@ -292,7 +292,7 @@
%typemap(jni) std::vector<std::vector<uint8_t>>& "jobject"
%typemap(javain) std::vector<std::vector<uint8_t>>& "$javainput"

%typemap(directorin,descriptor="Lee/ria/libcdoc/CertificateList;") std::vector<std::vector<uint8_t>>& %{
%typemap(directorin,descriptor="Lee/ria/cdoc/CertificateList;") std::vector<std::vector<uint8_t>>& %{
// CertificateList directorin

// Use scope guard to reset CertificateList after Java call
Expand All @@ -302,7 +302,7 @@
};
std::unique_ptr<libcdoc::CertificateList, decltype(del)> $1_db(new libcdoc::CertificateList(&$1), del);

jclass buf_class = jenv->FindClass("ee/ria/libcdoc/CertificateList");
jclass buf_class = jenv->FindClass("ee/ria/cdoc/CertificateList");
jmethodID mid = jenv->GetMethodID(buf_class, "<init>", "(JZ)V");
jobject obj = jenv->NewObject(buf_class, mid, (jlong) $1_db.get(), JNI_FALSE);
$input = obj;
Expand Down