Commit fb41b41b authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

Feature: Added stubs for UUID generation

parent 8bddb6d3
......@@ -16,6 +16,7 @@ libigloo_la_SOURCES = \
src/sp.c \
src/ro.c \
src/tap.c \
src/uuid.c \
src/private.h
AM_CPPFLAGS = -I$(top_srcdir)/include
......@@ -39,7 +40,8 @@ IGLOO_BUILT_TESTS = \
tests/error \
tests/prng \
tests/cs \
tests/time
tests/time \
tests/uuid
# List all tests, if a test does not need to be compile
# (i.e. a script) add it here but not in IGLOO_BUILT_TESTS
......@@ -67,7 +69,8 @@ pkginclude_HEADERS = \
include/igloo/prng.h \
include/igloo/cs.h \
include/igloo/sp.h \
include/igloo/tap.h
include/igloo/tap.h \
include/igloo/uuid.h
# pkg-config .pc file
......
/* Copyright (C) 2022 Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _LIBIGLOO__UUID_H_
#define _LIBIGLOO__UUID_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <igloo/types.h>
igloo_error_t igloo_uuid_new_random_sp(const char **ref, igloo_ro_t instance) igloo_ATTR_F_WARN_UNUSED_RESULT;
igloo_error_t igloo_uuid_new_random_cstr(char **str, igloo_ro_t instance) igloo_ATTR_F_WARN_UNUSED_RESULT;
#ifdef __cplusplus
}
#endif
#endif /* ! _LIBIGLOO__UUID_H_ */
/* Copyright (C) 2022 Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <igloo/uuid.h>
#include <igloo/sp.h>
#include <igloo/error.h>
igloo_error_t igloo_uuid_new_random_sp(const char **ref, igloo_ro_t instance)
{
return igloo_ERROR_NOSYS;
}
igloo_error_t igloo_uuid_new_random_cstr(char **str, igloo_ro_t instance)
{
return igloo_ERROR_NOSYS;
}
/* Copyright (C) 2022 Philipp "ph3-der-loewe" Schafft <lion@lion.leolix.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdlib.h>
#include <igloo/tap.h>
#include <igloo/igloo.h>
#include <igloo/uuid.h>
#include <igloo/sp.h>
static igloo_ro_t g_instance;
int main (void)
{
igloo_tap_init();
igloo_tap_exit_on(igloo_TAP_EXIT_ON_FIN, NULL);
igloo_tap_test_success("igloo_initialize", igloo_initialize(&g_instance));
igloo_tap_test_success("unref instance", igloo_ro_unref(&g_instance));
igloo_tap_fin();
return EXIT_FAILURE; // return failure as we should never reach this point!
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment