Skip to content
Snippets Groups Projects
Commit 73d11c06 authored by Jerome Royan's avatar Jerome Royan
Browse files

initial commit

parent 3bf992e3
No related branches found
No related tags found
No related merge requests found
Showing
with 1000 additions and 6 deletions
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
node_modules
.vscode
*/build/*
EtsiClientGen/*
!EtsiClientGen/CMakeLists.txt
!EtsiClientGen/.openapi-generator-ignore
!EtsiClientGen/patches
!EtsiClientGen/conanfile.txt
\ No newline at end of file
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
CMakeLists.txt
conanfile.txt
patches
\ No newline at end of file
cmake_minimum_required (VERSION 2.6...3.10.2)
project (CGenerator)
cmake_policy(SET CMP0063 NEW)
set(CMAKE_C_VISIBILITY_PRESET default)
set(CMAKE_CXX_VISIBILITY_PRESET default)
set(CMAKE_VISIBILITY_INLINES_HIDDEN OFF)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
find_package(OpenSSL)
find_package(CURL REQUIRED)
#if (OPENSSL_FOUND)
# message (STATUS "OPENSSL found")
# set(CMAKE_C_FLAGS "-DOPENSSL")
# if(CMAKE_VERSION VERSION_LESS 3.4)
# include_directories(${OPENSSL_INCLUDE_DIR})
# include_directories(${OPENSSL_INCLUDE_DIRS})
# link_directories(${OPENSSL_LIBRARIES})
# endif()
# message(STATUS "Using OpenSSL ${OPENSSL_VERSION}")
#else()
# message (STATUS "OpenSSL Not found.")
#endif()
set(pkgName "worldStorageCClient")
# this default version can be overridden in PreTarget.cmake
set(PROJECT_VERSION_MAJOR 2)
set(PROJECT_VERSION_MINOR 1)
set(PROJECT_VERSION_PATCH 0)
#if( (DEFINED CURL_INCLUDE_DIR) AND (DEFINED CURL_LIBRARIES))
# include_directories(${CURL_INCLUDE_DIR})
# set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
#else()
# find_package(CURL 7.58.0 REQUIRED)
# if(CURL_FOUND)
# include_directories(${CURL_INCLUDE_DIR})
# set(PLATFORM_LIBRARIES ${PLATFORM_LIBRARIES} ${CURL_LIBRARIES} )
# else(CURL_FOUND)
# message(FATAL_ERROR "Could not find the CURL library and development files.")
# endif()
#endif()
set(SRCS
src/list.c
src/apiKey.c
src/apiClient.c
src/binary.c
external/cJSON.c
model/object.c
model/capability.c
model/encoding_information_structure.c
model/error.c
model/get_relocalization_information_200_response.c
model/get_relocalization_information_uuids_parameter_inner.c
model/mode_world_storage.c
model/relocalization_information.c
model/relocalization_information_reloc_objects_inner.c
model/trackable.c
model/trackable_type.c
model/type_world_storage.c
model/unit_system.c
model/world_anchor.c
model/world_link.c
api/DefaultAPI.c
api/RelocalizationInformationAPI.c
api/TrackablesAPI.c
api/WorldAnchorsAPI.c
api/WorldLinksAPI.c
)
set(HDRS
include/apiClient.h
include/list.h
include/binary.h
include/keyValuePair.h
external/cJSON.h
model/object.h
model/capability.h
model/encoding_information_structure.h
model/error.h
model/get_relocalization_information_200_response.h
model/get_relocalization_information_uuids_parameter_inner.h
model/mode_world_storage.h
model/relocalization_information.h
model/relocalization_information_reloc_objects_inner.h
model/trackable.h
model/trackable_type.h
model/type_world_storage.h
model/unit_system.h
model/world_anchor.h
model/world_link.h
api/DefaultAPI.h
api/RelocalizationInformationAPI.h
api/TrackablesAPI.h
api/WorldAnchorsAPI.h
api/WorldLinksAPI.h
)
include(PreTarget.cmake OPTIONAL)
set(PROJECT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
# Add library with project file with project name as library name
add_library(${pkgName} STATIC ${SRCS} ${HDRS})
# Link dependent libraries
#if(NOT CMAKE_VERSION VERSION_LESS 3.4)
# target_link_libraries(${pkgName} PRIVATE OpenSSL::SSL OpenSSL::Crypto)
#endif()
#target_link_libraries(${pkgName} PUBLIC ${CURL_LIBRARIES} )
target_link_libraries(${pkgName}
PUBLIC
openssl::openssl
CURL::libcurl
-lpthread
)
target_include_directories(
${pkgName} PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<INSTALL_INTERFACE:include>
)
#include(PostTarget.cmake OPTIONAL)
# installation of libraries, headers, and config files
#if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in)
# install(TARGETS ${pkgName} DESTINATION lib)
# foreach(HDR_FILE ${HDRS})
# get_filename_component(HDR_DIRECTORY ${HDR_FILE} DIRECTORY)
# get_filename_component(ABSOLUTE_HDR_DIRECTORY ${HDR_DIRECTORY} ABSOLUTE)
# file(RELATIVE_PATH RELATIVE_HDR_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${ABSOLUTE_HDR_DIRECTORY})
# install(FILES ${HDR_FILE} DESTINATION include/${pkgName}/${RELATIVE_HDR_PATH})
# endforeach()
#else()
# include(GNUInstallDirs)
# install(TARGETS ${pkgName} DESTINATION lib EXPORT ${pkgName}Targets)
install(TARGETS ${pkgName} DESTINATION lib)
foreach(HDR_FILE ${HDRS})
get_filename_component(HDR_DIRECTORY ${HDR_FILE} DIRECTORY)
get_filename_component(ABSOLUTE_HDR_DIRECTORY ${HDR_DIRECTORY} ABSOLUTE)
file(RELATIVE_PATH RELATIVE_HDR_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${ABSOLUTE_HDR_DIRECTORY})
install(FILES ${HDR_FILE} DESTINATION include/${pkgName}/${RELATIVE_HDR_PATH})
endforeach()
# include(CMakePackageConfigHelpers)
# write_basic_package_version_file(
# "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake"
# VERSION "${PROJECT_VERSION_STRING}"
# COMPATIBILITY AnyNewerVersion
# )
# export(EXPORT ${pkgName}Targets
# FILE "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Targets.cmake"
# NAMESPACE ${pkgName}::
# )
# configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.cmake.in
# "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake"
# @ONLY
# )
# set(ConfigPackageLocation lib/cmake/${pkgName})
# install(EXPORT ${pkgName}Targets
# FILE
# ${pkgName}Targets.cmake
# NAMESPACE
# ${pkgName}::
# DESTINATION
# ${ConfigPackageLocation}
# )
# install(
# FILES
# "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}Config.cmake"
# "${CMAKE_CURRENT_BINARY_DIR}/${pkgName}/${pkgName}ConfigVersion.cmake"
# DESTINATION
# ${ConfigPackageLocation}
# )
#endif()
# make installation packages
#include(Packing.cmake OPTIONAL)
# Setting file variables to null
#set(SRCS "")
#set(HDRS "")
## This section shows how to use the above compiled library to compile the source files
## set source files
#set(SRCS
# unit-tests/manual-DefaultAPI.c
# unit-tests/manual-RelocalizationInformationAPI.c
# unit-tests/manual-TrackablesAPI.c
# unit-tests/manual-WorldAnchorsAPI.c
# unit-tests/manual-WorldLinksAPI.c
#)
##set header files
#set(HDRS
#)
## loop over all files in SRCS variable
#foreach(SOURCE_FILE ${SRCS})
# # Get only the file name from the file as add_executable does not support executable with slash("/")
# get_filename_component(FILE_NAME_ONLY ${SOURCE_FILE} NAME_WE)
# # Remove .c from the file name and set it as executable name
# string( REPLACE ".c" "" EXECUTABLE_FILE ${FILE_NAME_ONLY})
# # Add executable for every source file in SRCS
# add_executable(unit-${EXECUTABLE_FILE} ${SOURCE_FILE})
# # Link above created library to executable and dependent library curl
# target_link_libraries(unit-${EXECUTABLE_FILE} ${CURL_LIBRARIES} ${pkgName} )
#endforeach(SOURCE_FILE ${SRCS})
[requires]
openssl/3.2.1
libcurl/8.6.0
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
[options]
#!/bin/bash
patch -u ../model/encoding_information_structure.c -i fixCEncodingInformationStructure.patch
patch -u ../model/error.c -i fixCError.patch
patch -u ../model/trackable.c -i fixCTrackable.patch
patch -u ../api/TrackablesAPI.c -i fixCTrackableAPI.patch
patch -u ../model/trackable_type.c -i fixCTrackableType.patch
patch -u ../api/WorldAnchorsAPI.c -i fixCWorldAnchorAPI.patch
patch -u ../model/world_link.c -i fixCWorldLink.patch
patch -u ../api/WorldLinksAPI.c -i fixCWorldLinkAPI.patch
patch -u ../model/error.h -i fixHeaderError.patch
patch -u ../model/trackable.h -i fixHeaderTrackable.patch
patch -u ../model/trackable_type.h -i fixHeaderTrackableType.patch
patch -u ../model/unit_system.h -i fixHeaderUnitSystem.patch
patch -u ../model/world_link.h -i fixHeaderWorldLink.patch
--- encoding_information_structure_origin.c 2024-05-28 14:41:34.817357145 +0200
+++ encoding_information_structure.c 2024-05-22 18:34:03.566752000 +0200
@@ -56,7 +56,7 @@
if (world_storage_api_encoding_information_structure_DATAFORMAT_NULL == encoding_information_structure->data_format) {
goto fail;
}
- if(cJSON_AddStringToObject(item, "dataFormat", data_formatencoding_information_structure_ToString(encoding_information_structure->data_format)) == NULL)
+ if(cJSON_AddStringToObject(item, "dataFormat", encoding_information_structure_data_format_ToString(encoding_information_structure->data_format)) == NULL)
{
goto fail; //Enum
}
--- error_origin.c 2024-05-28 14:41:34.827357147 +0200
+++ error.c 2024-05-21 17:10:43.422284000 +0200
@@ -5,11 +5,11 @@
-error_t *error_create(
+error__t *error_create(
int code,
char *message
) {
- error_t *error_local_var = malloc(sizeof(error_t));
+ error__t *error_local_var = malloc(sizeof(error__t));
if (!error_local_var) {
return NULL;
}
@@ -20,7 +20,7 @@
}
-void error_free(error_t *error) {
+void error_free(error__t *error) {
if(NULL == error){
return ;
}
@@ -32,7 +32,7 @@
free(error);
}
-cJSON *error_convertToJSON(error_t *error) {
+cJSON *error_convertToJSON(error__t *error) {
cJSON *item = cJSON_CreateObject();
// error->code
@@ -60,9 +60,9 @@
return NULL;
}
-error_t *error_parseFromJSON(cJSON *errorJSON){
+error__t *error_parseFromJSON(cJSON *errorJSON){
- error_t *error_local_var = NULL;
+ error__t *error_local_var = NULL;
// error->code
cJSON *code = cJSON_GetObjectItemCaseSensitive(errorJSON, "code");
--- trackable_origin.c 2024-05-28 14:41:34.877357153 +0200
+++ trackable.c 2024-05-22 18:50:02.874278000 +0200
@@ -3,42 +3,6 @@
#include <stdio.h>
#include "trackable.h"
-
-char* trackable_trackable_type_ToString(world_storage_api_trackable__e trackable_type) {
- char* trackable_typeArray[] = { "NULL", "FIDUCIAL_MARKER", "IMAGE_MARKER", "MESH", "MAP", "GEOPOSE", "OTHER" };
- return trackable_typeArray[trackable_type];
-}
-
-world_storage_api_trackable__e trackable_trackable_type_FromString(char* trackable_type){
- int stringToReturn = 0;
- char *trackable_typeArray[] = { "NULL", "FIDUCIAL_MARKER", "IMAGE_MARKER", "MESH", "MAP", "GEOPOSE", "OTHER" };
- size_t sizeofArray = sizeof(trackable_typeArray) / sizeof(trackable_typeArray[0]);
- while(stringToReturn < sizeofArray) {
- if(strcmp(trackable_type, trackable_typeArray[stringToReturn]) == 0) {
- return stringToReturn;
- }
- stringToReturn++;
- }
- return 0;
-}
-char* trackable_unit_ToString(world_storage_api_trackable__e unit) {
- char* unitArray[] = { "NULL", "MM", "CM", "DM", "M", "DAM", "HM", "KM", "INCH", "FOOT", "YARD", "MILE" };
- return unitArray[unit];
-}
-
-world_storage_api_trackable__e trackable_unit_FromString(char* unit){
- int stringToReturn = 0;
- char *unitArray[] = { "NULL", "MM", "CM", "DM", "M", "DAM", "HM", "KM", "INCH", "FOOT", "YARD", "MILE" };
- size_t sizeofArray = sizeof(unitArray) / sizeof(unitArray[0]);
- while(stringToReturn < sizeofArray) {
- if(strcmp(unit, unitArray[stringToReturn]) == 0) {
- return stringToReturn;
- }
- stringToReturn++;
- }
- return 0;
-}
-
trackable_t *trackable_create(
char *uuid,
char *name,
@@ -162,10 +126,10 @@
// trackable->trackable_type
- if (world_storage_api_trackable__NULL == trackable->trackable_type) {
+ if (world_storage_api_trackable_type__NULL == trackable->trackable_type) {
goto fail;
}
- cJSON *trackable_type_local_JSON = trackable_type_convertToJSON(trackable->trackable_type);
+ cJSON *trackable_type_local_JSON = trackable_type_trackable_type_convertToJSON(*trackable->trackable_type);
if(trackable_type_local_JSON == NULL) {
goto fail; // custom
}
@@ -217,10 +181,10 @@
// trackable->unit
- if (world_storage_api_trackable__NULL == trackable->unit) {
+ if (world_storage_api_unit_system__NULL == trackable->unit) {
goto fail;
}
- cJSON *unit_local_JSON = unit_system_convertToJSON(trackable->unit);
+ cJSON *unit_local_JSON = unit_system_unit_system_convertToJSON(*trackable->unit);
if(unit_local_JSON == NULL) {
goto fail; // custom
}
@@ -342,7 +306,7 @@
}
- trackable_type_local_nonprim = trackable_type_parseFromJSON(trackable_type); //custom
+ *trackable_type_local_nonprim = trackable_type_trackable_type_parseFromJSON(trackable_type); //custom
// trackable->trackable_encoding_information
cJSON *trackable_encoding_information = cJSON_GetObjectItemCaseSensitive(trackableJSON, "trackableEncodingInformation");
@@ -400,7 +364,7 @@
}
- unit_local_nonprim = unit_system_parseFromJSON(unit); //custom
+ *unit_local_nonprim = unit_system_unit_system_parseFromJSON(unit); //custom
// trackable->trackable_size
cJSON *trackable_size = cJSON_GetObjectItemCaseSensitive(trackableJSON, "trackableSize");
--- TrackablesAPI_origin.c 2024-05-17 23:00:40.039961617 +0200
+++ TrackablesAPI.c 2024-05-17 23:18:05.808565009 +0200
@@ -151,16 +151,7 @@
sprintf(localVarToReplace_trackableUUID, "{%s}", "trackableUUID");
localVarPath = strReplace(localVarPath, localVarToReplace_trackableUUID, trackableUUID);
- if(trackableUUID == NULL) {
- goto end;
- }
- char* localVarToReplace_trackableUUID = malloc(sizeOfPathParams_trackableUUID);
- sprintf(localVarToReplace_trackableUUID, "{%s}", "trackableUUID");
-
- localVarPath = strReplace(localVarPath, localVarToReplace_trackableUUID, trackableUUID);
-
-
-
+
// header parameters
char *keyHeader_token = NULL;
char * valueHeader_token = 0;
@@ -255,15 +246,6 @@
sprintf(localVarToReplace_trackableUUID, "{%s}", "trackableUUID");
localVarPath = strReplace(localVarPath, localVarToReplace_trackableUUID, trackableUUID);
- if(trackableUUID == NULL) {
- goto end;
- }
- char* localVarToReplace_trackableUUID = malloc(sizeOfPathParams_trackableUUID);
- sprintf(localVarToReplace_trackableUUID, "{%s}", "trackableUUID");
-
- localVarPath = strReplace(localVarPath, localVarToReplace_trackableUUID, trackableUUID);
-
-
// header parameters
char *keyHeader_token = NULL;
--- WorldAnchorsAPI_origin.c 2024-05-17 23:28:13.635759091 +0200
+++ WorldAnchorsAPI.c 2024-05-17 23:28:43.856060784 +0200
@@ -151,16 +151,7 @@
sprintf(localVarToReplace_worldAnchorUUID, "{%s}", "worldAnchorUUID");
localVarPath = strReplace(localVarPath, localVarToReplace_worldAnchorUUID, worldAnchorUUID);
- if(worldAnchorUUID == NULL) {
- goto end;
- }
- char* localVarToReplace_worldAnchorUUID = malloc(sizeOfPathParams_worldAnchorUUID);
- sprintf(localVarToReplace_worldAnchorUUID, "{%s}", "worldAnchorUUID");
-
- localVarPath = strReplace(localVarPath, localVarToReplace_worldAnchorUUID, worldAnchorUUID);
-
-
-
+
// header parameters
char *keyHeader_token = NULL;
char * valueHeader_token = 0;
@@ -255,16 +246,7 @@
sprintf(localVarToReplace_worldAnchorUUID, "{%s}", "worldAnchorUUID");
localVarPath = strReplace(localVarPath, localVarToReplace_worldAnchorUUID, worldAnchorUUID);
- if(worldAnchorUUID == NULL) {
- goto end;
- }
- char* localVarToReplace_worldAnchorUUID = malloc(sizeOfPathParams_worldAnchorUUID);
- sprintf(localVarToReplace_worldAnchorUUID, "{%s}", "worldAnchorUUID");
-
- localVarPath = strReplace(localVarPath, localVarToReplace_worldAnchorUUID, worldAnchorUUID);
-
-
-
+
// header parameters
char *keyHeader_token = NULL;
char * valueHeader_token = 0;
--- world_link_origin.c 2024-05-17 23:43:30.883486119 +0200
+++ world_link.c 2024-05-17 23:43:53.193634445 +0200
@@ -4,58 +4,6 @@
#include "world_link.h"
-char* world_link_type_from_ToString(world_storage_api_world_link__e type_from) {
- char* type_fromArray[] = { "NULL", "TRACKABLE", "ANCHOR", "UNKNOWN" };
- return type_fromArray[type_from];
-}
-
-world_storage_api_world_link__e world_link_type_from_FromString(char* type_from){
- int stringToReturn = 0;
- char *type_fromArray[] = { "NULL", "TRACKABLE", "ANCHOR", "UNKNOWN" };
- size_t sizeofArray = sizeof(type_fromArray) / sizeof(type_fromArray[0]);
- while(stringToReturn < sizeofArray) {
- if(strcmp(type_from, type_fromArray[stringToReturn]) == 0) {
- return stringToReturn;
- }
- stringToReturn++;
- }
- return 0;
-}
-char* world_link_type_to_ToString(world_storage_api_world_link__e type_to) {
- char* type_toArray[] = { "NULL", "TRACKABLE", "ANCHOR", "UNKNOWN" };
- return type_toArray[type_to];
-}
-
-world_storage_api_world_link__e world_link_type_to_FromString(char* type_to){
- int stringToReturn = 0;
- char *type_toArray[] = { "NULL", "TRACKABLE", "ANCHOR", "UNKNOWN" };
- size_t sizeofArray = sizeof(type_toArray) / sizeof(type_toArray[0]);
- while(stringToReturn < sizeofArray) {
- if(strcmp(type_to, type_toArray[stringToReturn]) == 0) {
- return stringToReturn;
- }
- stringToReturn++;
- }
- return 0;
-}
-char* world_link_unit_ToString(world_storage_api_world_link__e unit) {
- char* unitArray[] = { "NULL", "MM", "CM", "DM", "M", "DAM", "HM", "KM", "INCH", "FOOT", "YARD", "MILE" };
- return unitArray[unit];
-}
-
-world_storage_api_world_link__e world_link_unit_FromString(char* unit){
- int stringToReturn = 0;
- char *unitArray[] = { "NULL", "MM", "CM", "DM", "M", "DAM", "HM", "KM", "INCH", "FOOT", "YARD", "MILE" };
- size_t sizeofArray = sizeof(unitArray) / sizeof(unitArray[0]);
- while(stringToReturn < sizeofArray) {
- if(strcmp(unit, unitArray[stringToReturn]) == 0) {
- return stringToReturn;
- }
- stringToReturn++;
- }
- return 0;
-}
-
world_link_t *world_link_create(
char *uuid,
char *creator_uuid,
@@ -177,7 +125,7 @@
// world_link->type_from
- if (world_storage_api_world_link__NULL == world_link->type_from) {
+ if (world_storage_api_type_world_storage__NULL == world_link->type_from) {
goto fail;
}
cJSON *type_from_local_JSON = type_world_storage_convertToJSON(world_link->type_from);
@@ -191,7 +139,7 @@
// world_link->type_to
- if (world_storage_api_world_link__NULL == world_link->type_to) {
+ if (world_storage_api_type_world_storage__NULL == world_link->type_to) {
goto fail;
}
cJSON *type_to_local_JSON = type_world_storage_convertToJSON(world_link->type_to);
@@ -223,7 +171,7 @@
// world_link->unit
- if (world_storage_api_world_link__NULL == world_link->unit) {
+ if (world_storage_api_unit_system__NULL == world_link->unit) {
goto fail;
}
cJSON *unit_local_JSON = unit_system_convertToJSON(world_link->unit);
--- WorldLinksAPI_origin.c 2024-05-17 23:28:29.575918299 +0200
+++ WorldLinksAPI.c 2024-05-17 23:28:56.976190462 +0200
@@ -151,16 +151,7 @@
sprintf(localVarToReplace_worldLinkUUID, "{%s}", "worldLinkUUID");
localVarPath = strReplace(localVarPath, localVarToReplace_worldLinkUUID, worldLinkUUID);
- if(worldLinkUUID == NULL) {
- goto end;
- }
- char* localVarToReplace_worldLinkUUID = malloc(sizeOfPathParams_worldLinkUUID);
- sprintf(localVarToReplace_worldLinkUUID, "{%s}", "worldLinkUUID");
-
- localVarPath = strReplace(localVarPath, localVarToReplace_worldLinkUUID, worldLinkUUID);
-
-
-
+
// header parameters
char *keyHeader_token = NULL;
char * valueHeader_token = 0;
@@ -255,16 +246,7 @@
sprintf(localVarToReplace_worldLinkUUID, "{%s}", "worldLinkUUID");
localVarPath = strReplace(localVarPath, localVarToReplace_worldLinkUUID, worldLinkUUID);
- if(worldLinkUUID == NULL) {
- goto end;
- }
- char* localVarToReplace_worldLinkUUID = malloc(sizeOfPathParams_worldLinkUUID);
- sprintf(localVarToReplace_worldLinkUUID, "{%s}", "worldLinkUUID");
-
- localVarPath = strReplace(localVarPath, localVarToReplace_worldLinkUUID, worldLinkUUID);
-
-
-
+
// header parameters
char *keyHeader_token = NULL;
char * valueHeader_token = 0;
--- error_origin.h 2024-05-28 14:41:34.817357145 +0200
+++ error.h 2024-05-21 17:10:12.662278000 +0200
@@ -13,27 +13,27 @@
#include "../include/keyValuePair.h"
#include "../include/binary.h"
-typedef struct error_t error_t;
+typedef struct error__t error__t;
-typedef struct error_t {
+typedef struct error__t {
int code; //numeric
char *message; // string
-} error_t;
+} error__t;
-error_t *error_create(
+error__t *error_create(
int code,
char *message
);
-void error_free(error_t *error);
+void error_free(error__t *error);
-error_t *error_parseFromJSON(cJSON *errorJSON);
+error__t *error_parseFromJSON(cJSON *errorJSON);
-cJSON *error_convertToJSON(error_t *error);
+cJSON *error_convertToJSON(error__t *error);
#endif /* _error_H_ */
--- trackable_origin.h 2024-05-17 23:05:41.556322567 +0200
+++ trackable.h 2024-05-17 23:06:00.866712577 +0200
@@ -19,24 +19,6 @@
#include "trackable_type.h"
#include "unit_system.h"
-// Enum for trackable
-
-typedef enum { world_storage_api_trackable__NULL = 0, world_storage_api_trackable__FIDUCIAL_MARKER, world_storage_api_trackable__IMAGE_MARKER, world_storage_api_trackable__MESH, world_storage_api_trackable__MAP, world_storage_api_trackable__GEOPOSE, world_storage_api_trackable__OTHER } world_storage_api_trackable__e;
-
-char* trackable_trackable_type_ToString(world_storage_api_trackable__e trackable_type);
-
-world_storage_api_trackable__e trackable_trackable_type_FromString(char* trackable_type);
-
-// Enum for trackable
-
-typedef enum { world_storage_api_trackable__NULL = 0, world_storage_api_trackable__MM, world_storage_api_trackable__CM, world_storage_api_trackable__DM, world_storage_api_trackable__M, world_storage_api_trackable__DAM, world_storage_api_trackable__HM, world_storage_api_trackable__KM, world_storage_api_trackable__INCH, world_storage_api_trackable__FOOT, world_storage_api_trackable__YARD, world_storage_api_trackable__MILE } world_storage_api_trackable__e;
-
-char* trackable_unit_ToString(world_storage_api_trackable__e unit);
-
-world_storage_api_trackable__e trackable_unit_FromString(char* unit);
-
-
-
typedef struct trackable_t {
char *uuid; // string
char *name; // string
--- trackable_type_origin.h 2024-05-28 14:41:34.877357153 +0200
+++ trackable_type.h 2024-05-22 17:57:49.859596000 +0200
@@ -13,20 +13,20 @@
#include "../include/keyValuePair.h"
#include "../include/binary.h"
-typedef struct trackable_type_t trackable_type_t;
-// Enum for trackable_type
+// Enum for trackable_type
typedef enum { world_storage_api_trackable_type__NULL = 0, world_storage_api_trackable_type__FIDUCIAL_MARKER, world_storage_api_trackable_type__IMAGE_MARKER, world_storage_api_trackable_type__MESH, world_storage_api_trackable_type__MAP, world_storage_api_trackable_type__GEOPOSE, world_storage_api_trackable_type__OTHER } world_storage_api_trackable_type__e;
+typedef world_storage_api_trackable_type__e trackable_type_t;
char* trackable_type_trackable_type_ToString(world_storage_api_trackable_type__e trackable_type);
world_storage_api_trackable_type__e trackable_type_trackable_type_FromString(char* trackable_type);
-//cJSON *trackable_type_trackable_type_convertToJSON(world_storage_api_trackable_type__e trackable_type);
+cJSON *trackable_type_trackable_type_convertToJSON(world_storage_api_trackable_type__e trackable_type);
-//world_storage_api_trackable_type__e trackable_type_trackable_type_parseFromJSON(cJSON *trackable_typeJSON);
+world_storage_api_trackable_type__e trackable_type_trackable_type_parseFromJSON(cJSON *trackable_typeJSON);
#endif /* _trackable_type_H_ */
--- unit_system_origin.h 2024-05-28 14:41:34.887357155 +0200
+++ unit_system.h 2024-05-22 18:37:07.017974000 +0200
@@ -13,20 +13,17 @@
#include "../include/keyValuePair.h"
#include "../include/binary.h"
-typedef struct unit_system_t unit_system_t;
-
-
// Enum for unit_system
-
typedef enum { world_storage_api_unit_system__NULL = 0, world_storage_api_unit_system__MM, world_storage_api_unit_system__CM, world_storage_api_unit_system__DM, world_storage_api_unit_system__M, world_storage_api_unit_system__DAM, world_storage_api_unit_system__HM, world_storage_api_unit_system__KM, world_storage_api_unit_system__INCH, world_storage_api_unit_system__FOOT, world_storage_api_unit_system__YARD, world_storage_api_unit_system__MILE } world_storage_api_unit_system__e;
+typedef world_storage_api_unit_system__e unit_system_t;
char* unit_system_unit_system_ToString(world_storage_api_unit_system__e unit_system);
world_storage_api_unit_system__e unit_system_unit_system_FromString(char* unit_system);
-//cJSON *unit_system_unit_system_convertToJSON(world_storage_api_unit_system__e unit_system);
+cJSON *unit_system_unit_system_convertToJSON(world_storage_api_unit_system__e unit_system);
-//world_storage_api_unit_system__e unit_system_unit_system_parseFromJSON(cJSON *unit_systemJSON);
+world_storage_api_unit_system__e unit_system_unit_system_parseFromJSON(cJSON *unit_systemJSON);
#endif /* _unit_system_H_ */
--- world_link_origin.h 2024-05-17 23:08:53.449892849 +0200
+++ world_link.h 2024-05-17 23:13:56.354907893 +0200
@@ -26,24 +26,6 @@
world_storage_api_world_link__e world_link_type_from_FromString(char* type_from);
-// Enum for world_link
-
-typedef enum { world_storage_api_world_link__NULL = 0, world_storage_api_world_link__TRACKABLE, world_storage_api_world_link__ANCHOR, world_storage_api_world_link__UNKNOWN } world_storage_api_world_link__e;
-
-char* world_link_type_to_ToString(world_storage_api_world_link__e type_to);
-
-world_storage_api_world_link__e world_link_type_to_FromString(char* type_to);
-
-// Enum for world_link
-
-typedef enum { world_storage_api_world_link__NULL = 0, world_storage_api_world_link__MM, world_storage_api_world_link__CM, world_storage_api_world_link__DM, world_storage_api_world_link__M, world_storage_api_world_link__DAM, world_storage_api_world_link__HM, world_storage_api_world_link__KM, world_storage_api_world_link__INCH, world_storage_api_world_link__FOOT, world_storage_api_world_link__YARD, world_storage_api_world_link__MILE } world_storage_api_world_link__e;
-
-char* world_link_unit_ToString(world_storage_api_world_link__e unit);
-
-world_storage_api_world_link__e world_link_unit_FromString(char* unit);
-
-
-
typedef struct world_link_t {
char *uuid; // string
char *creator_uuid; // string
LICENSE 0 → 100644
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2022 ETSI
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*This repository is part of the outcomes of the Specialist Task Force 620 and 669 focusing on the authoring and use of a World Representation as part of the ETSI ISG Augmented Reality Framework architecture (https://www.etsi.org/deliver/etsi_gs/ARF/001_099/003/01.01.01_60/gs_ARF003v010101p.pdf).*
*The set of the World Representation components includes:*
*• The C, C++ and C# source code for servers and clients generated from OpenAPI available here (https://forge.etsi.org/rep/arf/arf005)*
*• The C++ and C# source code for servers and clients generated from OpenAPI available here (https://forge.etsi.org/rep/arf/arf005)*
*• A Unity plugin and a Unity editor for authoring and accessing a World Representation hosted on a World Storage server.*
......@@ -11,17 +11,19 @@
---
# WORLD STORAGE C CLIENT (libcurl)
# WORLD STORAGE CPP SERVER (RestBed)
## Description
This repo contains a libcurl client library generation pipeline compliant to the World Storage API.
This repo contains a restbed server library generation pipeline compliant to the World Storage API.
It also contains a sample using that library, it's a basic implementation allowing the user to perform all CRUD operations on the Trackable models.
## Repo Content
| | File / Folder | Description |
|:-:|:--------------:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| 📂 | EtsiClientGen | The folder where the library code will be generated, the openapi generator is set to not overwrite the CmakeLists.txt used to generate and export the library to the user's sytem |
| 📂 | EtsiServerGen | The folder where the library code will be generated, the openapi generator is set to not overwrite the CmakeLists.txt used to generate and export the library to the user's sytem |
| 📂 | EtsiServerImpl | This folder contains a basic implementation of this library, its main set up a local hosted server on port 8080 waiting for CRUD REST queries on the Trackable objects |
| 📂 | arf005 | A submodule pointing to the git containing the API specification file |
| 📃 | package.json | The file containing the npm scripts automating the whole library generation process |
......@@ -62,8 +64,8 @@ To generate the code and the DLLs use the following commands:
You will find the header files in:
/usr/local/include/worldStorageCClient/
/usr/local/include/worldStorageRestBedcppServer/
and the library file in:
/usr/local/lib/libworldStorageCClient.a
/usr/local/lib/libworldStorageRestBedcppServer.so
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment