From d161d1616d4cb32a8c1e23a0587ee37e3ab0deb0 Mon Sep 17 00:00:00 2001 From: Rick Bell Date: Fri, 1 May 2015 14:33:15 -0700 Subject: Added new core.c and core.h to Makefile.am Updated Copyright from 2013 to 2015 --- Makefile.am | 2 ++ libdleyna/core/core.h | 53 ++++------------------------------------- libdleyna/core/error.c | 2 +- libdleyna/core/error.h | 2 +- libdleyna/core/log.c | 2 +- libdleyna/core/log.h | 2 +- libdleyna/core/service-task.c | 2 +- libdleyna/core/service-task.h | 2 +- libdleyna/core/settings.c | 2 +- libdleyna/core/settings.h | 2 +- libdleyna/core/task-atom.h | 2 +- libdleyna/core/task-processor.c | 2 +- libdleyna/core/task-processor.h | 2 +- m4/compiler-flags.m4 | 2 +- m4/log.m4 | 2 +- 15 files changed, 20 insertions(+), 61 deletions(-) diff --git a/Makefile.am b/Makefile.am index 340d6bc..fcb513a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,6 +19,7 @@ lib_LTLIBRARIES = libdleyna-core-1.0.la libdleyna_coreinc_HEADERS = libdleyna/core/connector.h \ libdleyna/core/connector-mgr.h \ libdleyna/core/control-point.h \ + libdleyna/core/core.h \ libdleyna/core/error.h \ libdleyna/core/log.h \ libdleyna/core/main-loop.h \ @@ -34,6 +35,7 @@ libdleyna_core_1_0_la_LDFLAGS = -version-info $(DLEYNA_CORE_VERSION) \ libdleyna_core_1_0_la_SOURCES = $(libdleyna_coreinc_HEADERS) \ libdleyna/core/connector-mgr.c \ + libdleyna/core/core.c \ libdleyna/core/error.c \ libdleyna/core/log.c \ libdleyna/core/main-loop.c \ diff --git a/libdleyna/core/core.h b/libdleyna/core/core.h index 8d9bdda..d5a6dd2 100644 --- a/libdleyna/core/core.h +++ b/libdleyna/core/core.h @@ -20,54 +20,11 @@ * */ -#include +#ifndef DLEYNA_CORE_TASK_H__ +#define DLEYNA_CORE_TASK_H__ -#include "core.h" +#include -gchar *dleyna_core_prv_convert_udn_to_path(const gchar *udn) -{ - gchar *uuid; - size_t len; - size_t dest_len; - size_t i; +gchar *dleyna_core_prv_convert_udn_to_path(const gchar *udn); - /* This function will generate a valid dbus path from the udn - * We are not going to check the UDN validity. We will try to - * convert it anyway. To avoid any security problem, we will - * check some limits and possibly return only a partial - * UDN. For a better understanding, a valid UDN should be: - * UDN = "uuid:4Hex-2Hex-2Hex-2Hex-6Hex" - * - * The convertion rules are: - * 1 - An invalid char will be escaped using its hexa representation - * prefixed with '_': - * Example 1 ': ' -> '_3A' - * Example 2 '- ' -> '_2D' - * 2 - The max size of the converted UDN can be 3 times the original - * size (if all char are not dbus compliant). - * The max size of a dbus path is an UINT32: G_MAXUINT32 - * We will limit the of the converted string size to G_MAXUINT32 / 2 - * otherwise we will never have space to generate object path. - */ - - len = strlen(udn); - dest_len = MIN(len * 3, G_MAXUINT32 / 2); - - uuid = g_malloc(dest_len + 1); - i = 0; - - while (*udn && (i < dest_len)) - { - if (g_ascii_isalnum(*udn) || (*udn == '_')) - uuid[i++] = *udn; - else - i += g_snprintf(uuid + i, dest_len + 1,"_%02x", *udn); - - udn++; - } - - - uuid[i]=0; - - return uuid; -} +#endif /* DLEYNA_CORE_TASK_H__ */ diff --git a/libdleyna/core/error.c b/libdleyna/core/error.c index 3f28dcb..1b094bd 100644 --- a/libdleyna/core/error.c +++ b/libdleyna/core/error.c @@ -1,7 +1,7 @@ /* * dleyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/error.h b/libdleyna/core/error.h index 2bb122f..35ba714 100644 --- a/libdleyna/core/error.h +++ b/libdleyna/core/error.h @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/log.c b/libdleyna/core/log.c index 04672d9..bcdc3c3 100644 --- a/libdleyna/core/log.c +++ b/libdleyna/core/log.c @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/log.h b/libdleyna/core/log.h index 6a0d28d..a99056e 100644 --- a/libdleyna/core/log.h +++ b/libdleyna/core/log.h @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/service-task.c b/libdleyna/core/service-task.c index c009dee..3c5c7c5 100644 --- a/libdleyna/core/service-task.c +++ b/libdleyna/core/service-task.c @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/service-task.h b/libdleyna/core/service-task.h index 0961215..25f0a81 100644 --- a/libdleyna/core/service-task.h +++ b/libdleyna/core/service-task.h @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/settings.c b/libdleyna/core/settings.c index d97d3a2..ef02d44 100644 --- a/libdleyna/core/settings.c +++ b/libdleyna/core/settings.c @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/settings.h b/libdleyna/core/settings.h index a7603c9..5d9b69a 100644 --- a/libdleyna/core/settings.h +++ b/libdleyna/core/settings.h @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/task-atom.h b/libdleyna/core/task-atom.h index 70d3a6f..7e9f722 100644 --- a/libdleyna/core/task-atom.h +++ b/libdleyna/core/task-atom.h @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/task-processor.c b/libdleyna/core/task-processor.c index efbd9ab..6277897 100644 --- a/libdleyna/core/task-processor.c +++ b/libdleyna/core/task-processor.c @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/libdleyna/core/task-processor.h b/libdleyna/core/task-processor.h index ac0b6f4..2be5ce4 100644 --- a/libdleyna/core/task-processor.h +++ b/libdleyna/core/task-processor.h @@ -1,7 +1,7 @@ /* * dLeyna * - * Copyright (C) 2012-2013 Intel Corporation. All rights reserved. + * Copyright (C) 2012-2015 Intel Corporation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, diff --git a/m4/compiler-flags.m4 b/m4/compiler-flags.m4 index 645137e..9a88f3d 100644 --- a/m4/compiler-flags.m4 +++ b/m4/compiler-flags.m4 @@ -1,7 +1,7 @@ dnl dnl dLeyna dnl -dnl Copyright (C) 2012-2013 Intel Corporation. All rights reserved. +dnl Copyright (C) 2012-2015 Intel Corporation. All rights reserved. dnl dnl This program is free software; you can redistribute it and/or modify it dnl under the terms and conditions of the GNU Lesser General Public License, diff --git a/m4/log.m4 b/m4/log.m4 index abc5a6e..a258a58 100644 --- a/m4/log.m4 +++ b/m4/log.m4 @@ -1,7 +1,7 @@ dnl dnl dLeyna dnl -dnl Copyright (C) 2012-2013 Intel Corporation. All rights reserved. +dnl Copyright (C) 2012-2015 Intel Corporation. All rights reserved. dnl dnl This program is free software; you can redistribute it and/or modify it dnl under the terms and conditions of the GNU Lesser General Public License, -- cgit v1.2.1