mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -05:00
Fix JSON API related files licensing based on talk with Cyril and FSFE suggestions
This commit is contained in:
parent
b8f2bee295
commit
610fedabb8
@ -1,21 +1,23 @@
|
|||||||
/*******************************************************************************
|
/*
|
||||||
* RetroShare JSON API *
|
* RetroShare JSON API
|
||||||
* *
|
*
|
||||||
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||||
* *
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* This program is free software: you can redistribute it and/or modify it under
|
||||||
* it under the terms of the GNU Affero General Public License version 3 as *
|
* the terms of the GNU Affero General Public License as published by the
|
||||||
* published by the Free Software Foundation. *
|
* Free Software Foundation, version 3.
|
||||||
* *
|
*
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* FOR A PARTICULAR PURPOSE.
|
||||||
* GNU Lesser General Public License for more details. *
|
* See the GNU Affero General Public License for more details.
|
||||||
* *
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
* *
|
*
|
||||||
*******************************************************************************/
|
* SPDX-FileCopyrightText: 2004-2019 RetroShare Team <contact@retroshare.cc>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
/*******************************************************************************
|
/*
|
||||||
* RetroShare JSON API *
|
* RetroShare JSON API
|
||||||
* *
|
*
|
||||||
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||||
* *
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* This program is free software: you can redistribute it and/or modify it under
|
||||||
* it under the terms of the GNU Affero General Public License version 3 as *
|
* the terms of the GNU Affero General Public License as published by the
|
||||||
* published by the Free Software Foundation. *
|
* Free Software Foundation, version 3.
|
||||||
* *
|
*
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* FOR A PARTICULAR PURPOSE.
|
||||||
* GNU Lesser General Public License for more details. *
|
* See the GNU Affero General Public License for more details.
|
||||||
* *
|
*
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
* *
|
*
|
||||||
*******************************************************************************/
|
* SPDX-FileCopyrightText: 2004-2019 RetroShare Team <contact@retroshare.cc>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -1,22 +1,24 @@
|
|||||||
/*******************************************************************************
|
/*
|
||||||
* RetroShare JSON API *
|
* RetroShare JSON API
|
||||||
* *
|
*
|
||||||
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org> *
|
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||||
* *
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* This program is free software: you can redistribute it and/or modify it under
|
||||||
* it under the terms of the GNU Affero General Public License as *
|
* the terms of the GNU Affero General Public License as published by the
|
||||||
* published by the Free Software Foundation, either version 3 of the *
|
* Free Software Foundation, version 3.
|
||||||
* License, or (at your option) any later version. *
|
*
|
||||||
* *
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* FOR A PARTICULAR PURPOSE.
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* See the GNU Affero General Public License for more details.
|
||||||
* GNU Affero General Public License for more details. *
|
*
|
||||||
* *
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
*
|
||||||
* *
|
* SPDX-FileCopyrightText: 2004-2019 RetroShare Team <contact@retroshare.cc>
|
||||||
*******************************************************************************/
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
/*******************************************************************************
|
/*
|
||||||
* libretroshare/src/rsserver: p3webui.cc *
|
* RetroShare Web User Interface
|
||||||
* *
|
*
|
||||||
* libretroshare: retroshare core library *
|
* Copyright (C) 2019 Cyril Soler <csoler@users.sourceforge.net>
|
||||||
* *
|
*
|
||||||
* Copyright 2019-2019 Cyril Soler *
|
* This program is free software: you can redistribute it and/or modify it under
|
||||||
* *
|
* the terms of the GNU Affero General Public License as published by the
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* Free Software Foundation, version 3.
|
||||||
* it under the terms of the GNU Lesser General Public License version 3 as *
|
*
|
||||||
* published by the Free Software Foundation. *
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* *
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* FOR A PARTICULAR PURPOSE.
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* See the GNU Affero General Public License for more details.
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
*
|
||||||
* GNU Lesser General Public License for more details. *
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
*
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* SPDX-FileCopyrightText: 2004-2019 RetroShare Team <contact@retroshare.cc>
|
||||||
* *
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*******************************************************************************/
|
*/
|
||||||
|
|
||||||
#include "p3webui.h"
|
#include "p3webui.h"
|
||||||
|
|
||||||
@ -194,5 +194,3 @@ bool p3WebUI::stop()
|
|||||||
rsJsonApi->restart();
|
rsJsonApi->restart();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
47
libretroshare/src/jsonapi/p3webui.h
Normal file
47
libretroshare/src/jsonapi/p3webui.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* RetroShare Web User Interface
|
||||||
|
*
|
||||||
|
* Copyright (C) 2019 Cyril Soler <csoler@users.sourceforge.net>
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU Affero General Public License as published by the
|
||||||
|
* Free Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program 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 Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2004-2019 RetroShare Team <contact@retroshare.cc>
|
||||||
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
#include "retroshare/rswebui.h"
|
||||||
|
#include "jsonapi/jsonapi.h"
|
||||||
|
|
||||||
|
class p3WebUI: public RsWebUi, public JsonApiResourceProvider
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~p3WebUI() override = default;
|
||||||
|
|
||||||
|
// implements RsWebUI
|
||||||
|
|
||||||
|
virtual void setHtmlFilesDirectory(const std::string& html_dir) override;
|
||||||
|
virtual void setUserPassword(const std::string& passwd) override;
|
||||||
|
|
||||||
|
virtual bool restart() override ;
|
||||||
|
virtual bool stop() override ;
|
||||||
|
bool isRunning() const override;
|
||||||
|
// implements JsonApiResourceProvider
|
||||||
|
|
||||||
|
virtual std::vector<std::shared_ptr<restbed::Resource> > getResources() const override;
|
||||||
|
};
|
@ -161,8 +161,8 @@ PUBLIC_HEADERS = retroshare/rsdisc.h \
|
|||||||
|
|
||||||
rs_webui {
|
rs_webui {
|
||||||
PUBLIC_HEADERS += retroshare/rswebui.h
|
PUBLIC_HEADERS += retroshare/rswebui.h
|
||||||
SOURCES += rsserver/p3webui.cc
|
SOURCES += jsonapi/p3webui.cc
|
||||||
HEADERS += rsserver/p3webui.h
|
HEADERS += jsonapi/p3webui.h
|
||||||
}
|
}
|
||||||
|
|
||||||
HEADERS += plugins/pluginmanager.h \
|
HEADERS += plugins/pluginmanager.h \
|
||||||
|
@ -1,22 +1,26 @@
|
|||||||
/*******************************************************************************
|
/*
|
||||||
* libretroshare/src/retroshare: rsjsonapi.h *
|
* RetroShare JSON API public header
|
||||||
* *
|
*
|
||||||
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio.eigenlab.org> *
|
* Copyright (C) 2018-2019 Gioacchino Mazzurco <gio.eigenlab.org>
|
||||||
* Copyright (C) 2019-2019 Cyril Soler <csoler@users.sourceforge.net> *
|
* Copyright (C) 2019 Cyril Soler <csoler@users.sourceforge.net>
|
||||||
* *
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* This program is free software: you can redistribute it and/or modify it under
|
||||||
* it under the terms of the GNU Affero General Public License version 3 as *
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
* published by the Free Software Foundation. *
|
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||||
* *
|
* later version.
|
||||||
* This program is distributed in the hope that it will be useful, *
|
*
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* GNU Lesser General Public License for more details. *
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
* *
|
* details.
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
*
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
*******************************************************************************/
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2004-2019 RetroShare Team <contact@retroshare.cc>
|
||||||
|
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
@ -1,23 +1,25 @@
|
|||||||
/*******************************************************************************
|
/*
|
||||||
* libretroshare/src/rsserver: rswebui.h *
|
* RetroShare Web User Interface public header
|
||||||
* *
|
*
|
||||||
* libretroshare: retroshare core library *
|
* Copyright (C) 2019 Cyril Soler <csoler@users.sourceforge.net>
|
||||||
* *
|
*
|
||||||
* Copyright 2019-2019 Cyril Soler <csoler@users.sourceforge.net> *
|
* This program is free software: you can redistribute it and/or modify it under
|
||||||
* *
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||||
* it under the terms of the GNU Affero General Public License version 3 as *
|
* later version.
|
||||||
* published by the Free Software Foundation. *
|
*
|
||||||
* *
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* details.
|
||||||
* GNU Lesser General Public License for more details. *
|
*
|
||||||
* *
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
*
|
||||||
* *
|
* SPDX-FileCopyrightText: 2004-2019 RetroShare Team <contact@retroshare.cc>
|
||||||
*******************************************************************************/
|
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
/*******************************************************************************
|
|
||||||
* libretroshare/src/rsserver: p3webui.h *
|
|
||||||
* *
|
|
||||||
* libretroshare: retroshare core library *
|
|
||||||
* *
|
|
||||||
* Copyright 2019-2019 Cyril Soler *
|
|
||||||
* *
|
|
||||||
* This program is free software: you can redistribute it and/or modify *
|
|
||||||
* it under the terms of the GNU Lesser General Public License version 3 as *
|
|
||||||
* published by the Free Software Foundation. *
|
|
||||||
* *
|
|
||||||
* This program 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 Lesser General Public License for more details. *
|
|
||||||
* *
|
|
||||||
* You should have received a copy of the GNU Affero General Public License *
|
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
|
|
||||||
* *
|
|
||||||
*******************************************************************************/
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <memory>
|
|
||||||
#include "retroshare/rswebui.h"
|
|
||||||
#include "jsonapi/jsonapi.h"
|
|
||||||
|
|
||||||
class p3WebUI: public RsWebUi, public JsonApiResourceProvider
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
~p3WebUI() override = default;
|
|
||||||
|
|
||||||
// implements RsWebUI
|
|
||||||
|
|
||||||
virtual void setHtmlFilesDirectory(const std::string& html_dir) override;
|
|
||||||
virtual void setUserPassword(const std::string& passwd) override;
|
|
||||||
|
|
||||||
virtual bool restart() override ;
|
|
||||||
virtual bool stop() override ;
|
|
||||||
bool isRunning() const override;
|
|
||||||
// implements JsonApiResourceProvider
|
|
||||||
|
|
||||||
virtual std::vector<std::shared_ptr<restbed::Resource> > getResources() const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user