WIP improvements to PhotoService:
- switch p3photoservice to use gxcommentservice
- clean out old RsPhotoComment classes
- redesign PhotoDialog to use standard GxsCommentService classes
- remove unneeded old Comment classes from GUI
- fix indenting for PhotoDialog and p3photoservice.h
- fix layout issue in Extra Widgets for GxsGroupDialog
WIP improvements to PhotoService:
- Switch from custom image to use RsGxsImage
- Update classes for new Image class
- fix serialiser for photos
- switch group creation to use GxGroupDialog
- tweak GxsGroupDialog to display extra Widgets
- add AlbumExtra widget
Improve atomic access to restbed service
Protect JSON API restart against bursts
Fix JSON API error condition enum registration
Provide ostream helper for error_condition
Provide optional forced thread cancel for debugging purpose, disabled by
default at compile time define RS_THREAD_FORCE_STOP to enable it
Avoid double fullstop in retroshare-gui json api apply button
JSON API server uses standardized error handling based on
std::error_condition for a few method, this improve debugabbility both
from library size and from API client side
JSON API auth token are now more flexible, now the only proibition is using
colon character ':' in user name
Implemented TO_JSON operation for std::error_condition
Avoid unkown serial job handling code duplication via fatalUnknownSerialJob
Usability improvement in t_RsLogger
Disable compilation of now unused is_alphanumeric
Removed antipattern abstraction RsSingleJobThread
Rename runloop() method to run() in RsThread
Ported few classes ineriting from RsSingleJobThread to RsThread
RsThread use std::atomic instead of self implemented strange binary semaphores
Removed RsTickingThread::shutdown() use RsThread::askForStop() instead
Removed RsTickingThread::fullstop() use RsThread::fullstop() instead
Stop properly JSON API server in retroshare-gui
Centralize errno traslation to literal in util/rserrno.*
A copy of the repository freezed before this deletion to ease old code
viewing is available at
https://github.com/RetroShare/zz_archive_RetroShare_libresapi
Removed some more cruft
Temporarly disabled JSON API generation of RsWebUi methods due to
compilation breakage when rs_webui is disabled, RsWebUi keeps working
but cannot be restarted from JSON API
Link to GXS group is a concept that is useful for almost all GXS based
services, gen exchange now provides method to facilitate the
implementation of group links at service layer.
Move waitToken in token service interface.
ATM it support extracting metadata only from OGG files.
The system has been designed to be easly extensible to more file formats
registering more indexer functions which just need to extract metadata
from a certain type of file and feed it to Xapian.
The system has been integrated into existent file search system to
through generric search requests and results, it keep a good level of
retro-compatibility due to some tricks.
The indexing system is released under AGPLv3 so when libretroshare is compiled
with deep search enabled AGPLv3 must be honored instead of LGPLv3-or-later.
Cleaned up the debian copyright file using non-deprecated license
code-names.
On Android and potencially other mobile platforms, WiFi drivers are configured
by default to discard any packet that is not directed to the unicast mac
address of the interface, this way they could save some battery but breaks
anything that is not unicast, such as broadcast discovery. To solve this
problem On such platforms provide methods to handle low level multicast
listening so we can receive advertisement from same broadcast domain nodes.
In Restbed one is not supposed to call session->yield outside the
threads controlled by Restbed. RetroShare JSON API async call were
calling session->yield from threads controlled by RetroShare all the
times, this caused crashes in some cases, like when the JSON API
socket timed out concurrently with the session->yield call .
To solve this problem session->yield from async
calls are now wrapped insto mService->schedule to ensure they are
executed on the right thread (aka one of the threads controlled by
Restbed).
While solving this issue I realized also that passing RsEvents as const
references around was quite limiting in cases where the event need to
be finally handled in another thread, in that case passing by const
reference the RsEvent needed to be copied by value into the thread
that process it, in this copy by value process the information of
which was the original specific type is lost, and then only the data
and methods from general RsEvents are available, unless the handler
does tricky stuff with type coercion etc. To solve this limitation
pass the events as std::shared_ptr<const RsEvent> seems the safer and
more elegant solution.
JSON API user would bet an unusable base64 blob due to RsTlv opaque JSON
serialization, this way the content of the set is serialized plainly
so it is usable through JSON API, without breaking binary
serialization compatibility.
We must stop using those RsTlv derived items.
Mails sent in the past end never received were lingering in the outgoing
queue forever as displayed by statistics. If a mail is older then
GXS_STORAGE_PERIOD all nodes delete it from the GXS group so it can
never arrive to destination, there is no point in keeping it in the
outgoing queue, instead notify sending timed out and delete the mail.
Sending PGP fingerprint trough broadcast discovery is misleading in
terms of security, as those packets cannot be trusted for PGP
fingerprint verification, removing it reduce packet size and reduce the
risc of wrong usage of untrusted information
Rename from RsDisc to more descriptive RsGossipDiscovery
Keep full retrocompatibility suggesting usage of RsGossipDiscovery
Add capability to send and receive full RetroShare invitation
Emit event when receiving a full invitation
Start using new debug utilities
Use enum class instead of defines and constant where appropriate
Deprecate unsafe costructor, substituted by fromBufferUnsafe which explicitely
marked suggest the caller to pay attention.
Use enum class for id types instead of constants
Make size constants more private
Use internal Id_t alias to avoid huge template lines
Remove and deprecate oguly names in favor of consistent names
This should bit by bit substitute RsNotify which would be very difficult
to support properly in JSON API.
The new system is much simpler to use also from the C++ side of the
moon.
BroadcastDiscovery take advantage of the new system to notify about new
non friend peer discovered, tested successfully also in JSON API.
Creating GXS groups imply a bunch of crypto operations that require lot
of time expecially on embedded device, channel creation was reported
as failed while it was still pending.
Reduce too long lines.
Print API error messages also on std::cerr.
Discover peers on the same broadcast domain/LAN
Implements own node announcement
Implements others announcement listening
Implements API to get notifiend when other nodes get discovered
Implements API to get discovered nodes
Add discovered peer locator to rsPeers if it is already friend
Yet a bunch of things to do to take full advantage of this new
implementation
Workaround miss-behaviour on old Android phones
Cleanup indentation a bit
Consistent param naming
Introduce default parameter values also for output paramethers
'RsGxsChannels::createVote' hides overloaded virtual function
In file included from temp/moc/moc_GxsChannelGroupItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelGroupItem.h:24:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:116:15:
warning: 'RsGxsChannels::createComment' hides overloaded virtual
function [-Woverloaded-virtual]
virtual bool createComment(RsGxsComment& comment) = 0;
^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:172:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createComment'
declared here: different number of parameters (2 vs 1)
virtual bool createComment(uint32_t &token, RsGxsComment
&comment) = 0;
^
In file included from temp/moc/moc_GxsChannelGroupItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelGroupItem.h:24:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:132:15:
warning: 'RsGxsChannels::createVote' hides overloaded virtual function
[-Woverloaded-virtual]
virtual bool createVote(RsGxsVote& vote) = 0;
^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:173:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createVote'
declared here: different number of parameters (2 vs 1)
virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0;
^
In file included from temp/moc/moc_GxsChannelPostItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelPostItem.h:26:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:116:15:
warning: 'RsGxsChannels::createComment' hides overloaded virtual
function [-Woverloaded-virtual]
virtual bool createComment(RsGxsComment& comment) = 0;
^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:172:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createComment'
declared here: different number of parameters (2 vs 1)
virtual bool createComment(uint32_t &token, RsGxsComment
&comment) = 0;
^
In file included from temp/moc/moc_GxsChannelPostItem.cpp:9:
In file included from temp/moc/../../../../../trunk/retroshare-gui/src/
gui/feeds/GxsChannelPostItem.h:26:
../../../trunk/libretroshare/src/retroshare/rsgxschannels.h:132:15:
warning: 'RsGxsChannels::createVote' hides overloaded virtual function
[-Woverloaded-virtual]
virtual bool createVote(RsGxsVote& vote) = 0;
^
../../../trunk/libretroshare/src/retroshare/rsgxscommon.h:173:15: note:
hidden overloaded virtual function 'RsGxsCommentService::createVote'
declared here: different number of parameters (2 vs 1)
virtual bool createVote(uint32_t &token, RsGxsVote &vote) = 0;
^