diff --git a/Makefile.am b/Makefile.am index d802794..5ecba79 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,6 +23,7 @@ pkginclude_HEADERS = \ include/igloo/interface.h \ include/igloo/io.h \ include/igloo/socket.h \ + include/igloo/socketaddr.h \ include/igloo/stdio.h \ include/igloo/filter.h \ include/igloo/objecthandler.h \ @@ -40,6 +41,7 @@ libigloo_la_SOURCES = \ src/ro.c \ src/io.c \ src/socket.c \ + src/socketaddr.c \ src/stdio.c \ src/filter.c \ src/objecthandler.c \ diff --git a/include/igloo/socketaddr.h b/include/igloo/socketaddr.h new file mode 100644 index 0000000..0765b25 --- /dev/null +++ b/include/igloo/socketaddr.h @@ -0,0 +1,36 @@ +/* Copyright (C) 2019 Philipp "ph3-der-loewe" Schafft + * + * 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__SOCKETADDR_H_ +#define _LIBIGLOO__SOCKETADDR_H_ +/** + * @file + * Put a good description of this file here + */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Put stuff here */ + +#ifdef __cplusplus +} +#endif + +#endif /* ! _LIBIGLOO__SOCKETADDR_H_ */ diff --git a/include/igloo/types.h b/include/igloo/types.h index e58dbe1..88675f6 100644 --- a/include/igloo/types.h +++ b/include/igloo/types.h @@ -41,6 +41,7 @@ extern "C" { typedef struct igloo_io_tag igloo_io_t; typedef struct igloo_socket_tag igloo_socket_t; +typedef struct igloo_socketaddr_tag igloo_socketaddr_t; typedef struct igloo_filter_tag igloo_filter_t; typedef struct igloo_objecthandler_tag igloo_objecthandler_t; typedef struct igloo_logmsg_tag igloo_logmsg_t; @@ -72,6 +73,7 @@ typedef union __attribute__ ((__transparent_union__)) { igloo_RO_TYPE(igloo_ro_base_t) igloo_RO_TYPE(igloo_io_t) igloo_RO_TYPE(igloo_socket_t) + igloo_RO_TYPE(igloo_socketaddr_t) igloo_RO_TYPE(igloo_filter_t) igloo_RO_TYPE(igloo_objecthandler_t) igloo_RO_TYPE(igloo_logmsg_t) diff --git a/src/socketaddr.c b/src/socketaddr.c new file mode 100644 index 0000000..3575305 --- /dev/null +++ b/src/socketaddr.c @@ -0,0 +1,29 @@ +/* Icecast + * + * This program is distributed under the GNU General Public License, version 2. + * A copy of this license is included with this source. + * + * Copyright 2019, Philipp "ph3-der-loewe" Schafft , + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include + +struct igloo_socketaddr_tag { + igloo_ro_base_t __base; +}; + +static void __free(igloo_ro_t self); + +igloo_RO_PUBLIC_TYPE(igloo_socketaddr_t, + igloo_RO_TYPEDECL_FREE(__free), + igloo_RO_TYPEDECL_NEW_NOOP() + ); + +static void __free(igloo_ro_t self) +{ +}