Merge pull request #1406 from csoler/v0.6.5-DebianPackaging

V0.6.5 debian packaging
This commit is contained in:
csoler 2018-11-11 14:27:41 +01:00 committed by GitHub
commit fd3cf4a29c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
309 changed files with 5259 additions and 8756 deletions

View File

@ -1,11 +0,0 @@
set QTDIR=C:\Qt\5.5\mingw492_32
set LIBS=..\libs
set RSPATH=.\retroshare-gui\src\debug
set PATH=%QTDIR%\bin;%LIBS%\bin;%PATH%
If not exist %RSPATH%\retroshare.exe (
build-all-mingw32make.bat
)
%RSPATH%\retroshare.exe

View File

@ -1,217 +0,0 @@
set QTDIR=C:\Qt\5.5\mingw492_32\
set MINGW=C:\Qt\Tools\mingw492_32
set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
set DEBUG=1
@echo off
rem emptying used variables in case the script was aborted and tempfile
set pack=
set clean=
set errorlevel=
if exist tmp.txt del tmp.txt
:loop1
if %1x == x (
rem if not exist tmp.txt echo debug >>tmp.txt
goto :end1
)
if /i %1==clean (
set clean=clean
shift
goto :loop1
)
if /i %1==pack (
set pack=pack
shift
goto :loop1
)
echo.%1>>tmp.txt
shift
goto :loop1
:end1
if %clean%x==cleanx (
if not exist tmp.txt echo %clean% >>tmp.txt
)
if not exist tmp.txt (
if not %pack%x==packx (
echo debug >>tmp.txt
set clean=clean
)
)
for /f %%a in (tmp.txt) do (
if ECHO==1 @echo on
rem TODO: Remove these lines
rem GOTO :retroshare-gui
:libbitdht
rem ###################################
rem ### libbitdht #####################
rem ###################################
cd libbitdht\src
if not %clean%x==x mingw32-make clean
qmake libbitdht.pro
CALL :TEST_ERROR
mingw32-make %%a
CALL :TEST_ERROR
echo ###################################
echo ### libbitdht done ################
echo ###################################
cd ..\..
:openpgpsdk
rem ###################################
rem ### openpgpsdk ####################
rem ###################################
cd openpgpsdk\src
if not %clean%x==x mingw32-make clean
qmake openpgpsdk.pro
CALL :TEST_ERROR
mingw32-make
CALL :TEST_ERROR
echo ###################################
echo ### openpgpsdk done ###############
echo ###################################
cd ..\..
:libresapi
rem ###################################
rem ### libresapi #####################
rem ###################################
cd libresapi\src
if not %clean%x==x mingw32-make clean
qmake libresapi.pro
CALL :TEST_ERROR
mingw32-make %%a
CALL :TEST_ERROR
echo ###################################
echo ### libresapi done ################
echo ###################################
cd ..\..
:libretroshare
rem ###################################
rem ### libretroshare #################
rem ###################################
cd libretroshare\src
if not %clean%x==x mingw32-make clean
qmake libretroshare.pro "CONFIG+=version_detail_bash_script"
CALL :TEST_ERROR
mingw32-make %%a
CALL :TEST_ERROR
echo ###################################
echo ### libretroshare done ############
echo ###################################
cd ..\..
:pegmarkdown
rem ###################################
rem ### pegmarkdown ###################
rem ###################################
cd supportlibs\pegmarkdown
if not %clean%x==x mingw32-make clean
qmake pegmarkdown.pro
CALL :TEST_ERROR
mingw32-make %%a
CALL :TEST_ERROR
echo ###################################
echo ### pegmarkdown done ##############
echo ###################################
cd ..\..
:retroshare-nogui
rem ###################################
rem ### retroshare-nogui ##############
rem ###################################
cd retroshare-nogui\src
if not %clean%x==x mingw32-make clean
qmake retroshare-nogui.pro
CALL :TEST_ERROR
mingw32-make %%a
CALL :TEST_ERROR
echo ###################################
echo ### retroshare-nogui done #########
echo ###################################
cd ..\..
:retroshare-gui
rem ###################################
rem ### retroshare-gui ################
rem ###################################
cd retroshare-gui\src
if not %clean%x==x mingw32-make clean
rem qmake -r -spec ..\mkspecs\win32-g++ "CONFIG+=version_detail_bash_script" retroshare-gui.pro
qmake retroshare-gui.pro "CONFIG+=version_detail_bash_script"
CALL :TEST_ERROR
mingw32-make %%a
CALL :TEST_ERROR
echo ###################################
echo ### retroshare-gui done ###########
echo ###################################
cd ..\..
@echo off
)
@echo off
if %pack%x==packx call packaging.bat
rem ###################################
rem ### clean up ######################
rem ###################################
set clean=
del tmp.txt
set pack=
pause
rem ###################################
rem ### END ###########################
rem ###################################
GOTO :EOF
:TEST_ERROR
@echo off
if errorlevel 1 (
pause
set clean=
del tmp.txt
set pack=
EXIT
)
if ECHO==1 @echo on
EXIT /B
:EOF

View File

@ -4,46 +4,78 @@ Upstream-Contact: retroshare.team@gmail.com
Source: https://github.com/retroshare/retroshare
Files: *
Copyright: Copyright 2007-2018, Retroshare Team <retroshare.team@gmail.com>
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
Copyright: 2007-2018, Retroshare Team <retroshare.team@gmail.com>
License: AGPL-3+
Files: openpgpsdk/*
Copyright: 2005-2008 Ben Laurie, Rachel Willmer, Retroshare Team <retroshare.team@gmail.com>
License: Apache-2.0
Files: libretroshare/*
Copyright: 2007-2018, Retroshare Team <retroshare.team@gmail.com>
License: LGPL-3+
License: Apache-2.0
Contributors: . The Contributors have asserted
their moral rights under the UK Copyright Design and Patents Act 1988 to
be recorded as the authors of this copyright work.
.
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.
.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.
See the License for the specific language governing permissions and
limitations under the License.
License: LGPL-3+
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 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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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/>.
.
See /usr/share/common-licenses/GPL-2 on your Debian system.
In addition, as a special exception, the copyright holders give permission to
link this program with the OpenSSL library (or with modified versions of
OpenSSL that use the same license as OpenSSL), and distribute linked
combinations including the two.
License: AGPL-3+
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, either version 3 of the
License, or (at your option) any later version.
.
In addition to these license terms, the author grants the following
additional rights:
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.
.
If you modify this program, or any covered work, by linking or
combining it with the OpenSSL project's OpenSSL library (or a
modified version of that library), containing parts covered by the
terms of the OpenSSL or SSLeay licenses, the author
grants you additional permission to convey the resulting work.
Corresponding Source for a non-source form of such a combination
shall include the source code for the parts of OpenSSL used as well
as that of the covered work.
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/>.
.
You may at your option choose to remove this additional permission from
the work, or from any part of it.
.
It is possible to build this program in a way that it loads OpenSSL
libraries at run-time. If doing so, the following notices are required
by the OpenSSL and SSLeay licenses:
.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit. (http://www.openssl.org/)
.
This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com)
As a special exception, the copyright holders give permission to link the
code of portions of this program with the OpenSSL library under certain
conditions as described in each individual source file and distribute
linked combinations including the program with the OpenSSL library. You
must comply with the GNU Affero General Public License in all respects for
all of the code used other than as permitted herein. If you modify file(s)
with this exception, you may extend this exception to your version of the
file(s), but you are not obligated to do so. If you do not wish to do so,
delete this exception statement from your version. If you delete this
exception statement from all source files in the program, then also delete
it in the license file.

View File

@ -65,32 +65,38 @@ Uploading-to-mentors bug:
Licensing issues:
Various licenses involved:
R: re-licence to GPLv3
L: re-licence to LGPLv3
A: re-licence to AGPLv3
D: delete
d: delete in debian package to avoid licensing problems
Code part | Licenses |A| Authors | Comment
--------------------------------+------------------------+-+----------------------------------------------+-------------------------------------------------
Code part | Licenses | A| Authors | Comment
------------------------------------------+------------------------+--+----------------------------------------------+-------------------------------------------------
libbitdht | GPLv3 | | drbob, csoler, Retroshare team |
bitdht/bencode.h | Public domain | | Mike Frysinger <vapier@gmail.com> |
bitdht/bdrandom.h | GPLv2 |R| csoler |
--------------------------------+------------------------+-+----------------------------------------------+-------------------------------------------------
bitdht/bdrandom.h | GPLv2 | L| csoler |
------------------------------------------+------------------------+--+----------------------------------------------+-------------------------------------------------
libresapi | GPLv3 | | G10H4ck, [], electron128 | Most files are unlicenced
src/api/json.h | MIT | | Jeff Weinstein (jeff.weinstein at gmail) |
src/api/webui-src/app/mithril.min.js | MIT | | Leo Horie |
libretroshare | GPLv2,GPLv3 | | csoler,drbob,Mr-alice,Chris,Thunder | Some files unversionned.
plugins/dlfcn_win32.cc | GPLv2.1 |R| Ramiro Polla |
pqi/authgpg.h | GPLv2 |R| Raghu Dev R. | .cc is authed by drbob
upnp/UPnPBase.h | GPLv2 | | Marcelo Roberto Jimenez, aMule Team | other code in upnp/ not copyrighted
plugins/dlfcn_win32.cc | GPLv2.1 | L| Ramiro Polla |
pqi/authgpg.h | GPLv2 | L| Raghu Dev R. | .cc is authed by drbob
upnp/UPnPBase.h | GPLv2 | L| Marcelo Roberto Jimenez, aMule Team | other code in upnp/ not copyrighted. Re-licensed with permission 10/11/2018
util/pugiconfig.h | MIT | | Arseny Kapoulkyne | [unused file!]
util/rsstring.h | GPLv2 |R| Thomas Kister |
util/rswin.h | GPLv2 |R| Thomas Kister |
util/rsstring.h | GPLv2 | L| Thomas Kister |
util/rswin.h | GPLv2 | L| Thomas Kister |
util/rsversioninfo.h | [none] | | Alexandrut |
util/stacktrace.h | GPLv2 |R| Timo Bingmann, G10H4ck |
librssimulator | [None] | | No authors |
util/stacktrace.h | GPLv2 | R| Timo Bingmann, G10H4ck |
librssimulator | [None] |dA| No authors |
openpgpsdk | Apache | | Rachell Wilmer, Ben Laurie |
pegmarkdown | All right reserved | | Daniel Jalkut - Code currently unused |
plugins/feedreader | GPLv2 | | Thunder |
pegmarkdown | All right reserved | | Daniel Jalkut - Code currently unused | will be deleted when creating debian package
plugins/feedreader | GPLv2 | A| Thunder |
plugins/VOIP | | | |
AudioInputConfig.h+ | All right reserved | | Thorvald Natvig | Code can be modified/re-used. Mumble's code.
SpeezProcessor.h | | | Peter Zotov |
AudioInputConfig.h+ | All right reserved | A| Thorvald Natvig | Permission to re-license on 04/11/2018
AudioStats.h+ | All right reserved | A| Thorvald Natvig |
AudioWizard.h+ | All right reserved | A| Thorvald Natvig |
SpeexProcessor.h | | | Peter Zotov |
retroshare-android-notify-* | GPLv3 | | G10H4ck |
retroshare-android-service | GPLv3 | | G10H4ck |
retroshare-gui/src | | | Thunder, csoler, drbob, crypton |
@ -108,7 +114,7 @@ Licensing issues:
images/retroshare_win.rc.h | GPLv2 | | crypton | [Unused code]
msgs/textformat.h | GPLv3 | | Merdhah Momeny, Golnaz Nilieh | very simple .h. Can be re-implemented
settings/rsettings.h | GPLv2 | | Matt Edman, defnax, Justin Hiple |
statistics/BandwidthGraphW.h| GPLv2 | | Matt Edman, defnax, Justin Hiple |
statistics/BandwidthGraphW.h | GPLv2 | | Matt Edman, defnax, Justin Hiple |
statistics/dhtgraph.h | GPLv2 | | Matt Edman, defnax, Justin Hiple |
toaster/MessageToaster.h | GPLv3 | | Xesc |
toaster/DownloadToaster.h | GPLv3 | | Xesc |

View File

@ -124,6 +124,9 @@ if ! test "${nodl}" = "yes"; then
# remove unised qml code, only needed on Android
rm -rf ${workdir}/src/retroshare-qml-app/
rm -rf ${workdir}/src/librssimulator/
rm -rf ${workdir}/src/libretroshare/tests/
rm -rf ${workdir}/src/libretroshare/unfinished/
rm -rf ${workdir}/src/libretroshare/unused/
rm -rf ${workdir}/src/retroshare-android-notify-service/
rm -rf ${workdir}/src/retroshare-android-service/
rm -rf ${workdir}/src/libretroshare/src/unused/
@ -162,12 +165,15 @@ else
cp -r debian/* ${workdir}/debian/
rm -rf ${workdir}/src/retroshare-qml-app/
rm -rf ${workdir}/src/librssimulator/
rm -rf ${workdir}/src/libretroshare/tests/
rm -rf ${workdir}/src/libretroshare/unfinished/
rm -rf ${workdir}/src/libretroshare/unused/
rm -rf ${workdir}/src/retroshare-android-notify-service/
rm -rf ${workdir}/src/retroshare-android-service/
rm -rf ${workdir}/src/librssimulator/
rm -rf ${workdir}/src/unittests/
rm -rf ${workdir}/src/libretroshare/src/unused/
rm -rf ${workdir}/src/pegmarkdown/
rm -rf ${workdir}/src/unittests/
rm -rf ${workdir}/src/build_scripts/
rm -f ${workdir}/debian/*~
rm -f ${workdir}/debian/.*.sw?

View File

@ -1,13 +0,0 @@
set QTDIR=C:\Qt\4.8.6
set MINGW=C:\MinGW
set PATH=%QTDIR%\bin;%MINGW%\bin;%PATH%
mingw32-make clean
qmake libbitdht.pro
mingw32-make
pause

View File

@ -2,64 +2,29 @@
README for RetroShare
=======================================================================================
RetroShare web site . . . . http://retroshare.sourceforge.net/
Documentation . . . . . . . http://retroshare.sourceforge.net/doc.html
Support . . . . . . . . . . http://retroshare.sourceforge.net/support.html
RetroShare web site . . . . http://retroshare.net/index.html
Developer's blog . . . . . https://retroshareteam.wordpress.com
Documentation . . . . . . . https://retroshare.readthedocs.io/en/latest/
Support . . . . . . . . . . http://retroshare.net/support.html
Forums . . . . . . . . . . http://retroshare.sourceforge.net/forum/
Wiki . . . . . . . . . . . http://retroshare.sourceforge.net/wiki/
The Developers site . . . . http://retroshare.sourceforge.net/developers.html
Project site . . . . . . . https://sourceforge.net/projects/retroshare
Wiki . . . . . . . . . . . https://github.com/RetroShare/documentation/wiki
Old developers site . . . . http://retroshare.sourceforge.net/wiki/index.php/Developers_Corner
Project site . . . . . . . https://github.com/RetroShare/RetroShare
Relted projects/plugins . . https://github.com/RetroShare
Contact: . . . . . . . . . retroshare@lunamutt.com ,defnax@users.sourceforge.net
Compiling + Running RetroShare (V0.5.xxx)
=========================================================================================
REQUIREMENTS
Compiling RetroShare
=========================================================================================
Libraries/Tools:
* C/C++ Compiler. (standard on Linux/cygwin)
* Qt >= 4.5.x https://download.qt.io/official_releases/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.tar.gz
* OpenSSL http://www.openssl.org/source/openssl-0.9.8k.tar.gz
* MiniUPnP http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.3.tar.gz
* gpgme ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.1.8.tar.bz2
* libgpg-error ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.7.tar.bz2
Build Scripts are avaible on GIT:
https://github.com/RetroShare/RetroShare/tree/master/build_scripts
Windows only:
* Cygwin http://www.cygwin.com/cygwin/setup.exe (for openssl compile)
* MinGW/Msys package http://sourceforge.net/projects/mingw/files/ (for compile gpgme,libgpg-error)
* Pthreads http://sourceware.org/pthreads-win32/
* Zlib http://www.zlib.net/
You can find here instructions howto compile RetroShare:
https://retroshare.readthedocs.io/en/latest/developer/compilation/
Latest RetroShare sources from (SVN) sourceforge.net:
svn co https://retroshare.svn.sourceforge.net/svnroot/retroshare retroshare
=========================================================================================
Build Scripts are avaible on SVN for Debian and Ubuntu:
http://retroshare.svn.sourceforge.net/viewvc/retroshare/trunk/build_scripts/
Latest stable OpenSSL is available at:
http://www.openssl.org
Latest miniupnpc-1.3 is avaible at:
http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.3.tar.gz
Latest gpgme Library is avaible at:
ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.1.8.tar.bz2
Latest libgpg-error Library is avaible at:
ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.7.tar.bz2
Windows only:
pthreads: ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.tar.gz
zlib: http://www.zlib.net/zlib-1.2.3.tar.gz
=========================================================================================
You can find here instrustions howto compile libretroshare and gui:
http://retroshare.sourceforge.net/wiki/index.php/Developers_Corner
=========================================================================================
You can go on over to our forum when you have trouble with compiling:
You can go on over to our forum or chat lobby when you have trouble with compiling:
retroshare://forum?name=Developers%20Discussions&id=8fd22bd8f99754461e7ba1ca8a727995
retroshare://chat_room?name=Retroshare%20Devel%20%28signed%29&id=L68DB0A1E09BDA3A5
http://retroshare.sourceforge.net/forum/
---------------------------------------------

View File

@ -1,7 +0,0 @@
TODO
---------------
Too much to list...
test SVN

View File

@ -1,24 +1,25 @@
/*******************************************************************************
* libretroshare/src/crypto: chacha20.cpp *
* libretroshare/src/crypto: chacha20.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2016 by Mr.Alice *
* Copyright 2016 by Mr.Alice <retroshare.team@gmail.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free 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 *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* GNU Lesser 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <stdexcept>
#include <stdint.h>
#include <assert.h>

View File

@ -1,21 +1,25 @@
/*******************************************************************************
* libretroshare/src/crypto: crypto.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once
/*
* RetroShare Content Search and Indexing.
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org>
*
* 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, 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
* 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 <http://www.gnu.org/licenses/>.
*/
#include "util/rstime.h"
#include <vector>

View File

@ -6,16 +6,16 @@
* Copyright 2009-2011 by Robert Fernie <drbob@lunamutt.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free 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 *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* GNU Lesser 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/

View File

@ -6,16 +6,16 @@
* Copyright 2009-2011 by Robert Fernie <drbob@lunamutt.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free 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 *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* GNU Lesser 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/

View File

@ -7,16 +7,16 @@
* Copyright (C) 2015-2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free 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 *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* GNU Lesser 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/

View File

@ -6,16 +6,16 @@
* Copyright 2009-2011 by Robert Fernie. <drbob@lunamutt.com> *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free 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 *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* GNU Lesser 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
******************************************************************************/

View File

@ -1,454 +0,0 @@
/*
* libretroshare/src/ft: ftdbase.cc
*
* File Transfer for RetroShare.
*
* Copyright 2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "ft/ftdbase.h"
#include "util/rsdir.h"
#include "retroshare/rspeers.h"
#include "serialiser/rsconfigitems.h"
//#define DB_DEBUG 1
ftFiStore::ftFiStore(CacheStrapper *cs, CacheTransfer *cft, p3PeerMgr *pm,
RsPeerId ownid, std::string cachedir)
:FileIndexStore(cs, cft, pm, ownid, cachedir)
{
return;
}
bool ftFiStore::search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const
{
/* could use hintflags to specify which bits of fileinfo to use additionally.
eg. hintflags & FT_SEARCH_PEER_ID, then only return matching peers + hash.
eg. hintflags & FT_SEARCH_NAME, then only return matching name + hash.
*
* Still to see if concept is worthwhle
*/
/* remove unused parameter warnings */
(void) hintflags;
#ifdef DB_DEBUG
std::cerr << "ftFiStore::search(" << hash << "," << hintflags;
std::cerr << ")";
std::cerr << std::endl;
#endif
std::list<FileDetail> results;
std::list<FileDetail>::iterator it;
if (SearchHash(hash, results))
{
bool first = true;
for(it = results.begin(); it != results.end(); ++it)
{
#ifdef DB_DEBUG
std::cerr << "ftFiStore::search() found: ";
std::cerr << it->name << " (" << it->size;
std::cerr << ") @ " << it->id << " = " << hash;
std::cerr << std::endl;
#endif
bool fullmatch = true;
// if (it->size != size)
// fullmatch = false;
#if 0
if (hintflags & FT_SEARCH_PEER_ID)
{
pit = std::find(info.srcIds.begin(),
info.srcId.end(). it->id);
if (pit == info.srcIds.end())
{
fullmatch = false;
}
}
#endif
if (fullmatch)
{
if (first)
{
first = false;
info.fname = it->name;
info.size = it->size;
info.hash = it->hash;
}
TransferInfo ti;
ti.peerId = it->id;
ti.name = it->name;
ti.tfRate = 0;
info.peers.push_back(ti);
}
}
/**** DEPENDS ON SOURCES!
info.downloadStatus = FT_STATE_COMPLETE:
****/
/* if the first flag is cleared, we've definitely
* had a full match!.
*/
if (!first)
return true;
}
return false;
}
ftFiMonitor::ftFiMonitor(CacheStrapper *cs,std::string cachedir, const RsPeerId& pid,const std::string& config_dir)
:FileIndexMonitor(cs,cachedir, pid,config_dir), p3Config()
{
return;
}
bool ftFiMonitor::search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const
{
return search(hash,hintflags,RsPeerId(),info) ;
}
bool ftFiMonitor::search(const RsFileHash &hash, FileSearchFlags hintflags, const RsPeerId& peer_id,FileInfo &info) const
{
#ifdef DB_DEBUG
std::cerr << "ftFiMonitor::search(" << hash << "," << hintflags;
std::cerr << ")";
std::cerr << std::endl;
#endif
// Setup search flags according to hintflags. Originally flags was 0. I (cyril) don't know
// why we don't just pass hintflags there, so I tried to keep the idea.
//
FileSearchFlags flags = hintflags ;
flags &= (RS_FILE_HINTS_BROWSABLE | RS_FILE_HINTS_NETWORK_WIDE);
if(findLocalFile(hash, flags,peer_id,info.path, info.size,info.storage_permission_flags,info.parent_groups))
{
/* fill in details */
#ifdef DB_DEBUG
std::cerr << "ftFiMonitor::search() found: ";
std::cerr << path;
std::cerr << " = " << hash << "," << fsize;
std::cerr << std::endl;
#endif
info.fname = RsDirUtil::getTopDir(info.path);
return true;
}
return false;
};
int ftFiMonitor::watchPeriod() const
{
return getPeriod() ;
}
void ftFiMonitor::setWatchPeriod(int seconds)
{
setPeriod(seconds) ;// call FileIndexMonitor
IndicateConfigChanged() ;
}
void ftFiMonitor::setRememberHashCacheDuration(uint32_t days)
{
setRememberHashFilesDuration(days) ; // calls FileIndexMonitor
IndicateConfigChanged() ;
}
uint32_t ftFiMonitor::rememberHashCacheDuration() const
{
return rememberHashFilesDuration() ; // calls FileIndexMonitor
}
void ftFiMonitor::setRememberHashCache(bool b)
{
setRememberHashFiles(b) ; // calls FileIndexMonitor
IndicateConfigChanged() ;
}
bool ftFiMonitor::rememberHashCache()
{
return rememberHashFiles() ; // calls FileIndexMonitor
}
void ftFiMonitor::clearHashCache()
{
clearHashFiles() ;
}
/******* LOAD / SAVE CONFIG List.
*
*
*
*
*/
RsSerialiser *ftFiMonitor::setupSerialiser()
{
RsSerialiser *rss = new RsSerialiser();
/* add in the types we need! */
rss->addSerialType(new RsFileConfigSerialiser());
rss->addSerialType(new RsGeneralConfigSerialiser());
return rss;
}
const std::string hash_cache_duration_ss("HASH_CACHE_DURATION");
const std::string hash_cache_ss("HASH_CACHE");
const std::string watch_file_duration_ss("WATCH_FILES_DELAY");
bool ftFiMonitor::saveList(bool &cleanup, std::list<RsItem *>& sList)
{
cleanup = true;
#ifdef DB_DEBUG
std::cerr << "ftFiMonitor::saveList()";
std::cerr << std::endl;
#endif
/* get list of directories */
std::list<SharedDirInfo> dirList;
std::list<SharedDirInfo>::iterator it;
getSharedDirectories(dirList);
for(it = dirList.begin(); it != dirList.end(); ++it)
{
RsFileConfigItem *fi = new RsFileConfigItem();
fi->file.path = (*it).filename ;
fi->file.name = (*it).virtualname ;
fi->flags = (*it).shareflags.toUInt32() ;
for(std::list<RsNodeGroupId>::const_iterator it2( (*it).parent_groups.begin());it2!=(*it).parent_groups.end();++it2)
fi->parent_groups.ids.insert(*it2) ;
sList.push_back(fi);
}
std::map<std::string, std::string> configMap;
/* basic control parameters */
{
std::string s ;
rs_sprintf(s, "%lu", rememberHashFilesDuration()) ;
configMap[hash_cache_duration_ss] = s ;
}
configMap[hash_cache_ss] = rememberHashFiles()?"YES":"NO" ;
{
std::string s ;
rs_sprintf(s, "%d", watchPeriod()) ;
configMap[watch_file_duration_ss] = s ;
}
RsConfigKeyValueSet *rskv = new RsConfigKeyValueSet();
/* Convert to TLV */
for(std::map<std::string,std::string>::const_iterator mit = configMap.begin(); mit != configMap.end(); ++mit)
{
RsTlvKeyValue kv;
kv.key = mit->first;
kv.value = mit->second;
rskv->tlvkvs.pairs.push_back(kv);
}
/* Add KeyValue to saveList */
sList.push_back(rskv);
return true;
}
bool ftFiMonitor::loadList(std::list<RsItem *>& load)
{
/* for each item, check it exists ....
* - remove any that are dead (or flag?)
*/
static const FileStorageFlags PERMISSION_MASK = DIR_FLAGS_BROWSABLE_OTHERS | DIR_FLAGS_NETWORK_WIDE_OTHERS | DIR_FLAGS_BROWSABLE_GROUPS | DIR_FLAGS_NETWORK_WIDE_GROUPS ;
#ifdef DEBUG_ELIST
std::cerr << "ftFiMonitor::loadList()";
std::cerr << std::endl;
#endif
std::list<SharedDirInfo> dirList;
std::list<RsItem *>::iterator it;
for(it = load.begin(); it != load.end(); ++it)
{
RsConfigKeyValueSet *rskv ;
/* switch on type */
if (NULL != (rskv = dynamic_cast<RsConfigKeyValueSet *>(*it)))
{
/* make into map */
std::map<std::string, std::string> configMap;
std::map<std::string, std::string>::const_iterator mit ;
for(std::list<RsTlvKeyValue>::const_iterator kit = rskv->tlvkvs.pairs.begin(); kit != rskv->tlvkvs.pairs.end(); ++kit)
{
configMap[kit->key] = kit->value;
}
if (configMap.end() != (mit = configMap.find(hash_cache_duration_ss)))
{
uint32_t t=0 ;
if(sscanf(mit->second.c_str(),"%d",&t) == 1)
setRememberHashFilesDuration(t);
}
if(configMap.end() != (mit = configMap.find(hash_cache_ss)))
setRememberHashFiles( mit->second == "YES") ;
if(configMap.end() != (mit = configMap.find(watch_file_duration_ss)))
{
int t=0 ;
if(sscanf(mit->second.c_str(),"%d",&t) == 1)
setWatchPeriod(t);
}
delete *it ;
continue ;
}
// 07/05/2016 - This ensures backward compatibility. Can be removed in a few weeks.
RsFileConfigItem_deprecated *fib = dynamic_cast<RsFileConfigItem_deprecated *>(*it);
if (fib)
{
/* ensure that it exists? */
SharedDirInfo info ;
info.filename = RsDirUtil::convertPathToUnix(fib->file.path);
info.virtualname = fib->file.name;
info.shareflags = FileStorageFlags(fib->flags) ;
info.shareflags &= PERMISSION_MASK ;
info.shareflags &= ~DIR_FLAGS_NETWORK_WIDE_GROUPS ; // disabling this flag for know, for consistency reasons
for(std::list<std::string>::const_iterator itt(fib->parent_groups.begin());itt!=fib->parent_groups.end();++itt)
{
RsGroupInfo ginfo;
if(rsPeers->getGroupInfoByName(*itt,ginfo) )
{
info.parent_groups.push_back(ginfo.id) ;
std::cerr << "(II) converted old group ID \"" << *itt << "\" into corresponding new group id " << ginfo.id << std::endl;
}
else
std::cerr << "(EE) cannot convert old group ID \"" << *itt << "\" into corresponding new group id: no candidate found. " << std::endl;
}
dirList.push_back(info) ;
}
RsFileConfigItem *fi = dynamic_cast<RsFileConfigItem *>(*it);
if (fi)
{
/* ensure that it exists? */
SharedDirInfo info ;
info.filename = RsDirUtil::convertPathToUnix(fi->file.path);
info.virtualname = fi->file.name;
info.shareflags = FileStorageFlags(fi->flags) ;
info.shareflags &= PERMISSION_MASK ;
info.shareflags &= ~DIR_FLAGS_NETWORK_WIDE_GROUPS ; // disabling this flag for know, for consistency reasons
for(std::set<RsNodeGroupId>::const_iterator itt(fi->parent_groups.ids.begin());itt!=fi->parent_groups.ids.end();++itt)
info.parent_groups.push_back(*itt) ;
dirList.push_back(info) ;
}
delete *it ;
}
/* set directories */
setSharedDirectories(dirList);
load.clear() ;
return true;
}
void ftFiMonitor::updateShareFlags(const SharedDirInfo& info)
{
std::cerr << "Updating share flags:" << std::endl;
std::cerr << " Directory : " << info.filename << std::endl;
std::cerr << " Virtual : " << info.virtualname << std::endl;
std::cerr << " Flags : " << info.shareflags << std::endl;
FileIndexMonitor::updateShareFlags(info);
/* flag for config */
IndicateConfigChanged();
}
void ftFiMonitor::setSharedDirectories(const std::list<SharedDirInfo>& dirList)
{
FileIndexMonitor::setSharedDirectories(dirList);
/* flag for config */
IndicateConfigChanged();
}
ftCacheStrapper::ftCacheStrapper(p3ServiceControl *sc, uint32_t ftServiceId)
:CacheStrapper(sc, ftServiceId)
{
return;
}
/* overloaded search function */
bool ftCacheStrapper::search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const
{
/* remove unused parameter warnings */
(void) hintflags;
#ifdef DB_DEBUG
std::cerr << "ftCacheStrapper::search(" << hash << "," << hintflags;
std::cerr << ")";
std::cerr << std::endl;
#endif
RsCacheData data;
if (findCache(hash, data))
{
#ifdef DB_DEBUG
std::cerr << "ftCacheStrapper::search() found: ";
std::cerr << data.path << "/" << data.name;
std::cerr << " = " << data.hash << "," << data.size;
std::cerr << std::endl;
#endif
/* ... */
info.size = data.size;
info.fname = data.name;
info.path = data.path + "/" + data.name;
return true;
}
return false;
}

View File

@ -1,104 +0,0 @@
/*
* libretroshare/src/ft: ftdbase.h
*
* File Transfer for RetroShare.
*
* Copyright 2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef FT_DBASE_INTERFACE_HEADER
#define FT_DBASE_INTERFACE_HEADER
/*
* ftdbase.
*
* Wrappers for the Cache/FiStore/FiMonitor classes.
* So they work in the ft world.
*/
class p3LinkMgr ;
class p3PeerMgr ;
class p3ServiceControl ;
#include "ft/ftsearch.h"
#include "pqi/p3cfgmgr.h"
#include "dbase/fistore.h"
#include "dbase/fimonitor.h"
#include "dbase/cachestrapper.h"
class ftFiStore: public FileIndexStore, public ftSearch
{
public:
ftFiStore(CacheStrapper *cs, CacheTransfer *cft, p3PeerMgr *pm,
RsPeerId ownid, std::string cachedir);
/* overloaded search function */
virtual bool search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const;
};
class ftFiMonitor: public FileIndexMonitor, public ftSearch, public p3Config
{
public:
ftFiMonitor(CacheStrapper *cs,std::string cachedir, const RsPeerId& pid,const std::string& config_dir);
/* overloaded search function */
virtual bool search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const;
virtual bool search(const RsFileHash &hash, FileSearchFlags hintflags, const RsPeerId& peer_id, FileInfo &info) const;
/* overloaded set dirs enables config indication */
virtual void setSharedDirectories(const std::list<SharedDirInfo>& dirList);
virtual void updateShareFlags(const SharedDirInfo& info) ;
void setRememberHashCacheDuration(uint32_t days) ;
uint32_t rememberHashCacheDuration() const ;
void setRememberHashCache(bool) ;
bool rememberHashCache() ;
void clearHashCache() ;
void setWatchPeriod(int seconds) ; // can be negative, which means auto-check disabled.
int watchPeriod() const ;
/***
* Configuration - store shared directories
*/
protected:
virtual RsSerialiser *setupSerialiser();
virtual bool saveList(bool &cleanup, std::list<RsItem *>&);
virtual bool loadList(std::list<RsItem *>& load);
};
class ftCacheStrapper: public CacheStrapper, public ftSearch
{
public:
ftCacheStrapper(p3ServiceControl *cm, uint32_t ftServiceId);
/* overloaded search function */
virtual bool search(const RsFileHash &hash, FileSearchFlags hintflags, FileInfo &info) const;
};
#endif

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/grouter: grouterclientservice.h
*
* Services for RetroShare.
*
* Copyright 2013 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "csoler@users.sourceforge.net".
*
*/
/*******************************************************************************
* libretroshare/src/grouter: grouterclientservice.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2013 by 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
// This class is the parent class for any service that will use the global router to distribute its packets.
// Typical representative clients include:

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/services: groutermatrix.cc
*
* Services for RetroShare.
*
* Copyright 2013 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "csoler@users.sourceforge.net".
*
*/
/*******************************************************************************
* libretroshare/src/grouter: groutermatrix.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2013 by 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "groutertypes.h"
#include "groutermatrix.h"

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/services: groutermatrix.h
*
* Services for RetroShare.
*
* Copyright 2013 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "csoler@users.sourceforge.net".
*
*/
/*******************************************************************************
* libretroshare/src/grouter: groutermatrix.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2013 by 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once

View File

@ -1,158 +0,0 @@
/*
* libretroshare/src/gxp: gxp.h
*
* General Exchange Protocol interface for RetroShare.
*
* Copyright 2011-2011 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef RS_GIXP_H
#define RS_GIXP_H
/************************************************************************
* GIXP: General Identity Exchange Protocol.
*
* As we're always running into troubles with GPG signatures... we are going to
* create a layer of RSA Keys for the following properties:
*
* 1) RSA Keys can be Anonymous, Self-Signed with Pseudonym, Signed by GPG Key.
* - Anonymous & Pseudonym Keys will be shared network-wide (Hop by Hop).
- GPG signed Keys will only be shared if we can validate the signature
(providing similar behaviour to existing GPG Keys).
- GPG signed Keys can optionally be marked for Network-wide sharing.
* 2) These keys can be used anywhere, specifically in the protocols described below.
* 3) These keys can be used to sign, encrypt, verify & decrypt
* 4) Keys will never need to be directly accessed - stored in this class.
* 5) They will be cached locally and exchanged p2p, by pull request.
* 6) This class will use the generalised packet storage for efficient caching & loading.
* 7) Data will be stored encrypted.
*
*
*****/
class gixp::key
{
gxip::keyref mKeyId;
PubKey *pubKey;
PrivateKey *privKey; /* NULL if non-existant */
};
/* As we want GPG signed profiles, to be usable as PSEUDONYMS further afield,
* we will split them out, and distribute them seperately.
*
* So a key can have multiple profiles associated with it.
* - They should always have a self-signed one.
* - optionally have a gpg-signed one.
*/
class gixp::profile
{
public:
gxip::keyref mKeyId;
std::string mName;
rstime_t mTimestamp; /* superseded by newer timestamps */
uint32_t mProfileType; /* ANONYMOUS (no name, self-signed), PSEUDONYM (self-signed), GPG (name=gpgid, gpgsigned), REVOCATION?? */
gpp::permissions mPermissions;
gxip::signature mSignature;
};
class gxip::keyref
{
std::string keyId;
}
class gxip::keyrefset
{
std::list<gxip::keyref> keyIds;
}
class gxip::signature
{
gxip::keyref signer;
std::string signature;
}
class gxip::signset
{
std::list<gxip::signature> signs;
};
/*
* We will pinch an idea from Amplify & Briar... of using reputations to decide
* if we display or distribute messages.
*
* The Reputation will be associated with the Profile - It has to be stored
* independently of the messages - which will not be touched.
*
* This part of the code will have to be worked out.
*/
class gxip::reputation
{
gxip::keyref;
int16_t score; /* -1000 => 1000 ??? */
std::string comment;
gxip::signature sign;
};
/*******
* NOTES:
* 1) much of this is already implemented in libretroshare/src/distrib/distribsecurity.cc
* 2) Data types will need to be shoehorned into gxmp::signedmsg format for transport.
* 3) Likewise this class will sit above a gdp/gnp/gsp data handling.
*/
class p3gixp
{
bool createKey(gixp::profile, bool doGpgAlso); /* fills in mKeyId, and signature */
bool haveKey(keyId);
bool havePrivateKey(keyId);
bool requestKey(keyId);
bool getProfile(keyId, gixp::profile &prof); /* generic profile - that can be distributed far and wide */
bool getGpgProfile(keyId, gixp::profile &prof); /* personal profile - (normally) only shared with friends */
bool getReputations(keyId, std::list<gxip::reputation> &reps);
int16_t getRepScore(keyId, uint32_t flags);
/*** process data ***/
bool sign(KeyId, Data, signature);
bool verify(KeyId, Data, signature);
bool decrypt(KeyId, Data, decryptedData);
bool encrypt(KeyId, Data, decryptedData);
};
#endif /* RS_GIXP_H */

View File

@ -1,214 +0,0 @@
/*
* libretroshare/src/gxp: gxp.h
*
* General Exchange Protocol interface for RetroShare.
*
* Copyright 2011-2011 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef RS_GMXP_H
#define RS_GMXP_H
/************************************************************************
* GMXP: General Message Exchange Protocol.
*
* The existing experiences of Forums & Channels have highlighted some
* significant limitations of the Cache-Based exchange system. Based
* on this initial understandings - an improved transport system will
* be design to provide a generalised message exchange foundation,
* which can be used to build new services...
*
*
* Key Properties:
*
* 1) Message independent: Should be able to be used for Forums, Channels
* Twitter, Photos, Task Tracking, Link Cloud, etc.
* 2) Easy to Use: Specify(Msg, Permissions, KeyId) only.
* 3) Efficient Network Transport. (in common with GIXP)
* 4) Efficient Cache System (in common with GIXP).
* 5) Uses Groups Feature (in common with GIXP).
* 6) Search Protocols. ( might need overloading at higher level).
*
*****/
/******
* NOTES:
* 1) Based on Forum/Channel Groups.
* 2) Will likely need to extend to handle info for other services.
* 3) Perhaps a more generalised class like gxmp::msg would be best with extra data.
*
*/
class gxmp::group
{
gxp::id grpId;
uint32_t grpType; /* FORUM, CHANNEL, TWITTER, etc */
uint32_t timestamp;
uint32_t grpFlags;
std::string grpName;
std::string grpDesc;
std::string grpCategory;
RsTlvImage grpPixmap;
gpp::permissions grpPermissions;
gxip::keyref adminKey;
gxip::keyrefset publishKeys;
gxip::signature adminSignature;
};
/******
* NOTES:
* 1) This represents the base of the Unpacked Msgs, it will be overloaded by all classes
* that want to use the service. It is difficult to go from gxmp::msg => gxmp::signedmsg
* so data should be stored in the signedmsg format.
* 2) All services will fundamentally use data types derived from this.
* 3) This packet is only serialised once at post time, typically it is deserialised by all nodes.
*/
class gmxp::link
{
uint32_t linktype;
gxp::id msgId;
}
class gmxp::msg
{
gxp::id groupId;
gxp::id msgId;
gxp::id parentId; /* for full threading */
gxp::id threadId; /* top of thread Id */
gxp::id origMsgId; /* if a replacement msg, otherwise == msgId */
gxp::id replacingMsgId; /* if a replacement msg, otherwise == NULL (for ordering) */
uint32_t msgtype; /* FORUM, CHANNEL, EVENT, COMMENT, VOTE, etc */
uint32_t flags; /* Is this needed? */
uint32_t timestamp;
// New extensions - put these in the generic message, so we can handle search / linking for all services.
std::list<std::string> hashtags;
std::list<gmxp::link> linked;
gpp::permissions msgPermissions;
gxip::signset signatures; // should this be a set, or a singleton?
};
class gmxp::group: public gxp::group
{
???
};
/******
* NOTES:
* 1) This class will be based on p3distrib - which does most of this stuff already!
* 2) There are lots of virtual functions - which can be overloaded to customise behaviour.
* for clarity - these have not been shown here.
*
* 3) We need to extend this class to add search functionality... so you can discover new
* stuff from your friends. This will need to be an overloaded functionality as the
* search will be service specific.
*/
/* General Interface class which is extended by specific versions.
*
* This provides most of the generic search, and access functions.
* As we are going to end up with diamond style double inheritance.
* This function needs to be pure virtual.. so there is no disambiugation issues.
*/
class rsGmxp
{
/* create content */
std::string createGroup(std::wstring name, std::wstring desc, uint32_t flags, unsigned char *pngImageData, uint32_t imageSize);
std::string publishMsg(RsDistribMsg *msg, bool personalSign);
/* indicate interest in info */
bool subscribeToGroup(const std::string &grpId, bool subscribe);
/* search messages (TO DEFINE) */
/* extract messages (From p3Distrib Existing Methods) */
bool getAllGroupList(std::list<std::string> &grpids);
bool getSubscribedGroupList(std::list<std::string> &grpids);
bool getPublishGroupList(std::list<std::string> &grpids);
void getPopularGroupList(uint32_t popMin, uint32_t popMax, std::list<std::string> &grpids);
bool getAllMsgList(const std::string& grpId, std::list<std::string> &msgIds);
bool getParentMsgList(const std::string& grpId,
const std::string& pId, std::list<std::string> &msgIds);
bool getTimePeriodMsgList(const std::string& grpId, uint32_t timeMin,
uint32_t timeMax, std::list<std::string> &msgIds);
GroupInfo *locked_getGroupInfo(const std::string& grpId);
RsDistribMsg *locked_getGroupMsg(const std::string& grpId, const std::string& msgId);
void getGrpListPubKeyAvailable(std::list<std::string>& grpList);
};
class p3gmxp
{
p3gmxp(int serviceType, serialiser *);
/* create content */
std::string createGroup(std::wstring name, std::wstring desc, uint32_t flags, unsigned char *pngImageData, uint32_t imageSize);
std::string publishMsg(RsDistribMsg *msg, bool personalSign);
/* indicate interest in info */
bool subscribeToGroup(const std::string &grpId, bool subscribe);
/* search messages (TO DEFINE) */
/* extract messages (From p3Distrib Existing Methods) */
bool getAllGroupList(std::list<std::string> &grpids);
bool getSubscribedGroupList(std::list<std::string> &grpids);
bool getPublishGroupList(std::list<std::string> &grpids);
void getPopularGroupList(uint32_t popMin, uint32_t popMax, std::list<std::string> &grpids);
bool getAllMsgList(const std::string& grpId, std::list<std::string> &msgIds);
bool getParentMsgList(const std::string& grpId,
const std::string& pId, std::list<std::string> &msgIds);
bool getTimePeriodMsgList(const std::string& grpId, uint32_t timeMin,
uint32_t timeMax, std::list<std::string> &msgIds);
GroupInfo *locked_getGroupInfo(const std::string& grpId);
RsDistribMsg *locked_getGroupMsg(const std::string& grpId, const std::string& msgId);
void getGrpListPubKeyAvailable(std::list<std::string>& grpList);
};
#endif /* RS_GMXP_H */

View File

@ -1,443 +0,0 @@
/*
* libretroshare/src/gxp: gxp.h
*
* General Exchange Protocol interface for RetroShare.
*
* Copyright 2011-2011 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef RS_GXP_H
#define RS_GXP_H
/************************************************************************
* This File describes the following components for a generalised exchange protocol (GXP).
*
* GPP: General Permissions Protocol: Who is allowed access to what?
* GDP: General Data Protocol: High Level Interface for exchanging data.
* GSP: General Storage Protocol: Class implementing GDP for disk access.
* GNP: General Network Protocol: Class implementing GDP for network exchange.
*
* This will be the mechanism to enforce groups.
* No idea what the data types will look like.
*
*****/
/************************************************************************
* GPP: General Permissions Protocol
*
* This will be the mechanism to enforce groups.
* No idea what the data types will look like.
* The real challenge here is to ensure that the permissions are universal,
* so they can be baked into the messages.
*
* PUBLIC:
*
* RESTRICTED:
*
* PUBLISHER_ONLY_SHARE:
*
* GROUP: list<gpgid>
*
* GROUP: signed by list<keyid>
*
* SAME AS GROUP_DESCRIPTION: (for messages)
*
* These permissions will need to be coupled to local permissions...
* eg. I don't want Party Photos going to Work Collegues.
*
* The combination of both permissions will determine who things are shared with.
*
*****/
class gpp::group
{
}
class gpp::Permissions
{
};
/************************************************************************
* GDP: General Data Protocol
*
* Generic Data Interface used for both GNP and GSP
*
* Permissions are handled at this level... totally generic to all messages.
*
* gxmp::signedmsg represents the "original data" container format that will
* be tranported and stored by GSP / GNP cmodules.
*****/
class gxp::id
{
std::string id;
};
/******
* NOTES:
* 1) Based on Forum/Channel Groups.
* 2) Will likely need to extend to handle info for other services.
* 3) Perhaps a more generalised class like gxmp::msg would be best with extra data.
*
*/
class gxmp::group
{
gxp::id grpId;
uint32_t grpType; /* FORUM, CHANNEL, TWITTER, etc */
uint32_t timestamp;
uint32_t grpFlags;
std::string grpName;
std::string grpDesc;
std::string grpCategory;
RsTlvImage grpPixmap;
gpp::permissions grpPermissions;
gxip::keyref adminKey;
gxip::keyrefset publishKeys;
gxip::signature adminSignature;
};
/******
* NOTES:
* 1) It is possible for the packet to be encrypted, rather than just signed.
* so the uncrypted data mustn't give away too much about whats in the msg.
* 2) This is based on the DistribSignedMsg format.
* 3) Combined signatures instead of explict publish/personal signs -
* to make it more general. Expect first signature == msgId.
* 4) Should the permissions be only a group level, or for individual msgs as well?
*
*/
class gxp::signedmsg
{
gxp::id groupId; /* high level groupings, e.g. specific forum, channel, or twitter user, etc. */
gxp::id msgId; /* unique msgId within that group, normally signature of the message */
uint32_t timestamp;
gpp::permissions grpPermissions;
gxp::data packet; /* compressed data */
gxip::signset signatures;
};
class gdp::interface
{
/* query for available groups & messages */
int listgroups(std::list<gdb::id> &grpIds);
/* response from listmsgs: -1 = invalid parameters, 0 = incomplete list, 1 = all known msgs */
int listmsgs(const gdp::id grpId, std::list<gdb::id> &msgIds, const rstime_t from, const rstime_t to, const int maxmsgs);
/* response from requestMsg: YES (available immediately), RETRIEVING (known to exist),
* IN_REQUEST (might exist), NOT_AVAILABLE (still might exist)
* NB: NOT_AVAILABLE could mean that it will be retrievable later when other peers come online, or possibilly we are not allowed it.
*/
int requestMsg(gdp::id groupId, gdp::id msgId, double &delay);
int getMsg(gdp::id groupId, gdp::id msgId, gdp::message &msg);
int storeMsg(const gdp::message &msg);
/* search interface, is it here? or next level up */
};
/************************************************************************
* GSP: General Storage Protocol
*
* This will be the mechanism used to store both GIXP and GMXP data.
*
* This will have a decent index system - which is loaded immediately.
* meaning we know if a message exists or not.
*
* We will also implement a cache system, meaning recently accessed data
* is available immediately.
*
*
*
*****/
class gsp::storage: public gdp::interface
{
/*** gdp::iterface *****/
int requestMsg(gdp::id groupId, gdp::id msgId, double &delay);
int getMsg(gdp::id groupId, gdp::id msgId, gdp::message &msg);
int storeMsg(const gdp::message &msg);
int flagMsg(gxp::id grpId, gxp::id msgId, bool pleaseCache);
/*** IMPLEMENTATION DETAILS ****/
loadIndex();
loadCache();
bool isInCache(gdp::id grpId, gdp::id msgId);
bool isInIndex(gdp::id grpId, gdp::id msgId);
void fetchToCache(gdp::id grpId, gdp::id msgId);
};
/************************************************************************
* GNP: General Network Protocol
*
* This will be the mechanism share data with peers.
* It will be designed and closely couple to GSP for effective data managment.
*
* This part will effectively interface with librs Network Service.
* This will also push message ids around - to indicate new messages.
*
* This would sit above the GSP, and push things into storage
* as they come over the network
*
*
*****/
class gnp::exchange: public gdp::interface
{
/*** gdp::iterface *****/
int requestMsg(gdp::id groupId, gdp::id msgId, double &delay);
int getMsg(gdp::id groupId, gdp::id msgId, gdp::message &msg);
int storeMsg(const gdp::message &msg);
/*** IMPLEMENTATION DETAILS ****/
/* Get/Send Messages */
getAvailableMsgs(gdp::id grpId, rstime_t from, rstime_t to); /* request over the network */
sendAvailableMsgs(std::string peerId, gdp::id grpId, rstime_t from, rstime_t to); /* send to peers */
requestMessages(std::string peerId, gdp::id grpId, std::list<gdp::id> msgIds);
sendMessages(std::string peerId, gdp::id grpId, std::list<gdp::id> msgIds); /* send to peer, obviously permissions have been checked first */
/* Search the network */
};
/************************************************************************
* GIXP: General Identity Exchange Protocol.
*
* As we're always running into troubles with GPG signatures... we are going to
* create a layer of RSA Keys for the following properties:
*
* 1) RSA Keys can be Anonymous, Self-Signed with Pseudonym, Signed by GPG Key.
* - Anonymous & Pseudonym Keys will be shared network-wide (Hop by Hop).
- GPG signed Keys will only be shared if we can validate the signature
(providing similar behaviour to existing GPG Keys).
- GPG signed Keys can optionally be marked for Network-wide sharing.
* 2) These keys can be used anywhere, specifically in the protocols described below.
* 3) These keys can be used to sign, encrypt, verify & decrypt
* 4) Keys will never need to be directly accessed - stored in this class.
* 5) They will be cached locally and exchanged p2p, by pull request.
* 6) This class will use the generalised packet storage for efficient caching & loading.
* 7) Data will be stored encrypted.
*****/
class gixp::key
{
gxip::keyref mKeyId;
PubKey *pubKey;
PrivateKey *privKey; /* NULL if non-existant */
};
class gixp::profile
{
public:
gxip::keyref mKeyId;
std::string mPseudonym;
rstime_t mTimestamp; /* superseded by newer timestamps */
uint32_t mProfileType; /* ANONYMOUS (no name, self-signed), PSEUDONYM (self-signed), GPG (name=gpgname, gpgsigned), REVOCATION?? */
gpp::permissions mPermissions;
gxip::signature mSignature;
};
class gxip::keyref
{
std::string keyId;
}
class gxip::keyrefset
{
std::list<gxip::keyref> keyIds;
}
class gxip::signature
{
gxip::keyref signer;
std::string signature;
}
class gxip::signset
{
std::list<gxip::signature> signs;
};
/*******
* NOTES:
* 1) much of this is already implemented in libretroshare/src/distrib/distribsecurity.cc
* 2) Data types will need to be shoehorned into gxmp::signedmsg format for transport.
* 3) Likewise this class will sit above a gdp/gnp/gsp data handling.
*/
class p3gixp
{
bool createKey(gixp::profile); /* fills in mKeyId, and signature */
bool haveKey(keyId);
bool havePrivateKey(keyId);
bool requestKey(keyId);
gixp::profile getProfile(keyId);
/*** process data ***/
bool sign(KeyId, Data, signature);
bool verify(KeyId, Data, signature);
bool decrypt(KeyId, Data, decryptedData);
bool encrypt(KeyId, Data, decryptedData);
};
/************************************************************************
* GMXP: General Message Exchange Protocol.
*
* The existing experiences of Forums & Channels have highlighted some
* significant limitations of the Cache-Based exchange system. Based
* on this initial understandings - an improved transport system will
* be design to provide a generalised message exchange foundation,
* which can be used to build new services...
*
*
* Key Properties:
*
* 1) Message independent: Should be able to be used for Forums, Channels
* Twitter, Photos, Task Tracking, Link Cloud, etc.
* 2) Easy to Use: Specify(Msg, Permissions, KeyId) only.
* 3) Efficient Network Transport. (in common with GIXP)
* 4) Efficient Cache System (in common with GIXP).
* 5) Uses Groups Feature (in common with GIXP).
* 6) Search Protocols. ( might need overloading at higher level).
*
*****/
/******
* NOTES:
* 1) This represents the base of the Unpacked Msgs, it will be overloaded by all classes
* that want to use the service. It is difficult to go from gxmp::msg => gxmp::signedmsg
* so data should be stored in the signedmsg format.
* 2) All services will fundamentally use data types derived from this.
* 3) This packet is only serialised once at post time, typically it is deserialised be all nodes.
*/
class gxmp::msg
{
gxp::id groupId;
gxp::id msgId;
gxp::id parentId; /* for full threading */
gxp::id threadId; /* top of thread Id */
gxp::id origMsgId; /* if a replacement msg, otherwise == msgId */
gxp::id replacingMsgId; /* if a replacement msg, otherwise == NULL (for ordering) */
uint32_t type; /* FORUM, CHANNEL, EVENT, COMMENT, VOTE, etc */
uint32_t flags; /* Is this needed? */
uint32_t timestamp;
gpp::permissions msgPermissions;
gxip::signset signatures;
};
/******
* NOTES:
* 1) This class will be based on p3distrib - which does most of this stuff already!
* 2) There are lots of virtual functions - which can be overloaded to customise behaviour.
* for clarity - these have not been shown here.
*
* 3) We need to extend this class to add search functionality... so you can discover new
* stuff from your friends. This will need to be an overloaded functionality as the
* search will be service specific.
*/
class p3gmxp
{
p3gmxp(int serviceType, serialiser *);
/* create content */
std::string createGroup(std::wstring name, std::wstring desc, uint32_t flags, unsigned char *pngImageData, uint32_t imageSize);
std::string publishMsg(RsDistribMsg *msg, bool personalSign);
/* indicate interest in info */
bool subscribeToGroup(const std::string &grpId, bool subscribe);
/* search messages (TO DEFINE) */
/* extract messages (From p3Distrib Existing Methods) */
bool getAllGroupList(std::list<std::string> &grpids);
bool getSubscribedGroupList(std::list<std::string> &grpids);
bool getPublishGroupList(std::list<std::string> &grpids);
void getPopularGroupList(uint32_t popMin, uint32_t popMax, std::list<std::string> &grpids);
bool getAllMsgList(const std::string& grpId, std::list<std::string> &msgIds);
bool getParentMsgList(const std::string& grpId,
const std::string& pId, std::list<std::string> &msgIds);
bool getTimePeriodMsgList(const std::string& grpId, uint32_t timeMin,
uint32_t timeMax, std::list<std::string> &msgIds);
GroupInfo *locked_getGroupInfo(const std::string& grpId);
RsDistribMsg *locked_getGroupMsg(const std::string& grpId, const std::string& msgId);
void getGrpListPubKeyAvailable(std::list<std::string>& grpList);
};
#endif /* RS_GXP_H */

View File

@ -1,385 +0,0 @@
/*
* libretroshare/src/gxp: gxp_apps.h
*
* General Exchange Protocol interface for RetroShare.
*
* Copyright 2011-2011 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef RS_GXP_APPS_H
#define RS_GXP_APPS_H
/************************************************************************
* This File describes applications that will use the GXP protocols.
*
*****/
/************************************************************************
* Forums / Channels.
*
* The existing experiences of Forums & Channels have highlighted some
* significant limitations of the Cache-Based exchange system. The new
* and improved system will be based on GMXP.
*
* Existing Issues to deal with:
* 1) GPG Signatures take too long to verify (GPGme/gpg.exe issue)
* 2) Signatures are re-verified each startup.
* 3) Forum Messages are broadcast to all peers - excessive traffic/disk space.
* 4) Impossible to Edit Messages, or Comment on Channel Posts.
*
* Most of these issues (1-3) will be dealt with via GMXP GIXP system
*
* The data structures below are closely modelled on existing types.
*
*****/
class gxp::forum::msg: public gmxp::msg
{
/**** PROVIDED BY PARENT ***/
//gxp::id groupId;
//gxp::id msgId;
//gxp::id parentId;
//gxp::id threadId;
//gxp::id origMsgId;
//gxp::id replacingMsgId;
//uint32_t timestamp;
//uint32_t type;
//uint32_t flags;
//gpp::permissions msgPermissions;
//gxp::signset signatures;
/**** SPECIFIC FOR FORUM MSG ****/
std::string srcId;
std::string title;
std::string msg;
};
class gxp::channel::msg: public gmxp::msg
{
/**** PROVIDED BY PARENT ***/
//gxp::id groupId;
//gxp::id msgId;
//gxp::id parentId; // NOT USED.
//gxp::id threadId; // NOT USED.
//gxp::id origMsgId;
//gxp::id replacingMsgId;
//uint32_t timestamp;
//uint32_t type;
//uint32_t flags;
//gpp::permissions msgPermissions;
//gxp::signset signatures;
/**** SPECIFIC FOR CHANNEL MSG ****/
std::wstring subject;
std::wstring message;
RsTlvFileSet attachment;
RsTlvImage thumbnail;
};
/************************************************************************
* Events.
*
* It is well known that Events & Photos are the two primary uses for
* Facebook. It is imperative that these are implemented in GXP.
*
*****/
class gxp::events::event: public gmxp::msg
{
/**** PROVIDED BY PARENT ***/
//gxp::id groupId;
//gxp::id msgId;
//gxp::id parentId;
//gxp::id threadId;
//gxp::id origMsgId;
//gxp::id replacingMsgId;
//uint32_t timestamp;
//uint32_t type;
//uint32_t flags;
//gpp::permissions msgPermissions;
//gxp::signset signatures;
/**** SPECIFIC FOR EVENT MSG ****/
location
time
repeats
invite list
number of places.
host
};
class gxp::events::reply: public gmxp::msg
{
/**** PROVIDED BY PARENT ***/
//gxp::id groupId;
//gxp::id msgId;
//gxp::id parentId;
//gxp::id threadId;
//gxp::id origMsgId;
//gxp::id replacingMsgId;
//uint32_t timestamp;
//uint32_t type;
//uint32_t flags;
//gpp::permissions msgPermissions;
//gxp::signset signatures;
/**** SPECIFIC FOR REPLY MSG ****/
bool amcoming;
};
/************************************************************************
* Photos.
*
*****/
class gxp::PhotoAlbum: public gmxp::group
{
Location
Period
Type
Photographer
Comments
};
class gxp::photos::photo: public gmxp::msg
{
/**** PROVIDED BY PARENT ***/
//gxp::id groupId;
//gxp::id msgId;
//gxp::id parentId;
//gxp::id threadId;
//gxp::id origMsgId;
//gxp::id replacingMsgId;
//uint32_t timestamp;
//uint32_t type;
//uint32_t flags;
//gpp::permissions msgPermissions;
//gxp::signset signatures;
/**** SPECIFIC FOR PHOTO MSG ****/
Location
Time
Type
Photographer
Comment
FileLink.
};
/************************************************************************
* Wiki.
*
* Wiki pages are very similar to Forums... Just they are editable
* but anyone, and will replace the earlier version.
*
*****/
class gxp::wiki::topic: public gmxp::group
{
}
class gxp::wiki::page: public gmxp::msg
{
/**** PROVIDED BY PARENT ***/
//gxp::id groupId;
//gxp::id msgId;
//gxp::id parentId;
//gxp::id threadId;
//gxp::id origMsgId;
//gxp::id replacingMsgId;
//uint32_t timestamp;
//uint32_t type;
//uint32_t flags;
//gpp::permissions msgPermissions;
//gxp::signset signatures;
/**** SPECIFIC FOR FORUM MSG ****/
Title
Format
Page
Links
References
};
/************************************************************************
* Links.
*
*****/
class gxp::Link
{
};
/************************************************************************
* Comments.
*
*****/
class gxp::Comment
{
};
/************************************************************************
* Vote.
*
*****/
class gxp::Vote
{
};
/************************************************************************
* Status
*
*****/
class gxp::Status
{
};
/************************************************************************
* Tasks
*
*****/
class gxp::Task
{
};
/************************************************************************
* Tweet
*
*****/
class gxp::Tweet
{
HashTags
Content
Links
};
/************************************************************************
* Library.
*
*****/
class gxp::Paper
{
KeyWords
Journal
Authors
Abstract
References
Similar Papers
};
#endif /* RS_GXP_H */

View File

@ -1,104 +0,0 @@
/* Generalised Service Base Class.
* The base class interfaces with gixp, disk, net services.
*/
class RsGxpLink
{
uint32_t type;
std::string msgId;
}
class RsGxpItem
{
std::string msgId;
std::string origMsgId;
std::string groupId;
gxpTime time;
std::list<std::string> hashtags;
std::list<RsGxpLink> linked;
RsGxpSignature mSignature;
};
class RsGxpGroup
{
};
class gxp_service
{
public:
requestItem(msgId);
recv(RsGxpItem *item);
send(RsGxpItem *item);
/****************************************************************************************************/
// Event Callback for the service.
/****************************************************************************************************/
notify_groupChanged(); // Mainly for GUI display.
notify_newMessage(); // used for newsFeeds.
notify_duplicateMessage(); // Channels needs this for Downloading stuff, can probably be moved above.
locked_checkDistribMsg(); // required overload?
/****************************************************************************************************/
// Must worry about sharing keys.
// Can gixp handle it?
// What interfaces do we need here?
/****************************************************************************************************/
/****************************************************************************************************/
// Interface for Message Read Status
// At the moment this is overloaded to handle autodownload flags too.
// This is a configuration thing.
/****************************************************************************************************/
int flagItemRead(std::string id);
int flagItemUnread(std::string id);
int flagGroupRead(std::string id);
int flagGroupUnread(std::string id);
/****************************************************************************************************/
// External Interface for Data.
/****************************************************************************************************/
// Mesage Creation.
int createGroup(RsGxpGroup *grp);
int createItem(RsGxpItem *item);
// Group Lists & Message Lists.
int getGroupsChanged(std::list<std::string> &groupIds);
int getGroups(std::list<std::string> &groupIds);
int getGroupList(std::string grpId, std::list<std::string> &groupIds);
int getTimeRange(GxpTime from, GxpTime to, std::list<std::string> &msgIds);
int getGroupTimeRange(std::string grpId, GxpTime from, GxpTime to, std::list<std::string> &msgIds);
int getReplacementMsgs(std::string origId, std::list<std::string> replaceIds);
// Getting the Actual Data.
int haveItem(std::string msgId);
int requestItem(std::string msgId);
RsGxpItem *getMsg_locked(std::string msgId);
RsGxpGroup *getGroup_locked(std::string msgId);
// Interface with GIXP Stuff... everything else should be behind the scenes.
RsGixpProfile *getProfile_locked(std::string id);
// Immediate Search...
int searchReferringLinks(RsGxpLink link, std::list<std::string> &msgIds);
int searchHashTags(std::list<std::string>, std::list<std::string> &msgIds);
// Remote Search...
private:
// Reversed Index: for hash searching.
std::map<std::string, std::list<ids> > mSearchMap;
};

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/gxs: rsgxsnettunnel.cc
*
* General Data service, interface for RetroShare.
*
* Copyright 2018-2018 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare.project@gmail.com"
*
*/
/*******************************************************************************
* libretroshare/src/gxs: gxsnettunnel.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2018 by Cyril Soler <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "util/rsdir.h"
#include "util/rstime.h"

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/gxs: rsgxsnettunnel.h
*
* General Data service, interface for RetroShare.
*
* Copyright 2018-2018 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare.project@gmail.com"
*
*/
/*******************************************************************************
* libretroshare/src/gxs: gxsnettunnel.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2018 by Cyril Soler <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once

View File

@ -1,31 +1,29 @@
/*******************************************************************************
* libretroshare/src/gxs: rsnxs.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2011-2011 by Robert Fernie <retroshare.team@gmail.com> *
* Copyright 2011-2011 by Christopher Evi-Parker *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef RSGNP_H
#define RSGNP_H
/*
* libretroshare/src/gxs: rsnxs.h
*
* Network Exchange Service interface for RetroShare.
*
* Copyright 2011-2011 by Robert Fernie, Christopher Evi-Prker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <set>
#include <string>
#include "util/rstime.h"

View File

@ -1,20 +1,23 @@
/*
* RetroShare JSON API
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org>
*
* 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, 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
* 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 <http://www.gnu.org/licenses/>.
*/
/*******************************************************************************
* libretroshare/src/gxs: jsonapi.cpp *
* *
* RetroShare JSON API *
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "jsonapi.h"

View File

@ -1,20 +1,24 @@
/*
* RetroShare JSON API
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org>
*
* 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, 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
* 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 <http://www.gnu.org/licenses/>.
*/
/*******************************************************************************
* libretroshare/src/gxs: jsonapi.h *
* *
* RetroShare JSON API *
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once
#include <string>

View File

@ -1,20 +1,24 @@
/*
* RetroShare JSON API
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org>
*
* 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, 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
* 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 <http://www.gnu.org/licenses/>.
*/
/*******************************************************************************
* libretroshare/src/gxs: jsonapiitems.h *
* *
* RetroShare JSON API *
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once
#include <string>

View File

@ -101,6 +101,7 @@ HEADERS += tcponudp/udppeer.h \
tcponudp/tcpstream.h \
tcponudp/tou.h \
tcponudp/udprelay.h \
tcponudp/rsudpstack.h \
pqi/pqissludp.h \
SOURCES += tcponudp/udppeer.cc \
@ -403,6 +404,7 @@ HEADERS += pqi/authssl.h \
pqi/pqiperson.h \
pqi/pqipersongrp.h \
pqi/pqiservice.h \
pqi/pqiservicemonitor.h \
pqi/pqissl.h \
pqi/pqissllistener.h \
pqi/pqisslpersongrp.h \
@ -427,12 +429,12 @@ HEADERS += rsserver/p3face.h \
rsserver/p3serverconfig.h
HEADERS += grouter/groutercache.h \
grouter/rsgrouter.h \
retroshare/rsgrouter.h \
grouter/grouteritems.h \
grouter/p3grouter.h \
grouter/rsgroutermatrix.h \
grouter/groutertypes.h \
grouter/rsgrouterclient.h
grouter/grouterclientservice.h
HEADERS += rsitems/rsitem.h \
rsitems/itempriorities.h \
@ -492,6 +494,7 @@ HEADERS += util/folderiterator.h \
util/rsmemory.h \
util/smallobject.h \
util/rsdir.h \
util/argstream.h \
util/rsdiscspace.h \
util/rsnet.h \
util/extaddrfinder.h \
@ -707,44 +710,46 @@ DEFINES *= SQLITE_HAS_CODEC
DEFINES *= GXS_ENABLE_SYNC_MSGS
HEADERS += rsitems/rsnxsitems.h \
rsitems/rsgxsitems.h \
retroshare/rstokenservice.h \
retroshare/rsgxsservice.h \
retroshare/rsgxsflags.h \
retroshare/rsgxsifacetypes.h \
retroshare/rsgxsiface.h \
retroshare/rsgxscommon.h \
retroshare/rsgxsifacehelper.h \
util/retrodb.h \
util/rsdbbind.h \
util/contentvalue.h \
gxs/rsgxsutil.h \
gxs/gxssecurity.h \
gxs/rsgds.h \
gxs/rsgxs.h \
gxs/rsdataservice.h \
gxs/rsgxsnetservice.h \
gxs/rsgxsnettunnel.h \
retroshare/rsgxsflags.h \
retroshare/rsgxsifacetypes.h \
gxs/rsgenexchange.h \
gxs/rsnxs.h \
gxs/rsnxsobserver.h \
gxs/rsgxsdata.h \
retroshare/rstokenservice.h \
gxs/rsgxsdataaccess.h \
retroshare/rsgxsservice.h \
rsitems/rsgxsitems.h \
util/retrodb.h \
util/rsdbbind.h \
gxs/rsgxsutil.h \
util/contentvalue.h \
gxs/gxssecurity.h \
gxs/rsgxsifacehelper.h \
gxs/gxstokenqueue.h \
gxs/rsgxsnetutils.h \
gxs/rsgxsiface.h \
gxs/rsgxsrequesttypes.h
SOURCES += rsitems/rsnxsitems.cc \
rsitems/rsgxsitems.cc \
util/retrodb.cc \
util/contentvalue.cc \
util/rsdbbind.cc \
gxs/gxssecurity.cc \
gxs/rsgxsdataaccess.cc \
gxs/rsdataservice.cc \
gxs/rsgenexchange.cc \
gxs/rsgxsnetservice.cc \
gxs/rsgxsnettunnel.cc \
gxs/rsgxsdata.cc \
rsitems/rsgxsitems.cc \
gxs/rsgxsdataaccess.cc \
util/retrodb.cc \
util/contentvalue.cc \
util/rsdbbind.cc \
gxs/gxssecurity.cc \
gxs/gxstokenqueue.cc \
gxs/rsgxsnetutils.cc \
gxs/rsgxsutil.cc \

View File

@ -1,14 +0,0 @@
set QTDIR=C:\Qt\4.8.6
set MINGW=C:\MinGW
set GIT=C:\Program Files\Git
set PATH=%QTDIR%\bin;%MINGW%\bin;;%GIT%\bin;%PATH%
mingw32-make clean
qmake libretroshare.pro "CONFIG+=version_detail_bash_script"
mingw32-make
pause

View File

@ -21,26 +21,6 @@
*******************************************************************************/
#pragma once
#pragma once
/*
* RetroShare
*
* Copyright (C) 2012-2014 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, 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
* 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 <http://www.gnu.org/licenses/>.
*/
#include "retroshare/rstypes.h"
#include "util/rsurl.h"

View File

@ -1,408 +0,0 @@
/*
* libretroshare/src/ : authgpgtest.cc
*
* GPG interface for RetroShare.
*
* Copyright 2009-2010 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
* This is *THE* auth manager. It provides the web-of-trust via
* gpgme, and authenticates the certificates that are managed
* by the sublayer AuthSSL.
*
*/
#include "pqi/authgpgtest.h"
AuthGPGtest::AuthGPGtest()
{
mOwnGPGId = "TEST_DUMMY_OWN_GPG_ID";
return;
}
/**
* @param ids list of gpg certificate ids (note, not the actual certificates)
*/
bool AuthGPGtest::availableGPGCertificatesWithPrivateKeys(std::list<std::string> &ids)
{
std::cerr << "AuthGPGtest::availableGPGCertificatesWithPrivateKeys()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::printKeys()
{
std::cerr << "AuthGPGtest::printKeys()";
std::cerr << std::endl;
return true;
}
/*********************************************************************************/
/************************* STAGE 1 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 1: Initialisation.... As we are switching to OpenPGP the init functions
* will be different. Just move the initialisation functions over....
*
* As GPGMe requires external calls to the GPG executable, which could potentially
* be expensive, We'll want to cache the GPG keys in this class.
* This should be done at initialisation, and saved in a map.
* (see storage at the end of the class)
*
****/
bool AuthGPGtest::active()
{
std::cerr << "AuthGPGtest::active()";
std::cerr << std::endl;
return true;
}
/* Initialize */
bool AuthGPGtest::InitAuth()
{
std::cerr << "AuthGPGtest::InitAuth()";
std::cerr << std::endl;
return true;
}
/* Init by generating new Own PGP Cert, or selecting existing PGP Cert */
int AuthGPGtest::GPGInit(const std::string& ownId)
{
std::cerr << "AuthGPGtest::GPGInit(): new OwnId: " << ownId;
std::cerr << std::endl;
mOwnGPGId = ownId;
return true;
}
bool AuthGPGtest::CloseAuth()
{
std::cerr << "AuthGPGtest::CloseAuth()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::GeneratePGPCertificate(std::string name, std::string email, std::string passwd, std::string &pgpId, std::string &errString)
{
std::cerr << "AuthGPGtest::GeneratePGPCertificate()";
std::cerr << std::endl;
return true;
}
/*********************************************************************************/
/************************* STAGE 3 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 3: These are some of the most commonly used functions in Retroshare.
*
* More commonly used functions.
*
* provide access to details in cache list.
*
****/
std::string getGPGName(const std::string &pgp_id)
{
std::cerr << "AuthGPGtest::getGPGName()";
std::cerr << std::endl;
return "DUMMY_NAME";
}
std::string getGPGEmail(const std::string &pgp_id)
{
std::cerr << "AuthGPGtest::getGPGEmail()";
std::cerr << std::endl;
return "DUMMY_EMAIL";
}
/* PGP web of trust management */
std::string AuthGPGtest::getGPGOwnId()
{
std::cerr << "AuthGPGtest::getGPGOwnId()";
std::cerr << std::endl;
return mOwnGPGId;
}
std::string AuthGPGtest::getGPGOwnName()
{
std::cerr << "AuthGPGtest::getGPGOwnName()";
std::cerr << std::endl;
return "DUMMY_OWN_NAME";
}
#if 0
std::string AuthGPGtest::getGPGOwnEmail()
{
std::cerr << "AuthGPGtest::getGPGOwnEmail()";
std::cerr << std::endl;
return "DUMMY_OWN_EMAIL";
}
#endif
bool AuthGPGtest::getGPGDetails(const std::string& id, RsPeerDetails &d)
{
std::cerr << "AuthGPGtest::getGPGDetails()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::getGPGAllList(std::list<std::string> &ids)
{
std::cerr << "AuthGPGtest::getGPGAllList()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::getGPGValidList(std::list<std::string> &ids)
{
std::cerr << "AuthGPGtest::getGPGValidList()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::getGPGAcceptedList(std::list<std::string> &ids)
{
std::cerr << "AuthGPGtest::getGPGAcceptedList()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::getGPGSignedList(std::list<std::string> &ids)
{
std::cerr << "AuthGPGtest::getGPGSignedList()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::isGPGValid(const std::string& id)
{
std::cerr << "AuthGPGtest::isGPGValid()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::isGPGSigned(const std::string& id)
{
std::cerr << "AuthGPGtest::isGPGSigned()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::isGPGAccepted(const std::string& id)
{
std::cerr << "AuthGPGtest::isGPGAccepted()";
std::cerr << std::endl;
return true;
}
bool isGPGId(const std::string &id)
{
std::cerr << "AuthGPGtest::isGPGId()";
std::cerr << std::endl;
return true;
}
/*********************************************************************************/
/************************* STAGE 4 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 4: Loading and Saving Certificates. (Strings and Files)
*
****/
bool AuthGPGtest::LoadCertificateFromString(const std::string& pem, std::string &gpg_id,
std::string& error_string)
{
std::cerr << "AuthGPGtest::LoadCertificateFromString()";
std::cerr << std::endl;
return true;
}
std::string AuthGPGtest::SaveCertificateToString(const std::string& id)
{
std::cerr << "AuthGPGtest::SaveCertificateToString()";
std::cerr << std::endl;
return "NOT_A_CERTIFICATE";
}
/*********************************************************************************/
/************************* STAGE 6 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 6: Authentication, Trust and Signing.
*
* This is some of the harder functions, but they should have been
* done in gpgroot already.
*
****/
bool AuthGPGtest::setAcceptToConnectGPGCertificate(const std::string& gpg_id,
bool acceptance)
{
std::cerr << "AuthGPGtest::setAcceptToConnectGPGCertificate()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::SignCertificateLevel0(const std::string& id)
{
std::cerr << "AuthGPGtest::SignCertificateLevel0()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::RevokeCertificate(const std::string& id)
{
std::cerr << "AuthGPGtest::RevokeCertificate()";
std::cerr << std::endl;
return true;
}
virtual bool TrustCertificate(const std::string &id, int trustlvl)
{
std::cerr << "AuthGPGtest::TrustCertificate()";
std::cerr << std::endl;
return true;
}
void AuthGPGtest::run()
{
}
#if 0
bool AuthGPGtest::TrustCertificateNone(std::string id)
{
std::cerr << "AuthGPGtest::TrustCertificateNone()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::TrustCertificateMarginally(std::string id)
{
std::cerr << "AuthGPGtest::TrustCertificateMarginally()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::TrustCertificateFully(std::string id)
{
std::cerr << "AuthGPGtest::TrustCertificateFully()";
std::cerr << std::endl;
return true;
}
#endif
bool AuthGPGtest::TrustCertificate(std::string id, int trustlvl)
{
std::cerr << "AuthGPGtest::TrustCertificate()";
std::cerr << std::endl;
return true;
}
/*********************************************************************************/
/************************* STAGE 7 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 7: Signing Data.
*
* There should also be Encryption Functions... (do later).
*
****/
#if 0
bool AuthGPGtest::SignData(std::string input, std::string &sign)
{
std::cerr << "AuthGPGtest::SignData()";
std::cerr << std::endl;
return false;
}
bool AuthGPGtest::SignData(const void *data, const uint32_t len, std::string &sign)
{
std::cerr << "AuthGPGtest::SignData()";
std::cerr << std::endl;
return false;
}
bool AuthGPGtest::SignDataBin(std::string input, unsigned char *sign, unsigned int *signlen)
{
std::cerr << "AuthGPGtest::SignDataBin()";
std::cerr << std::endl;
return false;
}
#endif
bool AuthGPGtest::SignDataBin(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen)
{
std::cerr << "AuthGPGtest::SignDataBin()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::VerifySignBin(const void*, uint32_t, unsigned char*, unsigned int, const std::string& withfingerprint)
{
std::cerr << "AuthGPGtest::VerifySignBin()";
std::cerr << std::endl;
return true;
}
bool AuthGPGtest::decryptText(gpgme_data_t CIPHER, gpgme_data_t PLAIN)
{
std::cerr << "AuthGPGtest::decryptText()";
std::cerr << std::endl;
return true;
}
bool AuthGPGimpl::addService(AuthGPGService *service)
{
std::cerr << "AuthGPGtest::addService()";
std::cerr << std::endl;
return true;
}
std::string AuthGPGtest::getGPGName(const std::string & pgp_id)
{
std::cerr << "AuthGPGtest::getGPGName()";
std::cerr << std::endl;
return std::string("");
}
bool AuthGPGtest::TrustCertificate(const std::string & id, int trustlvl)
{
}
bool AuthGPGtest::isGPGId(const std::string & id)
{
}
std::string AuthGPGtest::getGPGEmail(const std::string & pgp_id)
{
}
bool AuthGPGtest::encryptText(gpgme_data_t PLAIN, gpgme_data_t CIPHER)
{
std::cerr << "AuthGPGtest::encryptText()";
std::cerr << std::endl;
return false;
}

View File

@ -1,160 +0,0 @@
/*
* libretroshare/src/ : authgpgtest.h
*
* GPG interface for RetroShare.
*
* Copyright 2009-2010 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
* This is *THE* auth manager. It provides the web-of-trust via
* gpgme, and authenticates the certificates that are managed
* by the sublayer AuthSSL.
*
*/
#ifndef RS_GPG_AUTH_TEST_HEADER
#define RS_GPG_AUTH_TEST_HEADER
#include "pqi/authgpg.h"
/* override the default AuthGPG */
void setAuthGPG(AuthGPG *newgpg);
class AuthGPGtest: public AuthGPG
{
public:
AuthGPGtest();
/**
* @param ids list of gpg certificate ids (note, not the actual certificates)
*/
virtual bool availableGPGCertificatesWithPrivateKeys(std::list<std::string> &ids);
virtual bool printKeys();
/*********************************************************************************/
/************************* STAGE 1 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 1: Initialisation.... As we are switching to OpenPGP the init functions
* will be different. Just move the initialisation functions over....
*
* As GPGMe requires external calls to the GPG executable, which could potentially
* be expensive, We'll want to cache the GPG keys in this class.
* This should be done at initialisation, and saved in a map.
* (see storage at the end of the class)
*
****/
virtual bool active();
/* Initialize */
virtual bool InitAuth ();
virtual void run();
/* Init by generating new Own PGP Cert, or selecting existing PGP Cert */
virtual int GPGInit(const std::string& ownId);
virtual bool CloseAuth();
virtual bool GeneratePGPCertificate(std::string name, std::string email, std::string passwd, std::string &pgpId, std::string &errString);
/*********************************************************************************/
/************************* STAGE 3 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 3: These are some of the most commonly used functions in Retroshare.
*
* More commonly used functions.
*
* provide access to details in cache list.
*
****/
virtual std::string getGPGName(const std::string &pgp_id);
virtual std::string getGPGEmail(const std::string &pgp_id);
/* PGP web of trust management */
virtual std::string getGPGOwnId();
virtual std::string getGPGOwnName();
//virtual std::string getGPGOwnEmail();
virtual bool getGPGDetails(const std::string& id, RsPeerDetails &d);
virtual bool getGPGAllList(std::list<std::string> &ids);
virtual bool getGPGValidList(std::list<std::string> &ids);
virtual bool getGPGAcceptedList(std::list<std::string> &ids);
virtual bool getGPGSignedList(std::list<std::string> &ids);
virtual bool isGPGValid(const std::string& id);
virtual bool isGPGSigned(const std::string& id);
virtual bool isGPGAccepted(const std::string& id);
virtual bool isGPGId(const std::string &id);
/*********************************************************************************/
/************************* STAGE 4 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 4: Loading and Saving Certificates. (Strings and Files)
*
****/
virtual bool LoadCertificateFromString(const std::string& pem, std::string &gpg_id,
std::string& error_string);
virtual std::string SaveCertificateToString(const std::string& id);
/*********************************************************************************/
/************************* STAGE 6 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 6: Authentication, Trust and Signing.
*
* This is some of the harder functions, but they should have been
* done in gpgroot already.
*
****/
virtual bool setAcceptToConnectGPGCertificate(const std::string& gpg_id,
bool acceptance); //don't act on the gpg key, use a seperate set
virtual bool SignCertificateLevel0(const std::string& id);
virtual bool RevokeCertificate(const std::string& id); /* Particularly hard - leave for later */
//virtual bool TrustCertificateNone(std::string id);
//virtual bool TrustCertificateMarginally(std::string id);
//virtual bool TrustCertificateFully(std::string id);
virtual bool TrustCertificate(const std::string &id, int trustlvl); //trustlvl is 2 for none, 3 for marginal and 4 for full trust
/*********************************************************************************/
/************************* STAGE 7 ***********************************************/
/*********************************************************************************/
/*****
* STAGE 7: Signing Data.
*
* There should also be Encryption Functions... (do later).
*
****/
//virtual bool SignData(std::string input, std::string &sign);
//virtual bool SignData(const void *data, const uint32_t len, std::string &sign);
//virtual bool SignDataBin(std::string input, unsigned char *sign, unsigned int *signlen);
virtual bool SignDataBin(const void *data, const uint32_t len, unsigned char *sign, unsigned int *signlen);
virtual bool VerifySignBin(const void*, uint32_t, unsigned char*, unsigned int, const std::string& withfingerprint);
virtual bool decryptText(gpgme_data_t CIPHER, gpgme_data_t PLAIN);
virtual bool encryptText(gpgme_data_t PLAIN, gpgme_data_t CIPHER);
//END of PGP public functions
virtual bool addService(AuthGPGService *service);
private:
std::string mOwnGPGId;
};
#endif

View File

@ -1,223 +0,0 @@
/*
* libretroshare/src/pqi: authssltest.cc
*
* 3P/PQI network interface for RetroShare.
*
* Copyright 2004-2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "pqi/authssltest.h"
AuthSSLtest::AuthSSLtest()
{
mOwnId = "abcdtestid12345678";
}
/* Initialisation Functions (Unique) */
bool AuthSSLtest::validateOwnCertificate(X509 *x509, EVP_PKEY *pkey)
{
std::cerr << "AuthSSLtest::validateOwnCertificate()";
std::cerr << std::endl;
return false;
}
bool AuthSSLtest::active()
{
std::cerr << "AuthSSLtest::active()";
std::cerr << std::endl;
return true;
}
int AuthSSLtest::InitAuth(const char *srvr_cert, const char *priv_key,
const char *passwd)
{
std::cerr << "AuthSSLtest::InitAuth()";
std::cerr << std::endl;
return 1;
}
bool AuthSSLtest::CloseAuth()
{
std::cerr << "AuthSSLtest::AuthSSLtest::CloseAuth()";
std::cerr << std::endl;
return 1;
}
/*********** Overloaded Functions from p3AuthMgr **********/
/* get Certificate Id */
std::string AuthSSLtest::OwnId()
{
std::cerr << "AuthSSLtest::OwnId";
std::cerr << std::endl;
return mOwnId;
}
std::string AuthSSLtest::getOwnLocation()
{
std::cerr << "AuthSSLtest::getOwnLocation";
std::cerr << std::endl;
return "TestVersion";
}
//bool getAllList(std::list<std::string> &ids);
//bool getAuthenticatedList(std::list<std::string> &ids);
//bool getUnknownList(std::list<std::string> &ids);
//bool getSSLChildListOfGPGId(std::string gpg_id, std::list<std::string> &ids);
/* get Details from the Certificates */
//bool isAuthenticated(std::string id);
//virtual std::string getName(std::string id);
//std::string getIssuerName(std::string id);
//std::string getGPGId(SSL_id id);
//bool getCertDetails(std::string id, sslcert &cert);
/* Load/Save certificates */
std::string AuthSSLtest::SaveOwnCertificateToString()
{
std::cerr << "AuthSSLtest::SaveOwnCertificateToString()";
std::cerr << std::endl;
return std::string();
}
/* Sign / Encrypt / Verify Data */
bool AuthSSLtest::SignData(std::string input, std::string &sign)
{
std::cerr << "AuthSSLtest::SignData()";
std::cerr << std::endl;
return false;
}
bool AuthSSLtest::SignData(const void *data, const uint32_t len, std::string &sign)
{
std::cerr << "AuthSSLtest::SignData()";
std::cerr << std::endl;
return false;
}
bool AuthSSLtest::SignDataBin(std::string, unsigned char*, unsigned int*)
{
std::cerr << "AuthSSLtest::SignDataBin()";
std::cerr << std::endl;
return false;
}
bool AuthSSLtest::SignDataBin(const void*, uint32_t, unsigned char*, unsigned int*)
{
std::cerr << "AuthSSLtest::SignDataBin()";
std::cerr << std::endl;
return false;
}
bool AuthSSLtest::VerifyOwnSignBin(const void*, uint32_t, unsigned char*, unsigned int)
{
std::cerr << "AuthSSLtest::VerifyOwnSignBin()";
std::cerr << std::endl;
return false;
}
bool AuthSSLtest::VerifySignBin(const void *data, const uint32_t len,
unsigned char *sign, unsigned int signlen, SSL_id sslId)
{
std::cerr << "AuthSSLtest::VerifySignBin()";
std::cerr << std::endl;
return false;
}
// return : false if encrypt failed
bool AuthSSLtest::encrypt(void *&out, int &outlen, const void *in, int inlen, std::string peerId)
{
std::cerr << "AuthSSLtest::encrypt()";
std::cerr << std::endl;
return false;
}
// return : false if decrypt fails
bool AuthSSLtest::decrypt(void *&out, int &outlen, const void *in, int inlen)
{
std::cerr << "AuthSSLtest::decrypt()";
std::cerr << std::endl;
return false;
}
X509* AuthSSLtest::SignX509ReqWithGPG(X509_REQ *req, long days)
{
std::cerr << "AuthSSLtest::SignX509ReqWithGPG";
std::cerr << std::endl;
return NULL;
}
bool AuthSSLtest::AuthX509WithGPG(X509 *x509)
{
std::cerr << "AuthSSLtest::AuthX509WithGPG()";
std::cerr << std::endl;
return false;
}
int AuthSSLtest::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
{
std::cerr << "AuthSSLtest::VerifyX509Callback()";
std::cerr << std::endl;
return 0;
}
bool AuthSSLtest::ValidateCertificate(X509 *x509, std::string &peerId)
{
std::cerr << "AuthSSLtest::ValidateCertificate()";
std::cerr << std::endl;
return false;
}
SSL_CTX *AuthSSLtest::getCTX()
{
std::cerr << "AuthSSLtest::getCTX()";
std::cerr << std::endl;
return NULL;
}
/* Restored these functions: */
bool AuthSSLtest::FailedCertificate(X509 *x509, bool incoming)
{
std::cerr << "AuthSSLtest::FailedCertificate()";
std::cerr << std::endl;
return false;
}
bool AuthSSLtest::CheckCertificate(std::string peerId, X509 *x509)
{
std::cerr << "AuthSSLtest::CheckCertificate()";
std::cerr << std::endl;
return false;
}

View File

@ -1,101 +0,0 @@
/*
* libretroshare/src/pqi: authssltest.h
*
* 3P/PQI network interface for RetroShare.
*
* Copyright 2009-2010 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#ifndef MRK_AUTH_SSL_TEST_HEADER
#define MRK_AUTH_SSL_TEST_HEADER
#include "pqi/authssl.h"
void setAuthSSL(AuthSSL *newssl);
class AuthSSLtest: public AuthSSL
{
public:
AuthSSLtest();
/* Initialisation Functions (Unique) */
virtual bool validateOwnCertificate(X509 *x509, EVP_PKEY *pkey);
virtual bool active();
virtual int InitAuth(const char *srvr_cert, const char *priv_key,
const char *passwd);
virtual bool CloseAuth();
/*********** Overloaded Functions from p3AuthMgr **********/
/* get Certificate Id */
virtual std::string OwnId();
virtual std::string getOwnLocation();
//virtual bool getAllList(std::list<std::string> &ids);
//virtual bool getAuthenticatedList(std::list<std::string> &ids);
//virtual bool getUnknownList(std::list<std::string> &ids);
//virtual bool getSSLChildListOfGPGId(std::string gpg_id, std::list<std::string> &ids);
/* get Details from the Certificates */
//virtual bool isAuthenticated(std::string id);
//virtual std::string getName(std::string id);
//virtual std::string getIssuerName(std::string id);
//virtual std::string getGPGId(SSL_id id);
//virtual bool getCertDetails(std::string id, sslcert &cert);
/* Load/Save certificates */
virtual std::string SaveOwnCertificateToString();
/* Sign / Encrypt / Verify Data */
virtual bool SignData(std::string input, std::string &sign);
virtual bool SignData(const void *data, const uint32_t len, std::string &sign);
virtual bool SignDataBin(std::string, unsigned char*, unsigned int*);
virtual bool SignDataBin(const void*, uint32_t, unsigned char*, unsigned int*);
virtual bool VerifyOwnSignBin(const void*, uint32_t, unsigned char*, unsigned int);
virtual bool VerifySignBin(const void *data, const uint32_t len,
unsigned char *sign, unsigned int signlen, SSL_id sslId);
// return : false if encrypt failed
virtual bool encrypt(void *&out, int &outlen, const void *in, int inlen, std::string peerId);
// return : false if decrypt fails
virtual bool decrypt(void *&out, int &outlen, const void *in, int inlen);
virtual X509* SignX509ReqWithGPG(X509_REQ *req, long days);
virtual bool AuthX509WithGPG(X509 *x509);
virtual int VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx);
virtual bool ValidateCertificate(X509 *x509, std::string &peerId); /* validate + get id */
public: /* SSL specific functions used in pqissl/pqissllistener */
virtual SSL_CTX *getCTX();
/* Restored these functions: */
virtual bool FailedCertificate(X509 *x509, bool incoming); /* store for discovery */
virtual bool CheckCertificate(std::string peerId, X509 *x509); /* check that they are exact match */
private:
std::string mOwnId;
};
#endif // MRK_AUTH_SSL_TEST_HEADER

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/pqi: p3dhtmgr.cc
*
* 3P/PQI network interface for RetroShare.
*
* Copyright 2004-2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/pqi: p3dhtmgr.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2004-2008 by Robert Fernie. *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <unistd.h>
#include <iomanip>

View File

@ -1,28 +1,24 @@
/*
* libretroshare/src/pqi: p3dhtmgr.h
*
* 3P/PQI network interface for RetroShare.
*
* Copyright 2004-2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/pqi: p3dhtmgr.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2004-2008 by Robert Fernie. *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef MRK_P3_DHT_MANAGER_HEADER
#define MRK_P3_DHT_MANAGER_HEADER

View File

@ -20,6 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "pqi/p3linkmgr.h"
#include "pqi/p3peermgr.h"

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/pqi: pqiservicemonitor.h
*
* 3P/PQI network interface for RetroShare.
*
* Copyright 2014 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2.1 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/pqi: pqiservicemonitor.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2014 by Robert Fernie <drbob@lunamutt.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef PQI_SERVICE_MONITOR_H
#define PQI_SERVICE_MONITOR_H

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/services: rsgrouter.h
*
* Services for RetroShare.
*
* Copyright 2013 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "csoler@users.sourceforge.net".
*
*/
/*******************************************************************************
* libretroshare/src/retroshare: rsgrouter.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2013 by Cyril Soler <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once

View File

@ -1,31 +1,28 @@
/*******************************************************************************
* libretroshare/src/retroshare: rsgxscommon.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright (C) 2012 Robert Fernie <retroshare@lunamutt.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef RETROSHARE_GXS_COMMON_OBJS_INTERFACE_H
#define RETROSHARE_GXS_COMMON_OBJS_INTERFACE_H
/*
* libretroshare/src/retroshare: rsgxscommong.h
*
* RetroShare C++ Interface.
*
* Copyright 2012-2012 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2.1 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <inttypes.h>
#include <string>
#include <list>

View File

@ -1,25 +1,24 @@
/*
* RetroShare C++ Interface.
*
* Copyright 2018 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/retroshare: rsgxsdistsync.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright (C) 2012 Cyril Soler <retroshare@lunamutt.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once

View File

@ -1,28 +1,24 @@
/*
* libretroshare/src/gxs/: rsgxsifaceimpl.h
*
* RetroShare GXS. RsGxsIface
*
* Copyright 2012 by Christopher Evi-Parker
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/retroshare: rsgxsiface.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2012 by Christopher Evi-Parker *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef RSGXSIFACE_H_
#define RSGXSIFACE_H_

View File

@ -1,32 +1,29 @@
/*******************************************************************************
* libretroshare/src/retroshare: rsgxsifacehelper.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2011 by Christopher Evi-Parker *
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef RSGXSIFACEIMPL_H
#define RSGXSIFACEIMPL_H
/*
* libretroshare/src/gxs/: rsgxsifaceimpl.h
*
* RetroShare GXS. Convenience interface implementation
*
* Copyright 2012 by Christopher Evi-Parker
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <chrono>
#include <thread>

View File

@ -1,151 +0,0 @@
#ifndef RETROSHARE_POSTED_GUI_INTERFACE_H
#define RETROSHARE_POSTED_GUI_INTERFACE_H
/*
* libretroshare/src/retroshare: rsposted.h
*
* RetroShare C++ Interface.
*
* Copyright 2008-2012 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <inttypes.h>
#include <string>
#include <list>
#include <retroshare/rsidentityVEG.h>
/* The Main Interface Class - for information about your Peers */
class RsPostedVEG;
extern RsPostedVEG *rsPostedVEG;
class RsPostedGroup
{
public:
RsGroupMetaData mMeta;
RsPostedGroup() { return; }
};
class RsPostedMsg
{
public:
RsPostedMsg(uint32_t t)
:postedType(t) { return; }
RsMsgMetaData mMeta;
uint32_t postedType;
};
#define RSPOSTED_MSGTYPE_POST 0x0001
#define RSPOSTED_MSGTYPE_VOTE 0x0002
#define RSPOSTED_MSGTYPE_COMMENT 0x0004
#define RSPOSTED_PERIOD_YEAR 1
#define RSPOSTED_PERIOD_MONTH 2
#define RSPOSTED_PERIOD_WEEK 3
#define RSPOSTED_PERIOD_DAY 4
#define RSPOSTED_PERIOD_HOUR 5
#define RSPOSTED_VIEWMODE_LATEST 1
#define RSPOSTED_VIEWMODE_TOP 2
#define RSPOSTED_VIEWMODE_HOT 3
#define RSPOSTED_VIEWMODE_COMMENTS 4
class RsPostedPost: public RsPostedMsg
{
public:
RsPostedPost(): RsPostedMsg(RSPOSTED_MSGTYPE_POST)
{
mMeta.mMsgFlags = RSPOSTED_MSGTYPE_POST;
return;
}
std::string mLink;
std::string mNotes;
};
class RsPostedVote: public RsPostedMsg
{
public:
RsPostedVote(): RsPostedMsg(RSPOSTED_MSGTYPE_VOTE)
{
mMeta.mMsgFlags = RSPOSTED_MSGTYPE_VOTE;
return;
}
};
class RsPostedComment: public RsPostedMsg
{
public:
RsPostedComment(): RsPostedMsg(RSPOSTED_MSGTYPE_COMMENT)
{
mMeta.mMsgFlags = RSPOSTED_MSGTYPE_COMMENT;
return;
}
std::string mComment;
};
std::ostream &operator<<(std::ostream &out, const RsPostedGroup &group);
std::ostream &operator<<(std::ostream &out, const RsPostedPost &post);
std::ostream &operator<<(std::ostream &out, const RsPostedVote &vote);
std::ostream &operator<<(std::ostream &out, const RsPostedComment &comment);
class RsPostedVEG: public RsTokenServiceVEG
{
public:
RsPostedVEG() { return; }
virtual ~RsPostedVEG() { return; }
/* Specific Service Data */
virtual bool getGroup(const uint32_t &token, RsPostedGroup &group) = 0;
virtual bool getPost(const uint32_t &token, RsPostedPost &post) = 0;
virtual bool getComment(const uint32_t &token, RsPostedComment &comment) = 0;
virtual bool submitGroup(uint32_t &token, RsPostedGroup &group, bool isNew) = 0;
virtual bool submitPost(uint32_t &token, RsPostedPost &post, bool isNew) = 0;
virtual bool submitVote(uint32_t &token, RsPostedVote &vote, bool isNew) = 0;
virtual bool submitComment(uint32_t &token, RsPostedComment &comment, bool isNew) = 0;
// Special Ranking Request.
virtual bool requestRanking(uint32_t &token, std::string groupId) = 0;
virtual bool getRankedPost(const uint32_t &token, RsPostedPost &post) = 0;
virtual bool extractPostedCache(const std::string &str, uint32_t &votes, uint32_t &comments) = 0;
// Control Ranking Calculations.
virtual bool setViewMode(uint32_t mode) = 0;
virtual bool setViewPeriod(uint32_t period) = 0;
virtual bool setViewRange(uint32_t first, uint32_t count) = 0;
// exposed for testing...
virtual float calcPostScore(const RsMsgMetaData &meta) = 0;
};
#endif

View File

@ -1,27 +1,24 @@
/*
* libretroshare/src/services: rsreputation.h
*
* Services for RetroShare.
*
* Copyright 2015 by Cyril Soler
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "csoler@users.sourceforge.net".
*
*/
/*******************************************************************************
* libretroshare/src/retroshare: rsreputations.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2015 by Cyril Soler <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once

View File

@ -1,5 +1,5 @@
/*******************************************************************************
* libretroshare/src/retroshare: rsturtle.h *
* libretroshare/src/rsserver: rstypes.h *
* *
* libretroshare: retroshare core library *
* *

View File

@ -1,29 +1,24 @@
/*
* "$Id: p3face-config.cc,v 1.4 2007-05-05 16:10:05 rmf24 Exp $"
*
* RetroShare C++ Interface.
*
* Copyright 2004-2006 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/rsserver: p3face-config.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2004-2006 by Robert Fernie. *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "rsserver/p3face.h"

View File

@ -1,28 +1,24 @@
/*
* "$Id: p3face-info.cc,v 1.5 2007-04-15 18:45:23 rmf24 Exp $"
*
* RetroShare C++ Interface.
*
* Copyright 2015 by RetroShare Team.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/rsserver: p3face-info.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2015 by RetroShare Team <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "rsserver/p3face.h"
#include <bzlib.h>

View File

@ -1,29 +1,24 @@
/*
* "$Id: p3face-server.cc,v 1.5 2007-04-15 18:45:23 rmf24 Exp $"
*
* RetroShare C++ Interface.
*
* Copyright 2004-2006 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/rsserver: p3face-server.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2015 by Robert Fernie <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "util/rstime.h"
#include "rsserver/p3face.h"

View File

@ -1,143 +0,0 @@
/*
* libretroshare/src/rsserver: p3photo.cc
*
* RetroShare C++ Interface.
*
* Copyright 2007-2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "rsserver/p3photo.h"
#include "services/p3photoservice.h"
RsPhoto *rsPhoto = NULL;
RsPhotoDetails::RsPhotoDetails()
{
return;
}
RsPhotoShowDetails::RsPhotoShowDetails()
{
return;
}
p3Photo::p3Photo(p3PhotoService *p3ps)
:mPhoto(p3ps)
{
return;
}
p3Photo::~p3Photo()
{
return;
}
/* needs update? */
bool p3Photo::updated()
{
return mPhoto->updated();
}
/* access data */
bool p3Photo::getPhotoList(std::string id, std::list<std::string> &hashs)
{
return mPhoto->getPhotoList(id, hashs);
}
bool p3Photo::getShowList(std::string id, std::list<std::string> &showIds)
{
return mPhoto -> getShowList(id, showIds);
}
bool p3Photo::getShowDetails(std::string id, std::string showId, RsPhotoShowDetails &detail)
{
return mPhoto -> getShowDetails(id, showId, detail);
}
bool p3Photo::getPhotoDetails(std::string id, std::string photoId, RsPhotoDetails &detail)
{
return mPhoto -> getPhotoDetails(id, photoId, detail);
}
/* add / delete */
std::string p3Photo::createShow(std::string name)
{
return mPhoto -> createShow(name);
}
bool p3Photo::deleteShow(std::string showId)
{
return mPhoto -> deleteShow(showId);
}
bool p3Photo::addPhotoToShow(std::string showId, std::string photoId, int16_t index)
{
return mPhoto -> addPhotoToShow(showId, photoId, index);
}
bool p3Photo::movePhotoInShow(std::string showId, std::string photoId, int16_t index)
{
return mPhoto -> movePhotoInShow(showId, photoId, index);
}
bool p3Photo::removePhotoFromShow(std::string showId, std::string photoId)
{
return mPhoto -> removePhotoFromShow(showId, photoId);
}
std::string p3Photo::addPhoto(std::string path) /* add from file */
{
return mPhoto -> addPhoto(path); /* add from file */
}
bool p3Photo::addPhoto(std::string srcId, std::string photoId) /* add from peers photos */
{
return mPhoto -> addPhoto(srcId, photoId); /* add from peers photos */
}
bool p3Photo::deletePhoto(std::string photoId)
{
return mPhoto -> deletePhoto(photoId);
}
/* modify properties (TODO) */
bool p3Photo::modifyShow(std::string showId, std::wstring name, std::wstring comment)
{
return mPhoto -> modifyShow(showId, name, comment);
}
bool p3Photo::modifyPhoto(std::string photoId, std::wstring name, std::wstring comment)
{
return mPhoto -> modifyPhoto(photoId, name, comment);
}
bool p3Photo::modifyShowComment(std::string showId, std::string photoId, std::wstring comment)
{
return mPhoto -> modifyShowComment(showId, photoId, comment);
}

View File

@ -1,69 +0,0 @@
#ifndef RETROSHARE_P3_PHOTO_INTERFACE_H
#define RETROSHARE_P3_PHOTO_INTERFACE_H
/*
* libretroshare/src/rsserver: p3photo.h
*
* RetroShare C++ Interface.
*
* Copyright 2007-2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "retroshare/rsphoto.h"
#include "services/p3photoservice.h"
class p3Photo: public RsPhoto
{
public:
p3Photo(p3PhotoService *p3ps);
virtual ~p3Photo();
/* changed? */
virtual bool updated();
/* access data */
virtual bool getPhotoList(std::string id, std::list<std::string> &hashs);
virtual bool getShowList(std::string id, std::list<std::string> &showIds);
virtual bool getShowDetails(std::string id, std::string showId, RsPhotoShowDetails &detail);
virtual bool getPhotoDetails(std::string id, std::string photoId, RsPhotoDetails &detail);
/* add / delete */
virtual std::string createShow(std::string name);
virtual bool deleteShow(std::string showId);
virtual bool addPhotoToShow(std::string showId, std::string photoId, int16_t index);
virtual bool movePhotoInShow(std::string showId, std::string photoId, int16_t index);
virtual bool removePhotoFromShow(std::string showId, std::string photoId);
virtual std::string addPhoto(std::string path); /* add from file */
virtual bool addPhoto(std::string srcId, std::string photoId); /* add from peers photos */
virtual bool deletePhoto(std::string photoId);
/* modify properties (TODO) */
virtual bool modifyShow(std::string showId, std::wstring name, std::wstring comment);
virtual bool modifyPhoto(std::string photoId, std::wstring name, std::wstring comment);
virtual bool modifyShowComment(std::string showId, std::string photoId, std::wstring comment);
private:
p3PhotoService *mPhoto;
};
#endif

View File

@ -1,104 +0,0 @@
/*
* libretroshare/src/rsserver: p3rank.cc
*
* RetroShare C++ Interface.
*
* Copyright 2007-2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "rsserver/p3rank.h"
RsRanks *rsRanks = NULL;
p3Rank::p3Rank(p3Ranking *ranking)
:mRank(ranking)
{
return;
}
p3Rank::~p3Rank()
{
return;
}
/* needs update? */
bool p3Rank::updated()
{
return mRank->updated();
}
/* Set Sort Methods */
bool p3Rank::setSortPeriod(uint32_t period)
{
return mRank->setSortPeriod(period);
}
bool p3Rank::setSortMethod(uint32_t type)
{
return mRank->setSortMethod(type);
}
bool p3Rank::clearPeerFilter()
{
return mRank->clearPeerFilter();
}
bool p3Rank::setPeerFilter(std::list<std::string> peers)
{
return mRank->setPeerFilter(peers);
}
/* get Ids */
uint32_t p3Rank::getRankingsCount()
{
return mRank->getRankingsCount();
}
float p3Rank::getMaxRank()
{
return mRank->getMaxRank();
}
bool p3Rank::getRankings(uint32_t first, uint32_t count, std::list<std::string> &rids)
{
return mRank->getRankings(first, count, rids);
}
bool p3Rank::getRankDetails(std::string rid, RsRankDetails &details)
{
return mRank->getRankDetails(rid, details);
}
/* Add New Comment / Msg */
std::string p3Rank::newRankMsg(std::wstring link, std::wstring title, std::wstring comment, int32_t score)
{
return mRank->newRankMsg(link, title, comment, score);
}
bool p3Rank::updateComment(std::string rid, std::wstring comment, int32_t score)
{
return mRank->updateComment(rid, comment, score);
}
std::string p3Rank::anonRankMsg(std::string rid, std::wstring link, std::wstring title)
{
return mRank->anonRankMsg(rid, link, title);
}

View File

@ -1,64 +0,0 @@
#ifndef RETROSHARE_P3_RANKING_INTERFACE_H
#define RETROSHARE_P3_RANKING_INTERFACE_H
/*
* libretroshare/src/rsserver: p3rank.h
*
* RetroShare C++ Interface.
*
* Copyright 2007-2008 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "retroshare/rsrank.h"
#include "services/p3ranking.h"
class p3Rank: public RsRanks
{
public:
p3Rank(p3Ranking *ranking);
virtual ~p3Rank();
/* needs update? */
virtual bool updated();
/* Set Sort Methods */
virtual bool setSortPeriod(uint32_t period);
virtual bool setSortMethod(uint32_t type);
virtual bool clearPeerFilter();
virtual bool setPeerFilter(std::list<std::string> peers);
/* get Ids */
virtual uint32_t getRankingsCount();
virtual float getMaxRank();
virtual bool getRankings(uint32_t first, uint32_t count, std::list<std::string> &rids);
virtual bool getRankDetails(std::string rid, RsRankDetails &details);
/* Add New Comment / Msg */
virtual std::string newRankMsg(std::wstring link, std::wstring title, std::wstring comment, int32_t score);
virtual bool updateComment(std::string rid, std::wstring comment, int32_t score);
virtual std::string anonRankMsg(std::string rid, std::wstring link, std::wstring title);
private:
p3Ranking *mRank;
};
#endif

View File

@ -1,3 +1,25 @@
/*******************************************************************************
* libretroshare/src/rsserver: rsloginhandler.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2018 retroshare team <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <string>
#include <iostream>
#include <pqi/authgpg.h>

View File

@ -1,3 +1,25 @@
/*******************************************************************************
* libretroshare/src/rsserver: rsloginhandler.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2018 retroshare team <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#pragma once
#include <string>

View File

@ -1,29 +1,24 @@
/*
* "$Id: rstypes.cc,v 1.2 2007-04-07 08:41:00 rmf24 Exp $"
*
* RetroShare C++ Interface.
*
* Copyright 2004-2006 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/rsserver: rstypes.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2004-2006 by Robert Fernie <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
/* Insides of RetroShare interface.
* only prints stuff out at the moment

View File

@ -1,345 +0,0 @@
/*
* libretroshare/src/serialiser: rsmailtransportitems.cc
*
* RetroShare Serialiser.
*
* Copyright 2014 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <stdexcept>
#include "util/rstime.h"
#include "serialiser/rsbaseserial.h"
#include "serialiser/rsmailtransportitems.h"
#include "serialiser/rstlvbase.h"
/***
#define RSSERIAL_DEBUG 1
***/
#include <iostream>
/*************************************************************************/
// RsMailMimeItem
bool RsMailChunkItem::isPartial()
{
return (mPartCount != 1);
}
void RsMailChunkItem::clear()
{
mMailId.TlvClear();
mPartCount = 0;
mMailIndex = 0;
mWholeMailId.clear();
mMessage.clear();
}
std::ostream &RsMailChunkItem::print(std::ostream &out, uint16_t indent)
{
printRsItemBase(out, "RsMailChunkItem", indent);
uint16_t int_Indent = indent + 2;
mMailId.print(out, int_Indent);
printIndent(out, int_Indent);
out << "PartCount: " << mPartCount << std::endl;
printIndent(out, int_Indent);
out << "MailIndex: " << mMailIndex << std::endl;
printIndent(out, int_Indent);
out << "WholeMailId: " << mWholeMailId.toStdString() << std::endl;
printIndent(out, int_Indent);
out << "mMessage: " << mMessage << std::endl;
printRsItemEnd(out, "RsMailChunkItem", indent);
return out;
}
uint32_t RsMailChunkItem::serial_size()
{
uint32_t s = 8; /* header */
s += mMailId.TlvSize(); /* mMailId */
s += 2; /* mPartCount */
s += 2; /* mMailIndex */
s += mWholeMailId.serial_size(); /* mRecvTime */
s += GetTlvStringSize(mMessage);
return s;
}
/* serialise the data to the buffer */
bool RsMailChunkItem::serialise(void *data, uint32_t& pktsize)
{
uint32_t tlvsize = serial_size() ;
uint32_t offset = 0;
if (pktsize < tlvsize)
return false; /* not enough space */
pktsize = tlvsize;
bool ok = true;
ok &= setRsItemHeader(data, tlvsize, PacketId(), tlvsize);
#ifdef RSSERIAL_DEBUG
std::cerr << "RsMailChunkItem::serialise() Header: " << ok << std::endl;
std::cerr << "RsMailChunkItem::serialise() Size: " << tlvsize << std::endl;
#endif
/* skip the header */
offset += 8;
/* add mandatory parts first */
ok &= mMailId.SetTlv(data, tlvsize, &offset);
ok &= setRawUInt16(data, tlvsize, &offset, mPartCount);
ok &= setRawUInt16(data, tlvsize, &offset, mMailIndex);
ok &= mWholeMailId.serialise(data, tlvsize, offset);
ok &= SetTlvString(data, tlvsize, &offset, TLV_TYPE_STR_MSG, mMessage);
if (offset != tlvsize)
{
ok = false;
std::cerr << "RsMailMimeSerialiser::serialiseItem() Size Error! " << std::endl;
}
return ok;
}
RsMailChunkItem *RsMailTransportSerialiser::deserialiseChunkItem(void *data, uint32_t *pktsize)
{
/* get the type and size */
uint32_t rstype = getRsItemId(data);
uint32_t rssize = getRsItemSize(data);
uint32_t offset = 0;
if ((RS_PKT_VERSION_SERVICE != getRsItemVersion(rstype)) ||
(mServiceType != getRsItemService(rstype)) ||
(RS_PKT_SUBTYPE_MAIL_TRANSPORT_CHUNK != getRsItemSubType(rstype)))
{
return NULL; /* wrong type */
}
if (*pktsize < rssize) /* check size */
return NULL; /* not enough data */
/* set the packet length */
*pktsize = rssize;
bool ok = true;
/* ready to load */
RsMailChunkItem *item = new RsMailChunkItem(mServiceType);
item->clear();
/* skip the header */
offset += 8;
/* get mandatory parts first */
ok &= item->mMailId.GetTlv(data, rssize, &offset);
ok &= getRawUInt16(data, rssize, &offset, &(item->mPartCount));
ok &= getRawUInt16(data, rssize, &offset, &(item->mMailIndex));
ok &= item->mWholeMailId.deserialise(data, rssize, offset);
ok &= GetTlvString(data, rssize, &offset, TLV_TYPE_STR_MSG, item->mMessage);
if (offset != rssize)
{
/* error */
delete item;
return NULL;
}
if (!ok)
{
delete item;
return NULL;
}
return item;
}
void RsMailAckItem::clear()
{
mMailId.TlvClear();
}
std::ostream& RsMailAckItem::print(std::ostream &out, uint16_t indent)
{
printRsItemBase(out, "RsMailAckItem", indent);
uint16_t int_Indent = indent + 2;
mMailId.print(out, int_Indent);
printRsItemEnd(out, "RsMailAckItem", indent);
return out;
}
uint32_t RsMailAckItem::serial_size()
{
uint32_t s = 8; /* header */
s += mMailId.TlvSize();
return s;
}
bool RsMailAckItem::serialise(void *data, uint32_t& pktsize)
{
uint32_t tlvsize = serial_size() ;
uint32_t offset = 0;
if (pktsize < tlvsize)
return false; /* not enough space */
pktsize = tlvsize;
bool ok = true;
ok &= setRsItemHeader(data, tlvsize, PacketId(), tlvsize);
#ifdef RSSERIAL_DEBUG
std::cerr << "RsMailAckItem::serialise() Header: " << ok << std::endl;
std::cerr << "RsMailAckItem::serialise() Size: " << tlvsize << std::endl;
#endif
/* skip the header */
offset += 8;
/* add mandatory parts first */
ok &= mMailId.SetTlv(data, tlvsize, &offset);
if (offset != tlvsize)
{
ok = false;
std::cerr << "RsMailAckItem::serialise() Size Error! " << std::endl;
}
return ok;
}
RsMailAckItem* RsMailTransportSerialiser::deserialiseAckItem(void *data,uint32_t* pktsize)
{
/* get the type and size */
uint32_t rstype = getRsItemId(data);
uint32_t rssize = getRsItemSize(data);
uint32_t offset = 0;
if ((RS_PKT_VERSION_SERVICE != getRsItemVersion(rstype)) ||
(mServiceType != getRsItemService(rstype)) ||
(RS_PKT_SUBTYPE_MAIL_TRANSPORT_ACK != getRsItemSubType(rstype)))
{
return NULL; /* wrong type */
}
if (*pktsize < rssize) /* check size */
return NULL; /* not enough data */
/* set the packet length */
*pktsize = rssize;
bool ok = true;
/* ready to load */
RsMailAckItem *item = new RsMailAckItem(mServiceType);
item->clear();
/* skip the header */
offset += 8;
/* get mandatory parts first */
ok &= item->mMailId.GetTlv(data, rssize, &offset);
if (offset != rssize)
{
/* error */
delete item;
return NULL;
}
if (!ok)
{
delete item;
return NULL;
}
return item;
}
/**************************/
RsItem* RsMailTransportSerialiser::deserialise(void *data, uint32_t *pktsize)
{
#ifdef RSSERIAL_DEBUG
std::cerr << "RsMailTransportSerialiser::deserialise()" << std::endl;
#endif
/* get the type and size */
uint32_t rstype = getRsItemId(data);
if ((RS_PKT_VERSION_SERVICE != getRsItemVersion(rstype)) ||
(mServiceType != getRsItemService(rstype)))
{
return NULL; /* wrong type */
}
switch(getRsItemSubType(rstype))
{
case RS_PKT_SUBTYPE_MAIL_TRANSPORT_CHUNK:
return deserialiseChunkItem(data, pktsize);
break;
case RS_PKT_SUBTYPE_MAIL_TRANSPORT_ACK:
return deserialiseAckItem(data, pktsize);
break;
default:
return NULL;
break;
}
return NULL;
}
bool RsMailTransportSerialiser::serialise(RsItem *item, void *data, uint32_t *size){
if (item->PacketService() != mServiceType)
{
return false;
}
return dynamic_cast<RsMailTransportItem*>(item)->serialise(data,*size);
}
/*************************************************************************/

View File

@ -1,145 +0,0 @@
#ifndef RS_MAIL_TRANSPORT_ITEMS_H
#define RS_MAIL_TRANSPORT_ITEMS_H
/*
* libretroshare/src/serialiser: rsmailtransportitems.h
*
* RetroShare Serialiser.
*
* Copyright 2014-2014 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include <map>
#include "retroshare/rstypes.h"
#include "serialiser/rsserviceids.h"
#include "serialiser/rsserial.h"
#include "serialiser/rstlvmail.h"
/**************************************************************************/
// for defining tags themselves and msg tags
const uint8_t RS_PKT_SUBTYPE_MAIL_TRANSPORT_CHUNK = 0x01;
const uint8_t RS_PKT_SUBTYPE_MAIL_TRANSPORT_ACK = 0x02;
/**************************************************************************/
// These Types are generic - and usable by all MailTransport services.
// However they must be tweaked to indicate the Service ID before sending.
class RsMailTransportItem: public RsItem
{
public:
RsMailTransportItem(uint16_t service_type, uint8_t msg_subtype) : RsItem(RS_PKT_VERSION_SERVICE,service_type,msg_subtype)
{
setPriorityLevel(QOS_PRIORITY_RS_MAIL_ITEM) ;
}
RsMailTransportItem(uint8_t msg_subtype) : RsItem(RS_PKT_VERSION_SERVICE,0,msg_subtype)
{
setPriorityLevel(QOS_PRIORITY_RS_MAIL_ITEM) ;
}
virtual ~RsMailTransportItem() {}
virtual void clear() {}
virtual std::ostream& print(std::ostream &out, uint16_t indent = 0) = 0 ;
virtual bool serialise(void *data,uint32_t& size) = 0 ;
virtual uint32_t serial_size() = 0 ;
};
class RsMailChunkItem: public RsMailTransportItem
{
public:
RsMailChunkItem() :RsMailTransportItem(RS_PKT_SUBTYPE_MAIL_TRANSPORT_CHUNK) {}
RsMailChunkItem(uint16_t service_type) :RsMailTransportItem(service_type, RS_PKT_SUBTYPE_MAIL_TRANSPORT_CHUNK) {}
virtual ~RsMailChunkItem() {}
virtual void clear();
virtual bool serialise(void *data,uint32_t& size) ;
virtual uint32_t serial_size() ;
virtual std::ostream &print(std::ostream &out, uint16_t indent = 0);
// extra functions.
bool isPartial();
// Serialised.
RsTlvMailId mMailId;
uint16_t mPartCount;
uint16_t mMailIndex;
RsMessageId mWholeMailId;
std::string mMessage;
};
class RsMailAckItem : public RsMailTransportItem
{
public:
RsMailAckItem() :RsMailTransportItem(RS_PKT_SUBTYPE_MAIL_TRANSPORT_ACK) {}
RsMailAckItem(uint16_t service_type) :RsMailTransportItem(service_type, RS_PKT_SUBTYPE_MAIL_TRANSPORT_ACK) {}
virtual std::ostream &print(std::ostream &out, uint16_t indent = 0);
virtual bool serialise(void *data,uint32_t& size) ;
virtual uint32_t serial_size() ;
virtual ~RsMailAckItem() {}
virtual void clear();
// serialised
RsTlvMailId mMailId;
};
class RsMailTransportSerialiser: public RsSerialType
{
public:
RsMailTransportSerialiser(uint16_t service_type)
:RsSerialType(RS_PKT_VERSION_SERVICE, service_type),
mServiceType(service_type) {}
virtual ~RsMailTransportSerialiser() {}
virtual uint32_t size(RsItem *item)
{
return dynamic_cast<RsMailTransportItem*>(item)->serial_size() ;
}
virtual bool serialise(RsItem *i, void *d, uint32_t *s);
virtual RsItem * deserialise(void *data, uint32_t *size);
private:
virtual RsMailChunkItem *deserialiseChunkItem(void *data, uint32_t *size);
virtual RsMailAckItem *deserialiseAckItem(void *data, uint32_t *size);
uint16_t mServiceType;
};
/**************************************************************************/
#endif /* RS_MAIL_TRANSPORT_ITEMS_H */

View File

@ -1,265 +0,0 @@
/*
* libretroshare/src/serialiser: rstlvmsgs.cc
*
* RetroShare Serialiser.
*
* Copyright 2014 by Robert Fernie
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
#include "serialiser/rstlvbase.h"
#include "serialiser/rstlvmail.h"
#include "serialiser/rsbaseserial.h"
/************************************* RsTlvIpAddress ************************************/
RsTlvMailAddress::RsTlvMailAddress()
:RsTlvItem()
{
return;
}
void RsTlvMailAddress::TlvClear()
{
mAddressType = 0;
mAddress.clear();
}
uint32_t RsTlvMailAddress::TlvSize() const
{
uint32_t s = TLV_HEADER_SIZE;
s += 4; // TYPE.
s += GetTlvStringSize(mAddress);
return s;
}
bool RsTlvMailAddress::SetTlv(void *data, uint32_t size, uint32_t *offset) const
{
/* must check sizes */
uint32_t tlvsize = TlvSize();
uint32_t tlvend = *offset + tlvsize;
if (size < tlvend)
return false; /* not enough space */
bool ok = true;
/* start at data[offset] */
/* add mandatory parts first */
ok &= SetTlvBase(data, tlvend, offset, TLV_TYPE_MSG_ADDRESS, tlvsize);
ok &= setRawUInt32(data, tlvend, offset, mAddressType);
ok &= SetTlvString(data, tlvend, offset, TLV_TYPE_STR_MSG, mAddress);
return ok;
}
bool RsTlvMailAddress::GetTlv(void *data, uint32_t size, uint32_t *offset)
{
if (size < *offset + TLV_HEADER_SIZE)
return false;
uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[*offset]) );
uint32_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) );
uint32_t tlvend = *offset + tlvsize;
if (size < tlvend) /* check size */
return false; /* not enough space */
if (tlvtype != TLV_TYPE_MSG_ADDRESS) /* check type */
return false;
bool ok = true;
/* ready to load */
TlvClear();
/* skip the header */
(*offset) += TLV_HEADER_SIZE;
ok &= getRawUInt32(data, tlvend, offset, &(mAddressType));
ok &= GetTlvString(data, tlvend, offset, TLV_TYPE_STR_MSG, mAddress);
/***************************************************************************
* NB: extra components could be added (for future expansion of the type).
* or be present (if this code is reading an extended version).
*
* We must chew up the extra characters to conform with TLV specifications
***************************************************************************/
if (*offset != tlvend)
{
#ifdef TLV_DEBUG
std::cerr << "RsTlvIpAddress::GetTlv() Warning extra bytes at end of item";
std::cerr << std::endl;
#endif
*offset = tlvend;
}
return ok;
}
std::ostream &RsTlvMailAddress::print(std::ostream &out, uint16_t indent) const
{
printBase(out, "RsTlvMailAddress", indent);
uint16_t int_Indent = indent + 2;
printIndent(out, int_Indent);
out << "AddressType:" << mAddressType << std::endl;
printIndent(out, int_Indent);
out << "Address:" << mAddress << std::endl;
printEnd(out, "RsTlvMailAddress", indent);
return out;
}
/************************************* RsTlvIpAddressInfo ************************************/
RsTlvMailId::RsTlvMailId()
:RsTlvItem(), mSentTime(0)
{
mMailFrom.TlvClear();
mMailDest.TlvClear();
mMailId.clear();
return;
}
void RsTlvMailId::TlvClear()
{
mMailFrom.TlvClear();
mMailDest.TlvClear();
mSentTime = 0;
mMailId.clear();
}
uint32_t RsTlvMailId::TlvSize() const
{
uint32_t s = TLV_HEADER_SIZE;
s += mMailFrom.TlvSize();
s += mMailDest.TlvSize();
s += 4; // SentTime
s += mMailId.serial_size();
return s;
}
bool RsTlvMailId::SetTlv(void *data, uint32_t size, uint32_t *offset) const
{
/* must check sizes */
uint32_t tlvsize = TlvSize();
uint32_t tlvend = *offset + tlvsize;
if (size < tlvend)
return false; /* not enough space */
bool ok = true;
/* start at data[offset] */
/* add mandatory parts first */
ok &= SetTlvBase(data, tlvend, offset, TLV_TYPE_MSG_ID, tlvsize);
ok &= mMailFrom.SetTlv(data, tlvend, offset);
ok &= mMailDest.SetTlv(data, tlvend, offset);
ok &= setRawUInt32(data, tlvend, offset, mSentTime);
ok &= mMailId.serialise(data, tlvend, *offset);
return ok;
}
bool RsTlvMailId::GetTlv(void *data, uint32_t size, uint32_t *offset)
{
if (size < *offset + TLV_HEADER_SIZE)
return false;
uint16_t tlvtype = GetTlvType( &(((uint8_t *) data)[*offset]) );
uint32_t tlvsize = GetTlvSize( &(((uint8_t *) data)[*offset]) );
uint32_t tlvend = *offset + tlvsize;
if (size < tlvend) /* check size */
return false; /* not enough space */
if (tlvtype != TLV_TYPE_MSG_ID) /* check type */
return false;
bool ok = true;
/* ready to load */
TlvClear();
/* skip the header */
(*offset) += TLV_HEADER_SIZE;
ok &= mMailFrom.GetTlv(data, tlvend, offset);
ok &= mMailDest.GetTlv(data, tlvend, offset);
ok &= getRawUInt32(data, tlvend, offset, &(mSentTime));
ok &= mMailId.deserialise(data, tlvend, *offset);
/***************************************************************************
* NB: extra components could be added (for future expansion of the type).
* or be present (if this code is reading an extended version).
*
* We must chew up the extra characters to conform with TLV specifications
***************************************************************************/
if (*offset != tlvend)
{
#ifdef TLV_DEBUG
std::cerr << "RsTlvMailId::GetTlv() Warning extra bytes at end of item";
std::cerr << std::endl;
#endif
*offset = tlvend;
}
return ok;
}
std::ostream &RsTlvMailId::print(std::ostream &out, uint16_t indent) const
{
printBase(out, "RsTlvMailId", indent);
uint16_t int_Indent = indent + 2;
mMailFrom.print(out, int_Indent);
mMailDest.print(out, int_Indent);
printIndent(out, int_Indent);
out << "SentTime:" << mSentTime;
out << std::endl;
printIndent(out, int_Indent);
out << "mMailId:" << mMailId.toStdString();
out << std::endl;
printEnd(out, "RsTlvMailId", indent);
return out;
}

View File

@ -1,71 +0,0 @@
#pragma once
/*
* libretroshare/src/serialiser: rstlvmail.h
*
* RetroShare Serialiser.
*
* Copyright 2014 by Robert Fernie
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************
* These are the Compound TLV structures that must be (un)packed.
******************************************************************/
#include <retroshare/rstypes.h>
#include "serialiser/rstlvitem.h"
#include "util/rsnet.h"
#include <list>
class RsTlvMailAddress: public RsTlvItem
{
public:
RsTlvMailAddress();
virtual ~RsTlvMailAddress() { return; }
virtual uint32_t TlvSize() const;
virtual void TlvClear();
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) const;
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset);
virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
uint32_t mAddressType;
std::string mAddress;
};
class RsTlvMailId: public RsTlvItem
{
public:
RsTlvMailId();
virtual ~RsTlvMailId() { return; }
virtual uint32_t TlvSize() const;
virtual void TlvClear();
virtual bool SetTlv(void *data, uint32_t size, uint32_t *offset) const;
virtual bool GetTlv(void *data, uint32_t size, uint32_t *offset);
virtual std::ostream &print(std::ostream &out, uint16_t indent) const;
RsTlvMailAddress mMailFrom;
RsTlvMailAddress mMailDest;
uint32_t mSentTime;
RsMessageId mMailId;
};

View File

@ -1,33 +1,28 @@
/*******************************************************************************
* libretroshare/src/tcponudp: rsudpstack.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2012-2012 by Robert Fernie <retroshare.team@gmail.com> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef RS_UDP_STACK_RECEIVER_H
#define RS_UDP_STACK_RECEIVER_H
/*
* tcponudp/rsudpstack.h
*
* libretroshare.
*
* Copyright 2010 by Robert Fernie
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 3 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************/
#ifdef RS_USE_BITDHT
#include "udp/udpstack.h"

View File

@ -1,28 +1,26 @@
//
// This file is part of the aMule Project.
//
// Copyright (c) 2004-2009 Marcelo Roberto Jimenez ( phoenix@amule.org )
// Copyright (c) 2006-2009 aMule Team ( admin@amule.org / http://www.amule.org )
// Copyright (c) 2009-2010 Retroshare Team
//
//
// This program 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 2 of the License, or
// (at your option) any later version.
// You are also granted to use it with the LGPL License
//
// 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License or the LGPL
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
//
//This file uses libupnp
/*******************************************************************************
* libretroshare/src/upnp: UPnPBase.cpp *
* *
* libretroshare: retroshare core library *
* *
* Copyright (c) 2004-2009 Marcelo Roberto Jimenez ( phoenix@amule.org ) *
* Copyright (c) 2006-2009 aMule Team ( admin@amule.org / http://www.amule.org)*
* Copyright (c) 2009-2010 Retroshare Team *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#define UPNP_C

View File

@ -1,28 +1,26 @@
//
// This file is part of the aMule Project.
//
// Copyright (c) 2004-2009 Marcelo Roberto Jimenez ( phoenix@amule.org )
// Copyright (c) 2006-2009 aMule Team ( admin@amule.org / http://www.amule.org )
// Copyright (c) 2009-2010 Retroshare Team
//
//
// This program 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 2 of the License, or
// (at your option) any later version.
// You are also granted to use it with the LGPL License
//
// 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License or the LGPL
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
//
//This file uses libupnp
/*******************************************************************************
* libretroshare/src/upnp: UPnPBase.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright (c) 2004-2009 Marcelo Roberto Jimenez ( phoenix@amule.org ) *
* Copyright (c) 2006-2009 aMule Team ( admin@amule.org / http://www.amule.org)*
* Copyright (c) 2009-2010 Retroshare Team *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include <map>
#include <string>

View File

@ -1,22 +1,25 @@
/**************************************************************************************
* MiniUPnPc *
/*******************************************************************************
* libretroshare/src/upnp: upnputil.c *
* *
* libretroshare: retroshare core library *
* From MiniUPnPc, re-licensed with permission *
* *
* Copyright (c) 2005-2016, Thomas BERNARD *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions are met: *
* 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 Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* * Redistributions of source code must retain the above copyright notice, *
* this list of conditions and the following disclaimer. *
* * Redistributions in binary form must reproduce the above copyright notice, *
* this list of conditions and the following disclaimer in the documentation *
* and/or other materials provided with the distribution. *
* * The name of the author may not be used to endorse or promote products *
* derived from this software without specific prior written permission. *
* This software is subject to the conditions detailed in the *
* LICENCE file provided in this distribution. *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
//this file uses miniupnp
//From https://github.com/miniupnp/miniupnp/blob/master/miniupnpc/upnpc.c

View File

@ -1,22 +1,26 @@
/**************************************************************************************
* MiniUPnPc *
/*******************************************************************************
* libretroshare/src/upnp: upnputil.h *
* *
* libretroshare: retroshare core library *
* From MiniUPnPc, re-licensed with permission *
* *
* Copyright (c) 2005-2016, Thomas BERNARD *
* All rights reserved. *
* *
* Redistribution and use in source and binary forms, with or without *
* modification, are permitted provided that the following conditions are met: *
* 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 Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* * Redistributions of source code must retain the above copyright notice, *
* this list of conditions and the following disclaimer. *
* * Redistributions in binary form must reproduce the above copyright notice, *
* this list of conditions and the following disclaimer in the documentation *
* and/or other materials provided with the distribution. *
* * The name of the author may not be used to endorse or promote products *
* derived from this software without specific prior written permission. *
* This software is subject to the conditions detailed in the *
* LICENCE file provided in this distribution. *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
//this file uses miniupnp
#ifndef MINIUPNP_UTIL_H_

View File

@ -1,24 +1,24 @@
/* Copyright (C) 2004 Xavier Decoret <Xavier.Decoret@imag.fr>
*
* argstream is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* This licence has been changed from GPL to LPGL, with permission
* of the original author. (August 2013).
*
*/
/*******************************************************************************
* libretroshare/src/util: argstream.h *
* *
* libretroshare: retroshare core library *
* *
* Copyright (C) 2004 Xavier Decoret <Xavier.Decoret@imag.fr> *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#ifndef ARGSTREAM_H
#define ARGSTREAM_H

View File

@ -1,28 +1,24 @@
/*
* rs-core/src/dbase: rsexpr.cc
*
* RetroShare C++ Interface.
*
* Copyright 2007-2008 by Kashif Kaleem.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License Version 2 as published by the Free Software Foundation.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Please report all bugs and problems to "retroshare@lunamutt.com".
*
*/
/*******************************************************************************
* libretroshare/src/retroshare: rsexpr.cc *
* *
* libretroshare: retroshare core library *
* *
* Copyright 2007-2008 by Kashif Kaleem *
* *
* 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 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 *
* 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 Lesser General Public License *
* along with this program. If not, see <https://www.gnu.org/licenses/>. *
* *
*******************************************************************************/
#include "retroshare/rsexpr.h"
#include "retroshare/rstypes.h"

View File

@ -23,6 +23,7 @@
#include <cstdio>
#include <csignal>
#include <cstdlib>
#include <stdio.h>
#if defined(__linux__) && defined(__GLIBC__)

View File

@ -1,28 +0,0 @@
SQLCIPHER_VERSION=3.3.1
MSYS2AUTOMAKE=/usr/share/automake-1.15
BLD=../build-libs
DLD=../downloads
all: dirs sqlcipher
dirs:
mkdir -p ../../libs/include
mkdir -p ../../libs/lib
mkdir -p ../../libs/bin
mkdir -p $(DLD)
mkdir -p $(BLD)
sqlcipher: | ../../libs/lib/libsqlcipher.a
$(DLD)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz:
curl.exe -L -k https://github.com/sqlcipher/sqlcipher/archive/v$(SQLCIPHER_VERSION).tar.gz -o $(DLD)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz
../../libs/lib/libsqlcipher.a: $(DLD)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz
tar xvf $(DLD)/sqlcipher-$(SQLCIPHER_VERSION).tar.gz -C $(BLD)
cp $(MSYS2AUTOMAKE)/config.guess $(BLD)/sqlcipher-$(SQLCIPHER_VERSION)/config.guess
cp $(MSYS2AUTOMAKE)/config.sub $(BLD)/sqlcipher-$(SQLCIPHER_VERSION)/config.sub
cd $(BLD)/sqlcipher-$(SQLCIPHER_VERSION) && LIBS="-L`pwd`/../../libs/lib -lgdi32 $$LIBS" && export LIBS && ./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I`pwd`/../../libs/include" LDFLAGS="-L`pwd`/../../libs/lib -lcrypto -lgdi32" && make install prefix="`pwd`/install"
cp -r $(BLD)/sqlcipher-$(SQLCIPHER_VERSION)/install/include/* ../../libs/include/
cp $(BLD)/sqlcipher-$(SQLCIPHER_VERSION)/install/lib/libsqlcipher.a ../../libs/lib/
cp $(BLD)/sqlcipher-$(SQLCIPHER_VERSION)/install/bin/sqlcipher.exe ../../libs/bin/

View File

@ -1,3 +1,23 @@
#
# Copyright (C) 2018, Retroshare team <retroshare.team@gmailcom>
# All rights reserved.
# Contributors: retroshare team. The Contributors have asserted
# their moral rights under the UK Copyright Design and Patents Act 1988 to
# be recorded as the authors of this copyright work.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License.
#
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
# #
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
TEMPLATE = lib

View File

@ -1,20 +1,23 @@
################################################################################
# use_openpgpsdk.pri #
# Copyright (C) 2018, Retroshare team <retroshare.team@gmailcom> #
# #
# 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 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 #
# 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 Lesser General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
################################################################################
#
# Copyright (C) 2018, Retroshare team <retroshare.team@gmailcom>
# All rights reserved.
# Contributors: retroshare team. The Contributors have asserted
# their moral rights under the UK Copyright Design and Patents Act 1988 to
# be recorded as the authors of this copyright work.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License.
#
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
#
DEPENDPATH *= $$system_path($$clean_path($${PWD}/../../openpgpsdk/src))
INCLUDEPATH *= $$system_path($$clean_path($${PWD}/../../openpgpsdk/src))
LIBS *= -L$$system_path($$clean_path($${OUT_PWD}/../../openpgpsdk/src/lib/)) -lops

View File

@ -1,3 +1,24 @@
################################################################################
# retroshare_plugin.pri #
# Copyright (C) 2018, Retroshare team <retroshare.team@gmailcom> #
# #
# 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, 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 #
# 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 Lesser General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
################################################################################
TEMPLATE = subdirs
SUBDIRS += \
!include("../../retroshare.pri"): error("Could not include file ../../retroshare.pri")
TEMPLATE = lib

View File

@ -1,3 +1,21 @@
################################################################################
# FeedReader.pro #
# Copyright (C) 2018, Retroshare team <retroshare.team@gmailcom> #
# #
# 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, 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 #
# 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 Lesser General Public License #
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
################################################################################
!include("../Common/retroshare_plugin.pri"): error("Could not include file ../Common/retroshare_plugin.pri")
CONFIG += qt uic qrc resources

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/FeedReaderPlugin.cpp *
* *
* Copyright (C) 2012 by Thunder <retroshare.project@gmail.com> *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#include <QApplication>
#include <QIcon>

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/FeedReaderPlugin.h *
* *
* Copyright (C) 2012 by Thunder <retroshare.project@gmail.com> *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#pragma once

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/AddFeedDialog.cpp *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#include <QMessageBox>
#include <QDateTime>

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/AddFeedDialog.h *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#ifndef ADDFEEDDIALOG_H
#define ADDFEEDDIALOG_H

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/AddReaderConfig.cpp *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#include "FeedReaderConfig.h"
#include "ui_FeedReaderConfig.h"

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/AddReaderConfig.h *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#ifndef _FEEDREADERCONFIG_H
#define _FEEDREADERCONFIG_H

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderDialog.cpp *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#include <QKeyEvent>
#include <QMenu>

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare GUI is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderDialog.h *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#ifndef _FEEDREADERDIALOG_H
#define _FEEDREADERDIALOG_H

View File

@ -1,23 +1,24 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderFeedItem.cpp *
* *
* LibResAPI: API for local socket server *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#include <QMenu>
#include <QUrl>

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2013 by Thunder
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderFeedItem.h *
* *
* Copyright (C) 2012 by Thunder *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#ifndef _FEEDREADERFEEDITEM_H
#define _FEEDREADERFEEDITEM_H

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 RetroShare Team
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderFeedNotify.cpp *
* *
* Copyright (C) 2012 by RetroShare Team <retroshare.project@gmail.com> *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#include <QMutex>
#include <QDateTime>

View File

@ -1,23 +1,22 @@
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2012 RetroShare Team
*
* This program 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 2
* 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
* 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderFeedNotify.h *
* *
* Copyright (C) 2012 by RetroShare Team <retroshare.project@gmail.com> *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#ifndef FEEDREADERFEEDNOTIFY_H
#define FEEDREADERFEEDNOTIFY_H

View File

@ -1,3 +1,23 @@
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderMessageWidget.cpp *
* *
* Copyright (C) 2012 by RetroShare Team <retroshare.project@gmail.com> *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#include <QDateTime>
#include <QMenu>
#include <QKeyEvent>

View File

@ -1,3 +1,23 @@
/*******************************************************************************
* plugins/FeedReader/gui/FeedReaderMessageWidget.h *
* *
* Copyright (C) 2012 by RetroShare Team <retroshare.project@gmail.com> *
* *
* 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, 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 *
* 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/>. *
* *
*******************************************************************************/
#ifndef FEEDREADERMESSAGEWIDGET_H
#define FEEDREADERMESSAGEWIDGET_H

Some files were not shown because too many files have changed in this diff Show More