mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 05:53:12 -07:00
Add stub ChiakiDiscoveryService
This commit is contained in:
parent
661b410db1
commit
040c9af841
3 changed files with 72 additions and 2 deletions
|
@ -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}")
|
||||
|
|
40
lib/include/chiaki/discoveryservice.h
Normal file
40
lib/include/chiaki/discoveryservice.h
Normal 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
|
28
lib/src/discoveryservice.c
Normal file
28
lib/src/discoveryservice.c
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue