Merge pull request #1432 from RetroShare/v0.6.5

V0.6.5
This commit is contained in:
csoler 2018-12-16 14:35:30 +01:00 committed by GitHub
commit fd1e7074c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
465 changed files with 10220 additions and 8812 deletions

View File

@ -3,7 +3,7 @@
* * * *
* BitDHT: An Flexible DHT library. * * BitDHT: An Flexible DHT library. *
* * * *
* Copyright (C) 2010 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2010 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* BitDHT: An Flexible DHT library. * * BitDHT: An Flexible DHT library. *
* * * *
* Copyright (C) 2010 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2010 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* LibResAPI: API for local socket server * * LibResAPI: API for local socket server *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as * * it under the terms of the GNU Affero General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2016 by Mr.Alice <retroshare.team@gmail.com> * * Copyright 2016 by Mr.Alice <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -1396,25 +1396,25 @@ bool ftController::FileControl(const RsFileHash& hash, uint32_t flags)
return true; return true;
} }
bool ftController::FileClearCompleted() bool ftController::FileClearCompleted()
{ {
#ifdef CONTROL_DEBUG #ifdef CONTROL_DEBUG
std::cerr << "ftController::FileClearCompleted()" <<std::endl; std::cerr << "ftController::FileClearCompleted()" <<std::endl;
#endif #endif
{ {
RsStackMutex stack(ctrlMutex); /******* LOCKED ********/ RS_STACK_MUTEX(ctrlMutex);
for(std::map<RsFileHash, ftFileControl*>::iterator it(mCompleted.begin());it!=mCompleted.end();++it) for(auto it(mCompleted.begin()); it != mCompleted.end(); ++it)
delete it->second ; delete it->second;
mCompleted.clear(); mCompleted.clear();
IndicateConfigChanged(); IndicateConfigChanged();
} /******* UNLOCKED ********/ }
RsServer::notify()->notifyDownloadCompleteCount(0); RsServer::notify()->notifyDownloadCompleteCount(0);
return false; return true;
} }
/* get Details of File Transfers */ /* get Details of File Transfers */

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2008 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2008 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -1827,7 +1827,7 @@ int ftServer::handleIncoming()
********************************** **********************************
*********************************/ *********************************/
void ftServer::receiveSearchResult(RsTurtleFTSearchResultItem *item) void ftServer::ftReceiveSearchResult(RsTurtleFTSearchResultItem *item)
{ {
bool hasCallback = false; bool hasCallback = false;

View File

@ -98,7 +98,7 @@ public:
uint16_t serviceId() const { return RS_SERVICE_TYPE_FILE_TRANSFER ; } uint16_t serviceId() const { return RS_SERVICE_TYPE_FILE_TRANSFER ; }
virtual bool handleTunnelRequest(const RsFileHash& hash,const RsPeerId& peer_id) ; virtual bool handleTunnelRequest(const RsFileHash& hash,const RsPeerId& peer_id) ;
virtual void receiveTurtleData(const RsTurtleGenericTunnelItem *item,const RsFileHash& hash,const RsPeerId& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction) ; virtual void receiveTurtleData(const RsTurtleGenericTunnelItem *item,const RsFileHash& hash,const RsPeerId& virtual_peer_id,RsTurtleGenericTunnelItem::Direction direction) ;
virtual void receiveSearchResult(RsTurtleFTSearchResultItem *item); virtual void ftReceiveSearchResult(RsTurtleFTSearchResultItem *item); // We dont use TurtleClientService::receiveSearchResult() because of backward compatibility.
virtual RsItem *create_item(uint16_t service,uint8_t item_type) const ; virtual RsItem *create_item(uint16_t service,uint8_t item_type) const ;
virtual RsServiceSerializer *serializer() { return this ; } virtual RsServiceSerializer *serializer() { return this ; }

View File

@ -36,20 +36,17 @@ bool GxsTokenQueue::queueRequest(uint32_t token, uint32_t req_type)
void GxsTokenQueue::checkRequests() void GxsTokenQueue::checkRequests()
{ {
{ {
RsStackMutex stack(mQueueMtx); /********** STACK LOCKED MTX ******/ RS_STACK_MUTEX(mQueueMtx);
if (mQueue.empty()) if (mQueue.empty()) return;
{
return;
}
} }
// Must check all, and move to a different list - for reentrant / good mutex behaviour. // Must check all, and move to a different list - for reentrant / good mutex behaviour.
std::list<GxsTokenQueueItem> toload; std::list<GxsTokenQueueItem> toload;
std::list<GxsTokenQueueItem>::iterator it; std::list<GxsTokenQueueItem>::iterator it;
bool stuffToLoad = false; bool stuffToLoad = false;
{ {
RsStackMutex stack(mQueueMtx); /********** STACK LOCKED MTX ******/ RS_STACK_MUTEX(mQueueMtx);
for(it = mQueue.begin(); it != mQueue.end();) for(it = mQueue.begin(); it != mQueue.end();)
{ {
uint32_t token = it->mToken; uint32_t token = it->mToken;
@ -62,29 +59,29 @@ void GxsTokenQueue::checkRequests()
stuffToLoad = true; stuffToLoad = true;
#ifdef GXS_DEBUG #ifdef GXS_DEBUG
std::cerr << "GxsTokenQueue::checkRequests() token: " << token << " Complete"; std::cerr << "GxsTokenQueue::checkRequests() token: " << token
std::cerr << std::endl; << " Complete" << std::endl;
#endif #endif
++it; ++it;
} }
else if (status == RsTokenService::FAILED) else if (status == RsTokenService::FAILED)
{ {
// maybe we should do alternative callback? // maybe we should do alternative callback?
std::cerr << "GxsTokenQueue::checkRequests() ERROR Request Failed: " << token; std::cerr << __PRETTY_FUNCTION__ << " ERROR Request Failed! "
std::cerr << std::endl; << " token: " << token << std::endl;
it = mQueue.erase(it); it = mQueue.erase(it);
} }
else else
{ {
#ifdef GXS_DEBUG #ifdef GXS_DEBUG
std::cerr << "GxsTokenQueue::checkRequests() token: " << token << " is unfinished, status: " << status; std::cerr << "GxsTokenQueue::checkRequests() token: " << token
std::cerr << std::endl; << " is unfinished, status: " << status << std::endl;
#endif #endif
++it; ++it;
} }
} }
} } // RS_STACK_MUTEX(mQueueMtx) END
if (stuffToLoad) if (stuffToLoad)
{ {
@ -95,11 +92,3 @@ void GxsTokenQueue::checkRequests()
} }
} }
// This must be overloaded to complete the functionality.
void GxsTokenQueue::handleResponse(uint32_t token, uint32_t req_type)
{
std::cerr << "GxsTokenQueue::handleResponse(" << token << "," << req_type << ") ERROR: NOT HANDLED";
std::cerr << std::endl;
}

View File

@ -54,7 +54,7 @@ public:
protected: protected:
/// This must be overloaded to complete the functionality. /// This must be overloaded to complete the functionality.
virtual void handleResponse(uint32_t token, uint32_t req_type); virtual void handleResponse(uint32_t token, uint32_t req_type) = 0;
private: private:
RsGenExchange *mGenExchange; RsGenExchange *mGenExchange;

View File

@ -1198,16 +1198,16 @@ void RsDataService::locked_retrieveGroups(RetroCursor* c, std::vector<RsNxsGrp*>
} }
} }
int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, bool /* cache */, bool withMeta) int RsDataService::retrieveNxsMsgs(
const GxsMsgReq &reqIds, GxsMsgResult &msg, bool /* cache */,
bool withMeta )
{ {
#ifdef RS_DATA_SERVICE_DEBUG_TIME #ifdef RS_DATA_SERVICE_DEBUG_TIME
rstime::RsScopeTimer timer(""); rstime::RsScopeTimer timer("");
int resultCount = 0; int resultCount = 0;
#endif #endif
GxsMsgReq::const_iterator mit = reqIds.begin(); for(auto mit = reqIds.begin(); mit != reqIds.end(); ++mit)
for(; mit != reqIds.end(); ++mit)
{ {
const RsGxsGroupId& grpId = mit->first; const RsGxsGroupId& grpId = mit->first;
@ -1216,9 +1216,9 @@ int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, b
const std::set<RsGxsMessageId>& msgIdV = mit->second; const std::set<RsGxsMessageId>& msgIdV = mit->second;
std::vector<RsNxsMsg*> msgSet; std::vector<RsNxsMsg*> msgSet;
if(msgIdV.empty()){ if(msgIdV.empty())
{
RsStackMutex stack(mDbMutex); RS_STACK_MUTEX(mDbMutex);
RetroCursor* c = mDb->sqlQuery(MSG_TABLE_NAME, withMeta ? mMsgColumnsWithMeta : mMsgColumns, KEY_GRP_ID+ "='" + grpId.toStdString() + "'", ""); RetroCursor* c = mDb->sqlQuery(MSG_TABLE_NAME, withMeta ? mMsgColumnsWithMeta : mMsgColumns, KEY_GRP_ID+ "='" + grpId.toStdString() + "'", "");
@ -1228,16 +1228,17 @@ int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, b
} }
delete c; delete c;
}else{ }
else
{
RS_STACK_MUTEX(mDbMutex);
// request each grp // request each grp
std::set<RsGxsMessageId>::const_iterator sit = msgIdV.begin(); for( std::set<RsGxsMessageId>::const_iterator sit = msgIdV.begin();
sit!=msgIdV.end();++sit )
for(; sit!=msgIdV.end();++sit){ {
const RsGxsMessageId& msgId = *sit; const RsGxsMessageId& msgId = *sit;
RsStackMutex stack(mDbMutex);
RetroCursor* c = mDb->sqlQuery(MSG_TABLE_NAME, withMeta ? mMsgColumnsWithMeta : mMsgColumns, KEY_GRP_ID+ "='" + grpId.toStdString() RetroCursor* c = mDb->sqlQuery(MSG_TABLE_NAME, withMeta ? mMsgColumnsWithMeta : mMsgColumns, KEY_GRP_ID+ "='" + grpId.toStdString()
+ "' AND " + KEY_MSG_ID + "='" + msgId.toStdString() + "'", ""); + "' AND " + KEY_MSG_ID + "='" + msgId.toStdString() + "'", "");

View File

@ -47,10 +47,14 @@ public:
* Retrieves all msgs * Retrieves all msgs
* @param reqIds requested msg ids (grpId,msgId), leave msg list empty to get all msgs for the grp * @param reqIds requested msg ids (grpId,msgId), leave msg list empty to get all msgs for the grp
* @param msg result of msg retrieval * @param msg result of msg retrieval
* @param cache whether to store results of this retrieval in memory for faster later retrieval * @param cache IGNORED whether to store results of this retrieval in memory
* for faster later retrieval
* @param strictFilter if true do not request any message if reqIds is empty
* @return error code * @return error code
*/ */
int retrieveNxsMsgs(const GxsMsgReq& reqIds, GxsMsgResult& msg, bool cache, bool withMeta = false); int retrieveNxsMsgs(
const GxsMsgReq& reqIds, GxsMsgResult& msg, bool cache,
bool withMeta = false );
/*! /*!
* Retrieves groups, if empty, retrieves all grps, if map is not empty * Retrieves groups, if empty, retrieves all grps, if map is not empty

View File

@ -137,16 +137,19 @@ public:
typedef std::map<RsNxsMsg*, RsGxsMsgMetaData*> MsgStoreMap; typedef std::map<RsNxsMsg*, RsGxsMsgMetaData*> MsgStoreMap;
RsGeneralDataService(){} RsGeneralDataService(){}
virtual ~RsGeneralDataService(){return;} virtual ~RsGeneralDataService(){}
/*! /*!
* Retrieves all msgs * Retrieves all msgs
* @param reqIds requested msg ids (grpId,msgId), leave msg list empty to get all msgs for the grp * @param reqIds requested msg ids (grpId,msgId), leave msg list empty to get all msgs for the grp
* @param msg result of msg retrieval * @param msg result of msg retrieval
* @param cache whether to store results of this retrieval in memory for faster later retrieval * @param cache whether to store results of this retrieval in memory for faster later retrieval
* @param strictFilter if true do not request any message if reqIds is empty
* @return error code * @return error code
*/ */
virtual int retrieveNxsMsgs(const GxsMsgReq& reqIds, GxsMsgResult& msg, bool cache, bool withMeta=false) = 0; virtual int retrieveNxsMsgs(
const GxsMsgReq& reqIds, GxsMsgResult& msg, bool cache,
bool withMeta = false ) = 0;
/*! /*!
* Retrieves all groups stored * Retrieves all groups stored

View File

@ -1925,7 +1925,7 @@ void RsGenExchange::setGroupStatusFlags(uint32_t& token, const RsGxsGroupId& grp
void RsGenExchange::setGroupServiceString(uint32_t& token, const RsGxsGroupId& grpId, const std::string& servString) void RsGenExchange::setGroupServiceString(uint32_t& token, const RsGxsGroupId& grpId, const std::string& servString)
{ {
RS_STACK_MUTEX(mGenMtx) ; RS_STACK_MUTEX(mGenMtx);
token = mDataAccess->generatePublicToken(); token = mDataAccess->generatePublicToken();
GrpLocMetaData g; GrpLocMetaData g;
@ -3429,3 +3429,9 @@ void RsGenExchange::turtleSearchRequest(const std::string& match_string)
{ {
mNetService->turtleSearchRequest(match_string) ; mNetService->turtleSearchRequest(match_string) ;
} }
bool RsGenExchange::localSearch( const std::string& matchString,
std::list<RsGxsGroupSummary>& results )
{
return mNetService->search(matchString, results);
}

View File

@ -313,6 +313,15 @@ public:
void turtleGroupRequest(const RsGxsGroupId& group_id); void turtleGroupRequest(const RsGxsGroupId& group_id);
void turtleSearchRequest(const std::string& match_string); void turtleSearchRequest(const std::string& match_string);
/**
* @brief Search local groups. Blocking API.
* @param matchString string to look for in the search
* @param results storage for results
* @return false on error, true otherwise
*/
bool localSearch( const std::string& matchString,
std::list<RsGxsGroupSummary>& results );
protected: protected:
bool messagePublicationTest(const RsGxsMsgMetaData&) ; bool messagePublicationTest(const RsGxsMsgMetaData&) ;

View File

@ -39,14 +39,16 @@ RsGxsDataAccess::~RsGxsDataAccess()
for(std::map<uint32_t, GxsRequest*>::const_iterator it(mRequests.begin());it!=mRequests.end();++it) for(std::map<uint32_t, GxsRequest*>::const_iterator it(mRequests.begin());it!=mRequests.end();++it)
delete it->second ; delete it->second ;
} }
bool RsGxsDataAccess::requestGroupInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, bool RsGxsDataAccess::requestGroupInfo(
const std::list<RsGxsGroupId> &groupIds) uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts,
const std::list<RsGxsGroupId> &groupIds )
{ {
if(groupIds.empty()) if(groupIds.empty())
{ {
std::cerr << "(WW) Group Id list is empty" << std::endl; std::cerr << __PRETTY_FUNCTION__ << " (WW) Group Id list is empty!"
return false; << std::endl;
} return false;
}
GxsRequest* req = NULL; GxsRequest* req = NULL;
uint32_t reqType = opts.mReqType; uint32_t reqType = opts.mReqType;
@ -76,19 +78,19 @@ bool RsGxsDataAccess::requestGroupInfo(uint32_t &token, uint32_t ansType, const
req = gir; req = gir;
} }
if(req == NULL) if(!req)
{ {
std::cerr << "RsGxsDataAccess::requestGroupInfo() request type not recognised, type " std::cerr << __PRETTY_FUNCTION__ << " request type not recognised, "
<< reqType << std::endl; << "reqType: " << reqType << std::endl;
return false; return false;
}else }
{
generateToken(token); generateToken(token);
#ifdef DATA_DEBUG #ifdef DATA_DEBUG
std::cerr << "RsGxsDataAccess::requestGroupInfo() gets Token: " << token << std::endl; std::cerr << "RsGxsDataAccess::requestGroupInfo() gets token: " << token
<< std::endl;
#endif #endif
}
setReq(req, token, ansType, opts); setReq(req, token, ansType, opts);
storeRequest(req); storeRequest(req);
@ -130,11 +132,8 @@ bool RsGxsDataAccess::requestGroupInfo(uint32_t &token, uint32_t ansType, const
void RsGxsDataAccess::generateToken(uint32_t &token) void RsGxsDataAccess::generateToken(uint32_t &token)
{ {
RsStackMutex stack(mDataMutex); /****** LOCKED *****/ RS_STACK_MUTEX(mDataMutex);
token = mNextToken++; token = mNextToken++;
return;
} }
@ -301,15 +300,12 @@ void RsGxsDataAccess::setReq(GxsRequest* req, uint32_t token, uint32_t ansType,
req->Options = opts; req->Options = opts;
return; return;
} }
void RsGxsDataAccess::storeRequest(GxsRequest* req) void RsGxsDataAccess::storeRequest(GxsRequest* req)
{ {
RsStackMutex stack(mDataMutex); /****** LOCKED *****/ RS_STACK_MUTEX(mDataMutex);
req->status = PENDING;
req->status = PENDING; req->reqTime = time(NULL);
req->reqTime = time(NULL);
mRequests[req->token] = req; mRequests[req->token] = req;
return;
} }
RsTokenService::GxsRequestStatus RsGxsDataAccess::requestStatus(uint32_t token) RsTokenService::GxsRequestStatus RsGxsDataAccess::requestStatus(uint32_t token)
@ -1040,29 +1036,42 @@ bool RsGxsDataAccess::getMsgData(MsgDataReq* req)
{ {
GxsMsgReq msgIdOut; GxsMsgReq msgIdOut;
const RsTokReqOptions& opts(req->Options);
// filter based on options // filter based on options
getMsgList(req->mMsgIds, req->Options, msgIdOut); getMsgList(req->mMsgIds, opts, msgIdOut);
// If the list is empty because of filtering do not retrieve from DB
if((opts.mMsgFlagMask || opts.mStatusMask) && msgIdOut.empty())
return true;
mDataStore->retrieveNxsMsgs(msgIdOut, req->mMsgData, true, true); mDataStore->retrieveNxsMsgs(msgIdOut, req->mMsgData, true, true);
return true; return true;
} }
bool RsGxsDataAccess::getMsgSummary(MsgMetaReq* req) bool RsGxsDataAccess::getMsgSummary(MsgMetaReq* req)
{ {
GxsMsgReq msgIdOut; GxsMsgReq msgIdOut;
// filter based on options const RsTokReqOptions& opts(req->Options);
getMsgList(req->mMsgIds, req->Options, msgIdOut);
mDataStore->retrieveGxsMsgMetaData(msgIdOut, req->mMsgMetaData); // filter based on options
getMsgList(req->mMsgIds, opts, msgIdOut);
// If the list is empty because of filtering do not retrieve from DB
if((opts.mMsgFlagMask || opts.mStatusMask) && msgIdOut.empty())
return true;
mDataStore->retrieveGxsMsgMetaData(msgIdOut, req->mMsgMetaData);
return true; return true;
} }
bool RsGxsDataAccess::getMsgList(const GxsMsgReq& msgIds, const RsTokReqOptions& opts, GxsMsgReq& msgIdsOut) bool RsGxsDataAccess::getMsgList(
const GxsMsgReq& msgIds, const RsTokReqOptions& opts,
GxsMsgReq& msgIdsOut )
{ {
GxsMsgMetaResult result; GxsMsgMetaResult result;
@ -1693,41 +1702,48 @@ void RsGxsDataAccess::cleanseMsgMetaMap(GxsMsgMetaResult& result)
return; return;
} }
void RsGxsDataAccess::filterMsgList(GxsMsgIdResult& msgIds, const RsTokReqOptions& opts, void RsGxsDataAccess::filterMsgList(
const MsgMetaFilter& msgMetas) const GxsMsgIdResult& resultsMap, const RsTokReqOptions& opts,
const MsgMetaFilter& msgMetas ) const
{ {
for( GxsMsgIdResult::iterator grpIt = resultsMap.begin();
GxsMsgIdResult::iterator mit = msgIds.begin(); grpIt != resultsMap.end(); ++grpIt )
for(;mit != msgIds.end(); ++mit)
{ {
const RsGxsGroupId& groupId(grpIt->first);
std::set<RsGxsMessageId>& msgsIdSet(grpIt->second);
MsgMetaFilter::const_iterator cit = msgMetas.find(mit->first); MsgMetaFilter::const_iterator cit = msgMetas.find(groupId);
if(cit == msgMetas.end()) continue;
#ifdef DATA_DEBUG
std::cerr << __PRETTY_FUNCTION__ << " " << msgsIdSet.size()
<< " for group: " << groupId << " before filtering"
<< std::endl;
#endif
if(cit == msgMetas.end()) for( std::set<RsGxsMessageId>::iterator msgIdIt = msgsIdSet.begin();
continue; msgIdIt != msgsIdSet.end(); )
std::set<RsGxsMessageId>& msgs = mit->second;
std::set<RsGxsMessageId>::iterator vit = msgs.begin();
const std::map<RsGxsMessageId, RsGxsMsgMetaData*>& meta = cit->second;
std::map<RsGxsMessageId, RsGxsMsgMetaData*>::const_iterator cit2;
for(; vit != msgs.end();)
{ {
const RsGxsMessageId& msgId(*msgIdIt);
const std::map<RsGxsMessageId, RsGxsMsgMetaData*>& msgsMetaMap =
cit->second;
bool keep = false; bool keep = false;
if( (cit2 = meta.find(*vit)) != meta.end() ) std::map<RsGxsMessageId, RsGxsMsgMetaData*>::const_iterator msgsMetaMapIt;
if( (msgsMetaMapIt = msgsMetaMap.find(msgId)) != msgsMetaMap.end() )
{ {
keep = checkMsgFilter(opts, cit2->second); keep = checkMsgFilter(opts, msgsMetaMapIt->second);
} }
if(keep) if(keep) ++msgIdIt;
{ else msgIdIt = msgsIdSet.erase(msgIdIt);
++vit;
}else
{
vit = msgs.erase(vit);
}
} }
#ifdef DATA_DEBUG
std::cerr << __PRETTY_FUNCTION__ << " " << msgsIdSet.size()
<< " for group: " << groupId << " after filtering"
<< std::endl;
#endif
} }
} }
@ -1905,62 +1921,87 @@ bool RsGxsDataAccess::checkGrpFilter(const RsTokReqOptions &opts, const RsGxsGrp
return subscribeMatch; return subscribeMatch;
} }
bool RsGxsDataAccess::checkMsgFilter(const RsTokReqOptions& opts, const RsGxsMsgMetaData* meta) const bool RsGxsDataAccess::checkMsgFilter(
const RsTokReqOptions& opts, const RsGxsMsgMetaData* meta ) const
{ {
bool statusMatch = false; if (opts.mStatusMask)
if (opts.mStatusMask)
{ {
// Exact Flags match required. // Exact Flags match required.
if ((opts.mStatusMask & opts.mStatusFilter) == (opts.mStatusMask & meta->mMsgStatus)) if ( (opts.mStatusMask & opts.mStatusFilter) ==
(opts.mStatusMask & meta->mMsgStatus) )
{ {
std::cerr << "checkMsgFilter() Accepting Msg as StatusMatches: "; #ifdef DATA_DEBUG
std::cerr << " Mask: " << opts.mStatusMask << " StatusFilter: " << opts.mStatusFilter; std::cerr << __PRETTY_FUNCTION__
std::cerr << " MsgStatus: " << meta->mMsgStatus << " MsgId: " << meta->mMsgId; << " Continue checking Msg as StatusMatches: "
std::cerr << std::endl; << " Mask: " << opts.mStatusMask
<< " StatusFilter: " << opts.mStatusFilter
statusMatch = true; << " MsgStatus: " << meta->mMsgStatus
<< " MsgId: " << meta->mMsgId << std::endl;
#endif
} }
else else
{ {
std::cerr << "checkMsgFilter() Dropping Msg due to !StatusMatch "; #ifdef DATA_DEBUG
std::cerr << " Mask: " << opts.mStatusMask << " StatusFilter: " << opts.mStatusFilter; std::cerr << __PRETTY_FUNCTION__
std::cerr << " MsgStatus: " << meta->mMsgStatus << " MsgId: " << meta->mMsgId; << " Dropping Msg due to !StatusMatch "
std::cerr << std::endl; << " Mask: " << opts.mStatusMask
<< " StatusFilter: " << opts.mStatusFilter
<< " MsgStatus: " << meta->mMsgStatus
<< " MsgId: " << meta->mMsgId << std::endl;
#endif
return false;
} }
} }
else else
{ {
// no status comparision, #ifdef DATA_DEBUG
statusMatch = true; std::cerr << __PRETTY_FUNCTION__
<< " Status check not requested"
<< " mStatusMask: " << opts.mStatusMask
<< " MsgId: " << meta->mMsgId << std::endl;
#endif
} }
bool flagMatch = false; if(opts.mMsgFlagMask)
{
// Exact Flags match required.
if ( (opts.mMsgFlagMask & opts.mMsgFlagFilter) ==
(opts.mMsgFlagMask & meta->mMsgFlags) )
{
#ifdef DATA_DEBUG
std::cerr << __PRETTY_FUNCTION__
<< " Accepting Msg as FlagMatches: "
<< " Mask: " << opts.mMsgFlagMask
<< " FlagFilter: " << opts.mMsgFlagFilter
<< " MsgFlag: " << meta->mMsgFlags
<< " MsgId: " << meta->mMsgId << std::endl;
#endif
}
else
{
#ifdef DATA_DEBUG
std::cerr << __PRETTY_FUNCTION__
<< " Dropping Msg due to !FlagMatch "
<< " Mask: " << opts.mMsgFlagMask
<< " FlagFilter: " << opts.mMsgFlagFilter
<< " MsgFlag: " << meta->mMsgFlags
<< " MsgId: " << meta->mMsgId << std::endl;
#endif
if(opts.mMsgFlagMask) return false;
{ }
// Exact Flags match required. }
if ((opts.mMsgFlagMask & opts.mMsgFlagFilter) == (opts.mMsgFlagMask & meta->mMsgFlags)) else
{ {
std::cerr << "checkMsgFilter() Accepting Msg as FlagMatches: "; #ifdef DATA_DEBUG
std::cerr << " Mask: " << opts.mMsgFlagMask << " FlagFilter: " << opts.mMsgFlagFilter; std::cerr << __PRETTY_FUNCTION__
std::cerr << " MsgFlag: " << meta->mMsgFlags << " MsgId: " << meta->mMsgId; << " Flags check not requested"
std::cerr << std::endl; << " mMsgFlagMask: " << opts.mMsgFlagMask
<< " MsgId: " << meta->mMsgId << std::endl;
#endif
}
flagMatch = true; return true;
}
else
{
std::cerr << "checkMsgFilter() Dropping Msg due to !FlagMatch ";
std::cerr << " Mask: " << opts.mMsgFlagMask << " FlagFilter: " << opts.mMsgFlagFilter;
std::cerr << " MsgFlag: " << meta->mMsgFlags << " MsgId: " << meta->mMsgId;
std::cerr << std::endl;
flagMatch = false;
}
}else{
flagMatch = true;
}
return statusMatch && flagMatch;
} }

View File

@ -5290,7 +5290,8 @@ void RsGxsNetService::receiveTurtleSearchResults(TurtleRequestId req,const unsig
#ifdef NXS_NET_DEBUG_8 #ifdef NXS_NET_DEBUG_8
GXSNETDEBUG___ << " passing the grp data to observer." << std::endl; GXSNETDEBUG___ << " passing the grp data to observer." << std::endl;
#endif #endif
mObserver->receiveNewGroups(new_grps); mObserver->receiveNewGroups(new_grps);
mObserver->receiveDistantSearchResults(req, grpId);
} }
bool RsGxsNetService::search( const std::string& substring, bool RsGxsNetService::search( const std::string& substring,

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 by Cyril Soler <retroshare.team@gmail.com> * * Copyright 2018 by Cyril Soler <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 by Cyril Soler <retroshare.team@gmail.com> * * Copyright 2018 by Cyril Soler <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2011-2011 by Robert Fernie <retroshare.team@gmail.com> * * Copyright 2011-2011 by Robert Fernie <retroshare.project@gmail.com> *
* Copyright 2011-2011 by Christopher Evi-Parker * * Copyright 2011-2011 by Christopher Evi-Parker *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *

View File

@ -49,7 +49,7 @@ JsonApiServer::corsHeaders =
{ {
{ "Access-Control-Allow-Origin", "*" }, { "Access-Control-Allow-Origin", "*" },
{ "Access-Control-Allow-Methods", "GET, POST, OPTIONS"}, { "Access-Control-Allow-Methods", "GET, POST, OPTIONS"},
{ "Access-Control-Allow-Headers", "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range" }, { "Access-Control-Allow-Headers", "Authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range" },
{ "Access-Control-Expose-Headers", "Content-Length,Content-Range" } { "Access-Control-Expose-Headers", "Content-Length,Content-Range" }
}; };
@ -58,7 +58,7 @@ JsonApiServer::corsOptionsHeaders =
{ {
{ "Access-Control-Allow-Origin", "*" }, { "Access-Control-Allow-Origin", "*" },
{ "Access-Control-Allow-Methods", "GET, POST, OPTIONS"}, { "Access-Control-Allow-Methods", "GET, POST, OPTIONS"},
{ "Access-Control-Allow-Headers", "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range" }, { "Access-Control-Allow-Headers", "Authorization,DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range" },
{ "Access-Control-Max-Age", "1728000" }, // 20 days { "Access-Control-Max-Age", "1728000" }, // 20 days
{ "Content-Type", "text/plain; charset=utf-8" }, { "Content-Type", "text/plain; charset=utf-8" },
{ "Content-Length", "0" } { "Content-Length", "0" }
@ -322,6 +322,12 @@ void JsonApiServer::registerHandler(
const std::shared_ptr<rb::Session> session, const std::shared_ptr<rb::Session> session,
const std::function<void (const std::shared_ptr<rb::Session>)>& callback ) const std::function<void (const std::shared_ptr<rb::Session>)>& callback )
{ {
if(session->get_request()->get_method() == "OPTIONS")
{
callback(session);
return;
}
if(!rsLoginHelper->isLoggedIn()) if(!rsLoginHelper->isLoggedIn())
{ {
session->close(rb::CONFLICT); session->close(rb::CONFLICT);

View File

@ -769,7 +769,8 @@ HEADERS += serialiser/rsserializable.h \
serialiser/rstypeserializer.h \ serialiser/rstypeserializer.h \
util/rsjson.h util/rsjson.h
SOURCES += serialiser/rsserializer.cc \ SOURCES += serialiser/rsserializable.cc \
serialiser/rsserializer.cc \
serialiser/rstypeserializer.cc \ serialiser/rstypeserializer.cc \
util/rsjson.cc util/rsjson.cc

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 Retroshare Team <retroshare.team@gmail.com> * * Copyright 2018 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -318,7 +318,7 @@ public:
/** /**
* @brief Get free disk space limit * @brief Get free disk space limit
* @jsonapi{development} * @jsonapi{development}
* @return current current minimum free space on disk in MB * @return current minimum free space on disk in MB
*/ */
virtual uint32_t freeDiskSpaceLimit() const = 0; virtual uint32_t freeDiskSpaceLimit() const = 0;
@ -329,8 +329,15 @@ public:
*/ */
virtual void setFreeDiskSpaceLimit(uint32_t minimumFreeMB) = 0; virtual void setFreeDiskSpaceLimit(uint32_t minimumFreeMB) = 0;
virtual bool FileControl(const RsFileHash& hash, uint32_t flags) = 0; virtual bool FileControl(const RsFileHash& hash, uint32_t flags) = 0;
virtual bool FileClearCompleted() = 0;
/**
* @brief Clear completed downloaded files list
* @jsonapi{development}
* @return false on error, true otherwise
*/
virtual bool FileClearCompleted() = 0;
virtual void setDefaultEncryptionPolicy(uint32_t policy)=0; // RS_FILE_CTRL_ENCRYPTION_POLICY_STRICT/PERMISSIVE virtual void setDefaultEncryptionPolicy(uint32_t policy)=0; // RS_FILE_CTRL_ENCRYPTION_POLICY_STRICT/PERMISSIVE
virtual uint32_t defaultEncryptionPolicy()=0; virtual uint32_t defaultEncryptionPolicy()=0;
virtual void setMaxUploadSlotsPerFriend(uint32_t n)=0; virtual void setMaxUploadSlotsPerFriend(uint32_t n)=0;
@ -390,7 +397,7 @@ public:
* @return true if file found, false otherwise * @return true if file found, false otherwise
*/ */
virtual bool FileDetails( virtual bool FileDetails(
const RsFileHash &hash, FileSearchFlags hintflags, FileInfo& info ) = 0; const RsFileHash& hash, FileSearchFlags hintflags, FileInfo& info ) = 0;
virtual bool isEncryptedSource(const RsPeerId& virtual_peer_id) =0; virtual bool isEncryptedSource(const RsPeerId& virtual_peer_id) =0;

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2013 by Cyril Soler <retroshare.team@gmail.com> * * Copyright 2013 by Cyril Soler <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -1,4 +1,3 @@
#pragma once
/******************************************************************************* /*******************************************************************************
* libretroshare/src/retroshare: rsgxschannels.h * * libretroshare/src/retroshare: rsgxschannels.h *
* * * *
@ -21,8 +20,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* * * *
*******************************************************************************/ *******************************************************************************/
#pragma once
#include <inttypes.h> #include <cstdint>
#include <string> #include <string>
#include <list> #include <list>
#include <functional> #include <functional>
@ -32,6 +32,7 @@
#include "retroshare/rsgxscommon.h" #include "retroshare/rsgxscommon.h"
#include "serialiser/rsserializable.h" #include "serialiser/rsserializable.h"
#include "retroshare/rsturtle.h" #include "retroshare/rsturtle.h"
#include "util/rsdeprecate.h"
class RsGxsChannels; class RsGxsChannels;
@ -61,9 +62,6 @@ struct RsGxsChannelGroup : RsSerializable
} }
}; };
std::ostream &operator<<(std::ostream& out, const RsGxsChannelGroup& group);
struct RsGxsChannelPost : RsSerializable struct RsGxsChannelPost : RsSerializable
{ {
RsGxsChannelPost() : mCount(0), mSize(0) {} RsGxsChannelPost() : mCount(0), mSize(0) {}
@ -94,16 +92,90 @@ struct RsGxsChannelPost : RsSerializable
} }
}; };
std::ostream &operator<<(std::ostream& out, const RsGxsChannelPost& post);
class RsGxsChannels: public RsGxsIfaceHelper, public RsGxsCommentService class RsGxsChannels: public RsGxsIfaceHelper, public RsGxsCommentService
{ {
public: public:
explicit RsGxsChannels(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {} explicit RsGxsChannels(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {}
virtual ~RsGxsChannels() {} virtual ~RsGxsChannels() {}
/**
* @brief Create channel. Blocking API.
* @jsonapi{development}
* @param[inout] channel Channel data (name, description...)
* @return false on error, true otherwise
*/
virtual bool createChannel(RsGxsChannelGroup& channel) = 0;
/**
* @brief Add a comment on a post or on another comment
* @jsonapi{development}
* @param[inout] comment
* @return false on error, true otherwise
*/
virtual bool createComment(RsGxsComment& comment) = 0;
/**
* @brief Create channel post. Blocking API.
* @jsonapi{development}
* @param[inout] post
* @return false on error, true otherwise
*/
virtual bool createPost(RsGxsChannelPost& post) = 0;
/**
* @brief createVote
* @jsonapi{development}
* @param[inout] vote
* @return false on error, true otherwise
*/
virtual bool createVote(RsGxsVote& vote) = 0;
/**
* @brief Edit channel details.
* @jsonapi{development}
* @param[in] channel Channel data (name, description...) with modifications
* @return false on error, true otherwise
*/
virtual bool editChannel(RsGxsChannelGroup& channel) = 0;
/**
* @brief Share extra file
* Can be used to share extra file attached to a channel post
* @jsonapi{development}
* @param[in] path file path
* @return false on error, true otherwise
*/
virtual bool ExtraFileHash(const std::string& path) = 0;
/**
* @brief Remove extra file from shared files
* @jsonapi{development}
* @param[in] hash hash of the file to remove
* @return false on error, true otherwise
*/
virtual bool ExtraFileRemove(const RsFileHash& hash) = 0;
/**
* @brief Get auto-download option value for given channel
* @jsonapi{development}
* @param[in] channelId channel id
* @param[out] enabled storage for the auto-download option value
* @return false if something failed, true otherwhise
*/
virtual bool getChannelAutoDownload(
const RsGxsGroupId& channelId, bool& enabled ) = 0;
/**
* @brief Get download directory for the given channel
* @jsonapi{development}
* @param[in] channelId id of the channel
* @param[out] directory reference to string where to store the path
* @return false on error, true otherwise
*/
virtual bool getChannelDownloadDirectory( const RsGxsGroupId& channelId,
std::string& directory ) = 0;
/** /**
* @brief Get channels summaries list. Blocking API. * @brief Get channels summaries list. Blocking API.
* @jsonapi{development} * @jsonapi{development}
@ -125,76 +197,61 @@ public:
std::vector<RsGxsChannelGroup>& channelsInfo ) = 0; std::vector<RsGxsChannelGroup>& channelsInfo ) = 0;
/** /**
* @brief Get content of specified channels. Blocking API * @brief Get channel contents
* @jsonapi{development} * @jsonapi{development}
* @param[in] chanIds id of the channels of which the content is requested * @param[in] channelId id of the channel of which the content is requested
* @param[out] posts storage for the posts * @param[in] contentsIds ids of requested contents
* @param[out] posts storage for posts
* @param[out] comments storage for the comments * @param[out] comments storage for the comments
* @return false if something failed, true otherwhise * @return false if something failed, true otherwhise
*/ */
virtual bool getChannelsContent( virtual bool getChannelContent( const RsGxsGroupId& channelId,
const std::list<RsGxsGroupId>& chanIds, const std::set<RsGxsMessageId>& contentsIds,
std::vector<RsGxsChannelPost>& posts, std::vector<RsGxsChannelPost>& posts,
std::vector<RsGxsComment>& comments ) = 0; std::vector<RsGxsComment>& comments ) = 0;
/** /**
* @brief Create channel. Blocking API. * @brief Get channel content summaries
* @jsonapi{development} * @jsonapi{development}
* @param[inout] channel Channel data (name, description...) * @param[in] channelId id of the channel of which the content is requested
* @param[out] summaries storage for summaries
* @return false if something failed, true otherwhise
*/
virtual bool getContentSummaries( const RsGxsGroupId& channelId,
std::vector<RsMsgMetaData>& summaries ) = 0;
/**
* @brief Toggle post read status. Blocking API.
* @jsonapi{development}
* @param[in] postId post identifier
* @param[in] read true to mark as read, false to mark as unread
* @return false on error, true otherwise * @return false on error, true otherwise
*/ */
virtual bool createChannel(RsGxsChannelGroup& channel) = 0; virtual bool markRead(const RsGxsGrpMsgIdPair& postId, bool read) = 0;
/** /**
* @brief Create channel post. Blocking API. * @brief Enable or disable auto-download for given channel. Blocking API
* @jsonapi{development} * @jsonapi{development}
* @param[inout] post * @param[in] channelId channel id
* @return false on error, true otherwise
*/
virtual bool createPost(RsGxsChannelPost& post) = 0;
/* Specific Service Data
* TODO: change the orrible const uint32_t &token to uint32_t token
* TODO: create a new typedef for token so code is easier to read
*/
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsChannelGroup> &groups) = 0;
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts, std::vector<RsGxsComment> &cmts) = 0;
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts) = 0;
/**
* @brief toggle message read status
* @jsonapi{development}
* @param[out] token GXS token queue token
* @param[in] msgId
* @param[in] read
*/
virtual void setMessageReadStatus(
uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
/**
* @brief Enable or disable auto-download for given channel
* @jsonapi{development}
* @param[in] groupId channel id
* @param[in] enable true to enable, false to disable * @param[in] enable true to enable, false to disable
* @return false if something failed, true otherwhise * @return false if something failed, true otherwhise
*/ */
virtual bool setChannelAutoDownload( virtual bool setChannelAutoDownload(
const RsGxsGroupId &groupId, bool enable) = 0; const RsGxsGroupId& channelId, bool enable ) = 0;
/** /**
* @brief Get auto-download option value for given channel * @brief Share channel publishing key
* This can be used to authorize other peers to post on the channel
* @jsonapi{development} * @jsonapi{development}
* @param[in] groupId channel id * @param[in] channelId id of the channel
* @param[in] enabled storage for the auto-download option value * @param[in] peers peers to share the key with
* @return false if something failed, true otherwhise * @return false on error, true otherwise
*/ */
virtual bool getChannelAutoDownload( virtual bool shareChannelKeys(
const RsGxsGroupId &groupId, bool& enabled) = 0; const RsGxsGroupId& channelId, const std::set<RsPeerId>& peers ) = 0;
/** /**
* @brief Set download directory for the given channel * @brief Set download directory for the given channel. Blocking API.
* @jsonapi{development} * @jsonapi{development}
* @param[in] channelId id of the channel * @param[in] channelId id of the channel
* @param[in] directory path * @param[in] directory path
@ -204,90 +261,14 @@ public:
const RsGxsGroupId& channelId, const std::string& directory) = 0; const RsGxsGroupId& channelId, const std::string& directory) = 0;
/** /**
* @brief Get download directory for the given channel * @brief Subscrbe to a channel. Blocking API
* @jsonapi{development} * @jsonapi{development}
* @param[in] channelId id of the channel * @param[in] channelId Channel id
* @param[out] directory reference to string where to store the path * @param[in] subscribe true to subscribe, false to unsubscribe
* @return false on error, true otherwise * @return false on error, true otherwise
*/ */
virtual bool getChannelDownloadDirectory( const RsGxsGroupId& channelId, virtual bool subscribeToChannel( const RsGxsGroupId& channelId,
std::string& directory ) = 0; bool subscribe ) = 0;
/**
* @brief Share channel publishing key
* This can be used to authorize other peers to post on the channel
* @jsonapi{development}
* @param[in] groupId Channel id
* @param[in] peers peers to which share the key
* @return false on error, true otherwise
*/
virtual bool groupShareKeys(
const RsGxsGroupId& groupId, const std::set<RsPeerId>& peers ) = 0;
/**
* @brief Request subscription to a group.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @jsonapi{development}
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] groupId Channel id
* @param[in] subscribe
* @return false on error, true otherwise
*/
virtual bool subscribeToGroup( uint32_t& token, const RsGxsGroupId &groupId,
bool subscribe ) = 0;
/**
* @brief Request channel creation.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] group Channel data (name, description...)
* @return false on error, true otherwise
*/
virtual bool createGroup(uint32_t& token, RsGxsChannelGroup& group) = 0;
/**
* @brief Request post creation.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] post
* @return false on error, true otherwise
*/
virtual bool createPost(uint32_t& token, RsGxsChannelPost& post) = 0;
/**
* @brief Request channel change.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @jsonapi{development}
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] group Channel data (name, description...) with modifications
* @return false on error, true otherwise
*/
virtual bool updateGroup(uint32_t& token, RsGxsChannelGroup& group) = 0;
/**
* @brief Share extra file
* Can be used to share extra file attached to a channel post
* @jsonapi{development}
* @param[in] path file path
* @return false on error, true otherwise
*/
virtual bool ExtraFileHash(const std::string& path) = 0;
/**
* @brief Remove extra file from shared files
* @jsonapi{development}
* @param[in] hash hash of the file to remove
* @return false on error, true otherwise
*/
virtual bool ExtraFileRemove(const RsFileHash& hash) = 0;
/** /**
* @brief Request remote channels search * @brief Request remote channels search
@ -303,15 +284,136 @@ public:
const std::function<void (const RsGxsGroupSummary& result)>& multiCallback, const std::function<void (const RsGxsGroupSummary& result)>& multiCallback,
rstime_t maxWait = 300 ) = 0; rstime_t maxWait = 300 ) = 0;
/**
* @brief Request remote channel
* @jsonapi{development}
* @param[in] channelId id of the channel to request to distants peers
* @param multiCallback function that will be called each time a result is
* received
* @param[in] maxWait maximum wait time in seconds for search results
* @return false on error, true otherwise
*/
virtual bool turtleChannelRequest(
const RsGxsGroupId& channelId,
const std::function<void (const RsGxsChannelGroup& result)>& multiCallback,
rstime_t maxWait = 300 ) = 0;
/**
* @brief Search local channels
* @jsonapi{development}
* @param[in] matchString string to look for in the search
* @param multiCallback function that will be called for each result
* @param[in] maxWait maximum wait time in seconds for search results
* @return false on error, true otherwise
*/
virtual bool localSearchRequest(
const std::string& matchString,
const std::function<void (const RsGxsGroupSummary& result)>& multiCallback,
rstime_t maxWait = 30 ) = 0;
/* Following functions are deprecated as they expose internal functioning
* semantic, instead of a safe to use API */
RS_DEPRECATED_FOR(getChannelsInfo)
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsChannelGroup> &groups) = 0;
RS_DEPRECATED_FOR(getChannelsContent)
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts, std::vector<RsGxsComment> &cmts) = 0;
RS_DEPRECATED_FOR(getChannelsContent)
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts) = 0;
/**
* @brief toggle message read status
* @deprecated
* @param[out] token GXS token queue token
* @param[in] msgId
* @param[in] read
*/
RS_DEPRECATED_FOR(markRead)
virtual void setMessageReadStatus(
uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
/**
* @brief Share channel publishing key
* This can be used to authorize other peers to post on the channel
* @deprecated
* @param[in] groupId Channel id
* @param[in] peers peers to which share the key
* @return false on error, true otherwise
*/
RS_DEPRECATED_FOR(shareChannelKeys)
virtual bool groupShareKeys(
const RsGxsGroupId& groupId, const std::set<RsPeerId>& peers ) = 0;
/**
* @brief Request subscription to a group.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @deprecated
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] groupId Channel id
* @param[in] subscribe
* @return false on error, true otherwise
*/
RS_DEPRECATED_FOR(subscribeToChannel)
virtual bool subscribeToGroup( uint32_t& token, const RsGxsGroupId &groupId,
bool subscribe ) = 0;
/**
* @brief Request channel creation.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @deprecated
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] group Channel data (name, description...)
* @return false on error, true otherwise
*/
RS_DEPRECATED_FOR(createChannel)
virtual bool createGroup(uint32_t& token, RsGxsChannelGroup& group) = 0;
/**
* @brief Request post creation.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @deprecated
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] post
* @return false on error, true otherwise
*/
RS_DEPRECATED
virtual bool createPost(uint32_t& token, RsGxsChannelPost& post) = 0;
/**
* @brief Request channel change.
* The action is performed asyncronously, so it could fail in a subsequent
* phase even after returning true.
* @deprecated
* @param[out] token Storage for RsTokenService token to track request
* status.
* @param[in] group Channel data (name, description...) with modifications
* @return false on error, true otherwise
*/
RS_DEPRECATED_FOR(editChannel)
virtual bool updateGroup(uint32_t& token, RsGxsChannelGroup& group) = 0;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
/// Distant synchronisation methods /// /// Distant synchronisation methods ///
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
/// ///
RS_DEPRECATED_FOR(turtleChannelRequest)
virtual TurtleRequestId turtleGroupRequest(const RsGxsGroupId& group_id)=0; virtual TurtleRequestId turtleGroupRequest(const RsGxsGroupId& group_id)=0;
RS_DEPRECATED
virtual TurtleRequestId turtleSearchRequest(const std::string& match_string)=0; virtual TurtleRequestId turtleSearchRequest(const std::string& match_string)=0;
RS_DEPRECATED_FOR(turtleSearchRequest)
virtual bool retrieveDistantSearchResults(TurtleRequestId req, std::map<RsGxsGroupId, RsGxsGroupSummary> &results) =0; virtual bool retrieveDistantSearchResults(TurtleRequestId req, std::map<RsGxsGroupId, RsGxsGroupSummary> &results) =0;
RS_DEPRECATED
virtual bool clearDistantSearchResults(TurtleRequestId req)=0; virtual bool clearDistantSearchResults(TurtleRequestId req)=0;
RS_DEPRECATED_FOR(turtleChannelRequest)
virtual bool retrieveDistantGroup(const RsGxsGroupId& group_id,RsGxsChannelGroup& distant_group)=0; virtual bool retrieveDistantGroup(const RsGxsGroupId& group_id,RsGxsChannelGroup& distant_group)=0;
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
}; };

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2012-2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2012-2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,8 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2012-2012 by Robert Fernie <retroshare@lunamutt.com> * * Copyright (C) 2012 by Robert Fernie <retroshare@lunamutt.com> *
* Copyright (C) 2018 Gioacchino Mazzurco <gio@eigenlab.org> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *
@ -19,88 +20,195 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * * along with this program. If not, see <https://www.gnu.org/licenses/>. *
* * * *
*******************************************************************************/ *******************************************************************************/
#ifndef RETROSHARE_GXS_FORUM_GUI_INTERFACE_H #pragma once
#define RETROSHARE_GXS_FORUM_GUI_INTERFACE_H
#include <inttypes.h> #include <cstdint>
#include <string> #include <string>
#include <list> #include <list>
#include "retroshare/rstokenservice.h" #include "retroshare/rstokenservice.h"
#include "retroshare/rsgxsifacehelper.h" #include "retroshare/rsgxsifacehelper.h"
#include "serialiser/rstlvidset.h" #include "serialiser/rstlvidset.h"
#include "serialiser/rsserializable.h"
// Forum Service message flags, to be used in RsMsgMetaData::mMsgFlags
// Gxs imposes to use the first two bytes (lower bytes) of mMsgFlags for private forum flags, the upper bytes being used for internal GXS stuff.
static const uint32_t RS_GXS_FORUM_MSG_FLAGS_MASK = 0x0000000f ;
static const uint32_t RS_GXS_FORUM_MSG_FLAGS_MODERATED = 0x00000001 ;
#define IS_FORUM_MSG_MODERATION(flags) (flags & RS_GXS_FORUM_MSG_FLAGS_MODERATED)
/* The Main Interface Class - for information about your Peers */ /* The Main Interface Class - for information about your Peers */
class RsGxsForums; class RsGxsForums;
extern RsGxsForums *rsGxsForums;
class RsGxsForumGroup /**
* Pointer to global instance of RsGxsChannels service implementation
* @jsonapi{development}
*/
extern RsGxsForums* rsGxsForums;
/** Forum Service message flags, to be used in RsMsgMetaData::mMsgFlags
* Gxs imposes to use the first two bytes (lower bytes) of mMsgFlags for
* private forum flags, the upper bytes being used for internal GXS stuff.
*/
static const uint32_t RS_GXS_FORUM_MSG_FLAGS_MASK = 0x0000000f;
static const uint32_t RS_GXS_FORUM_MSG_FLAGS_MODERATED = 0x00000001;
#define IS_FORUM_MSG_MODERATION(flags) (flags & RS_GXS_FORUM_MSG_FLAGS_MODERATED)
struct RsGxsForumGroup : RsSerializable
{ {
public: virtual ~RsGxsForumGroup() {}
RsGroupMetaData mMeta; RsGroupMetaData mMeta;
std::string mDescription; std::string mDescription;
// What's below is optional, and handled by the serialiser /* What's below is optional, and handled by the serialiser
* TODO: run away from TLV old serializables as those types are opaque to
* JSON API! */
RsTlvGxsIdSet mAdminList;
RsTlvGxsMsgIdSet mPinnedPosts;
RsTlvGxsIdSet mAdminList; /// @see RsSerializable
RsTlvGxsMsgIdSet mPinnedPosts; virtual void serial_process( RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx )
{
RS_SERIAL_PROCESS(mMeta);
RS_SERIAL_PROCESS(mDescription);
RS_SERIAL_PROCESS(mAdminList);
RS_SERIAL_PROCESS(mPinnedPosts);
}
}; };
class RsGxsForumMsg struct RsGxsForumMsg : RsSerializable
{ {
public: virtual ~RsGxsForumMsg() {}
RsMsgMetaData mMeta; RsMsgMetaData mMeta;
std::string mMsg; std::string mMsg;
/// @see RsSerializable
virtual void serial_process( RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx )
{
RS_SERIAL_PROCESS(mMeta);
RS_SERIAL_PROCESS(mMsg);
}
}; };
//typedef std::map<RsGxsGroupId, std::vector<RsGxsForumMsg> > GxsForumMsgResult;
std::ostream &operator<<(std::ostream &out, const RsGxsForumGroup &group);
std::ostream &operator<<(std::ostream &out, const RsGxsForumMsg &msg);
class RsGxsForums: public RsGxsIfaceHelper class RsGxsForums: public RsGxsIfaceHelper
{ {
public: public:
explicit RsGxsForums(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {} explicit RsGxsForums(RsGxsIface& gxs) : RsGxsIfaceHelper(gxs) {}
virtual ~RsGxsForums() {} virtual ~RsGxsForums() {}
/**
* @brief Create forum. Blocking API.
* @jsonapi{development}
* @param[inout] forum Forum data (name, description...)
* @return false on error, true otherwise
*/
virtual bool createForum(RsGxsForumGroup& forum) = 0;
/**
* @brief Create forum message. Blocking API.
* @jsonapi{development}
* @param[inout] message
* @return false on error, true otherwise
*/
virtual bool createMessage(RsGxsForumMsg& message) = 0;
/**
* @brief Edit forum details.
* @jsonapi{development}
* @param[in] forum Forum data (name, description...) with modifications
* @return false on error, true otherwise
*/
virtual bool editForum(RsGxsForumGroup& forum) = 0;
/**
* @brief Get forums summaries list. Blocking API.
* @jsonapi{development}
* @param[out] forums list where to store the forums summaries
* @return false if something failed, true otherwhise
*/
virtual bool getForumsSummaries(std::list<RsGroupMetaData>& forums) = 0;
/**
* @brief Get forums information (description, thumbnail...).
* Blocking API.
* @jsonapi{development}
* @param[in] forumIds ids of the forums of which to get the informations
* @param[out] forumsInfo storage for the forums informations
* @return false if something failed, true otherwhise
*/
virtual bool getForumsInfo(
const std::list<RsGxsGroupId>& forumIds,
std::vector<RsGxsForumGroup>& forumsInfo ) = 0;
/**
* @brief Get content of specified forums. Blocking API
* @jsonapi{development}
* @param[in] forumIds id of the forum of which the content is requested
* @param[out] messages storage for the forum messages
* @return false if something failed, true otherwhise
*/
virtual bool getForumsContent(
const std::list<RsGxsGroupId>& forumIds,
std::vector<RsGxsForumMsg>& messages ) = 0;
/**
* @brief Get message metadatas for some messages of a specific forum. Blocking API
* @jsonapi{development}
* @param[in] forumIds id of the forum of which the content is requested
* @param[out] msg_metas storage for the forum messages meta data
* @return false if something failed, true otherwhise
*/
virtual bool getForumMsgMetaData( const RsGxsGroupId& forumId,
std::vector<RsMsgMetaData>& msg_metas) =0;
/**
* @brief Get specific list of messages from a single forums. Blocking API
* @jsonapi{development}
* @param[in] forumId id of the forum of which the content is requested
* @param[in] msgs_to_request list of message ids to request
* @param[out] msgs storage for the forum messages
* @return false if something failed, true otherwhise
*/
virtual bool getForumsContent(
const RsGxsGroupId& forumId,
std::set<RsGxsMessageId>& msgs_to_request,
std::vector<RsGxsForumMsg>& msgs) =0;
/**
* @brief Toggle message read status. Blocking API.
* @jsonapi{development}
* @param[in] messageId post identifier
* @param[in] read true to mark as read, false to mark as unread
* @return false on error, true otherwise
*/
virtual bool markRead(const RsGxsGrpMsgIdPair& messageId, bool read) = 0;
/**
* @brief Subscrbe to a forum. Blocking API
* @jsonapi{development}
* @param[in] forumId Forum id
* @param[in] subscribe true to subscribe, false to unsubscribe
* @return false on error, true otherwise
*/
virtual bool subscribeToForum( const RsGxsGroupId& forumId,
bool subscribe ) = 0;
/* Specific Service Data */ /* Specific Service Data */
RS_DEPRECATED_FOR("getForumsSummaries, getForumsInfo")
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) = 0; virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) = 0;
RS_DEPRECATED_FOR(getForumsContent)
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0; virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
//Not currently used RS_DEPRECATED_FOR(markRead)
//virtual bool getRelatedMessages(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
//////////////////////////////////////////////////////////////////////////////
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0; virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
RS_DEPRECATED_FOR(createForum)
//virtual bool setMessageStatus(const std::string &msgId, const uint32_t status, const uint32_t statusMask);
//virtual bool setGroupSubscribeFlags(const std::string &groupId, uint32_t subscribeFlags, uint32_t subscribeMask);
//virtual bool groupRestoreKeys(const std::string &groupId);
//virtual bool groupShareKeys(const std::string &groupId, std::list<std::string>& peers);
virtual bool createGroup(uint32_t &token, RsGxsForumGroup &group) = 0; virtual bool createGroup(uint32_t &token, RsGxsForumGroup &group) = 0;
RS_DEPRECATED_FOR(createMessage)
virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg) = 0; virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg) = 0;
/*! RS_DEPRECATED_FOR(editForum)
* To update forum group with new information
* @param token the token used to check completion status of update
* @param group group to be updated, groupId element must be set or will be rejected
* @return false groupId not set, true if set and accepted (still check token for completion)
*/
virtual bool updateGroup(uint32_t &token, RsGxsForumGroup &group) = 0; virtual bool updateGroup(uint32_t &token, RsGxsForumGroup &group) = 0;
}; };
#endif

View File

@ -61,6 +61,8 @@ struct RsGroupMetaData : RsSerializable
mCircleType(0x0001), mAuthenFlags(0), mSubscribeFlags(0), mPop(0), mCircleType(0x0001), mAuthenFlags(0), mSubscribeFlags(0), mPop(0),
mVisibleMsgCount(0), mLastPost(0), mGroupStatus(0) {} mVisibleMsgCount(0), mLastPost(0), mGroupStatus(0) {}
virtual ~RsGroupMetaData() {}
void operator =(const RsGxsGrpMetaData& rGxsMeta); void operator =(const RsGxsGrpMetaData& rGxsMeta);
RsGxsGroupId mGroupId; RsGxsGroupId mGroupId;
@ -124,9 +126,9 @@ struct RsMsgMetaData : RsSerializable
{ {
RsMsgMetaData() : mPublishTs(0), mMsgFlags(0), mMsgStatus(0), mChildTs(0) {} RsMsgMetaData() : mPublishTs(0), mMsgFlags(0), mMsgStatus(0), mChildTs(0) {}
virtual ~RsMsgMetaData() {}
void operator =(const RsGxsMsgMetaData& rGxsMeta); void operator =(const RsGxsMsgMetaData& rGxsMeta);
RsGxsGroupId mGroupId; RsGxsGroupId mGroupId;
RsGxsMessageId mMsgId; RsGxsMessageId mMsgId;

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright (C) 2015 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2015 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -288,6 +288,14 @@ struct RsLoginHelper
RsInit::LoadCertificateStatus attemptLogin( RsInit::LoadCertificateStatus attemptLogin(
const RsPeerId& account, const std::string& password ); const RsPeerId& account, const std::string& password );
/**
* @brief Feed extra entropy to the crypto libraries
* @jsonapi{development,unauthenticated}
* @param[in] bytes number to feed to the entropy pool
* @return false if error occurred, true otherwise
*/
static bool collectEntropy(uint32_t bytes);
struct Location : RsSerializable struct Location : RsSerializable
{ {
RsPeerId mLocationId; RsPeerId mLocationId;

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2012-2018 by Retroshare Team <retroshare.team@gmail.com> * * Copyright 2012-2018 by Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2015 by RetroShare Team <retroshare.team@gmail.com> * * Copyright 2015 by RetroShare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2015 by Robert Fernie <retroshare.team@gmail.com> * * Copyright 2015 by Robert Fernie <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -1934,6 +1934,9 @@ RsInit::LoadCertificateStatus RsLoginHelper::attemptLogin(
return RsInit::ERR_UNKOWN; return RsInit::ERR_UNKOWN;
} }
/*static*/ bool RsLoginHelper::collectEntropy(uint32_t bytes)
{ return RsInit::collectEntropy(bytes); }
void RsLoginHelper::getLocations(std::vector<RsLoginHelper::Location>& store) void RsLoginHelper::getLocations(std::vector<RsLoginHelper::Location>& store)
{ {
std::list<RsPeerId> locIds; std::list<RsPeerId> locIds;

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2018 retroshare team <retroshare.team@gmail.com> * * Copyright 2018 retroshare team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2004-2006 by Robert Fernie <retroshare.team@gmail.com> * * Copyright 2004-2006 by Robert Fernie <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -0,0 +1,31 @@
/*******************************************************************************
* 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/>. *
* *
*******************************************************************************/
#include "serialiser/rsserializable.h"
#include <iostream>
std::ostream& operator<<(std::ostream& out, const RsSerializable& serializable)
{
RsGenericSerializer::SerializeContext ctx;
const_cast<RsSerializable&>(serializable) // safe with TO_JSON
.serial_process(RsGenericSerializer::TO_JSON, ctx);
return out << ctx.mJson;
}

View File

@ -20,8 +20,11 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#pragma once #pragma once
#include "serialiser/rsserializer.h" #include "serialiser/rsserializer.h"
#include <iosfwd>
/** @brief Minimal ancestor for all serializable structs in RetroShare. /** @brief Minimal ancestor for all serializable structs in RetroShare.
* If you want your struct to be easly serializable you should inherit from this * If you want your struct to be easly serializable you should inherit from this
@ -49,3 +52,5 @@ struct RsSerializable
#define RS_SERIAL_PROCESS(I) do { \ #define RS_SERIAL_PROCESS(I) do { \
RsTypeSerializer::serial_process(j, ctx, I, #I ); \ RsTypeSerializer::serial_process(j, ctx, I, #I ); \
} while(0) } while(0)
std::ostream &operator<<(std::ostream& out, const RsSerializable& serializable);

View File

@ -28,13 +28,15 @@
#include "serialiser/rstlvbase.h" #include "serialiser/rstlvbase.h"
#include "serialiser/rstlvitem.h" #include "serialiser/rstlvitem.h"
#include "util/rsdeprecate.h"
#include <retroshare/rstypes.h> #include <retroshare/rstypes.h>
#include <retroshare/rsgxsifacetypes.h> #include <retroshare/rsgxsifacetypes.h>
#include <list> #include <list>
template<class ID_CLASS,uint32_t TLV_TYPE> class t_RsTlvIdSet: public RsTlvItem /// @deprecated use plain std::set<> instead
template<class ID_CLASS,uint32_t TLV_TYPE> class RS_DEPRECATED_FOR(std::set<>) t_RsTlvIdSet
: public RsTlvItem
{ {
public: public:
t_RsTlvIdSet() {} t_RsTlvIdSet() {}
@ -122,7 +124,7 @@ typedef t_RsTlvIdSet<RsGxsMessageId,TLV_TYPE_GXSMSGIDSET> RsTlvGxsMsgIdSet
typedef t_RsTlvIdSet<RsGxsCircleId, TLV_TYPE_GXSCIRCLEIDSET> RsTlvGxsCircleIdSet ; typedef t_RsTlvIdSet<RsGxsCircleId, TLV_TYPE_GXSCIRCLEIDSET> RsTlvGxsCircleIdSet ;
typedef t_RsTlvIdSet<RsNodeGroupId, TLV_TYPE_NODEGROUPIDSET> RsTlvNodeGroupIdSet ; typedef t_RsTlvIdSet<RsNodeGroupId, TLV_TYPE_NODEGROUPIDSET> RsTlvNodeGroupIdSet ;
class RsTlvServiceIdSet: public RsTlvItem class RS_DEPRECATED RsTlvServiceIdSet: public RsTlvItem
{ {
public: public:
RsTlvServiceIdSet() { return; } RsTlvServiceIdSet() { return; }

View File

@ -26,15 +26,18 @@
* *
******************************************************************/ ******************************************************************/
#include "util/rsdeprecate.h"
#include <iosfwd> #include <iosfwd>
#include <string> #include <string>
#include <inttypes.h> #include <inttypes.h>
//! A base class for all tlv items /*! A base class for all tlv items
/*! This class is provided to allow the serialisation and deserialization of compund * This class is provided to allow the serialisation and deserialization of
tlv items * compund tlv items
*/ * @deprecated TLV serialization system is deprecated!
class RsTlvItem */
class RS_DEPRECATED_FOR(RsSerializable) RsTlvItem
{ {
public: public:
RsTlvItem() { return; } RsTlvItem() { return; }
@ -51,8 +54,7 @@ std::ostream &printEnd(std::ostream &out, std::string clsName, uint16_t indent)
std::ostream &printIndent(std::ostream &out, uint16_t indent); std::ostream &printIndent(std::ostream &out, uint16_t indent);
class RS_DEPRECATED_FOR(RsSerializable) RsTlvUnit: public RsTlvItem
class RsTlvUnit: public RsTlvItem
{ {
public: public:
RsTlvUnit(uint16_t tlv_type); RsTlvUnit(uint16_t tlv_type);

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,7 @@ public:
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsChannelGroup> &groups); virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsChannelGroup> &groups);
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts, std::vector<RsGxsComment> &cmts); virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts, std::vector<RsGxsComment> &cmts);
virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts) { std::vector<RsGxsComment> cmts; return getPostData( token, posts, cmts);} virtual bool getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &posts);
//Not currently used //Not currently used
//virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsGxsChannelPost> &posts); //virtual bool getRelatedPosts(const uint32_t &token, std::vector<RsGxsChannelPost> &posts);
@ -112,6 +112,17 @@ virtual bool getChannelDownloadDirectory(const RsGxsGroupId &groupId, std::strin
const std::function<void (const RsGxsGroupSummary&)>& multiCallback, const std::function<void (const RsGxsGroupSummary&)>& multiCallback,
rstime_t maxWait = 300 ); rstime_t maxWait = 300 );
/// @see RsGxsChannels::turtleChannelRequest
virtual bool turtleChannelRequest(
const RsGxsGroupId& channelId,
const std::function<void (const RsGxsChannelGroup& result)>& multiCallback,
rstime_t maxWait = 300 );
/// @see RsGxsChannels::localSearchRequest
virtual bool localSearchRequest(const std::string& matchString,
const std::function<void (const RsGxsGroupSummary& result)>& multiCallback,
rstime_t maxWait = 30 ) override;
/** /**
* Receive results from turtle search @see RsGenExchange @see RsNxsObserver * Receive results from turtle search @see RsGenExchange @see RsNxsObserver
* @see RsGxsNetService::receiveTurtleSearchResults * @see RsGxsNetService::receiveTurtleSearchResults
@ -175,17 +186,40 @@ virtual bool ExtraFileRemove(const RsFileHash &hash);
std::vector<RsGxsChannelGroup>& channelsInfo ); std::vector<RsGxsChannelGroup>& channelsInfo );
/// Implementation of @see RsGxsChannels::getChannelContent /// Implementation of @see RsGxsChannels::getChannelContent
virtual bool getChannelsContent( virtual bool getChannelContent( const RsGxsGroupId& channelId,
const std::list<RsGxsGroupId>& chanIds, const std::set<RsGxsMessageId>& contentsIds,
std::vector<RsGxsChannelPost>& posts, std::vector<RsGxsChannelPost>& posts,
std::vector<RsGxsComment>& comments ); std::vector<RsGxsComment>& comments );
/// Implementation of @see RsGxsChannels::getContentSummaries
virtual bool getContentSummaries( const RsGxsGroupId& channelId,
std::vector<RsMsgMetaData>& summaries );
/// Implementation of @see RsGxsChannels::createChannel /// Implementation of @see RsGxsChannels::createChannel
virtual bool createChannel(RsGxsChannelGroup& channel); virtual bool createChannel(RsGxsChannelGroup& channel);
/// Implementation of @see RsGxsChannels::createComment
virtual bool createComment(RsGxsComment& comment);
/// Implementation of @see RsGxsChannels::editChannel
virtual bool editChannel(RsGxsChannelGroup& channel);
/// Implementation of @see RsGxsChannels::createPost /// Implementation of @see RsGxsChannels::createPost
virtual bool createPost(RsGxsChannelPost& post); virtual bool createPost(RsGxsChannelPost& post);
/// Implementation of @see RsGxsChannels::createVote
virtual bool createVote(RsGxsVote& vote);
/// Implementation of @see RsGxsChannels::subscribeToChannel
virtual bool subscribeToChannel( const RsGxsGroupId &groupId,
bool subscribe );
/// Implementation of @see RsGxsChannels::setPostRead
virtual bool markRead(const RsGxsGrpMsgIdPair& msgId, bool read);
virtual bool shareChannelKeys(
const RsGxsGroupId& channelId, const std::set<RsPeerId>& peers );
protected: protected:
// Overloaded from GxsTokenQueue for Request callbacks. // Overloaded from GxsTokenQueue for Request callbacks.
virtual void handleResponse(uint32_t token, uint32_t req_type); virtual void handleResponse(uint32_t token, uint32_t req_type);
@ -201,10 +235,8 @@ static uint32_t channelsAuthenPolicy();
void load_SubscribedGroups(const uint32_t &token); void load_SubscribedGroups(const uint32_t &token);
void request_SpecificUnprocessedPosts(std::list<std::pair<RsGxsGroupId, RsGxsMessageId> > &ids); void request_SpecificUnprocessedPosts(std::list<std::pair<RsGxsGroupId, RsGxsMessageId> > &ids);
void load_SpecificUnprocessedPosts(const uint32_t &token);
void request_GroupUnprocessedPosts(const std::list<RsGxsGroupId> &grouplist); void request_GroupUnprocessedPosts(const std::list<RsGxsGroupId> &grouplist);
void load_GroupUnprocessedPosts(const uint32_t &token); void load_unprocessedPosts(uint32_t token);
void handleUnprocessedPost(const RsGxsChannelPost &msg); void handleUnprocessedPost(const RsGxsChannelPost &msg);
@ -214,11 +246,6 @@ static uint32_t channelsAuthenPolicy();
bool setAutoDownload(const RsGxsGroupId &groupId, bool enabled); bool setAutoDownload(const RsGxsGroupId &groupId, bool enabled);
bool autoDownloadEnabled(const RsGxsGroupId &groupId, bool &enabled); bool autoDownloadEnabled(const RsGxsGroupId &groupId, bool &enabled);
std::map<RsGxsGroupId, RsGroupMetaData> mSubscribedGroups;
// DUMMY DATA, // DUMMY DATA,
virtual bool generateDummyData(); virtual bool generateDummyData();
@ -246,14 +273,21 @@ bool generateGroup(uint32_t &token, std::string groupName);
RsGxsMessageId mMsgId; RsGxsMessageId mMsgId;
}; };
std::map<RsGxsGroupId, RsGroupMetaData> mSubscribedGroups;
RsMutex mSubscribedGroupsMutex;
/** G10h4ck: Is this stuff really used? And for what? BEGIN */
uint32_t mGenToken; uint32_t mGenToken;
bool mGenActive; bool mGenActive;
int mGenCount; int mGenCount;
std::vector<ChannelDummyRef> mGenRefs; std::vector<ChannelDummyRef> mGenRefs;
RsGxsMessageId mGenThreadId; RsGxsMessageId mGenThreadId;
/** G10h4ck: Is this stuff really used? And for what? END */
p3GxsCommentService *mCommentService; p3GxsCommentService* mCommentService;
std::map<RsGxsGroupId,rstime_t> mKnownChannels;
std::map<RsGxsGroupId,rstime_t> mKnownChannels;
RsMutex mKnownChannelsMutex;
/** Store search callbacks with timeout*/ /** Store search callbacks with timeout*/
std::map< std::map<
@ -264,8 +298,17 @@ bool generateGroup(uint32_t &token, std::string groupName);
> mSearchCallbacksMap; > mSearchCallbacksMap;
RsMutex mSearchCallbacksMapMutex; RsMutex mSearchCallbacksMapMutex;
/// Cleanup mSearchCallbacksMap /** Store distant channels requests callbacks with timeout*/
void cleanTimedOutSearches(); std::map<
TurtleRequestId,
std::pair<
std::function<void (const RsGxsChannelGroup&)>,
std::chrono::system_clock::time_point >
> mDistantChannelsCallbacksMap;
RsMutex mDistantChannelsCallbacksMapMutex;
/// Cleanup mSearchCallbacksMap and mDistantChannelsCallbacksMap
void cleanTimedOutCallbacks();
}; };
#endif #endif

View File

@ -297,6 +297,11 @@ bool p3GxsForums::getGroupData(const uint32_t &token, std::vector<RsGxsForumGrou
return ok; return ok;
} }
bool p3GxsForums::getMsgMetaData(const uint32_t &token, GxsMsgMetaMap& msg_metas)
{
return RsGenExchange::getMsgMeta(token, msg_metas);
}
/* Okay - chris is not going to be happy with this... /* Okay - chris is not going to be happy with this...
* but I can't be bothered with crazy data structures * but I can't be bothered with crazy data structures
* at the moment - fix it up later * at the moment - fix it up later
@ -379,6 +384,145 @@ bool p3GxsForums::getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &
/********************************************************************************************/ /********************************************************************************************/
bool p3GxsForums::createForum(RsGxsForumGroup& forum)
{
uint32_t token;
if(!createGroup(token, forum))
{
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating group."
<< std::endl;
return false;
}
if(waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE)
{
std::cerr << __PRETTY_FUNCTION__ << "Error! GXS operation failed."
<< std::endl;
return false;
}
if(!RsGenExchange::getPublishedGroupMeta(token, forum.mMeta))
{
std::cerr << __PRETTY_FUNCTION__ << "Error! Failure getting updated "
<< " group data." << std::endl;
return false;
}
return true;
}
bool p3GxsForums::editForum(RsGxsForumGroup& forum)
{
uint32_t token;
if(!updateGroup(token, forum))
{
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed updating group."
<< std::endl;
return false;
}
if(waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE)
{
std::cerr << __PRETTY_FUNCTION__ << "Error! GXS operation failed."
<< std::endl;
return false;
}
if(!RsGenExchange::getPublishedGroupMeta(token, forum.mMeta))
{
std::cerr << __PRETTY_FUNCTION__ << "Error! Failure getting updated "
<< " group data." << std::endl;
return false;
}
return true;
}
bool p3GxsForums::getForumsSummaries( std::list<RsGroupMetaData>& forums )
{
uint32_t token;
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_GROUP_META;
if( !requestGroupInfo(token, opts)
|| waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false;
return getGroupSummary(token, forums);
}
bool p3GxsForums::getForumsInfo(
const std::list<RsGxsGroupId>& forumIds,
std::vector<RsGxsForumGroup>& forumsInfo )
{
uint32_t token;
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_GROUP_DATA;
if( !requestGroupInfo(token, opts, forumIds)
|| waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false;
return getGroupData(token, forumsInfo);
}
bool p3GxsForums::getForumsContent( const RsGxsGroupId& forumId, std::set<RsGxsMessageId>& msgs_to_request,std::vector<RsGxsForumMsg>& msgs)
{
uint32_t token;
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
GxsMsgReq msgIds;
msgIds[forumId] = msgs_to_request;
if( !requestMsgInfo(token, opts, msgIds) || waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false;
return getMsgData(token, msgs) ;
}
bool p3GxsForums::getForumsContent(
const std::list<RsGxsGroupId>& forumIds,
std::vector<RsGxsForumMsg>& messages )
{
uint32_t token;
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
if( !requestMsgInfo(token, opts, forumIds)
|| waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false;
return getMsgData(token, messages);
}
bool p3GxsForums::getForumMsgMetaData(const RsGxsGroupId& forumId, std::vector<RsMsgMetaData>& msg_metas)
{
uint32_t token;
RsTokReqOptions opts;
opts.mReqType = GXS_REQUEST_TYPE_MSG_META;
GxsMsgMetaMap meta_map;
std::list<RsGxsGroupId> forumIds;
forumIds.push_back(forumId);
if( !requestMsgInfo(token, opts, forumIds) || waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false;
bool res = getMsgMetaData(token, meta_map);
msg_metas = meta_map[forumId];
return res;
}
bool p3GxsForums::markRead(const RsGxsGrpMsgIdPair& msgId, bool read)
{
uint32_t token;
setMessageReadStatus(token, msgId, read);
if(waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false;
return true;
}
bool p3GxsForums::subscribeToForum(
const RsGxsGroupId& groupId, bool subscribe )
{
uint32_t token;
if( !RsGenExchange::subscribeToGroup(token, groupId, subscribe)
|| waitToken(token) != RsTokenService::COMPLETE ) return false;
return true;
}
bool p3GxsForums::createGroup(uint32_t &token, RsGxsForumGroup &group) bool p3GxsForums::createGroup(uint32_t &token, RsGxsForumGroup &group)
{ {
std::cerr << "p3GxsForums::createGroup()" << std::endl; std::cerr << "p3GxsForums::createGroup()" << std::endl;
@ -407,6 +551,17 @@ bool p3GxsForums::updateGroup(uint32_t &token, RsGxsForumGroup &group)
return true; return true;
} }
bool p3GxsForums::createMessage(RsGxsForumMsg& message)
{
uint32_t token;
if( !createMsg(token, message)
|| waitToken(token,std::chrono::milliseconds(5000)) != RsTokenService::COMPLETE ) return false;
if(RsGenExchange::getPublishedMsgMeta(token, message.mMeta)) return true;
return false;
}
bool p3GxsForums::createMsg(uint32_t &token, RsGxsForumMsg &msg) bool p3GxsForums::createMsg(uint32_t &token, RsGxsForumMsg &msg)
{ {
std::cerr << "p3GxsForums::createForumMsg() GroupId: " << msg.mMeta.mGroupId; std::cerr << "p3GxsForums::createForumMsg() GroupId: " << msg.mMeta.mGroupId;

View File

@ -38,55 +38,67 @@
class p3GxsForums: public RsGenExchange, public RsGxsForums, public p3Config, class p3GxsForums: public RsGenExchange, public RsGxsForums, public p3Config,
public RsTickEvent /* only needed for testing - remove after */ public RsTickEvent /* only needed for testing - remove after */
{ {
public: public:
p3GxsForums(
RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs* gixs);
p3GxsForums(RsGeneralDataService* gds, RsNetworkExchangeService* nes, RsGixs* gixs); virtual RsServiceInfo getServiceInfo();
virtual void service_tick();
virtual RsServiceInfo getServiceInfo(); protected:
virtual void notifyChanges(std::vector<RsGxsNotify*>& changes);
virtual void service_tick(); /// Overloaded from RsTickEvent.
virtual void handle_event(uint32_t event_type, const std::string &elabel);
protected:
virtual void notifyChanges(std::vector<RsGxsNotify*>& changes);
// Overloaded from RsTickEvent.
virtual void handle_event(uint32_t event_type, const std::string &elabel);
virtual RsSerialiser* setupSerialiser(); // @see p3Config::setupSerialiser() virtual RsSerialiser* setupSerialiser(); // @see p3Config::setupSerialiser()
virtual bool saveList(bool &cleanup, std::list<RsItem *>&saveList); // @see p3Config::saveList(bool &cleanup, std::list<RsItem *>&) virtual bool saveList(bool &cleanup, std::list<RsItem *>&saveList); // @see p3Config::saveList(bool &cleanup, std::list<RsItem *>&)
virtual bool loadList(std::list<RsItem *>& loadList); // @see p3Config::loadList(std::list<RsItem *>&) virtual bool loadList(std::list<RsItem *>& loadList); // @see p3Config::loadList(std::list<RsItem *>&)
public: public:
/// @see RsGxsForums::createForum
virtual bool createForum(RsGxsForumGroup& forum);
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups); /// @see RsGxsForums::createMessage
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs); virtual bool createMessage(RsGxsForumMsg& message);
//Not currently used
//virtual bool getRelatedMessages(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs);
////////////////////////////////////////////////////////////////////////////// /// @see RsGxsForums::editForum
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read); virtual bool editForum(RsGxsForumGroup& forum);
//virtual bool setMessageStatus(const std::string &msgId, const uint32_t status, const uint32_t statusMask); /// @see RsGxsForums::getForumsSummaries
//virtual bool setGroupSubscribeFlags(const std::string &groupId, uint32_t subscribeFlags, uint32_t subscribeMask); virtual bool getForumsSummaries(std::list<RsGroupMetaData>& forums);
//virtual bool groupRestoreKeys(const std::string &groupId); /// @see RsGxsForums::getForumsInfo
//virtual bool groupShareKeys(const std::string &groupId, std::list<std::string>& peers); virtual bool getForumsInfo(
const std::list<RsGxsGroupId>& forumIds,
std::vector<RsGxsForumGroup>& forumsInfo );
virtual bool createGroup(uint32_t &token, RsGxsForumGroup &group); /// @see RsGxsForums::getForumsContent
virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg); virtual bool getForumsContent(
const std::list<RsGxsGroupId>& forumIds,
std::vector<RsGxsForumMsg>& messages );
/*! /// @see RsGxsForums::getForumMsgMetaData
* To update forum group with new information virtual bool getForumMsgMetaData(const RsGxsGroupId& forumId, std::vector<RsMsgMetaData>& msg_metas) ;
* @param token the token used to check completion status of update
* @param group group to be updated, groupId element must be set or will be rejected
* @return false groupId not set, true if set and accepted (still check token for completion)
*/
virtual bool updateGroup(uint32_t &token, RsGxsForumGroup &group);
/// @see RsGxsForums::getForumsContent
virtual bool getForumsContent( const RsGxsGroupId& forumId, std::set<RsGxsMessageId>& msgs_to_request,std::vector<RsGxsForumMsg>& msgs) ;
private: /// @see RsGxsForums::markRead
virtual bool markRead(const RsGxsGrpMsgIdPair& messageId, bool read);
/// @see RsGxsForums::subscribeToForum
virtual bool subscribeToForum( const RsGxsGroupId& forumId,
bool subscribe );
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups);
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs);
virtual bool getMsgMetaData(const uint32_t &token, GxsMsgMetaMap& msg_metas);
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read);
virtual bool createGroup(uint32_t &token, RsGxsForumGroup &group);
virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg);
virtual bool updateGroup(uint32_t &token, RsGxsForumGroup &group);
private:
static uint32_t forumsAuthenPolicy(); static uint32_t forumsAuthenPolicy();

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2012-2012 by Robert Fernie <retroshare.team@gmail.com> * * Copyright 2012-2012 by Robert Fernie <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -1220,7 +1220,7 @@ void p3turtle::handleSearchResult(RsTurtleSearchResultItem *item)
} }
//RsServer::notify()->notifyTurtleSearchResult(ftsr->request_id,ftsr->result) ; //RsServer::notify()->notifyTurtleSearchResult(ftsr->request_id,ftsr->result) ;
client->receiveSearchResult(ftsr); client->ftReceiveSearchResult(ftsr);
continue ; continue ;
} }

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2007-2018 Retroshare Team <retroshare.team@gmail.com> * * Copyright 2007-2018 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2007-2018 Retroshare Team <retroshare.team@gmail.com> * * Copyright 2007-2018 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2007-2018 Retroshare Team <retroshare.team@gmail.com> * * Copyright 2007-2018 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright 2007-2018 Retroshare Team <retroshare.team@gmail.com> * * Copyright 2007-2018 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright (C) 2017 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2017 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright (C) 2017 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2017 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright (C) 2017 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2017 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright (C) 2017 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2017 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright (C) 2017 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2017 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

View File

@ -3,7 +3,7 @@
* * * *
* libretroshare: retroshare core library * * libretroshare: retroshare core library *
* * * *
* Copyright (C) 2017 Retroshare Team <retroshare.team@gmail.com> * * Copyright (C) 2017 Retroshare Team <retroshare.project@gmail.com> *
* * * *
* This program is free software: you can redistribute it and/or modify * * This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as * * it under the terms of the GNU Lesser General Public License as *

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