Add stub ChiakiDiscoveryService

This commit is contained in:
Florian Märkl 2019-06-28 13:43:10 +02:00
commit 040c9af841
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
3 changed files with 72 additions and 2 deletions

View file

@ -25,7 +25,8 @@ set(HEADER_FILES
include/chiaki/discovery.h
include/chiaki/congestioncontrol.h
include/chiaki/stoppipe.h
include/chiaki/reorderqueue.h)
include/chiaki/reorderqueue.h
include/chiaki/discoveryservice.h)
set(SOURCE_FILES
src/common.c
@ -53,7 +54,8 @@ set(SOURCE_FILES
src/discovery.c
src/congestioncontrol.c
src/stoppipe.c
src/reorderqueue.c)
src/reorderqueue.c
src/discoveryservice.c)
add_subdirectory(protobuf)
include_directories("${NANOPB_SOURCE_DIR}")

View file

@ -0,0 +1,40 @@
/*
* This file is part of Chiaki.
*
* Chiaki is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Chiaki 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Chiaki. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef CHIAKI_DISCOVERYSERVICE_H
#define CHIAKI_DISCOVERYSERVICE_H
#include "discovery.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct chiaki_discovery_service_t
{
ChiakiDiscovery discovery;
} ChiakiDiscoveryService;
CHIAKI_EXPORT ChiakiErrorCode chiaki_discovery_service_init(ChiakiDiscoveryService *service, ChiakiLog *log, sa_family_t family);
CHIAKI_EXPORT void chiaki_discovery_service_fini(ChiakiDiscoveryService *service);
#ifdef __cplusplus
}
#endif
#endif //CHIAKI_DISCOVERYSERVICE_H

View file

@ -0,0 +1,28 @@
/*
* This file is part of Chiaki.
*
* Chiaki is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Chiaki 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Chiaki. If not, see <https://www.gnu.org/licenses/>.
*/
#include <chiaki/discoveryservice.h>
CHIAKI_EXPORT ChiakiErrorCode chiaki_discovery_service_init(ChiakiDiscoveryService *service, ChiakiLog *log, sa_family_t family)
{
return chiaki_discovery_init(&service->discovery, log, family);
}
CHIAKI_EXPORT void chiaki_discovery_service_fini(ChiakiDiscoveryService *service)
{
chiaki_discovery_fini(&service->discovery);
}