1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-12-04 14:46:31 -05:00

Feature: Added a stub for socket addresses

This commit is contained in:
Philipp Schafft 2019-09-18 11:42:13 +00:00
parent ec977403d7
commit 90494bf6ff
4 changed files with 69 additions and 0 deletions

View File

@ -23,6 +23,7 @@ pkginclude_HEADERS = \
include/igloo/interface.h \ include/igloo/interface.h \
include/igloo/io.h \ include/igloo/io.h \
include/igloo/socket.h \ include/igloo/socket.h \
include/igloo/socketaddr.h \
include/igloo/stdio.h \ include/igloo/stdio.h \
include/igloo/filter.h \ include/igloo/filter.h \
include/igloo/objecthandler.h \ include/igloo/objecthandler.h \
@ -40,6 +41,7 @@ libigloo_la_SOURCES = \
src/ro.c \ src/ro.c \
src/io.c \ src/io.c \
src/socket.c \ src/socket.c \
src/socketaddr.c \
src/stdio.c \ src/stdio.c \
src/filter.c \ src/filter.c \
src/objecthandler.c \ src/objecthandler.c \

View File

@ -0,0 +1,36 @@
/* Copyright (C) 2019 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__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_ */

View File

@ -41,6 +41,7 @@ extern "C" {
typedef struct igloo_io_tag igloo_io_t; typedef struct igloo_io_tag igloo_io_t;
typedef struct igloo_socket_tag igloo_socket_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_filter_tag igloo_filter_t;
typedef struct igloo_objecthandler_tag igloo_objecthandler_t; typedef struct igloo_objecthandler_tag igloo_objecthandler_t;
typedef struct igloo_logmsg_tag igloo_logmsg_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_ro_base_t)
igloo_RO_TYPE(igloo_io_t) igloo_RO_TYPE(igloo_io_t)
igloo_RO_TYPE(igloo_socket_t) igloo_RO_TYPE(igloo_socket_t)
igloo_RO_TYPE(igloo_socketaddr_t)
igloo_RO_TYPE(igloo_filter_t) igloo_RO_TYPE(igloo_filter_t)
igloo_RO_TYPE(igloo_objecthandler_t) igloo_RO_TYPE(igloo_objecthandler_t)
igloo_RO_TYPE(igloo_logmsg_t) igloo_RO_TYPE(igloo_logmsg_t)

29
src/socketaddr.c Normal file
View File

@ -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 <lion@lion.leolix.org>,
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <igloo/socketaddr.h>
#include <igloo/ro.h>
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)
{
}