diff options
author | Rick Bell <richard.s.bell@intel.com> | 2015-05-01 14:33:15 -0700 |
---|---|---|
committer | Rick Bell <richard.s.bell@intel.com> | 2015-05-01 14:33:15 -0700 |
commit | d161d1616d4cb32a8c1e23a0587ee37e3ab0deb0 (patch) | |
tree | 230f5de23945474c2235b6bc5331b3a5a3120a95 /libdleyna | |
parent | f47f094a71f21f2be141071b0d0e00b618b91f3b (diff) | |
download | dleyna-core-d161d1616d4cb32a8c1e23a0587ee37e3ab0deb0.tar.gz |
Added new core.c and core.h to Makefile.am
Updated Copyright from 2013 to 2015
Diffstat (limited to 'libdleyna')
-rw-r--r-- | libdleyna/core/core.h | 53 | ||||
-rw-r--r-- | libdleyna/core/error.c | 2 | ||||
-rw-r--r-- | libdleyna/core/error.h | 2 | ||||
-rw-r--r-- | libdleyna/core/log.c | 2 | ||||
-rw-r--r-- | libdleyna/core/log.h | 2 | ||||
-rw-r--r-- | libdleyna/core/service-task.c | 2 | ||||
-rw-r--r-- | libdleyna/core/service-task.h | 2 | ||||
-rw-r--r-- | libdleyna/core/settings.c | 2 | ||||
-rw-r--r-- | libdleyna/core/settings.h | 2 | ||||
-rw-r--r-- | libdleyna/core/task-atom.h | 2 | ||||
-rw-r--r-- | libdleyna/core/task-processor.c | 2 | ||||
-rw-r--r-- | libdleyna/core/task-processor.h | 2 |
12 files changed, 16 insertions, 59 deletions
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 <string.h> +#ifndef DLEYNA_CORE_TASK_H__ +#define DLEYNA_CORE_TASK_H__ -#include "core.h" +#include <glib.h> -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, |