mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
libresapilocal is now optional (enabled by default)
This commit is contained in:
parent
47414acb62
commit
b5f95cb651
@ -3,8 +3,7 @@
|
|||||||
TEMPLATE = lib
|
TEMPLATE = lib
|
||||||
CONFIG += staticlib
|
CONFIG += staticlib
|
||||||
CONFIG += create_prl
|
CONFIG += create_prl
|
||||||
CONFIG += qt
|
CONFIG -= qt
|
||||||
QT += network
|
|
||||||
TARGET = resapi
|
TARGET = resapi
|
||||||
TARGET_PRL = libresapi
|
TARGET_PRL = libresapi
|
||||||
DESTDIR = lib
|
DESTDIR = lib
|
||||||
@ -147,8 +146,7 @@ SOURCES += \
|
|||||||
api/TmpBlobStore.cpp \
|
api/TmpBlobStore.cpp \
|
||||||
util/ContentTypes.cpp \
|
util/ContentTypes.cpp \
|
||||||
api/ApiPluginHandler.cpp \
|
api/ApiPluginHandler.cpp \
|
||||||
api/ChannelsHandler.cpp \
|
api/ChannelsHandler.cpp
|
||||||
api/ApiServerLocal.cpp
|
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
api/ApiServer.h \
|
api/ApiServer.h \
|
||||||
@ -174,5 +172,11 @@ HEADERS += \
|
|||||||
api/TmpBlobStore.h \
|
api/TmpBlobStore.h \
|
||||||
util/ContentTypes.h \
|
util/ContentTypes.h \
|
||||||
api/ApiPluginHandler.h \
|
api/ApiPluginHandler.h \
|
||||||
api/ChannelsHandler.h \
|
api/ChannelsHandler.h
|
||||||
api/ApiServerLocal.h
|
|
||||||
|
libresapilocalserver {
|
||||||
|
CONFIG *= qt
|
||||||
|
QT *= network
|
||||||
|
SOURCES *= api/ApiServerLocal.cpp
|
||||||
|
HEADERS *= api/ApiServerLocal.h
|
||||||
|
}
|
||||||
|
@ -15,7 +15,10 @@
|
|||||||
|
|
||||||
resource_api::ApiServer* WebuiPage::apiServer = 0;
|
resource_api::ApiServer* WebuiPage::apiServer = 0;
|
||||||
resource_api::ApiServerMHD* WebuiPage::apiServerMHD = 0;
|
resource_api::ApiServerMHD* WebuiPage::apiServerMHD = 0;
|
||||||
|
// TODO: LIBRESAPI_LOCAL_SERVER Move in appropriate place
|
||||||
|
#ifdef LIBRESAPI_LOCAL_SERVER
|
||||||
resource_api::ApiServerLocal* WebuiPage::apiServerLocal = 0;
|
resource_api::ApiServerLocal* WebuiPage::apiServerLocal = 0;
|
||||||
|
#endif
|
||||||
resource_api::RsControlModule* WebuiPage::controlModule = 0;
|
resource_api::RsControlModule* WebuiPage::controlModule = 0;
|
||||||
|
|
||||||
WebuiPage::WebuiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/)
|
WebuiPage::WebuiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/)
|
||||||
@ -95,8 +98,10 @@ QString WebuiPage::helpText() const
|
|||||||
Settings->getWebinterfaceAllowAllIps());
|
Settings->getWebinterfaceAllowAllIps());
|
||||||
apiServerMHD->start();
|
apiServerMHD->start();
|
||||||
|
|
||||||
|
// TODO: LIBRESAPI_LOCAL_SERVER Move in appropriate place
|
||||||
|
#ifdef LIBRESAPI_LOCAL_SERVER
|
||||||
apiServerLocal = new resource_api::ApiServerLocal(apiServer);
|
apiServerLocal = new resource_api::ApiServerLocal(apiServer);
|
||||||
|
#endif
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,8 +112,11 @@ QString WebuiPage::helpText() const
|
|||||||
apiServerMHD->stop();
|
apiServerMHD->stop();
|
||||||
delete apiServerMHD;
|
delete apiServerMHD;
|
||||||
apiServerMHD = 0;
|
apiServerMHD = 0;
|
||||||
|
// TODO: LIBRESAPI_LOCAL_SERVER Move in appropriate place
|
||||||
|
#ifdef LIBRESAPI_LOCAL_SERVER
|
||||||
delete apiServerLocal;
|
delete apiServerLocal;
|
||||||
apiServerLocal = 0;
|
apiServerLocal = 0;
|
||||||
|
#endif
|
||||||
delete apiServer;
|
delete apiServer;
|
||||||
apiServer = 0;
|
apiServer = 0;
|
||||||
delete controlModule;
|
delete controlModule;
|
||||||
|
@ -49,6 +49,8 @@ private:
|
|||||||
|
|
||||||
static resource_api::ApiServer* apiServer;
|
static resource_api::ApiServer* apiServer;
|
||||||
static resource_api::ApiServerMHD* apiServerMHD;
|
static resource_api::ApiServerMHD* apiServerMHD;
|
||||||
|
#ifdef LIBRESAPI_LOCAL_SERVER
|
||||||
static resource_api::ApiServerLocal* apiServerLocal;
|
static resource_api::ApiServerLocal* apiServerLocal;
|
||||||
|
#endif
|
||||||
static resource_api::RsControlModule* controlModule;
|
static resource_api::RsControlModule* controlModule;
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
# To {dis,en}able libresapi via local socket (unix domain socket or windows named pipes)
|
||||||
|
# {,un}comment the following line
|
||||||
|
CONFIG *= libresapilocalserver
|
||||||
|
|
||||||
# Gxs is always enabled now.
|
# Gxs is always enabled now.
|
||||||
DEFINES *= RS_ENABLE_GXS
|
DEFINES *= RS_ENABLE_GXS
|
||||||
|
|
||||||
@ -62,3 +66,5 @@ unfinished {
|
|||||||
}
|
}
|
||||||
|
|
||||||
wikipoos:DEFINES *= RS_USE_WIKI
|
wikipoos:DEFINES *= RS_USE_WIKI
|
||||||
|
|
||||||
|
libresapilocalserver:DEFINES *= LIBRESAPI_LOCAL_SERVER
|
||||||
|
Loading…
Reference in New Issue
Block a user