timesync: Remove circular header dependencies
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "timesyncd-conf.h"
|
||||
#include "timesyncd-manager.h"
|
||||
#include "timesyncd-server.h"
|
||||
#include "tests.h"
|
||||
|
||||
TEST(manager_parse_string) {
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "strv.h"
|
||||
#include "time-util.h"
|
||||
#include "timesyncd-bus.h"
|
||||
#include "timesyncd-manager.h"
|
||||
#include "timesyncd-server.h"
|
||||
#include "user-util.h"
|
||||
|
||||
static int property_get_servers(
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "bus-object.h"
|
||||
#include "timesyncd-manager.h"
|
||||
|
||||
typedef struct Manager Manager;
|
||||
|
||||
extern const BusObjectImplementation manager_object;
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "conf-parser.h"
|
||||
#include "timesyncd-manager.h"
|
||||
#include "timesyncd-server.h"
|
||||
|
||||
typedef struct Manager Manager;
|
||||
|
||||
const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ _Pragma("GCC diagnostic ignored \"-Wzero-as-null-pointer-constant\"")
|
||||
#include <stddef.h>
|
||||
#include "conf-parser.h"
|
||||
#include "timesyncd-conf.h"
|
||||
#include "timesyncd-manager.h"
|
||||
#include "timesyncd-server.h"
|
||||
%}
|
||||
struct ConfigPerfItem;
|
||||
%null_strings
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "time-util.h"
|
||||
#include "timesyncd-conf.h"
|
||||
#include "timesyncd-manager.h"
|
||||
#include "timesyncd-server.h"
|
||||
#include "user-util.h"
|
||||
|
||||
#ifndef ADJ_SETOFFSET
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
#include "time-util.h"
|
||||
#include "timesyncd-ntp-message.h"
|
||||
|
||||
typedef struct Manager Manager;
|
||||
|
||||
#include "timesyncd-server.h"
|
||||
typedef enum ServerType ServerType;
|
||||
typedef struct ServerAddress ServerAddress;
|
||||
typedef struct ServerName ServerName;
|
||||
|
||||
/*
|
||||
* "A client MUST NOT under any conditions use a poll interval less
|
||||
@@ -32,7 +32,7 @@ typedef struct Manager Manager;
|
||||
|
||||
#define DEFAULT_SAVE_TIME_INTERVAL_USEC (60 * USEC_PER_SEC)
|
||||
|
||||
struct Manager {
|
||||
typedef struct Manager {
|
||||
sd_bus *bus;
|
||||
sd_event *event;
|
||||
sd_resolve *resolve;
|
||||
@@ -116,7 +116,7 @@ struct Manager {
|
||||
/* Used to coalesce bus PropertiesChanged events */
|
||||
sd_event_source *deferred_ntp_server_event_source;
|
||||
unsigned ntp_server_change_mask;
|
||||
};
|
||||
} Manager;
|
||||
|
||||
int manager_new(Manager **ret);
|
||||
Manager* manager_free(Manager *m);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "alloc-util.h"
|
||||
#include "log.h"
|
||||
#include "string-table.h"
|
||||
#include "timesyncd-manager.h"
|
||||
#include "timesyncd-server.h"
|
||||
|
||||
static const char * const server_type_table[_SERVER_TYPE_MAX] = {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "list.h"
|
||||
#include "socket-util.h"
|
||||
|
||||
typedef struct Manager Manager;
|
||||
typedef struct ServerAddress ServerAddress;
|
||||
typedef struct ServerName ServerName;
|
||||
|
||||
@@ -16,8 +17,6 @@ typedef enum ServerType {
|
||||
_SERVER_TYPE_INVALID = -EINVAL,
|
||||
} ServerType;
|
||||
|
||||
#include "timesyncd-manager.h"
|
||||
|
||||
struct ServerAddress {
|
||||
ServerName *name;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user