summaryrefslogtreecommitdiff
path: root/subprojects
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-06-13 13:07:54 +0200
committerJens Georg <mail@jensge.org>2022-06-14 08:12:32 +0200
commit3b1fe5d0f36d13b3cd8980a1d5671aa43ede88f9 (patch)
treef8b5b6c49c9e3455635a345ac072c6b760ad4b2c /subprojects
parentb50c50dd6b27272b4e2207a6cf853defa0337684 (diff)
downloadgupnp-3b1fe5d0f36d13b3cd8980a1d5671aa43ede88f9.tar.gz
Service: Switch to g_uuid_string_random()
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/guul/guul.c86
-rw-r--r--subprojects/guul/guul.h34
-rw-r--r--subprojects/guul/meson.build34
3 files changed, 0 insertions, 154 deletions
diff --git a/subprojects/guul/guul.c b/subprojects/guul/guul.c
deleted file mode 100644
index 73c7c7c..0000000
--- a/subprojects/guul/guul.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * GUUL - GUUL Unified UUID Library
- * Copyright (C) 2015 Jens Georg.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <stdlib.h>
-
-#include <guul.h>
-
-#if defined(GUUL_PLATFORM_GENERIC) || defined(GUUL_PLATFORM_BSD)
-# include <uuid.h>
-#endif
-
-#if defined(GUUL_PLATFORM_OSX)
-# include <uuid/uuid.h>
-#endif
-
-#if defined(GUUL_PLATFORM_WINDOWS)
-# include <rpc.h>
-#endif
-
-#if defined(GUUL_PLATFORM_GENERIC) || defined(GUUL_PLATFORM_OSX)
-char *
-guul_get_uuid(void)
-{
- uuid_t uuid;
- char *out;
-
- out = calloc (41, sizeof (char));
-
- uuid_generate (uuid);
- uuid_unparse (uuid, out);
-
- return out;
-}
-#endif
-
-#if defined(GUUL_PLATFORM_BSD)
-char *
-guul_get_uuid()
-{
- uuid_t uuid;
- uint32_t status;
- char *result = NULL;
-
- uuid_create (&uuid, &status);
- uuid_to_string (&uuid, &result, &status);
-
- return result;
-}
-#endif
-
-#if defined(GUUL_PLATFORM_WINDOWS)
-char *
-guul_get_uuid()
-{
- char *ret = NULL;
- UUID uuid;
- RPC_STATUS stat;
- stat = UuidCreate (&uuid);
- if (stat == RPC_S_OK) {
- unsigned char* uuidStr = NULL;
- stat = UuidToString (&uuid, &uuidStr);
- if (stat == RPC_S_OK) {
- ret = g_strdup ((char *) uuidStr);
- RpcStringFree (&uuidStr);
- }
- }
-
- return ret;
-}
-#endif
diff --git a/subprojects/guul/guul.h b/subprojects/guul/guul.h
deleted file mode 100644
index b96bab1..0000000
--- a/subprojects/guul/guul.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * GUUL - GUUL Unified UUID Library
- * Copyright (C) 2015 Jens Georg.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __GUUL_H
-#define __GUUL_H
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-#ifdef GUUL_INTERNAL
-G_GNUC_INTERNAL
-#endif
-char *guul_get_uuid (void);
-
-G_END_DECLS
-
-#endif /* __GUUL_H */
diff --git a/subprojects/guul/meson.build b/subprojects/guul/meson.build
deleted file mode 100644
index cc1a498..0000000
--- a/subprojects/guul/meson.build
+++ /dev/null
@@ -1,34 +0,0 @@
-project('guul', 'c', version : '0.1')
-
-cc = meson.get_compiler('c')
-dependencies = [
- dependency('glib-2.0')
-]
-args = []
-
-if host_machine.system() == 'windows'
- args += '-DGUUL_PLATFORM_WINDOWS'
- dependencies += cc.find_library('rpcrt4')
-elif host_machine.system() == 'darwin'
- args += '-DGUUL_PLATFORM_OSX'
-else
- if not cc.has_function('uuid_to_string')
- dependencies += dependency('uuid')
- args += '-DGUUL_PLATFORM_GENERIC'
- else
- args += '-DGUUL_PLATFORM_BSD'
- endif
-endif
-
-guul_lib = static_library(
- 'guul',
- sources : 'guul.c',
- c_args : args,
- dependencies : dependencies
-)
-
-guul = declare_dependency (
- link_with : guul_lib,
- dependencies : dependencies,
- include_directories: include_directories('.')
-)