Init Commit
This commit is contained in:
11
Server/Service/CMakeLists.txt
Normal file
11
Server/Service/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
set(
|
||||
ServerServiceSrcs
|
||||
ServiceStatus.cpp
|
||||
ServiceStatus.h
|
||||
Options.cpp
|
||||
Options.h
|
||||
)
|
||||
|
||||
add_library(ServerService STATIC ${ServerServiceSrcs})
|
||||
target_link_libraries(ServerService ServiceStatusSource)
|
||||
target_link_libraries(ServerService OptionSource)
|
||||
30
Server/Service/Options.cpp
Normal file
30
Server/Service/Options.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// Created by fly on 2021/12/17.
|
||||
//
|
||||
|
||||
#include "Options.h"
|
||||
|
||||
|
||||
Options::Options(QObject *parent) : OptionsSource(parent) {
|
||||
|
||||
}
|
||||
|
||||
void Options::registerOption(
|
||||
QString optionId,
|
||||
QString optionName,
|
||||
QVariant defaultValue,
|
||||
OptionsSource::OptionType type,
|
||||
bool autoLoad,
|
||||
QString editConfig,
|
||||
QString description
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
QVariant Options::getOption(QString optionId) {
|
||||
return {};
|
||||
}
|
||||
|
||||
void Options::setOption(QString optionId, QVariant value) {
|
||||
|
||||
}
|
||||
33
Server/Service/Options.h
Normal file
33
Server/Service/Options.h
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Created by fly on 2021/12/17.
|
||||
//
|
||||
|
||||
#ifndef REGISTRYCENTER_OPTIONS_H
|
||||
#define REGISTRYCENTER_OPTIONS_H
|
||||
|
||||
#include <rep_Options_source.h>
|
||||
|
||||
class Options : public OptionsSource {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Options(QObject *parent = nullptr);
|
||||
|
||||
~Options() override = default;
|
||||
|
||||
void registerOption(
|
||||
QString optionId,
|
||||
QString optionName,
|
||||
QVariant defaultValue,
|
||||
OptionsSource::OptionType type,
|
||||
bool autoLoad,
|
||||
QString editConfig,
|
||||
QString description
|
||||
) override;
|
||||
|
||||
QVariant getOption(QString optionId) override;
|
||||
|
||||
void setOption(QString optionId, QVariant value) override;
|
||||
};
|
||||
|
||||
|
||||
#endif //REGISTRYCENTER_OPTIONS_H
|
||||
18
Server/Service/ServiceStatus.cpp
Normal file
18
Server/Service/ServiceStatus.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Created by fly on 2021/12/17.
|
||||
//
|
||||
|
||||
#include "ServiceStatus.h"
|
||||
|
||||
|
||||
ServiceStatus::ServiceStatus(QObject *parent) : ServiceStatusSource(parent) {
|
||||
|
||||
}
|
||||
|
||||
ServiceStatus::~ServiceStatus() {
|
||||
|
||||
}
|
||||
|
||||
void ServiceStatus::reportStatus(QString appId, QString appName) {
|
||||
|
||||
}
|
||||
22
Server/Service/ServiceStatus.h
Normal file
22
Server/Service/ServiceStatus.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Created by fly on 2021/12/17.
|
||||
//
|
||||
|
||||
#ifndef REGISTRYCENTER_SERVICESTATUS_H
|
||||
#define REGISTRYCENTER_SERVICESTATUS_H
|
||||
|
||||
#include <rep_ServiceStatus_source.h>
|
||||
|
||||
|
||||
class ServiceStatus : public ServiceStatusSource {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ServiceStatus(QObject *parent = nullptr);
|
||||
|
||||
~ServiceStatus() override;
|
||||
|
||||
void reportStatus(QString appId, QString appName) override;
|
||||
};
|
||||
|
||||
|
||||
#endif //REGISTRYCENTER_SERVICESTATUS_H
|
||||
Reference in New Issue
Block a user