mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
commit
590f5f6944
@ -1,5 +1,422 @@
|
|||||||
retroshare (ZZZZZZ-1.XXXXXX~YYYYYY) YYYYYY; urgency=low
|
retroshare (ZZZZZZ-1.XXXXXX~YYYYYY) YYYYYY; urgency=low
|
||||||
|
|
||||||
|
fd1e7074c csoler Sun, 16 Dec 2018 14:35:30 +0100 Merge pull request #1432 from RetroShare/v0.6.5
|
||||||
|
9ce573c3f csoler Sun, 16 Dec 2018 14:34:14 +0100 Merge pull request #1415 from csoler/v0.6.5-ForumModel2
|
||||||
|
60112e838 csoler Fri, 14 Dec 2018 22:14:59 +0100 added two missing virtual desctructors in GXS interface structures
|
||||||
|
117c19b10 csoler Fri, 14 Dec 2018 22:09:02 +0100 fixed a few problems in jumping to next unread post
|
||||||
|
348f88b6e csoler Thu, 13 Dec 2018 21:02:32 +0100 partially fixed async navigate action in forums
|
||||||
|
6ceb8c69c csoler Thu, 13 Dec 2018 19:57:03 +0100 Merge pull request #1428 from defnax/master
|
||||||
|
a95a235e0 defnax Wed, 12 Dec 2018 22:37:29 +0100 Update emotes.acs
|
||||||
|
7113eb7bf Gioacc Wed, 12 Dec 2018 21:35:31 +0100 GxsChannels optimizable API
|
||||||
|
39b7bc818 csoler Wed, 12 Dec 2018 21:31:54 +0100 added more debug info to figure out why some posts are not displayed
|
||||||
|
a114856b7 csoler Wed, 12 Dec 2018 11:33:38 +0100 changed code to create msg data map using MsgMeta instead of full Msg and added the handles to request MsgMeta data in forums
|
||||||
|
8f9c9295b csoler Tue, 11 Dec 2018 22:06:45 +0100 added proper timeout of 5 secs to all forum async-ed interactions
|
||||||
|
b38c63564 csoler Mon, 10 Dec 2018 22:51:09 +0100 restored display of forum summary when browsing forums
|
||||||
|
1dda7c5b3 csoler Sun, 9 Dec 2018 23:25:59 +0100 removed mUpdating variable which was used for a safety test that is not relevant anymore and caused problems
|
||||||
|
34f51fff9 csoler Sun, 9 Dec 2018 23:18:50 +0100 made next unread post arrow also work when no post is selected
|
||||||
|
983ac7dda csoler Sun, 9 Dec 2018 21:22:18 +0100 improved icons in forums and removed - button because it is not useful
|
||||||
|
27264cea0 csoler Sun, 9 Dec 2018 17:35:31 +0100 fixed icons and buttons in forums
|
||||||
|
a6ed2b26e csoler Sun, 9 Dec 2018 16:34:43 +0100 fixed author name placement and icon size when loading ID data in forums
|
||||||
|
d7b5c9766 csoler Sun, 9 Dec 2018 13:54:30 +0100 fixed missing filterAcceptsRow() in forum proxy model
|
||||||
|
d5928ca84 csoler Sat, 8 Dec 2018 22:19:39 +0100 fixed message loading bug due to currentIndex() not being ready when insertMessage() is called
|
||||||
|
459c04a23 csoler Sat, 8 Dec 2018 22:01:05 +0100 re-enabled debug output
|
||||||
|
7c248dc03 csoler Sat, 8 Dec 2018 21:43:14 +0100 attempt to fix pb on 32bits systems
|
||||||
|
a0b6962be csoler Fri, 7 Dec 2018 22:09:55 +0100 fixed bug in read/unread with children menu items
|
||||||
|
42aab5596 csoler Fri, 7 Dec 2018 21:45:15 +0100 fixed changing of read status using button in forum model
|
||||||
|
1163d00ae csoler Thu, 6 Dec 2018 23:49:14 +0100 small check to avoid re-loading already loaded msg
|
||||||
|
49ea15449 csoler Thu, 6 Dec 2018 23:18:56 +0100 fixed restoring of current item
|
||||||
|
5b8a64b67 csoler Thu, 6 Dec 2018 23:04:53 +0100 fixed a number of bugs in the update/display of forum model
|
||||||
|
bdf9bd5c5 Gioacc Thu, 6 Dec 2018 20:49:51 +0100 JSON API fix OPTION method handling for authenticated methods
|
||||||
|
db0a22a22 Gioacc Thu, 6 Dec 2018 20:46:44 +0100 JSON API for /rsFiles/FileClearCompleted
|
||||||
|
600a3d8e1 csoler Wed, 5 Dec 2018 20:28:58 +0100 fixed saving/restoring of expanded items in forum model
|
||||||
|
11b4981bd csoler Tue, 4 Dec 2018 23:36:07 +0100 keep current selection when updating a forum. Still need to keep the expand/collapse property
|
||||||
|
6fae40d41 csoler Tue, 4 Dec 2018 23:10:24 +0100 trying new notification system using begin/end remove/insert rows to avoid crash
|
||||||
|
b63544e85 csoler Tue, 4 Dec 2018 22:14:54 +0100 suppressed 2 uninitialized memory read in ForumModel
|
||||||
|
fb962c4b5 csoler Tue, 4 Dec 2018 09:36:06 +0100 attempt to fix crash when threads collide in forum model
|
||||||
|
ec0bb5347 csoler Mon, 3 Dec 2018 21:56:11 +0100 added missing emit of layoutAboutToBeChanged() in forum model
|
||||||
|
442360007 csoler Mon, 3 Dec 2018 21:28:00 +0100 update posts when navigating with arrows
|
||||||
|
55022432e csoler Mon, 3 Dec 2018 17:30:46 +0100 added proper update of threads when new msg is poste or received
|
||||||
|
49dc9bcae csoler Sun, 2 Dec 2018 22:49:16 +0100 increated timeout limit for retrieving forums
|
||||||
|
60e559561 csoler Sun, 2 Dec 2018 22:41:48 +0100 fixed bug in post pinning
|
||||||
|
24896bc59 csoler Sun, 2 Dec 2018 16:49:14 +0100 further cleaning of ForumModel code
|
||||||
|
8736380bf csoler Sun, 2 Dec 2018 16:45:16 +0100 added license, removed debug info
|
||||||
|
73c06006d csoler Sun, 2 Dec 2018 16:39:33 +0100 removed old code
|
||||||
|
91321725e csoler Sun, 2 Dec 2018 16:34:43 +0100 added sorting based on most recent TS from children
|
||||||
|
37f721f30 csoler Sun, 2 Dec 2018 16:07:28 +0100 added reset to avoid crash when switching from flat to tree views
|
||||||
|
1fced4a1c csoler Sun, 2 Dec 2018 12:02:25 +0100 added flat mode to ForumModel
|
||||||
|
917695e83 csoler Sat, 1 Dec 2018 23:14:08 +0100 fixed filtering of messages in new forum Model
|
||||||
|
a51eba1db csoler Sat, 1 Dec 2018 16:09:35 +0100 added filtering mechanism in ForumModel
|
||||||
|
b7b9f335f csoler Fri, 30 Nov 2018 18:01:51 +0100 fixed fonts for unread msgs in Forum Model
|
||||||
|
f56e932fb csoler Fri, 30 Nov 2018 17:24:43 +0100 fixed sorting problem in new model due to missing call to sortRole()
|
||||||
|
dce660357 csoler Thu, 29 Nov 2018 22:15:12 +0100 fixed Travis compilation
|
||||||
|
c07851090 csoler Thu, 29 Nov 2018 18:34:47 +0100 removed line that breaks compilation
|
||||||
|
66ad7b650 csoler Thu, 29 Nov 2018 18:33:25 +0100 added missing virtual destructor in RsGrpMetaData and RsMsgMetaData
|
||||||
|
09ffffe88 csoler Thu, 29 Nov 2018 00:01:35 +0100 removed some more old code from forum thread widget
|
||||||
|
9c840baf2 csoler Wed, 28 Nov 2018 23:50:38 +0100 added missing signal causing crach in new model when changing forums
|
||||||
|
ccdfc3cbf csoler Tue, 27 Nov 2018 22:24:18 +0100 cleaned up removed code in Forum Model
|
||||||
|
ed68d720a csoler Tue, 27 Nov 2018 20:43:09 +0100 fixed post versionning
|
||||||
|
23302ea46 csoler Tue, 27 Nov 2018 19:21:49 +0100 partly resurrected post versions
|
||||||
|
032f1307f G10h4c Tue, 27 Nov 2018 18:55:40 +0100 Merge pull request #1416 from pedro-nonfree/patch-1
|
||||||
|
561db0025 csoler Tue, 27 Nov 2018 15:15:54 +0100 resurrected sorting for pinned posts using a proxy model
|
||||||
|
02c6a92f4 csoler Tue, 27 Nov 2018 10:13:03 +0100 fixed resizing+CPU bug due to inconsistent return in eventFilter()
|
||||||
|
c0e87dbb3 csoler Tue, 27 Nov 2018 09:37:34 +0100 attempt at fixing column resize
|
||||||
|
bac6eb05b csoler Tue, 27 Nov 2018 08:16:59 +0100 Merge pull request #1420 from pedro-nonfree/rename-friend-to-trusted-node-statusbar
|
||||||
|
d3d3148c8 pedrol Tue, 27 Nov 2018 03:18:19 +0100 substitute friend to trusted node in statusbar
|
||||||
|
73e285805 csoler Mon, 26 Nov 2018 23:07:05 +0100 simplified comment in GxsIdDetails and hid columns in new ForumModel
|
||||||
|
b179cb579 csoler Mon, 26 Nov 2018 22:48:47 +0100 fixed next/prev item and next unread selection
|
||||||
|
3a76f2515 csoler Mon, 26 Nov 2018 22:07:10 +0100 resurrected prev/next buttons
|
||||||
|
581e892d9 csoler Mon, 26 Nov 2018 21:18:28 +0100 create an index iterator in ForumModel
|
||||||
|
6bb8e3ffd csoler Sun, 25 Nov 2018 22:07:59 +0100 saving work for next unread msg in forum model
|
||||||
|
65f2d2665 csoler Sun, 25 Nov 2018 21:12:26 +0100 fixed author tooltip in ForumModel
|
||||||
|
114a11af7 csoler Sun, 25 Nov 2018 17:44:56 +0100 fixed bug in read status update in new ForumModel
|
||||||
|
dc913e37c csoler Sun, 25 Nov 2018 17:40:48 +0100 fixed update of threads in new model
|
||||||
|
419bd2157 csoler Sun, 25 Nov 2018 17:11:08 +0100 factored all methods that apply to msg data using pointer to member function trick
|
||||||
|
0b0e58bd3 csoler Sat, 24 Nov 2018 22:25:23 +0100 fixed bug in coloring of read/unread property
|
||||||
|
738401585 csoler Sat, 24 Nov 2018 22:06:34 +0100 fixed update of QTreeView when something changes in Forum model using dataChanged() signal
|
||||||
|
6f83bb520 csoler Sat, 24 Nov 2018 20:50:09 +0100 fixed mark as read/unread and display of read status in forum model
|
||||||
|
9cec56f1e csoler Sat, 24 Nov 2018 17:57:19 +0100 added info for read/unread status and resurrected context menu in new forum model
|
||||||
|
c2686d1a9 csoler Sat, 24 Nov 2018 16:11:40 +0100 fixed display of author in new ForumModel
|
||||||
|
52a5aeb1f csoler Fri, 23 Nov 2018 23:17:12 +0100 added item delegate for author in new model
|
||||||
|
28b83117e pedrol Fri, 23 Nov 2018 14:45:16 +0100 remove unnecessary warning
|
||||||
|
543a7f280 csoler Thu, 22 Nov 2018 22:52:27 +0100 fixed display of current post in new Forum Model
|
||||||
|
20b8bca80 csoler Thu, 22 Nov 2018 22:07:58 +0100 worked on display of posts and selection in new forum model
|
||||||
|
81d23fa60 Gioacc Thu, 22 Nov 2018 21:56:55 +0100 JSON API to collect extra entropy
|
||||||
|
abec811d3 Gioacc Thu, 22 Nov 2018 16:41:19 +0100 Forum API add missing subscribe method
|
||||||
|
3edd1dd0d csoler Thu, 22 Nov 2018 11:24:05 +0100 fixed missing case entries in ForumModel
|
||||||
|
59220b5c8 csoler Thu, 22 Nov 2018 10:44:06 +0100 fixed layout of internal data in ForumModel
|
||||||
|
b28a76e35 csoler Thu, 22 Nov 2018 09:47:58 +0100 fixed update of posts list in new ForumModel
|
||||||
|
e01de33e1 csoler Thu, 22 Nov 2018 09:28:07 +0100 fixed compilation in new ForumModel
|
||||||
|
d3565c2ee csoler Wed, 21 Nov 2018 23:18:08 +0100 implemented update of posts for new model. Unfinished yet.
|
||||||
|
2066248b3 csoler Tue, 20 Nov 2018 23:28:07 +0100 started updating ForumFillThread to new model
|
||||||
|
d8f9559b0 csoler Mon, 19 Nov 2018 23:33:19 +0100 fixed memory corruption bug in GxsForumModel
|
||||||
|
dbeb97c0e csoler Mon, 19 Nov 2018 21:45:42 +0100 fixed bug in sizeHintRole()
|
||||||
|
a532b68b8 csoler Sun, 18 Nov 2018 21:36:13 +0100 improvements of the Forum Model
|
||||||
|
9d49ca0e4 csoler Sat, 17 Nov 2018 22:36:07 +0100 initial attempt at creating an ItemModel for forums
|
||||||
|
a802e494f csoler Tue, 20 Nov 2018 21:45:45 +0100 Merge pull request #1401 from G10h4ck/forum_api
|
||||||
|
8c8ce53e4 csoler Tue, 20 Nov 2018 21:44:40 +0100 Merge pull request #1385 from G10h4ck/safer_api
|
||||||
|
f8c25fd96 csoler Mon, 19 Nov 2018 22:13:55 +0100 fixed bug in TransfersDialog model got sizeHintRole()
|
||||||
|
2b58e3f46 Gioacc Sat, 17 Nov 2018 17:19:13 +0100 RsGxsChannels local search support
|
||||||
|
1d7f0d6ef csoler Sat, 17 Nov 2018 14:14:53 +0100 Merge pull request #1409 from csoler/v0.6.5-DebianPackaging
|
||||||
|
8075eec28 csoler Sat, 17 Nov 2018 14:10:08 +0100 fixed licenses in PhotoShare, Posted, profile, people and Network
|
||||||
|
f670a18b1 Gioacc Fri, 16 Nov 2018 19:09:37 +0100 Break too long line in retroshare.pri
|
||||||
|
e311b2887 Gioacc Fri, 16 Nov 2018 17:50:34 +0100 Complete channel API with comment and vote creation
|
||||||
|
ba58eba34 Gioacc Fri, 16 Nov 2018 17:03:25 +0100 Complete API for forums
|
||||||
|
ac2dacf51 csoler Thu, 15 Nov 2018 21:49:12 +0100 fixed licenses in gxsforums, gxschannels, im_history, msgs
|
||||||
|
05bb002c7 csoler Wed, 14 Nov 2018 21:14:40 +0100 fixed licenses in gxs/
|
||||||
|
eb1909e8b csoler Wed, 14 Nov 2018 20:54:37 +0100 fixed licenses in FileTransfer
|
||||||
|
9512228b0 csoler Wed, 14 Nov 2018 20:21:47 +0100 Merge pull request #1408 from csoler/v0.6.5-BugFix
|
||||||
|
6d0949372 csoler Wed, 14 Nov 2018 20:20:27 +0100 fixed overloading names for functions that are not supposed to be overloading in turtleClientService and ftServer
|
||||||
|
a506c80d8 csoler Tue, 13 Nov 2018 22:02:26 +0100 fixed licenses in elastic+feeds
|
||||||
|
630609c11 csoler Sun, 11 Nov 2018 20:42:48 +0100 fixed retroshare.project email in licenses
|
||||||
|
c4ae4c21b csoler Sun, 11 Nov 2018 20:41:06 +0100 fixed licenses in gui/common/
|
||||||
|
b57aacb6b csoler Sun, 11 Nov 2018 16:57:05 +0100 partially added/fixed licenses in gui/common
|
||||||
|
529f60a86 csoler Sun, 11 Nov 2018 14:28:47 +0100 Merge pull request #1407 from RetroShare/v0.6.5
|
||||||
|
fd3cf4a29 csoler Sun, 11 Nov 2018 14:27:41 +0100 Merge pull request #1406 from csoler/v0.6.5-DebianPackaging
|
||||||
|
b8d2d9cad Gioacc Mon, 5 Nov 2018 00:19:45 +0100 Print stack trace on crash
|
||||||
|
e95b8e4c5 csoler Sun, 11 Nov 2018 12:11:54 +0100 fixed license in retroshare-nogui
|
||||||
|
d242b4299 csoler Sun, 11 Nov 2018 12:00:30 +0100 improved Debian copyright file and packaging script
|
||||||
|
cdcc796af csoler Sun, 11 Nov 2018 11:59:55 +0100 fixed licenses in plugins/VOIP
|
||||||
|
7bc91e3ac csoler Sun, 11 Nov 2018 11:21:34 +0100 moved qmake files in openpgpsdk to Apache-2.0
|
||||||
|
1d548586f csoler Sun, 11 Nov 2018 11:20:56 +0100 improved debian copyright file
|
||||||
|
752337cbd csoler Sun, 11 Nov 2018 10:54:39 +0100 updated licensing in libretroshare and Debian packaging script
|
||||||
|
ca3694acc csoler Sat, 10 Nov 2018 23:03:44 +0100 re-licensed upnputil with permission from the author
|
||||||
|
9c3d5acd8 csoler Sat, 10 Nov 2018 17:40:34 +0100 fixed license in libretroshare
|
||||||
|
ddca91b0c csoler Sat, 10 Nov 2018 17:40:13 +0100 moved some files to unfinished and deleted soem unused files
|
||||||
|
602bc36ee csoler Sat, 10 Nov 2018 14:45:05 +0100 fixed missing licenses in libretroshare
|
||||||
|
98bf2922c csoler Sat, 10 Nov 2018 14:44:45 +0100 removed old/unused files
|
||||||
|
b53e75ae8 csoler Sat, 10 Nov 2018 14:14:05 +0100 removed old/unreferenced gxs source files. Moved unfinished ideas for wire+acadb to unfinished/
|
||||||
|
5f86ac1e3 csoler Thu, 8 Nov 2018 23:34:42 +0100 updated licenses in gui/Circles. partly changed licenses in gui/common.
|
||||||
|
c80022f9c csoler Sun, 4 Nov 2018 21:17:22 +0100 fixed licenses in tests/
|
||||||
|
15b3c4814 csoler Sun, 4 Nov 2018 20:38:39 +0100 finished licenses in VOIP. Files re-licensed with authorization
|
||||||
|
53ec7467d csoler Sun, 4 Nov 2018 16:19:17 +0100 fixed licenses in VOIP. Permission pending for some files
|
||||||
|
456845fc8 csoler Sun, 4 Nov 2018 15:48:33 +0100 fixed licenses in FeedReader
|
||||||
|
1e1e81704 csoler Sun, 4 Nov 2018 14:33:55 +0100 added license headers for librssimulator
|
||||||
|
4dce4002f hunber Sun, 28 Oct 2018 22:25:26 +0100 Removed outdated instructions from readme
|
||||||
|
41d942c14 hunber Sun, 28 Oct 2018 22:16:01 +0100 Updated links in readme
|
||||||
|
7742e0ca3 hunber Sun, 28 Oct 2018 22:15:07 +0100 Removed version.html
|
||||||
|
3e3adf733 hunber Sun, 28 Oct 2018 21:34:45 +0100 Removed some old build scripts
|
||||||
|
ca80161bf csoler Sun, 22 Jul 2018 00:02:06 +0200 fixed wrongly removed line
|
||||||
|
cd9a2db4e csoler Fri, 20 Jul 2018 19:48:29 +0200 fixed license in retroshare-gui/src/chat/ and main files
|
||||||
|
d3e690b0d G10h4c Sat, 10 Nov 2018 20:36:37 +0100 Merge pull request #1403 from G10h4ck/gui_dht_fixes
|
||||||
|
54df09c4b sehraf Thu, 8 Nov 2018 18:13:20 +0100 add missing DEFINE, fix small bugs
|
||||||
|
8b8ad3bce Gioacc Sat, 10 Nov 2018 16:30:35 +0100 Forum API for creation and posting
|
||||||
|
1d110600f Gioacc Sat, 10 Nov 2018 16:29:39 +0100 Minor cleanups in GxsChannels
|
||||||
|
72dd98516 Gioacc Sat, 10 Nov 2018 16:28:15 +0100 Deprecate TLV items, to avoid temptation to use them in new code
|
||||||
|
f84824271 Gioacc Sat, 10 Nov 2018 16:24:47 +0100 Implement ostream operator<< for RsSerializable
|
||||||
|
e449ffba0 Gioacc Fri, 9 Nov 2018 22:24:49 +0100 Better include in RsGxsChannels
|
||||||
|
90bacf12b Gioacc Fri, 9 Nov 2018 21:24:31 +0100 RsGxsDataAccess filtered getters do not return all messages if none matches
|
||||||
|
2ed6904d0 Gioacc Fri, 2 Nov 2018 00:53:32 +0100 gxschannels better debugging message
|
||||||
|
f6b22d25d Gioacc Thu, 1 Nov 2018 23:44:44 +0100 Fix typo in documentation
|
||||||
|
7aaf29c3d Gioacc Thu, 1 Nov 2018 15:27:46 +0100 Fix compilation with Qt older then 5.7
|
||||||
|
367c5182c Gioacc Thu, 1 Nov 2018 14:51:57 +0100 Fix compilation with Qt older then 5.10
|
||||||
|
ea86fe261 Gioacc Thu, 1 Nov 2018 07:04:01 +0100 Safer RsGxsChannel API
|
||||||
|
8fd22c8fd Gioacc Mon, 29 Oct 2018 05:50:11 +0100 Safer rsGxsChannel API
|
||||||
|
5e6970b64 Gioacc Fri, 9 Nov 2018 11:17:26 +0100 Merge branch 'v0.6.5'
|
||||||
|
60b424eb6 G10h4c Fri, 9 Nov 2018 11:10:30 +0100 Merge pull request #1389 from G10h4ck/jsonapi
|
||||||
|
5e6e9e03e G10h4c Fri, 9 Nov 2018 11:09:56 +0100 Merge pull request #1390 from G10h4ck/jsonapi
|
||||||
|
c073cc425 G10h4c Fri, 9 Nov 2018 11:09:21 +0100 Merge pull request #1397 from G10h4ck/htofix_rsGetHostByName_v0.6.5
|
||||||
|
18f4dbb9f csoler Thu, 8 Nov 2018 20:59:07 +0100 Merge pull request #1400 from sehraf/pr_small-DHT-fixes
|
||||||
|
a1f33e09e csoler Thu, 8 Nov 2018 20:53:34 +0100 Merge pull request #1398 from G10h4ck/htofix_rsGetHostByName_v0.6.5
|
||||||
|
2ebca7159 sehraf Thu, 8 Nov 2018 18:13:20 +0100 add missing DEFINE, fix small bugs
|
||||||
|
c4cbcf78f Gioacc Thu, 8 Nov 2018 13:14:29 +0100 Fix DNS resolution for hostnames that has also AAAA record
|
||||||
|
dfe7ebaa0 csoler Wed, 7 Nov 2018 23:11:52 +0100 fixed non working pause/cancel button in webUI
|
||||||
|
07f63c82e csoler Wed, 7 Nov 2018 21:45:44 +0100 fixed typo causing FT to show blank for transfer completion in webUI
|
||||||
|
e9da9a555 csoler Wed, 7 Nov 2018 21:42:38 +0100 fixed typo causing FT to show NaN for transfer progress in webUI
|
||||||
|
d74f7bb61 csoler Tue, 6 Nov 2018 23:29:31 +0100 Merge pull request #1395 from RetroShare/v0.6.5
|
||||||
|
cfb194a8e csoler Tue, 6 Nov 2018 23:28:54 +0100 Merge pull request #1392 from G10h4ck/hotfix_udp_crash
|
||||||
|
09f92642d csoler Tue, 6 Nov 2018 20:55:10 +0100 removed memory leak in gxsnettunnel
|
||||||
|
f976e1c52 csoler Tue, 6 Nov 2018 20:38:35 +0100 removed memory leak in handlign of old chat lobby items
|
||||||
|
a3c81e163 Gioacc Tue, 6 Nov 2018 13:02:56 +0100 Fix compilation for ubuntu 18.04 LTS
|
||||||
|
d00d0816f Gioacc Mon, 5 Nov 2018 22:54:22 +0100 Use only BIO_METHOD pointer in openssl >= 1.1.0
|
||||||
|
18e02c9f4 Gioacc Mon, 5 Nov 2018 22:23:40 +0100 TOU avoid forging BIO_METHOD in openssl >= 1.1.0
|
||||||
|
b54305d50 sehraf Mon, 5 Nov 2018 12:55:51 +0100 rename config option
|
||||||
|
66dff9bf0 sehraf Mon, 5 Nov 2018 11:00:32 +0100 Add a build-time switch to set whether GXS distributes all available data or only sends data withint the configured sync period.
|
||||||
|
fb7cfcaa1 csoler Mon, 5 Nov 2018 18:53:31 +0100 Merge pull request #1394 from sehraf/pr_gxsSync
|
||||||
|
81cad2ab0 Gioacc Mon, 5 Nov 2018 10:57:07 +0100 Fix missing include
|
||||||
|
927403415 sehraf Mon, 5 Nov 2018 12:55:51 +0100 rename config option
|
||||||
|
67cd2a140 sehraf Mon, 5 Nov 2018 11:00:32 +0100 Add a build-time switch to set whether GXS distributes all available data or only sends data withint the configured sync period.
|
||||||
|
1ef987661 Gioacc Mon, 5 Nov 2018 00:20:33 +0100 Merge branch 'stacktrace_on_crash' into hotfix_udp_crash
|
||||||
|
c0ca1a5aa Gioacc Mon, 5 Nov 2018 00:19:45 +0100 Print stack trace on crash
|
||||||
|
7d6fba7e8 Gioacc Sun, 4 Nov 2018 00:04:22 +0100 Attempt to fix crash in pqissludp
|
||||||
|
56b31a0e2 csoler Sat, 3 Nov 2018 20:48:11 +0100 Merge pull request #1391 from RetroShare/v0.6.5
|
||||||
|
d711e09b6 csoler Sat, 3 Nov 2018 20:24:24 +0100 fixed bug causing IdChooser to reset the current id
|
||||||
|
dccd40f77 csoler Fri, 2 Nov 2018 22:09:18 +0100 Merge pull request #1384 from hunbernd/fix/oldstuff
|
||||||
|
1f8ecc024 csoler Fri, 2 Nov 2018 20:30:30 +0100 Merge pull request #1378 from csoler/v0.6-ImprovedGUI
|
||||||
|
38a81047a csoler Fri, 2 Nov 2018 20:28:31 +0100 Merge pull request #1388 from RetroShare/v0.6.5
|
||||||
|
af86b29f2 csoler Fri, 2 Nov 2018 20:26:49 +0100 moved initialization to initializer list in HomePage
|
||||||
|
eca4f8adf Gioacc Thu, 1 Nov 2018 23:26:42 +0100 JSON API to check if PGP id is friend
|
||||||
|
4aedfddb9 csoler Thu, 1 Nov 2018 22:10:17 +0100 fixed bug in GRouter failing to set proper service ID in return receipts
|
||||||
|
33b39a8be csoler Thu, 1 Nov 2018 22:05:22 +0100 removed uninitialized memory read in determination of own IP
|
||||||
|
cb5d24756 csoler Thu, 1 Nov 2018 21:45:59 +0100 removed unnecessry debug output from pqissl
|
||||||
|
eb078d462 csoler Thu, 1 Nov 2018 21:42:07 +0100 added more info to deserialization warning in rsrecogn
|
||||||
|
9a2bbe339 csoler Thu, 1 Nov 2018 21:40:56 +0100 fixed uninitialized memory read due to not checking the result of beMsgGetNodeId() in bitdht
|
||||||
|
84aedb8ac csoler Thu, 1 Nov 2018 20:28:09 +0100 removed uninitialized memory read in updateOwnCert()
|
||||||
|
f80b815b2 hunber Sun, 28 Oct 2018 22:25:26 +0100 Removed outdated instructions from readme
|
||||||
|
74fcb5435 hunber Sun, 28 Oct 2018 22:16:01 +0100 Updated links in readme
|
||||||
|
d5d3830b6 hunber Sun, 28 Oct 2018 22:15:07 +0100 Removed version.html
|
||||||
|
3ca13e141 hunber Sun, 28 Oct 2018 21:34:45 +0100 Removed some old build scripts
|
||||||
|
3c6dd1af1 csoler Sun, 28 Oct 2018 17:45:21 +0100 removed unnecessary saving of config in p3turtle
|
||||||
|
20391371c csoler Sun, 28 Oct 2018 17:29:35 +0100 fixed bug causing some GXS sync tunnels to remain unused and prevent new tunnels to be created
|
||||||
|
b603b9b4c G10h4c Sat, 27 Oct 2018 19:46:43 +0200 Merge pull request #1381 from G10h4ck/conservative_ext_port
|
||||||
|
e5805e904 Gioacc Wed, 24 Oct 2018 05:32:21 +0200 Avoid external port being reset without necessity
|
||||||
|
966cd27cd G10h4c Wed, 24 Oct 2018 01:53:52 +0200 Merge pull request #1372 from PhenomRetroShare/Fix_Warnings
|
||||||
|
89082f342 Phenom Sun, 14 Oct 2018 16:22:30 +0200 Fix warnings in RetroShareLink
|
||||||
|
358f27be0 Phenom Sat, 13 Oct 2018 15:50:14 +0200 Fix warnings in MessagePage.cpp
|
||||||
|
a30e2c340 Phenom Mon, 8 Oct 2018 19:27:48 +0200 Fix Warnings in MouseEventFilter.cpp
|
||||||
|
da6778934 Phenom Mon, 8 Oct 2018 18:56:17 +0200 Fix Warnings in rsloginhandler.cc
|
||||||
|
be1f2f7a3 G10h4c Mon, 22 Oct 2018 00:29:55 +0200 Merge pull request #1379 from G10h4ck/jsonapi
|
||||||
|
e746b5b4a Gioacc Mon, 22 Oct 2018 00:24:02 +0200 JSON API unauthenticated access to /rsAccounts/getCurrentAccountId
|
||||||
|
6543d713e Gioacc Sun, 21 Oct 2018 17:12:13 +0200 JSON API import/export PGP key to file
|
||||||
|
7a1375ff6 Gioacc Sat, 20 Oct 2018 21:13:10 +0200 rsPeers add few JSON API calls
|
||||||
|
7d21e74b2 csoler Sat, 20 Oct 2018 17:48:36 +0200 added explicit options to including IP history and removed iP history from RS Links as it leaks information without users consent
|
||||||
|
259264897 csoler Sat, 20 Oct 2018 17:34:57 +0200 changed lobby for "chat rooms" in settings
|
||||||
|
d97551aa3 csoler Sat, 20 Oct 2018 17:31:52 +0200 added option to not include external IPs in preferences->node->certificate
|
||||||
|
395cf57ec csoler Sat, 20 Oct 2018 14:48:11 +0200 merged upstream/master
|
||||||
|
cfe95a57a csoler Sat, 20 Oct 2018 14:47:37 +0200 Merge pull request #1377 from G10h4ck/jsonapi
|
||||||
|
9e632ce99 csoler Sat, 20 Oct 2018 14:42:58 +0200 Merge pull request #1375 from csoler/v0.6-GxsFix2
|
||||||
|
ff92b36aa csoler Sat, 20 Oct 2018 14:14:44 +0200 Merge pull request #7 from G10h4ck/csoler-v0.6-GxsFix2
|
||||||
|
2d497d730 Gioacc Sat, 20 Oct 2018 14:07:39 +0200 Fix compilation with deep search and rm dead code
|
||||||
|
aca29e3ea Gioacc Sat, 20 Oct 2018 13:51:11 +0200 Merge branch 'v0.6-GxsFix2' of https://github.com/csoler/RetroShare into csoler-v0.6-GxsFix2
|
||||||
|
b5dbdcb60 csoler Sat, 20 Oct 2018 13:51:01 +0200 fixed compilation of web UI files on linux
|
||||||
|
5699d81ae Gioacc Sat, 20 Oct 2018 13:39:13 +0200 GXS deep search notify results also of known groups
|
||||||
|
abcd68741 csoler Fri, 19 Oct 2018 22:05:29 +0200 Merge pull request #1374 from csoler/v0.6-ImprovedGUI
|
||||||
|
450ed27b1 G10h4c Fri, 19 Oct 2018 16:36:11 +0200 Merge pull request #1376 from G10h4ck/jsonapi
|
||||||
|
9e2c4ce49 Gioacc Fri, 19 Oct 2018 15:10:15 +0200 JSON API authorize token in createLocation
|
||||||
|
945775e9f Gioacc Thu, 18 Oct 2018 04:21:23 +0200 Fix deep search compiling on 32bit time_t targets
|
||||||
|
9b4c48c54 csoler Tue, 16 Oct 2018 22:40:27 +0200 created a connexion between token and meta data of created posts and grps
|
||||||
|
21a92d69b csoler Tue, 16 Oct 2018 20:51:10 +0200 merged upstream/master
|
||||||
|
2bb24075c Gioacc Tue, 16 Oct 2018 16:19:23 +0200 Print warning also when serializing negative rstime_t
|
||||||
|
03cdd6c7b G10h4c Tue, 16 Oct 2018 16:06:09 +0200 Merge pull request #1363 from G10h4ck/jsonapi
|
||||||
|
37c515bcb csoler Mon, 15 Oct 2018 20:57:21 +0200 patch from sss to fix deadlocks on forum fill thread. To be tested
|
||||||
|
617ed25a1 thunde Sat, 13 Oct 2018 13:19:22 +0200 Modified Windows Build Environment - Removed commandline switch "version" - Added MinGit for determining version information during compile process - Added sigcheck to determine version of the executable
|
||||||
|
c7563f1ef thunde Sun, 14 Oct 2018 15:23:54 +0200 Fixed Windows compile with MSYS2
|
||||||
|
6e1de5b5e thunde Fri, 12 Oct 2018 13:52:19 +0200 Fixed Windows compile with MinGW
|
||||||
|
fae02741d csoler Sun, 14 Oct 2018 15:00:09 +0200 Merge pull request #1370 from sehraf/pr_remove-debug-output
|
||||||
|
bbf855fef csoler Sat, 13 Oct 2018 23:00:29 +0200 Merge pull request #1371 from csoler/v0.6-BugFixing
|
||||||
|
74022a5e1 csoler Sat, 13 Oct 2018 22:59:26 +0200 fixed bug in recent commit that broke turtle generic search
|
||||||
|
15b729b35 Gioacc Fri, 12 Oct 2018 22:28:44 +0200 Fix crash in p3Peers::loadCertificateFromString
|
||||||
|
9c90b32de csoler Fri, 12 Oct 2018 22:19:07 +0200 fixed dangerous memcpy in RsTurtleGenericSearchResultItem::clone() function
|
||||||
|
e6febe029 sehraf Fri, 12 Oct 2018 18:20:55 +0200 remove debug output
|
||||||
|
fc14300b0 Gioacc Wed, 10 Oct 2018 23:43:01 +0200 Re-add ftServer::requestDirDetails implementation
|
||||||
|
b3d73ba6a Gioacc Wed, 10 Oct 2018 23:32:32 +0200 Suppress aliasing warning in DirDetails and DirStub
|
||||||
|
047ae7f72 G10h4c Wed, 10 Oct 2018 22:23:28 +0200 Merge branch 'master' into jsonapi
|
||||||
|
18eee374f csoler Wed, 10 Oct 2018 22:04:32 +0200 Merge pull request #1361 from sehraf/pr_jsonfy-rsMsg
|
||||||
|
09b109d52 csoler Wed, 10 Oct 2018 22:03:51 +0200 Merge pull request #1364 from G10h4ck/safer_time
|
||||||
|
a47eec14e Gioacc Wed, 10 Oct 2018 21:54:50 +0200 Print a warning if deserialized rstime_t is negative
|
||||||
|
321fc8a8d Gioacc Wed, 10 Oct 2018 06:40:56 +0200 Implement mostly decent JSON API for channels and post creation
|
||||||
|
c05c37635 Gioacc Tue, 9 Oct 2018 22:58:17 +0200 Expose /rsFiles/requestDirDetails via JSON API
|
||||||
|
2139090f5 Gioacc Tue, 9 Oct 2018 22:43:15 +0200 Fix bug in JSON t_RsFlags32 deserialization
|
||||||
|
205743e0f Gioacc Tue, 9 Oct 2018 18:14:23 +0200 retroshare-service add missing doxygen dependency on OBS
|
||||||
|
74129f670 Gioacc Tue, 9 Oct 2018 18:06:21 +0200 jsonwrappersincl target always fails if doxygen fail
|
||||||
|
7798e5012 Gioacc Tue, 9 Oct 2018 01:09:25 +0200 Expose JSON API for ForceDirectoryCheck
|
||||||
|
406822b5e Gioacc Tue, 9 Oct 2018 00:55:32 +0200 Expose JSON API for file filtering
|
||||||
|
2556af692 Gioacc Mon, 8 Oct 2018 23:56:05 +0200 Add OBS packaging recipes for retroshare-service
|
||||||
|
a89c29030 Gioacc Mon, 8 Oct 2018 11:56:47 +0200 Add missing rstime include in jsonapi
|
||||||
|
b8af13f0b G10h4c Sun, 7 Oct 2018 22:29:42 +0200 Merge pull request #3 from hunbernd/fix/win64
|
||||||
|
b7d5944b9 hunber Sun, 7 Oct 2018 21:53:16 +0200 Fix building error about losing precision on Win x64
|
||||||
|
6db23267c Gioacc Sun, 7 Oct 2018 14:34:28 +0200 retroshare-gui fix windows compilation error due to time_t usage
|
||||||
|
72d836437 Gioacc Sun, 7 Oct 2018 14:03:27 +0200 libresapi fix compile error on windows due to time_t usage
|
||||||
|
ddf316454 Gioacc Sun, 7 Oct 2018 13:41:04 +0200 Fix ctime(&rstime_t) error on windows
|
||||||
|
77d938bf5 Gioacc Sun, 7 Oct 2018 13:07:22 +0200 Remove _USE_32BIT_TIME_T windows define
|
||||||
|
329050a9c Gioacc Sun, 7 Oct 2018 01:34:05 +0200 Use safer rstime_t instead of time_t
|
||||||
|
137bd9cd6 sehraf Sat, 6 Oct 2018 23:50:29 +0200 jsonapi: fix nested std types
|
||||||
|
f5158b3a9 Gioacc Tue, 25 Sep 2018 22:33:35 +0200 Allow CORS in JsonApiServer
|
||||||
|
8f17270a2 Gioacc Sat, 6 Oct 2018 18:49:17 +0200 Fix type in .pri breaking non-cross-compiling
|
||||||
|
586cff2ad csoler Sat, 6 Oct 2018 18:33:13 +0200 Merge pull request #1362 from csoler/v0.6-ImprovedGUI
|
||||||
|
045691855 csoler Sat, 6 Oct 2018 18:31:33 +0200 Merge pull request #1356 from PhenomRetroShare/Fix_Warnings
|
||||||
|
47df24b82 Gioacc Sat, 6 Oct 2018 02:49:13 +0200 Fix compilation due to .pro copy/paste error
|
||||||
|
c6ca3c566 Gioacc Sat, 6 Oct 2018 02:46:09 +0200 Fix compilation due to RsPeers::GetRetroshareInvite
|
||||||
|
41aa675a9 G10h4c Sat, 6 Oct 2018 02:41:35 +0200 Avoid travis breakage due to outdated qt55 depend
|
||||||
|
2b3570903 Gioacc Sat, 6 Oct 2018 01:23:08 +0200 retroshare-service deep search support for Android
|
||||||
|
b28512b88 Gioacc Fri, 5 Oct 2018 22:29:49 +0200 retroshare-service now build and runs fine on android (even older ones)
|
||||||
|
ec8e8ebaf csoler Fri, 5 Oct 2018 21:38:36 +0200 fixed merging with upstream/master
|
||||||
|
dbd52c0c9 csoler Fri, 5 Oct 2018 17:01:54 +0200 fixed bug in previous commit
|
||||||
|
4de049820 csoler Fri, 5 Oct 2018 16:54:36 +0200 fixed bad signature checking code for config files
|
||||||
|
1d8bb4481 Gioacc Fri, 5 Oct 2018 01:55:18 +0200 Fix warnings
|
||||||
|
341a68ce0 Gioacc Fri, 5 Oct 2018 01:23:17 +0200 rstypeserializer fix uninitialized variable usage
|
||||||
|
0f01f110a Gioacc Thu, 4 Oct 2018 23:37:39 +0200 jsonapi-generator fix param initialization on Android
|
||||||
|
321d2e84b Gioacc Thu, 4 Oct 2018 23:36:01 +0200 gxschannel expose blocking create post and channels API
|
||||||
|
6dabb81dc sehraf Thu, 4 Oct 2018 23:25:23 +0200 rsMsg: unify parameter name
|
||||||
|
500eb7f51 sehraf Thu, 4 Oct 2018 23:24:06 +0200 jsonapi: add rsMsg tagging functions
|
||||||
|
897c8e0a8 sehraf Thu, 4 Oct 2018 21:26:03 +0200 jsonapi: more rsMsg functions
|
||||||
|
70678ad50 sehraf Thu, 4 Oct 2018 22:42:34 +0200 jsonapi: fix std::map<T,U>
|
||||||
|
150af40e0 sehraf Wed, 3 Oct 2018 21:52:54 +0200 jsonapi: convert and add getMessageCount
|
||||||
|
285158db5 sehraf Wed, 3 Oct 2018 21:34:55 +0200 jsonapi: access messages (mail)
|
||||||
|
184fac95a Gioacc Thu, 4 Oct 2018 22:12:23 +0200 Fix deep_search enable/disable at build time
|
||||||
|
c6d020355 csoler Thu, 4 Oct 2018 19:22:49 +0200 added debug output to see which config files are loaded/saved
|
||||||
|
fb21e427b csoler Thu, 4 Oct 2018 19:14:21 +0200 removed saving of GxsTrans configuration in class destructor, causing lock up when quitting RS
|
||||||
|
7c986b926 Gioacc Thu, 4 Oct 2018 19:14:16 +0200 Remove overloaded GetRetroshareInvite method
|
||||||
|
6c4d1c34e csoler Thu, 4 Oct 2018 18:49:27 +0200 fixed removal of "share on channel"/"share on forum" menu entries in own files
|
||||||
|
7cc15c703 Gioacc Wed, 3 Oct 2018 19:05:02 +0200 Fix forward declarations class struct missmatch
|
||||||
|
e6e5700ed Gioacc Wed, 3 Oct 2018 19:04:02 +0200 Fix warning caused by clang defining _GNUC_
|
||||||
|
f26a0c793 Gioacc Wed, 3 Oct 2018 18:17:29 +0200 jsonapi-generator Fix warning that cause errors on mageia
|
||||||
|
8f3f2cd7c Gioacc Wed, 3 Oct 2018 15:53:18 +0200 retroshare-service improve building process
|
||||||
|
9c493453c csoler Wed, 3 Oct 2018 15:28:37 +0200 Merge pull request #1358 from csoler/v0.6-ImprovedGUI
|
||||||
|
81fc3b792 csoler Wed, 3 Oct 2018 15:25:53 +0200 select GxsIds as default list to chose msg destination from
|
||||||
|
64f1d7867 csoler Wed, 3 Oct 2018 15:07:50 +0200 Merge pull request #1357 from csoler/v0.6-ImprovedGUI
|
||||||
|
83a987936 csoler Wed, 3 Oct 2018 15:02:37 +0200 when replying to a msg, always select an ID to author the msg that was in the destination list
|
||||||
|
d401fdfb4 Phenom Sun, 30 Sep 2018 14:31:53 +0200 Fix Gcc Warning:
|
||||||
|
6ef72f551 Phenom Wed, 14 Feb 2018 19:24:24 +0100 Fix Gcc Warning in authssl.cc
|
||||||
|
1839d23df Phenom Thu, 15 Feb 2018 16:51:35 +0100 Fix Gcc Warning hashstream.h
|
||||||
|
79a8b2183 csoler Sun, 30 Sep 2018 13:31:26 +0200 Merge pull request #1353 from csoler/v0.6-FileLists
|
||||||
|
3d0ad54f1 csoler Sat, 29 Sep 2018 20:33:32 +0200 Merge pull request #1352 from PhenomRetroShare/Fix_Warnings
|
||||||
|
0ef47e25c csoler Sat, 29 Sep 2018 20:30:31 +0200 Merge pull request #1355 from Josep-San/GUI_Upload_Header_Context-Menu
|
||||||
|
443dbdfbe csoler Sat, 29 Sep 2018 19:04:23 +0200 fixed small bug breaking display of flat mode in files
|
||||||
|
0078501db Gioacc Sat, 29 Sep 2018 00:15:10 +0200 Initial work on a RetroShare cross-platform service
|
||||||
|
4578b4403 Josep- Fri, 28 Sep 2018 15:38:39 +0200 Added context menu for Upload list headers to hide/show columns.
|
||||||
|
752275f81 csoler Thu, 27 Sep 2018 22:14:00 +0200 fixed various display bugs in extra file list
|
||||||
|
54ec49dc0 csoler Thu, 27 Sep 2018 21:56:41 +0200 make extra shared file list appear only when non empty
|
||||||
|
e1698429d csoler Thu, 27 Sep 2018 21:46:00 +0200 fixed display of size
|
||||||
|
2610f62e4 csoler Thu, 27 Sep 2018 21:42:21 +0200 fixed display of temporary shared file text
|
||||||
|
c77a28c17 csoler Thu, 27 Sep 2018 21:20:06 +0200 added proper notification when removing an extra file
|
||||||
|
7ab7c7db9 csoler Thu, 27 Sep 2018 16:53:08 +0200 added possibility to remove extra shared file
|
||||||
|
138384636 csoler Thu, 27 Sep 2018 13:42:49 +0200 added extra list view in own files.
|
||||||
|
a6e3273ec Phenom Wed, 26 Sep 2018 18:02:04 +0200 Fix qmake double use_libretroshare.pri
|
||||||
|
aec68c226 Phenom Wed, 26 Sep 2018 17:55:58 +0200 Fix qmake double using retroshare.pri
|
||||||
|
590edb72f Phenom Wed, 26 Sep 2018 17:44:32 +0200 Fix qmake warnings:
|
||||||
|
f420bb464 Phenom Wed, 26 Sep 2018 17:36:33 +0200 Fix qmake warnings:
|
||||||
|
359e11433 Gioacc Tue, 25 Sep 2018 20:09:06 +0200 jsonapi-generator add missing include
|
||||||
|
f09bef2ac G10h4c Tue, 25 Sep 2018 18:10:16 +0200 Merge pull request #1349 from G10h4ck/jsonapi
|
||||||
|
95e0fd338 Gioacc Tue, 25 Sep 2018 17:15:06 +0200 JsonApiServer::isAuthTokenValid avoid timing attack
|
||||||
|
1e32c1db0 csoler Mon, 24 Sep 2018 21:03:01 +0200 Merge pull request #1346 from csoler/v0.6-ImprovedGUI
|
||||||
|
57577472f csoler Mon, 24 Sep 2018 20:55:27 +0200 added tooltip to show identity ID in distant chat dialog
|
||||||
|
5eda5a5bc csoler Mon, 24 Sep 2018 20:26:36 +0200 changed "lobby" into "chat room" in chat room info panel
|
||||||
|
ccabf82e6 Gioacc Fri, 21 Sep 2018 01:58:38 +0200 retroshare-gui now handle JsonApiServer too
|
||||||
|
d26912ebd G10h4c Fri, 21 Sep 2018 12:26:50 +0200 Merge pull request #1350 from zapek/jsonapi_windows_fix
|
||||||
|
1c7f02655 Gioacc Fri, 21 Sep 2018 01:40:26 +0200 Fix crash at startup if jsonapi not enabled
|
||||||
|
bf9816619 Gioacc Fri, 21 Sep 2018 01:39:48 +0200 RsServer fix crash on stop if shutdown callback not set
|
||||||
|
dc926d30c zapek Thu, 20 Sep 2018 23:29:36 +0200 links with wsock32 only if the jsonapi is built
|
||||||
|
458a8b087 zapek Thu, 20 Sep 2018 22:24:05 +0200 fixed JSONAPI build for Windows
|
||||||
|
5a63030d7 G10h4c Thu, 20 Sep 2018 12:39:02 +0200 Merge pull request #1348 from zapek/windows_compilation_fix
|
||||||
|
8f88a9290 zapek Thu, 20 Sep 2018 10:48:46 +0200 added some comments to explain the issue
|
||||||
|
add97dede Gioacc Wed, 19 Sep 2018 22:02:07 +0200 p3face include jsonapi.h only if enabled
|
||||||
|
eb77f921e Gioacc Wed, 19 Sep 2018 21:28:26 +0200 Implement JSON API HTTP Basic authentication
|
||||||
|
ab80999ca zapek Wed, 19 Sep 2018 15:51:09 +0200 fixed compilation on Windows/MSYS2
|
||||||
|
9a09e209e csoler Tue, 18 Sep 2018 22:02:18 +0200 added context menu entry to only show current IPs instead of all known IPs
|
||||||
|
3c61190b4 csoler Tue, 18 Sep 2018 21:20:55 +0200 fixed context menu in Home->cert
|
||||||
|
f2514d13e csoler Mon, 17 Sep 2018 23:03:11 +0200 added tooltip for certificates in Home
|
||||||
|
ac9350d37 G10h4c Sat, 15 Sep 2018 22:23:35 +0200 Merge pull request #1339 from sehraf/pr_remove-add-peer-open-code
|
||||||
|
43bc80de8 Gioacc Sat, 15 Sep 2018 21:53:46 +0200 JSON API export version extra too
|
||||||
|
cd03953b1 Gioacc Sat, 15 Sep 2018 21:07:03 +0200 Provide meaningful devault value in rsversion.h
|
||||||
|
4f4e2d2bb Gioacc Sat, 15 Sep 2018 20:57:28 +0200 More robust automatic version determination
|
||||||
|
dde9acb40 G10h4c Sat, 15 Sep 2018 19:44:25 +0200 Merge pull request #1343 from hunbernd/fix/deprecatedversinioningscript
|
||||||
|
05537d89c hunber Sat, 15 Sep 2018 18:21:02 +0200 Added warning instead of running the version_detail script
|
||||||
|
eece958aa G10h4c Sat, 15 Sep 2018 17:59:09 +0200 Merge pull request #1340 from sehraf/pr_remove-obsolete-version-scripts
|
||||||
|
0917dc253 csoler Sat, 15 Sep 2018 14:42:17 +0200 Merge pull request #1342 from sehraf/pr_add-TLSv1.3
|
||||||
|
0b6644cd5 sehraf Sat, 15 Sep 2018 14:38:57 +0200 get rid of unused variables
|
||||||
|
1e85b05f0 sehraf Sat, 15 Sep 2018 14:30:23 +0200 get rid of cipher_version variable. use plain output from openssl
|
||||||
|
3c19a3929 csoler Fri, 14 Sep 2018 22:15:31 +0200 Merge pull request #1338 from sehraf/pr_add-TLSv1.3
|
||||||
|
928958690 sehraf Fri, 14 Sep 2018 17:05:57 +0200 remove unused variable
|
||||||
|
1faaf91eb sehraf Fri, 14 Sep 2018 17:01:52 +0200 G10h4ck said that there are obsolete since #1336 and should not be used anymore.
|
||||||
|
dd36f8103 sehraf Fri, 14 Sep 2018 16:58:18 +0200 @G10h4ck reimplemented the code to add a peer with location and IPs in acceptInvite(). Remove the redundant code and use the new function for importFriendlist().
|
||||||
|
7ce2bef37 sehraf Fri, 14 Sep 2018 16:27:50 +0200 add support for displaying TLSv1.3
|
||||||
|
7784660d6 G10h4c Fri, 14 Sep 2018 13:25:42 +0200 Merge pull request #1337 from G10h4ck/jsonapi
|
||||||
|
d1804b480 G10h4c Fri, 14 Sep 2018 13:24:14 +0200 Merge pull request #1336 from G10h4ck/rs_version
|
||||||
|
d676ba393 Gioacc Thu, 13 Sep 2018 01:46:55 +0200 retroshare-nogui print message if JSON API is active
|
||||||
|
148e46346 Gioacc Wed, 12 Sep 2018 23:40:34 +0200 JSON API accessible via HTTP GET method
|
||||||
|
3d476f689 Gioacc Wed, 12 Sep 2018 20:06:52 +0200 Travis CI increase clone depth to get some tag for git describe
|
||||||
|
4a43c254f Gioacc Wed, 12 Sep 2018 11:32:10 +0200 appveyor increase clone depth to get some tag for git describe
|
||||||
|
828ff0f30 Gioacc Wed, 12 Sep 2018 01:22:24 +0200 Fix some compilation error on Windows
|
||||||
|
1694e37c5 Gioacc Wed, 12 Sep 2018 01:06:36 +0200 More fixes to JSON API
|
||||||
|
524576596 Gioacc Wed, 12 Sep 2018 00:35:42 +0200 JSON API expose retroshare version
|
||||||
|
92f90178c Gioacc Wed, 12 Sep 2018 00:33:29 +0200 RS version is now parametrizable at compile time
|
||||||
|
5495f43c5 Gioacc Wed, 12 Sep 2018 00:31:16 +0200 Fix RsServiceControl::getServiceItemNames doc
|
||||||
|
b13826387 csoler Tue, 11 Sep 2018 15:17:33 +0200 Merge pull request #1323 from csoler/v0.6-ForumAdmin
|
||||||
|
c17b821ea csoler Mon, 10 Sep 2018 20:39:29 +0200 Merge pull request #1334 from csoler/v0.6-GxsFix
|
||||||
|
428c2670f csoler Mon, 10 Sep 2018 20:29:48 +0200 fixed sorting for posts with children using a more appropriate flag for pinned posts
|
||||||
|
2b80c23f6 csoler Mon, 10 Sep 2018 20:03:47 +0200 fixed according to comments on PR 1334
|
||||||
|
cb83abf93 G10h4c Mon, 10 Sep 2018 00:29:07 +0200 Merge pull request #1335 from sehraf/pr_jsonfy
|
||||||
|
247c36827 sehraf Sun, 9 Sep 2018 22:21:18 +0200 incorporated requested changes
|
||||||
|
59a76a941 csoler Sun, 9 Sep 2018 21:22:08 +0200 fixed checking of signature for own ids when loading in cache
|
||||||
|
06fdaa403 csoler Sun, 9 Sep 2018 09:55:34 +0200 fixed sorting of pinned posts in "Lastest post in thread" mode
|
||||||
|
ae6a5c74d sehraf Sat, 8 Sep 2018 16:46:28 +0200 add rsPeer groups to jsonapi
|
||||||
|
5a961179f sehraf Sat, 8 Sep 2018 09:48:27 +0200 unify parameter names
|
||||||
|
31b0f67e9 sehraf Sat, 8 Sep 2018 09:47:45 +0200 jsonfy RsServiceControl
|
||||||
|
9306d8ccc sehraf Sat, 8 Sep 2018 08:58:42 +0200 drop deprecated function
|
||||||
|
f34d02138 sehraf Sat, 8 Sep 2018 08:57:07 +0200 make rs use the new function
|
||||||
|
ae14a01d5 sehraf Fri, 7 Sep 2018 14:19:06 +0200 add json support to getWaitingDiscCount
|
||||||
|
be5040011 sehraf Fri, 7 Sep 2018 14:17:44 +0200 jsonfy rsDisc
|
||||||
|
fb8e49ee6 sehraf Fri, 7 Sep 2018 12:58:30 +0200 jsonjy rsConfig
|
||||||
|
76d16f61e csoler Thu, 6 Sep 2018 22:14:17 +0200 fixed crash when no item to unban is actually selected in Banned files list
|
||||||
|
ce5778cb8 csoler Thu, 6 Sep 2018 21:23:21 +0200 Merge pull request #1332 from sehraf/pr_tiny-fix
|
||||||
|
3402f7d9b csoler Thu, 6 Sep 2018 21:15:25 +0200 auto send of own signed GXS ids to friends in discovery
|
||||||
|
39c07f4ef sehraf Wed, 5 Sep 2018 15:46:59 +0200 make p3GxsTrans a class
|
||||||
|
fe5e83125 csoler Thu, 6 Sep 2018 11:46:52 +0200 Merge pull request #1333 from csoler/v0.6-ImprovedGUI
|
||||||
|
e01cf95dd csoler Thu, 6 Sep 2018 11:46:04 +0200 fixed display of 1 chunk transfers
|
||||||
|
59b375477 csoler Thu, 6 Sep 2018 10:47:05 +0200 fixed new position of pinned post, and forbid pinning up non top level posts
|
||||||
|
59887124a csoler Thu, 6 Sep 2018 10:17:50 +0200 fixed transmission of pinned posts when a forum is edited
|
||||||
|
b17d2a3ac csoler Thu, 6 Sep 2018 08:39:30 +0200 Merge pull request #1331 from G10h4ck/jsonapi
|
||||||
|
ddc1f462d Gioacc Thu, 6 Sep 2018 02:05:29 +0200 retroshare-android-service better debug message
|
||||||
|
2c8aa5a1f Gioacc Thu, 6 Sep 2018 02:04:48 +0200 RsAccounts::getCurrentAccountId is now static
|
||||||
|
4a309b827 csoler Wed, 5 Sep 2018 21:00:34 +0200 fixed compilation with libressl2.7 (patch from sss, modified)
|
||||||
|
aa03cc00d Gioacc Wed, 5 Sep 2018 12:55:32 +0200 Temporarily disable qmake step on Travis CI OS X
|
||||||
|
72d220b2c Gioacc Wed, 5 Sep 2018 00:18:07 +0200 Merge branch 'master' into jsonapi
|
||||||
|
7787f9d62 Gioacc Wed, 5 Sep 2018 00:17:21 +0200 Merge branch 'master' into jsonapi
|
||||||
|
a194e4cf5 Gioacc Wed, 5 Sep 2018 00:08:56 +0200 Make JSON API server bind address configurable
|
||||||
|
703d70962 csoler Tue, 4 Sep 2018 20:53:30 +0200 updated ubuntu changelog
|
||||||
|
1392c7c6f csoler Tue, 4 Sep 2018 20:21:42 +0200 prevent editing of pinned posts
|
||||||
|
d856566c6 csoler Mon, 3 Sep 2018 22:02:32 +0200 added comment in the post sorting code
|
||||||
|
69c6860d8 csoler Mon, 3 Sep 2018 21:58:31 +0200 removed debug output
|
||||||
|
37b53033d csoler Mon, 3 Sep 2018 21:55:26 +0200 fixed sorting with pinned posts
|
||||||
|
68e130a1f Gioacc Mon, 3 Sep 2018 15:12:23 +0200 Temporarily disable Travis CI Mac OS X build
|
||||||
|
59535eac8 csoler Sun, 2 Sep 2018 17:07:40 +0200 added a flag for moderating messages to help removign them when the author is not a moderator anymore
|
||||||
|
e7d721b3d csoler Sat, 1 Sep 2018 18:40:28 +0200 ensure pinned posts always stay grouped together
|
||||||
|
4acbf775a Gioacc Sat, 1 Sep 2018 16:16:15 +0200 retroshare-android-service can be built without libresapi
|
||||||
|
7f7431355 Gioacc Sat, 1 Sep 2018 15:54:11 +0200 JSON API close restbed session before shutting down
|
||||||
|
7a37c11e4 Gioacc Sat, 1 Sep 2018 15:29:09 +0200 Prevent crash calling uninitialized service via JSON API
|
||||||
|
cc6f0b1f0 Gioacc Thu, 30 Aug 2018 21:41:15 +0200 Expose RsPeers JSON API
|
||||||
|
a8ddec03f Gioacc Thu, 30 Aug 2018 19:06:20 +0200 Expose more login related JSON API
|
||||||
|
a9b1a15b4 Gioacc Thu, 30 Aug 2018 19:02:50 +0200 jsonapi-generator handle multiple services per file
|
||||||
|
5c2f714ad csoler Thu, 30 Aug 2018 14:50:16 +0200 merged with upstream/master
|
||||||
|
380ebf2a5 csoler Thu, 30 Aug 2018 14:07:14 +0200 added UI to pin up posts
|
||||||
|
e5f65e950 csoler Thu, 30 Aug 2018 11:48:37 +0200 added login to pin up posts
|
||||||
|
e12c17c6f csoler Thu, 30 Aug 2018 11:08:49 +0200 added show of moderators in forum details
|
||||||
|
4c076b60a csoler Thu, 30 Aug 2018 10:54:52 +0200 added proper initializing of existing moderators
|
||||||
|
|
||||||
|
-- Retroshare Dev Team <contact@retroshare.net> Thu, 18 Dec 2018 22:00:00 +0100
|
||||||
|
|
||||||
|
retroshare (0.6.4-1.20180904.703d7096~bionic) bionic; urgency=low
|
||||||
|
|
||||||
910aea7 csoler Wed, 29 Aug 2018 22:10:58 +0200 Merge pull request #1325 from csoler/v0.6-ContentFiltering
|
910aea7 csoler Wed, 29 Aug 2018 22:10:58 +0200 Merge pull request #1325 from csoler/v0.6-ContentFiltering
|
||||||
65304a3 csoler Tue, 28 Aug 2018 23:57:16 +0200 added last relay (a.k.a which direct friend) of search results in sources column
|
65304a3 csoler Tue, 28 Aug 2018 23:57:16 +0200 added last relay (a.k.a which direct friend) of search results in sources column
|
||||||
c9b30f5 csoler Tue, 28 Aug 2018 23:42:24 +0200 fixed merged with upstream/master
|
c9b30f5 csoler Tue, 28 Aug 2018 23:42:24 +0200 fixed merged with upstream/master
|
||||||
|
@ -2,7 +2,7 @@ Source: retroshare
|
|||||||
Section: devel
|
Section: devel
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||||
Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
Build-Depends: debhelper (>= 7), git, libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Homepage: http://retroshare.sourceforge.net
|
Homepage: http://retroshare.sourceforge.net
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Source: retroshare
|
|||||||
Section: devel
|
Section: devel
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||||
Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
Build-Depends: debhelper (>= 7), git, libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Homepage: http://retroshare.sourceforge.net
|
Homepage: http://retroshare.sourceforge.net
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Source: retroshare
|
|||||||
Section: devel
|
Section: devel
|
||||||
Priority: standard
|
Priority: standard
|
||||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||||
Build-Depends: debhelper (>= 7), libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
Build-Depends: debhelper (>= 7), git, libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qt5-default
|
||||||
Standards-Version: 3.9.6
|
Standards-Version: 3.9.6
|
||||||
Homepage: http://retroshare.sourceforge.net
|
Homepage: http://retroshare.sourceforge.net
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Source: retroshare
|
|||||||
Section: devel
|
Section: devel
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
Maintainer: Cyril Soler <csoler@users.sourceforge.net>
|
||||||
Build-Depends: debhelper (>= 9), libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qtbase5-dev, qt5-qmake, qtbase5-dev-tools
|
Build-Depends: debhelper (>= 9), git, libglib2.0-dev, libupnp-dev, libssl-dev, libxss-dev, libgnome-keyring-dev, libbz2-dev, libspeex-dev, libspeexdsp-dev, libxslt1-dev, cmake, libcurl4-openssl-dev, libopencv-dev, tcl8.6, libsqlcipher-dev, libmicrohttpd-dev, libavcodec-dev, qtmultimedia5-dev, qttools5-dev, libqt5x11extras5-dev, qtbase5-dev, qt5-qmake, qtbase5-dev-tools
|
||||||
Standards-Version: 4.1.4
|
Standards-Version: 4.1.4
|
||||||
Homepage: http://retroshare.sourceforge.net
|
Homepage: http://retroshare.sourceforge.net
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
configure: configure-stamp
|
configure: configure-stamp
|
||||||
configure-stamp:
|
configure-stamp:
|
||||||
dh_testdir
|
dh_testdir
|
||||||
cd src && qmake "CONFIG-=debug" "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=retroshare_plugins" PREFIX=/usr LIB_DIR=/usr/lib RetroShare.pro
|
cd src && qmake "RS_MAJOR_VERSION=0" "RS_MINOR_VERSION=6" "RS_MINI_VERSION=4" "RS_EXTRA_VERSION=XXXXXX" "CONFIG-=debug" "CONFIG+=release" "CONFIG+=rs_autologin" "CONFIG+=retroshare_plugins" PREFIX=/usr LIB_DIR=/usr/lib RetroShare.pro
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
|
||||||
@ -11,13 +11,6 @@ build: build-arch build-indep
|
|||||||
|
|
||||||
build-stamp: configure-stamp
|
build-stamp: configure-stamp
|
||||||
dh_testdir
|
dh_testdir
|
||||||
# Add here commands to compile the package.
|
|
||||||
# cd libssh-0.6.4 && mkdir -p build && cd build && cmake -DWITH_STATIC_LIB=ON .. && make
|
|
||||||
# cd sqlcipher && ./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC" LDFLAGS="-lcrypto" && make
|
|
||||||
# mkdir lib
|
|
||||||
# cp -r libssh-0.6.4 lib/
|
|
||||||
#cp -r sqlcipher lib/
|
|
||||||
#cd src/rsctrl/src && make
|
|
||||||
cd src && $(MAKE)
|
cd src && $(MAKE)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@ branch="master"
|
|||||||
#bubba3="Y" # comment out to compile for bubba3
|
#bubba3="Y" # comment out to compile for bubba3
|
||||||
######################################################
|
######################################################
|
||||||
|
|
||||||
RS_MAJOR_VERSION=`fgrep RS_MAJOR_VERSION ../../libretroshare/src/retroshare/rsversion.h | cut -d\\ -f3- | sed -e s\/\ \/\/g | cut -c1`
|
RS_MAJOR_VERSION=0
|
||||||
RS_MINOR_VERSION=`fgrep RS_MINOR_VERSION ../../libretroshare/src/retroshare/rsversion.h | cut -d\\ -f3- | sed -e s\/\ \/\/g | cut -c1`
|
RS_MINOR_VERSION=6
|
||||||
RS_BUILD_NUMBER=`fgrep RS_BUILD_NUMBER ../../libretroshare/src/retroshare/rsversion.h | grep -v BUILD_NUMBER_ADD | cut -d\\ -f3- | sed -e s\/\ \/\/g | cut -c1`
|
RS_BUILD_NUMBER=4
|
||||||
|
|
||||||
# echo "RS_MAJOR_VERSION="${RS_MAJOR_VERSION}
|
# echo "RS_MAJOR_VERSION="${RS_MAJOR_VERSION}
|
||||||
# echo "RS_MINOR_VERSION="${RS_MINOR_VERSION}
|
# echo "RS_MINOR_VERSION="${RS_MINOR_VERSION}
|
||||||
@ -84,9 +84,12 @@ echo Attempting to get revision number...
|
|||||||
ccount=`git rev-list --count --all`
|
ccount=`git rev-list --count --all`
|
||||||
ccount=`expr $ccount + 8613 - 8267`
|
ccount=`expr $ccount + 8613 - 8267`
|
||||||
|
|
||||||
|
gitrev=`git describe | cut -d- -f2-3`
|
||||||
|
|
||||||
echo " Workdir :"${workdir}
|
echo " Workdir :"${workdir}
|
||||||
echo " Version :"${version_number}
|
echo " Version :"${version_number}
|
||||||
echo " Using revision :"${rev}
|
echo " Using revision :"${rev}
|
||||||
|
echo " Git Revision :"${gitrev}
|
||||||
echo " Commit count :"${ccount}
|
echo " Commit count :"${ccount}
|
||||||
echo " Hash :"${hhsh}
|
echo " Hash :"${hhsh}
|
||||||
echo " Date :"${date}
|
echo " Date :"${date}
|
||||||
@ -144,7 +147,7 @@ cd ${workdir}
|
|||||||
echo Setting version numbers...
|
echo Setting version numbers...
|
||||||
|
|
||||||
# setup version numbers
|
# setup version numbers
|
||||||
sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER 0x${hhsh}%" src/libretroshare/src/retroshare/rsversion.in > src/libretroshare/src/retroshare/rsversion.h
|
#sed -e "s%RS_REVISION_NUMBER.*%RS_REVISION_NUMBER 0x${hhsh}%" src/libretroshare/src/retroshare/rsversion.in > src/libretroshare/src/retroshare/rsversion.h
|
||||||
|
|
||||||
# Various cleaning
|
# Various cleaning
|
||||||
echo Cleaning...
|
echo Cleaning...
|
||||||
@ -157,6 +160,8 @@ for i in ${dist}; do
|
|||||||
if ! test "${i}" = "debian"; then
|
if ! test "${i}" = "debian"; then
|
||||||
echo copying changelog for ${i}
|
echo copying changelog for ${i}
|
||||||
sed -e s/XXXXXX/"${rev}"/g -e s/YYYYYY/"${i}"/g -e s/ZZZZZZ/"${version_number}"/g ../changelog > debian/changelog
|
sed -e s/XXXXXX/"${rev}"/g -e s/YYYYYY/"${i}"/g -e s/ZZZZZZ/"${version_number}"/g ../changelog > debian/changelog
|
||||||
|
sed -e s/XXXXXX/"-${gitrev}"/g debian/rules > debian_rules_tmp
|
||||||
|
cp debian_rules_tmp debian/rules
|
||||||
|
|
||||||
if test ${useretrotor} = "true"; then
|
if test ${useretrotor} = "true"; then
|
||||||
cp ../rules.retrotor debian/rules
|
cp ../rules.retrotor debian/rules
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -848,9 +848,18 @@ bool p3ChatService::handleRecvChatMsgItem(RsChatMsgItem *& ci)
|
|||||||
RsServer::notify()->AddPopupMessage(popupChatFlag, ci->PeerId().toStdString(), name, message); /* notify private chat message */
|
RsServer::notify()->AddPopupMessage(popupChatFlag, ci->PeerId().toStdString(), name, message); /* notify private chat message */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef RS_DIRECT_CHAT
|
||||||
/* notify public chat message */
|
/* notify public chat message */
|
||||||
RsServer::notify()->AddPopupMessage(RS_POPUP_GROUPCHAT, ci->PeerId().toStdString(), "", message);
|
RsServer::notify()->AddPopupMessage(
|
||||||
RsServer::notify()->AddFeedItem(RS_FEED_ITEM_CHAT_NEW, ci->PeerId().toStdString(), message, "");
|
RS_POPUP_GROUPCHAT,
|
||||||
|
ci->PeerId().toStdString(), "", message );
|
||||||
|
RsServer::notify()->AddFeedItem(
|
||||||
|
RS_FEED_ITEM_CHAT_NEW,
|
||||||
|
ci->PeerId().toStdString(), message, "" );
|
||||||
|
#else // def RS_DIRECT_CHAT
|
||||||
|
/* Ignore deprecated direct node broadcast chat messages */
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -1402,19 +1402,19 @@ bool ftController::FileClearCompleted()
|
|||||||
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 */
|
||||||
|
@ -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 *
|
||||||
|
@ -1827,7 +1827,7 @@ int ftServer::handleIncoming()
|
|||||||
**********************************
|
**********************************
|
||||||
*********************************/
|
*********************************/
|
||||||
|
|
||||||
void ftServer::receiveSearchResult(RsTurtleFTSearchResultItem *item)
|
void ftServer::ftReceiveSearchResult(RsTurtleFTSearchResultItem *item)
|
||||||
{
|
{
|
||||||
bool hasCallback = false;
|
bool hasCallback = false;
|
||||||
|
|
||||||
|
@ -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 ; }
|
||||||
|
|
||||||
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
@ -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() + "'", "");
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
|
@ -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&) ;
|
||||||
|
@ -39,12 +39,14 @@ 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!"
|
||||||
|
<< std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -303,13 +302,10 @@ void RsGxsDataAccess::setReq(GxsRequest* req, uint32_t token, uint32_t ansType,
|
|||||||
}
|
}
|
||||||
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,11 +1036,16 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1053,8 +1054,14 @@ bool RsGxsDataAccess::getMsgSummary(MsgMetaReq* 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->retrieveGxsMsgMetaData(msgIdOut, req->mMsgMetaData);
|
mDataStore->retrieveGxsMsgMetaData(msgIdOut, req->mMsgMetaData);
|
||||||
|
|
||||||
@ -1062,7 +1069,9 @@ bool RsGxsDataAccess::getMsgSummary(MsgMetaReq* req)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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)
|
if(opts.mMsgFlagMask)
|
||||||
{
|
{
|
||||||
// Exact Flags match required.
|
// Exact Flags match required.
|
||||||
if ((opts.mMsgFlagMask & opts.mMsgFlagFilter) == (opts.mMsgFlagMask & meta->mMsgFlags))
|
if ( (opts.mMsgFlagMask & opts.mMsgFlagFilter) ==
|
||||||
|
(opts.mMsgFlagMask & meta->mMsgFlags) )
|
||||||
{
|
{
|
||||||
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;
|
<< " Accepting Msg as FlagMatches: "
|
||||||
std::cerr << std::endl;
|
<< " Mask: " << opts.mMsgFlagMask
|
||||||
|
<< " FlagFilter: " << opts.mMsgFlagFilter
|
||||||
flagMatch = true;
|
<< " MsgFlag: " << meta->mMsgFlags
|
||||||
|
<< " MsgId: " << meta->mMsgId << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "checkMsgFilter() Dropping Msg due to !FlagMatch ";
|
#ifdef DATA_DEBUG
|
||||||
std::cerr << " Mask: " << opts.mMsgFlagMask << " FlagFilter: " << opts.mMsgFlagFilter;
|
std::cerr << __PRETTY_FUNCTION__
|
||||||
std::cerr << " MsgFlag: " << meta->mMsgFlags << " MsgId: " << meta->mMsgId;
|
<< " Dropping Msg due to !FlagMatch "
|
||||||
std::cerr << std::endl;
|
<< " Mask: " << opts.mMsgFlagMask
|
||||||
|
<< " FlagFilter: " << opts.mMsgFlagFilter
|
||||||
|
<< " MsgFlag: " << meta->mMsgFlags
|
||||||
|
<< " MsgId: " << meta->mMsgId << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
flagMatch = false;
|
return false;
|
||||||
}
|
}
|
||||||
}else{
|
}
|
||||||
flagMatch = true;
|
else
|
||||||
|
{
|
||||||
|
#ifdef DATA_DEBUG
|
||||||
|
std::cerr << __PRETTY_FUNCTION__
|
||||||
|
<< " Flags check not requested"
|
||||||
|
<< " mMsgFlagMask: " << opts.mMsgFlagMask
|
||||||
|
<< " MsgId: " << meta->mMsgId << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return statusMatch && flagMatch;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5291,6 +5291,7 @@ void RsGxsNetService::receiveTurtleSearchResults(TurtleRequestId req,const unsig
|
|||||||
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,
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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;
|
||||||
|
|
||||||
@ -330,7 +330,14 @@ 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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Clear completed downloaded files list
|
||||||
|
* @jsonapi{development}
|
||||||
|
* @return false on error, true otherwise
|
||||||
|
*/
|
||||||
virtual bool FileClearCompleted() = 0;
|
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;
|
||||||
|
|
||||||
|
@ -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 *
|
||||||
|
@ -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,91 +261,15 @@ 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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @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;
|
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
|
||||||
* @jsonapi{development}
|
* @jsonapi{development}
|
||||||
@ -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;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
};
|
};
|
||||||
|
@ -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 *
|
||||||
|
@ -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,183 @@
|
|||||||
* 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;
|
RsTlvGxsIdSet mAdminList;
|
||||||
RsTlvGxsMsgIdSet mPinnedPosts;
|
RsTlvGxsMsgIdSet mPinnedPosts;
|
||||||
|
|
||||||
|
/// @see RsSerializable
|
||||||
|
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() {}
|
||||||
|
|
||||||
/* Specific Service Data */
|
/**
|
||||||
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) = 0;
|
* @brief Create forum. Blocking API.
|
||||||
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
|
* @jsonapi{development}
|
||||||
//Not currently used
|
* @param[inout] forum Forum data (name, description...)
|
||||||
//virtual bool getRelatedMessages(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
|
* @return false on error, true otherwise
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
|
|
||||||
|
|
||||||
//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 createMsg(uint32_t &token, RsGxsForumMsg &msg) = 0;
|
|
||||||
/*!
|
|
||||||
* 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 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 message metadatas for a specific forum. Blocking API
|
||||||
|
* @jsonapi{development}
|
||||||
|
* @param[in] forumId id of the forum of which the content is requested
|
||||||
|
* @param[out] msgMetas storage for the forum messages meta data
|
||||||
|
* @return false if something failed, true otherwhise
|
||||||
|
*/
|
||||||
|
virtual bool getForumMsgMetaData( const RsGxsGroupId& forumId,
|
||||||
|
std::vector<RsMsgMetaData>& msgMetas) = 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] msgsIds list of message ids to request
|
||||||
|
* @param[out] msgs storage for the forum messages
|
||||||
|
* @return false if something failed, true otherwhise
|
||||||
|
*/
|
||||||
|
virtual bool getForumContent(
|
||||||
|
const RsGxsGroupId& forumId,
|
||||||
|
std::set<RsGxsMessageId>& msgsIds,
|
||||||
|
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 */
|
||||||
|
RS_DEPRECATED_FOR("getForumsSummaries, getForumsInfo")
|
||||||
|
virtual bool getGroupData(const uint32_t &token, std::vector<RsGxsForumGroup> &groups) = 0;
|
||||||
|
RS_DEPRECATED_FOR(getForumContent)
|
||||||
|
virtual bool getMsgData(const uint32_t &token, std::vector<RsGxsForumMsg> &msgs) = 0;
|
||||||
|
RS_DEPRECATED_FOR(markRead)
|
||||||
|
virtual void setMessageReadStatus(uint32_t& token, const RsGxsGrpMsgIdPair& msgId, bool read) = 0;
|
||||||
|
RS_DEPRECATED_FOR(createForum)
|
||||||
|
virtual bool createGroup(uint32_t &token, RsGxsForumGroup &group) = 0;
|
||||||
|
RS_DEPRECATED_FOR(createMessage)
|
||||||
|
virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg) = 0;
|
||||||
|
RS_DEPRECATED_FOR(editForum)
|
||||||
|
virtual bool updateGroup(uint32_t &token, RsGxsForumGroup &group) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
@ -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 *
|
||||||
|
@ -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;
|
||||||
|
@ -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 *
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
#define RS_MAJOR_VERSION 0
|
|
||||||
#define RS_MINOR_VERSION 6
|
|
||||||
#define RS_BUILD_NUMBER 4
|
|
||||||
#define RS_BUILD_NUMBER_ADD ""
|
|
||||||
|
|
||||||
// The revision number should be the 4 first bytes of the git revision hash, which is obtained using:
|
|
||||||
// git log --pretty="%H" | head -1 | cut -c1-8
|
|
||||||
//
|
|
||||||
// Do not forget the 0x, since the RS_REVISION_NUMBER should be an integer.
|
|
||||||
//
|
|
||||||
#define RS_REVISION_STRING "$REV$"
|
|
||||||
#define RS_REVISION_NUMBER 0x$REV$
|
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
@ -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;
|
||||||
|
@ -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 *
|
||||||
|
@ -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 *
|
||||||
|
31
libretroshare/src/serialiser/rsserializable.cc
Normal file
31
libretroshare/src/serialiser/rsserializable.cc
Normal 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;
|
||||||
|
}
|
@ -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);
|
||||||
|
@ -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; }
|
||||||
|
@ -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);
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "retroshare/rsnotify.h"
|
#include "retroshare/rsnotify.h"
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
// For Dummy Msgs.
|
// For Dummy Msgs.
|
||||||
#include "util/rsrandom.h"
|
#include "util/rsrandom.h"
|
||||||
@ -50,7 +51,7 @@
|
|||||||
* #define GXSCHANNEL_DEBUG 1
|
* #define GXSCHANNEL_DEBUG 1
|
||||||
****/
|
****/
|
||||||
|
|
||||||
/*extern*/ RsGxsChannels *rsGxsChannels = nullptr;
|
/*extern*/ RsGxsChannels* rsGxsChannels = nullptr;
|
||||||
|
|
||||||
|
|
||||||
#define GXSCHANNEL_STOREPERIOD (3600 * 24 * 30)
|
#define GXSCHANNEL_STOREPERIOD (3600 * 24 * 30)
|
||||||
@ -76,7 +77,10 @@ p3GxsChannels::p3GxsChannels(
|
|||||||
RsGenExchange( gds, nes, new RsGxsChannelSerialiser(),
|
RsGenExchange( gds, nes, new RsGxsChannelSerialiser(),
|
||||||
RS_SERVICE_GXS_TYPE_CHANNELS, gixs, channelsAuthenPolicy() ),
|
RS_SERVICE_GXS_TYPE_CHANNELS, gixs, channelsAuthenPolicy() ),
|
||||||
RsGxsChannels(static_cast<RsGxsIface&>(*this)), GxsTokenQueue(this),
|
RsGxsChannels(static_cast<RsGxsIface&>(*this)), GxsTokenQueue(this),
|
||||||
mSearchCallbacksMapMutex("GXS channels search")
|
mSubscribedGroupsMutex("GXS channels subscribed groups cache"),
|
||||||
|
mKnownChannelsMutex("GXS channels known channels timestamp cache"),
|
||||||
|
mSearchCallbacksMapMutex("GXS channels search callbacks map"),
|
||||||
|
mDistantChannelsCallbacksMapMutex("GXS channels distant channels callbacks map")
|
||||||
{
|
{
|
||||||
// For Dummy Msgs.
|
// For Dummy Msgs.
|
||||||
mGenActive = false;
|
mGenActive = false;
|
||||||
@ -174,7 +178,10 @@ bool p3GxsChannels::saveList(bool &cleanup, std::list<RsItem *>&saveList)
|
|||||||
|
|
||||||
RsGxsForumNotifyRecordsItem *item = new RsGxsForumNotifyRecordsItem ;
|
RsGxsForumNotifyRecordsItem *item = new RsGxsForumNotifyRecordsItem ;
|
||||||
|
|
||||||
item->records = mKnownChannels ;
|
{
|
||||||
|
RS_STACK_MUTEX(mKnownChannelsMutex);
|
||||||
|
item->records = mKnownChannels;
|
||||||
|
}
|
||||||
|
|
||||||
saveList.push_back(item) ;
|
saveList.push_back(item) ;
|
||||||
return true;
|
return true;
|
||||||
@ -191,8 +198,9 @@ bool p3GxsChannels::loadList(std::list<RsItem *>& loadList)
|
|||||||
|
|
||||||
RsGxsForumNotifyRecordsItem *fnr = dynamic_cast<RsGxsForumNotifyRecordsItem*>(item) ;
|
RsGxsForumNotifyRecordsItem *fnr = dynamic_cast<RsGxsForumNotifyRecordsItem*>(item) ;
|
||||||
|
|
||||||
if(fnr != NULL)
|
if(fnr)
|
||||||
{
|
{
|
||||||
|
RS_STACK_MUTEX(mKnownChannelsMutex);
|
||||||
mKnownChannels.clear();
|
mKnownChannels.clear();
|
||||||
|
|
||||||
for(auto it(fnr->records.begin());it!=fnr->records.end();++it)
|
for(auto it(fnr->records.begin());it!=fnr->records.end();++it)
|
||||||
@ -228,7 +236,7 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::cerr << "p3GxsChannels::notifyChanges() : " << changes.size() << "changes to notify" << std::endl;
|
std::cerr << "p3GxsChannels::notifyChanges() : " << changes.size() << "changes to notify" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
p3Notify *notify = NULL;
|
p3Notify* notify = nullptr;
|
||||||
if (!changes.empty())
|
if (!changes.empty())
|
||||||
{
|
{
|
||||||
notify = RsServer::notify();
|
notify = RsServer::notify();
|
||||||
@ -271,8 +279,7 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
std::cerr << "p3GxsChannels::notifyChanges() Msgs for Group: " << mit->first;
|
std::cerr << "p3GxsChannels::notifyChanges() Msgs for Group: " << mit->first;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
bool enabled = false ;
|
bool enabled = false;
|
||||||
|
|
||||||
if (autoDownloadEnabled(mit->first, enabled) && enabled)
|
if (autoDownloadEnabled(mit->first, enabled) && enabled)
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
@ -306,6 +313,7 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
/* group received */
|
/* group received */
|
||||||
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
std::list<RsGxsGroupId> &grpList = grpChange->mGrpIdList;
|
||||||
std::list<RsGxsGroupId>::iterator git;
|
std::list<RsGxsGroupId>::iterator git;
|
||||||
|
RS_STACK_MUTEX(mKnownChannelsMutex);
|
||||||
for (git = grpList.begin(); git != grpList.end(); ++git)
|
for (git = grpList.begin(); git != grpList.end(); ++git)
|
||||||
{
|
{
|
||||||
if(mKnownChannels.find(*git) == mKnownChannels.end())
|
if(mKnownChannels.find(*git) == mKnownChannels.end())
|
||||||
@ -338,6 +346,7 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
/* shouldn't need to worry about groups - as they need to be subscribed to */
|
/* shouldn't need to worry about groups - as they need to be subscribed to */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!unprocessedGroups.empty())
|
||||||
request_SpecificSubscribedGroups(unprocessedGroups);
|
request_SpecificSubscribedGroups(unprocessedGroups);
|
||||||
|
|
||||||
RsGxsIfaceHelper::receiveChanges(changes);
|
RsGxsIfaceHelper::receiveChanges(changes);
|
||||||
@ -345,8 +354,7 @@ void p3GxsChannels::notifyChanges(std::vector<RsGxsNotify *> &changes)
|
|||||||
|
|
||||||
void p3GxsChannels::service_tick()
|
void p3GxsChannels::service_tick()
|
||||||
{
|
{
|
||||||
|
static rstime_t last_dummy_tick = 0;
|
||||||
static rstime_t last_dummy_tick = 0;
|
|
||||||
|
|
||||||
if (time(NULL) > last_dummy_tick + 5)
|
if (time(NULL) > last_dummy_tick + 5)
|
||||||
{
|
{
|
||||||
@ -414,18 +422,21 @@ bool p3GxsChannels::groupShareKeys(
|
|||||||
* at the moment - fix it up later
|
* at the moment - fix it up later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool p3GxsChannels::getPostData(const uint32_t &token, std::vector<RsGxsChannelPost> &msgs, std::vector<RsGxsComment> &cmts)
|
bool p3GxsChannels::getPostData(
|
||||||
|
const uint32_t &token, std::vector<RsGxsChannelPost> &msgs,
|
||||||
|
std::vector<RsGxsComment> &cmts )
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::getPostData()";
|
std::cerr << __PRETTY_FUNCTION__ << std::cerr << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GxsMsgDataMap msgData;
|
GxsMsgDataMap msgData;
|
||||||
bool ok = RsGenExchange::getMsgData(token, msgData);
|
if(!RsGenExchange::getMsgData(token, msgData))
|
||||||
|
|
||||||
if(ok)
|
|
||||||
{
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ <<" ERROR in request" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
GxsMsgDataMap::iterator mit = msgData.begin();
|
GxsMsgDataMap::iterator mit = msgData.begin();
|
||||||
|
|
||||||
for(; mit != msgData.end(); ++mit)
|
for(; mit != msgData.end(); ++mit)
|
||||||
@ -435,7 +446,8 @@ bool p3GxsChannels::getPostData(const uint32_t &token, std::vector<RsGxsChannelP
|
|||||||
|
|
||||||
for(; vit != msgItems.end(); ++vit)
|
for(; vit != msgItems.end(); ++vit)
|
||||||
{
|
{
|
||||||
RsGxsChannelPostItem* postItem = dynamic_cast<RsGxsChannelPostItem*>(*vit);
|
RsGxsChannelPostItem* postItem =
|
||||||
|
dynamic_cast<RsGxsChannelPostItem*>(*vit);
|
||||||
|
|
||||||
if(postItem)
|
if(postItem)
|
||||||
{
|
{
|
||||||
@ -446,7 +458,8 @@ bool p3GxsChannels::getPostData(const uint32_t &token, std::vector<RsGxsChannelP
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RsGxsCommentItem* cmtItem = dynamic_cast<RsGxsCommentItem*>(*vit);
|
RsGxsCommentItem* cmtItem =
|
||||||
|
dynamic_cast<RsGxsCommentItem*>(*vit);
|
||||||
if(cmtItem)
|
if(cmtItem)
|
||||||
{
|
{
|
||||||
RsGxsComment cmt;
|
RsGxsComment cmt;
|
||||||
@ -466,23 +479,27 @@ bool p3GxsChannels::getPostData(const uint32_t &token, std::vector<RsGxsChannelP
|
|||||||
//const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS = 0x0217;
|
//const uint16_t RS_SERVICE_GXS_TYPE_CHANNELS = 0x0217;
|
||||||
//const uint8_t RS_PKT_SUBTYPE_GXSCHANNEL_POST_ITEM = 0x03;
|
//const uint8_t RS_PKT_SUBTYPE_GXSCHANNEL_POST_ITEM = 0x03;
|
||||||
//const uint8_t RS_PKT_SUBTYPE_GXSCOMMENT_COMMENT_ITEM = 0xf1;
|
//const uint8_t RS_PKT_SUBTYPE_GXSCOMMENT_COMMENT_ITEM = 0xf1;
|
||||||
std::cerr << "Not a GxsChannelPostItem neither a RsGxsCommentItem"
|
std::cerr << __PRETTY_FUNCTION__
|
||||||
<< " PacketService=" << std::hex << (int)msg->PacketService() << std::dec
|
<< " Not a GxsChannelPostItem neither a "
|
||||||
<< " PacketSubType=" << std::hex << (int)msg->PacketSubType() << std::dec
|
<< "RsGxsCommentItem PacketService=" << std::hex
|
||||||
|
<< (int)msg->PacketService() << std::dec
|
||||||
|
<< " PacketSubType=" << std::hex
|
||||||
|
<< (int)msg->PacketSubType() << std::dec
|
||||||
<< " , deleting!" << std::endl;
|
<< " , deleting!" << std::endl;
|
||||||
delete *vit;
|
delete *vit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
std::cerr << "p3GxsChannels::getPostData() ERROR in request";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ok;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::getPostData(
|
||||||
|
const uint32_t& token, std::vector<RsGxsChannelPost>& posts )
|
||||||
|
{
|
||||||
|
std::vector<RsGxsComment> cmts;
|
||||||
|
return getPostData(token, posts, cmts);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Not currently used
|
//Not currently used
|
||||||
@ -548,21 +565,6 @@ bool p3GxsChannels::getPostData(const uint32_t &token, std::vector<RsGxsChannelP
|
|||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
/********************************************************************************************/
|
/********************************************************************************************/
|
||||||
|
|
||||||
#if 0
|
|
||||||
bool p3GxsChannels::setChannelAutoDownload(uint32_t &token, const RsGxsGroupId &groupId, bool autoDownload)
|
|
||||||
{
|
|
||||||
std::cerr << "p3GxsChannels::setChannelAutoDownload()";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
|
|
||||||
// we don't actually use the token at this point....
|
|
||||||
//bool p3GxsChannels::setAutoDownload(const RsGxsGroupId &groupId, bool enabled)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool p3GxsChannels::setChannelAutoDownload(const RsGxsGroupId &groupId, bool enabled)
|
bool p3GxsChannels::setChannelAutoDownload(const RsGxsGroupId &groupId, bool enabled)
|
||||||
{
|
{
|
||||||
return setAutoDownload(groupId, enabled);
|
return setAutoDownload(groupId, enabled);
|
||||||
@ -574,20 +576,22 @@ bool p3GxsChannels::getChannelAutoDownload(const RsGxsGroupId &groupId, bool& en
|
|||||||
return autoDownloadEnabled(groupId,enabled);
|
return autoDownloadEnabled(groupId,enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3GxsChannels::setChannelDownloadDirectory(const RsGxsGroupId &groupId, const std::string& directory)
|
bool p3GxsChannels::setChannelDownloadDirectory(
|
||||||
|
const RsGxsGroupId &groupId, const std::string& directory )
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::setDownloadDirectory() id: " << groupId << " to: " << directory << std::endl;
|
std::cerr << __PRETTY_FUNCTION__ << " id: " << groupId << " to: "
|
||||||
|
<< directory << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
RS_STACK_MUTEX(mSubscribedGroupsMutex);
|
||||||
|
|
||||||
|
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
||||||
it = mSubscribedGroups.find(groupId);
|
it = mSubscribedGroups.find(groupId);
|
||||||
if (it == mSubscribedGroups.end())
|
if (it == mSubscribedGroups.end())
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
std::cerr << __PRETTY_FUNCTION__ << " Error! Unknown groupId: "
|
||||||
std::cerr << "p3GxsChannels::setAutoDownload() Missing Group" << std::endl;
|
<< groupId.toStdString() << std::endl;
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -597,13 +601,12 @@ bool p3GxsChannels::setChannelDownloadDirectory(const RsGxsGroupId &groupId, con
|
|||||||
|
|
||||||
if (directory == ss.mDownloadDirectory)
|
if (directory == ss.mDownloadDirectory)
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
std::cerr << __PRETTY_FUNCTION__ << " Warning! groupId: " << groupId
|
||||||
std::cerr << "p3GxsChannels::setDownloadDirectory() WARNING setting looks okay already" << std::endl;
|
<< " Was already configured to download into: " << directory
|
||||||
#endif
|
<< std::endl;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we are just going to set it anyway. */
|
|
||||||
ss.mDownloadDirectory = directory;
|
ss.mDownloadDirectory = directory;
|
||||||
std::string serviceString = ss.save();
|
std::string serviceString = ss.save();
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
@ -611,6 +614,13 @@ bool p3GxsChannels::setChannelDownloadDirectory(const RsGxsGroupId &groupId, con
|
|||||||
it->second.mServiceString = serviceString; // update Local Cache.
|
it->second.mServiceString = serviceString; // update Local Cache.
|
||||||
RsGenExchange::setGroupServiceString(token, groupId, serviceString); // update dbase.
|
RsGenExchange::setGroupServiceString(token, groupId, serviceString); // update dbase.
|
||||||
|
|
||||||
|
if(waitToken(token) != RsTokenService::COMPLETE)
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << " Error! Feiled setting group "
|
||||||
|
<< " service string" << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/* now reload it */
|
/* now reload it */
|
||||||
std::list<RsGxsGroupId> groups;
|
std::list<RsGxsGroupId> groups;
|
||||||
groups.push_back(groupId);
|
groups.push_back(groupId);
|
||||||
@ -626,16 +636,15 @@ bool p3GxsChannels::getChannelDownloadDirectory(const RsGxsGroupId & groupId,std
|
|||||||
std::cerr << "p3GxsChannels::getChannelDownloadDirectory(" << id << ")" << std::endl;
|
std::cerr << "p3GxsChannels::getChannelDownloadDirectory(" << id << ")" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RS_STACK_MUTEX(mSubscribedGroupsMutex);
|
||||||
|
|
||||||
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
||||||
|
|
||||||
it = mSubscribedGroups.find(groupId);
|
it = mSubscribedGroups.find(groupId);
|
||||||
|
|
||||||
if (it == mSubscribedGroups.end())
|
if (it == mSubscribedGroups.end())
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
std::cerr << __PRETTY_FUNCTION__ << " Error! Unknown groupId: "
|
||||||
std::cerr << "p3GxsChannels::getChannelDownloadDirectory() No Entry" << std::endl;
|
<< groupId.toStdString() << std::endl;
|
||||||
#endif
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,7 +653,7 @@ bool p3GxsChannels::getChannelDownloadDirectory(const RsGxsGroupId & groupId,std
|
|||||||
ss.load(it->second.mServiceString);
|
ss.load(it->second.mServiceString);
|
||||||
directory = ss.mDownloadDirectory;
|
directory = ss.mDownloadDirectory;
|
||||||
|
|
||||||
return true ;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void p3GxsChannels::request_AllSubscribedGroups()
|
void p3GxsChannels::request_AllSubscribedGroups()
|
||||||
@ -668,7 +677,8 @@ void p3GxsChannels::request_AllSubscribedGroups()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void p3GxsChannels::request_SpecificSubscribedGroups(const std::list<RsGxsGroupId> &groups)
|
void p3GxsChannels::request_SpecificSubscribedGroups(
|
||||||
|
const std::list<RsGxsGroupId> &groups )
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::request_SpecificSubscribedGroups()";
|
std::cerr << "p3GxsChannels::request_SpecificSubscribedGroups()";
|
||||||
@ -681,8 +691,19 @@ void p3GxsChannels::request_SpecificSubscribedGroups(const std::list<RsGxsGroupI
|
|||||||
|
|
||||||
uint32_t token = 0;
|
uint32_t token = 0;
|
||||||
|
|
||||||
RsGenExchange::getTokenService()->requestGroupInfo(token, ansType, opts, groups);
|
if(!RsGenExchange::getTokenService()->
|
||||||
GxsTokenQueue::queueRequest(token, GXSCHANNELS_SUBSCRIBED_META);
|
requestGroupInfo(token, ansType, opts, groups))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << " Failed requesting groups info!"
|
||||||
|
<< std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!GxsTokenQueue::queueRequest(token, GXSCHANNELS_SUBSCRIBED_META))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << " Failed queuing request!"
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -746,6 +767,7 @@ void p3GxsChannels::updateSubscribedGroup(const RsGroupMetaData &group)
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RS_STACK_MUTEX(mSubscribedGroupsMutex);
|
||||||
mSubscribedGroups[group.mGroupId] = group;
|
mSubscribedGroups[group.mGroupId] = group;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -757,9 +779,8 @@ void p3GxsChannels::clearUnsubscribedGroup(const RsGxsGroupId &id)
|
|||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//std::map<RsGxsGroupId, RsGrpMetaData> mSubscribedGroups;
|
RS_STACK_MUTEX(mSubscribedGroupsMutex);
|
||||||
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
||||||
|
|
||||||
it = mSubscribedGroups.find(id);
|
it = mSubscribedGroups.find(id);
|
||||||
if (it != mSubscribedGroups.end())
|
if (it != mSubscribedGroups.end())
|
||||||
{
|
{
|
||||||
@ -838,24 +859,20 @@ void p3GxsChannels::request_GroupUnprocessedPosts(const std::list<RsGxsGroupId>
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void p3GxsChannels::load_SpecificUnprocessedPosts(const uint32_t &token)
|
void p3GxsChannels::load_unprocessedPosts(uint32_t token)
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::load_SpecificUnprocessedPosts";
|
std::cerr << "p3GxsChannels::load_SpecificUnprocessedPosts" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::vector<RsGxsChannelPost> posts;
|
std::vector<RsGxsChannelPost> posts;
|
||||||
if (!getPostData(token, posts))
|
if (!getPostData(token, posts))
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
std::cerr << __PRETTY_FUNCTION__ << " ERROR getting post data!"
|
||||||
std::cerr << "p3GxsChannels::load_SpecificUnprocessedPosts ERROR";
|
<< std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<RsGxsChannelPost>::iterator it;
|
std::vector<RsGxsChannelPost>::iterator it;
|
||||||
for(it = posts.begin(); it != posts.end(); ++it)
|
for(it = posts.begin(); it != posts.end(); ++it)
|
||||||
{
|
{
|
||||||
@ -864,58 +881,27 @@ void p3GxsChannels::load_SpecificUnprocessedPosts(const uint32_t &token)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void p3GxsChannels::load_GroupUnprocessedPosts(const uint32_t &token)
|
|
||||||
{
|
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
|
||||||
std::cerr << "p3GxsChannels::load_GroupUnprocessedPosts";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
std::vector<RsGxsChannelPost> posts;
|
|
||||||
if (!getPostData(token, posts))
|
|
||||||
{
|
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
|
||||||
std::cerr << "p3GxsChannels::load_GroupUnprocessedPosts ERROR";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
std::vector<RsGxsChannelPost>::iterator it;
|
|
||||||
for(it = posts.begin(); it != posts.end(); ++it)
|
|
||||||
{
|
|
||||||
handleUnprocessedPost(*it);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void p3GxsChannels::handleUnprocessedPost(const RsGxsChannelPost &msg)
|
void p3GxsChannels::handleUnprocessedPost(const RsGxsChannelPost &msg)
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::handleUnprocessedPost() GroupId: " << msg.mMeta.mGroupId << " MsgId: " << msg.mMeta.mMsgId;
|
std::cerr << __PRETTY_FUNCTION__ << " GroupId: " << msg.mMeta.mGroupId
|
||||||
std::cerr << std::endl;
|
<< " MsgId: " << msg.mMeta.mMsgId << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!IS_MSG_UNPROCESSED(msg.mMeta.mMsgStatus))
|
if (!IS_MSG_UNPROCESSED(msg.mMeta.mMsgStatus))
|
||||||
{
|
{
|
||||||
std::cerr << "p3GxsChannels::handleUnprocessedPost() Msg already Processed";
|
std::cerr << __PRETTY_FUNCTION__ << " ERROR Msg already Processed! "
|
||||||
std::cerr << std::endl;
|
<< "mMsgId: " << msg.mMeta.mMsgId << std::endl;
|
||||||
std::cerr << "p3GxsChannels::handleUnprocessedPost() ERROR - this should not happen";
|
|
||||||
std::cerr << std::endl;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool enabled = false ;
|
|
||||||
|
|
||||||
/* check that autodownload is set */
|
/* check that autodownload is set */
|
||||||
if (autoDownloadEnabled(msg.mMeta.mGroupId,enabled) && enabled )
|
bool enabled = false;
|
||||||
|
if (autoDownloadEnabled(msg.mMeta.mGroupId, enabled) && enabled)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::handleUnprocessedPost() AutoDownload Enabled ... handling";
|
std::cerr << __PRETTY_FUNCTION__ << " AutoDownload Enabled... handling"
|
||||||
std::cerr << std::endl;
|
<< std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* check the date is not too old */
|
/* check the date is not too old */
|
||||||
@ -928,8 +914,7 @@ void p3GxsChannels::handleUnprocessedPost(const RsGxsChannelPost &msg)
|
|||||||
// MORE THOUGHT HAS TO GO INTO THAT STUFF.
|
// MORE THOUGHT HAS TO GO INTO THAT STUFF.
|
||||||
|
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::handleUnprocessedPost() START DOWNLOAD";
|
std::cerr << __PRETTY_FUNCTION__ << " START DOWNLOAD" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::list<RsGxsFile>::const_iterator fit;
|
std::list<RsGxsFile>::const_iterator fit;
|
||||||
@ -952,7 +937,10 @@ void p3GxsChannels::handleUnprocessedPost(const RsGxsChannelPost &msg)
|
|||||||
rsFiles->FileRequest(fname, hash, size, localpath, flags, srcIds);
|
rsFiles->FileRequest(fname, hash, size, localpath, flags, srcIds);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
std::cerr << "WARNING: Channel file is not auto-downloaded because its size exceeds the threshold of " << CHANNEL_MAX_AUTO_DL << " bytes." << std::endl;
|
std::cerr << __PRETTY_FUNCTION__ << "Channel file is not auto-"
|
||||||
|
<< "downloaded because its size exceeds the threshold"
|
||||||
|
<< " of " << CHANNEL_MAX_AUTO_DL << " bytes."
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -987,17 +975,16 @@ void p3GxsChannels::handleResponse(uint32_t token, uint32_t req_type)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GXSCHANNELS_UNPROCESSED_SPECIFIC:
|
case GXSCHANNELS_UNPROCESSED_SPECIFIC:
|
||||||
load_SpecificUnprocessedPosts(token);
|
load_unprocessedPosts(token);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GXSCHANNELS_UNPROCESSED_GENERIC:
|
case GXSCHANNELS_UNPROCESSED_GENERIC:
|
||||||
load_SpecificUnprocessedPosts(token);
|
load_unprocessedPosts(token);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
/* error */
|
std::cerr << __PRETTY_FUNCTION__ << "ERROR Unknown Request Type: "
|
||||||
std::cerr << "p3GxsService::handleResponse() Unknown Request Type: " << req_type;
|
<< req_type << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1029,36 +1016,159 @@ bool p3GxsChannels::getChannelsInfo(
|
|||||||
return getGroupData(token, channelsInfo);
|
return getGroupData(token, channelsInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3GxsChannels::getChannelsContent(
|
bool p3GxsChannels::getContentSummaries(
|
||||||
const std::list<RsGxsGroupId>& chanIds,
|
const RsGxsGroupId& channelId, std::vector<RsMsgMetaData>& summaries )
|
||||||
|
{
|
||||||
|
uint32_t token;
|
||||||
|
RsTokReqOptions opts;
|
||||||
|
opts.mReqType = GXS_REQUEST_TYPE_MSG_META;
|
||||||
|
|
||||||
|
std::list<RsGxsGroupId> channelIds;
|
||||||
|
channelIds.push_back(channelId);
|
||||||
|
|
||||||
|
if( !requestMsgInfo(token, opts, channelIds) ||
|
||||||
|
waitToken(token, std::chrono::seconds(5)) != RsTokenService::COMPLETE )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
GxsMsgMetaMap metaMap;
|
||||||
|
bool res = RsGenExchange::getMsgMeta(token, metaMap);
|
||||||
|
summaries = metaMap[channelId];
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::getChannelContent( const RsGxsGroupId& channelId,
|
||||||
|
const std::set<RsGxsMessageId>& contentsIds,
|
||||||
std::vector<RsGxsChannelPost>& posts,
|
std::vector<RsGxsChannelPost>& posts,
|
||||||
std::vector<RsGxsComment>& comments )
|
std::vector<RsGxsComment>& comments )
|
||||||
{
|
{
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
RsTokReqOptions opts;
|
RsTokReqOptions opts;
|
||||||
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA;
|
||||||
if( !requestMsgInfo(token, opts, chanIds)
|
|
||||||
|| waitToken(token) != RsTokenService::COMPLETE ) return false;
|
GxsMsgReq msgIds;
|
||||||
|
msgIds[channelId] = contentsIds;
|
||||||
|
|
||||||
|
if( !requestMsgInfo(token, opts, msgIds) ||
|
||||||
|
waitToken(token) != RsTokenService::COMPLETE ) return false;
|
||||||
|
|
||||||
return getPostData(token, posts, comments);
|
return getPostData(token, posts, comments);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3GxsChannels::createChannel(RsGxsChannelGroup& channel)
|
bool p3GxsChannels::createChannel(RsGxsChannelGroup& channel)
|
||||||
{
|
{
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
if( !createGroup(token, channel)
|
if(!createGroup(token, channel))
|
||||||
|| waitToken(token) != RsTokenService::COMPLETE )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(RsGenExchange::getPublishedGroupMeta(token, channel.mMeta))
|
|
||||||
{
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating group."
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(waitToken(token) != RsTokenService::COMPLETE)
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! GXS operation failed."
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!RsGenExchange::getPublishedGroupMeta(token, channel.mMeta))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failure getting updated "
|
||||||
|
<< " group data." << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef RS_DEEP_SEARCH
|
#ifdef RS_DEEP_SEARCH
|
||||||
DeepSearch::indexChannelGroup(channel);
|
DeepSearch::indexChannelGroup(channel);
|
||||||
#endif // RS_DEEP_SEARCH
|
#endif // RS_DEEP_SEARCH
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::createComment(RsGxsComment& comment)
|
||||||
|
{
|
||||||
|
uint32_t token;
|
||||||
|
if(!createComment(token, comment))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating comment."
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(waitToken(token) != RsTokenService::COMPLETE)
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! GXS operation failed."
|
||||||
|
<< std::endl;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!RsGenExchange::getPublishedMsgMeta(token, comment.mMeta))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failure getting generated "
|
||||||
|
<< " comment data." << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::createVote(RsGxsVote& vote)
|
||||||
|
{
|
||||||
|
uint32_t token;
|
||||||
|
if(!createVote(token, vote))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed creating vote."
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(waitToken(token) != RsTokenService::COMPLETE)
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! GXS operation failed."
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!RsGenExchange::getPublishedMsgMeta(token, vote.mMeta))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failure getting generated "
|
||||||
|
<< " vote data." << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::editChannel(RsGxsChannelGroup& channel)
|
||||||
|
{
|
||||||
|
uint32_t token;
|
||||||
|
if(!updateGroup(token, channel))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failed updating group."
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(waitToken(token) != RsTokenService::COMPLETE)
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! GXS operation failed."
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!RsGenExchange::getPublishedGroupMeta(token, channel.mMeta))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! Failure getting updated "
|
||||||
|
<< " group data." << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef RS_DEEP_SEARCH
|
||||||
|
DeepSearch::indexChannelGroup(channel);
|
||||||
|
#endif // RS_DEEP_SEARCH
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3GxsChannels::createPost(RsGxsChannelPost& post)
|
bool p3GxsChannels::createPost(RsGxsChannelPost& post)
|
||||||
@ -1079,6 +1189,29 @@ bool p3GxsChannels::createPost(RsGxsChannelPost& post)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::subscribeToChannel(
|
||||||
|
const RsGxsGroupId& groupId, bool subscribe )
|
||||||
|
{
|
||||||
|
uint32_t token;
|
||||||
|
if( !subscribeToGroup(token, groupId, subscribe)
|
||||||
|
|| waitToken(token) != RsTokenService::COMPLETE ) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::markRead(const RsGxsGrpMsgIdPair& msgId, bool read)
|
||||||
|
{
|
||||||
|
uint32_t token;
|
||||||
|
setMessageReadStatus(token, msgId, read);
|
||||||
|
if(waitToken(token) != RsTokenService::COMPLETE ) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool p3GxsChannels::shareChannelKeys(
|
||||||
|
const RsGxsGroupId& channelId, const std::set<RsPeerId>& peers)
|
||||||
|
{
|
||||||
|
return groupShareKeys(channelId, peers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// Blocking API implementation end
|
/// Blocking API implementation end
|
||||||
@ -1092,20 +1225,17 @@ bool p3GxsChannels::createPost(RsGxsChannelPost& post)
|
|||||||
bool p3GxsChannels::autoDownloadEnabled(const RsGxsGroupId &groupId,bool& enabled)
|
bool p3GxsChannels::autoDownloadEnabled(const RsGxsGroupId &groupId,bool& enabled)
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::autoDownloadEnabled(" << id << ")";
|
std::cerr << "p3GxsChannels::autoDownloadEnabled(" << groupId << ")";
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RS_STACK_MUTEX(mSubscribedGroupsMutex);
|
||||||
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
||||||
|
|
||||||
it = mSubscribedGroups.find(groupId);
|
it = mSubscribedGroups.find(groupId);
|
||||||
if (it == mSubscribedGroups.end())
|
if (it == mSubscribedGroups.end())
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
std::cerr << __PRETTY_FUNCTION__ << " WARNING requested channel: "
|
||||||
std::cerr << "p3GxsChannels::autoDownloadEnabled() No Entry";
|
<< groupId << " is not subscribed" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1190,23 +1320,20 @@ std::string SSGxsChannelGroup::save() const
|
|||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3GxsChannels::setAutoDownload(const RsGxsGroupId &groupId, bool enabled)
|
bool p3GxsChannels::setAutoDownload(const RsGxsGroupId& groupId, bool enabled)
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
#ifdef GXSCHANNELS_DEBUG
|
||||||
std::cerr << "p3GxsChannels::setAutoDownload() id: " << groupId << " enabled: " << enabled;
|
std::cerr << __PRETTY_FUNCTION__ << " id: " << groupId
|
||||||
std::cerr << std::endl;
|
<< " enabled: " << enabled << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
RS_STACK_MUTEX(mSubscribedGroupsMutex);
|
||||||
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
std::map<RsGxsGroupId, RsGroupMetaData>::iterator it;
|
||||||
|
|
||||||
it = mSubscribedGroups.find(groupId);
|
it = mSubscribedGroups.find(groupId);
|
||||||
if (it == mSubscribedGroups.end())
|
if (it == mSubscribedGroups.end())
|
||||||
{
|
{
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
std::cerr << __PRETTY_FUNCTION__ << " ERROR requested channel: "
|
||||||
std::cerr << "p3GxsChannels::setAutoDownload() Missing Group";
|
<< groupId.toStdString() << " is not subscribed!" << std::endl;
|
||||||
std::cerr << std::endl;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1215,27 +1342,21 @@ bool p3GxsChannels::setAutoDownload(const RsGxsGroupId &groupId, bool enabled)
|
|||||||
ss.load(it->second.mServiceString);
|
ss.load(it->second.mServiceString);
|
||||||
if (enabled == ss.mAutoDownload)
|
if (enabled == ss.mAutoDownload)
|
||||||
{
|
{
|
||||||
/* it should be okay! */
|
std::cerr << __PRETTY_FUNCTION__ << " WARNING mAutoDownload was already"
|
||||||
#ifdef GXSCHANNELS_DEBUG
|
<< " properly set to: " << enabled << " for channel:"
|
||||||
std::cerr << "p3GxsChannels::setAutoDownload() WARNING setting looks okay already";
|
<< groupId.toStdString() << std::endl;
|
||||||
std::cerr << std::endl;
|
return false;
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we are just going to set it anyway. */
|
|
||||||
ss.mAutoDownload = enabled;
|
ss.mAutoDownload = enabled;
|
||||||
std::string serviceString = ss.save();
|
std::string serviceString = ss.save();
|
||||||
|
|
||||||
uint32_t token;
|
uint32_t token;
|
||||||
|
RsGenExchange::setGroupServiceString(token, groupId, serviceString);
|
||||||
|
|
||||||
|
if(waitToken(token) != RsTokenService::COMPLETE) return false;
|
||||||
|
|
||||||
it->second.mServiceString = serviceString; // update Local Cache.
|
it->second.mServiceString = serviceString; // update Local Cache.
|
||||||
RsGenExchange::setGroupServiceString(token, groupId, serviceString); // update dbase.
|
|
||||||
|
|
||||||
/* now reload it */
|
|
||||||
std::list<RsGxsGroupId> groups;
|
|
||||||
groups.push_back(groupId);
|
|
||||||
|
|
||||||
request_SpecificSubscribedGroups(groups);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1604,7 +1725,7 @@ void p3GxsChannels::dummy_tick()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanTimedOutSearches();
|
cleanTimedOutCallbacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1776,7 +1897,7 @@ TurtleRequestId p3GxsChannels::turtleGroupRequest(const RsGxsGroupId& group_id)
|
|||||||
}
|
}
|
||||||
TurtleRequestId p3GxsChannels::turtleSearchRequest(const std::string& match_string)
|
TurtleRequestId p3GxsChannels::turtleSearchRequest(const std::string& match_string)
|
||||||
{
|
{
|
||||||
return netService()->turtleSearchRequest(match_string) ;
|
return netService()->turtleSearchRequest(match_string);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3GxsChannels::clearDistantSearchResults(TurtleRequestId req)
|
bool p3GxsChannels::clearDistantSearchResults(TurtleRequestId req)
|
||||||
@ -1834,6 +1955,7 @@ bool p3GxsChannels::turtleSearchRequest(
|
|||||||
|
|
||||||
TurtleRequestId sId = turtleSearchRequest(matchString);
|
TurtleRequestId sId = turtleSearchRequest(matchString);
|
||||||
|
|
||||||
|
{
|
||||||
RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
||||||
mSearchCallbacksMap.emplace(
|
mSearchCallbacksMap.emplace(
|
||||||
sId,
|
sId,
|
||||||
@ -1841,6 +1963,60 @@ bool p3GxsChannels::turtleSearchRequest(
|
|||||||
multiCallback,
|
multiCallback,
|
||||||
std::chrono::system_clock::now() +
|
std::chrono::system_clock::now() +
|
||||||
std::chrono::seconds(maxWait) ) );
|
std::chrono::seconds(maxWait) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @see RsGxsChannels::turtleChannelRequest
|
||||||
|
bool p3GxsChannels::turtleChannelRequest(
|
||||||
|
const RsGxsGroupId& channelId,
|
||||||
|
const std::function<void (const RsGxsChannelGroup& result)>& multiCallback,
|
||||||
|
rstime_t maxWait)
|
||||||
|
{
|
||||||
|
if(channelId.isNull())
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << "Error! channelId can't be null!"
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
TurtleRequestId sId = turtleGroupRequest(channelId);
|
||||||
|
|
||||||
|
{
|
||||||
|
RS_STACK_MUTEX(mDistantChannelsCallbacksMapMutex);
|
||||||
|
mDistantChannelsCallbacksMap.emplace(
|
||||||
|
sId,
|
||||||
|
std::make_pair(
|
||||||
|
multiCallback,
|
||||||
|
std::chrono::system_clock::now() +
|
||||||
|
std::chrono::seconds(maxWait) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// @see RsGxsChannels::localSearchRequest
|
||||||
|
bool p3GxsChannels::localSearchRequest(
|
||||||
|
const std::string& matchString,
|
||||||
|
const std::function<void (const RsGxsGroupSummary& result)>& multiCallback,
|
||||||
|
rstime_t maxWait )
|
||||||
|
{
|
||||||
|
if(matchString.empty())
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << " match string can't be empty!"
|
||||||
|
<< std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto timeout = std::chrono::steady_clock::now() + std::chrono::seconds(maxWait);
|
||||||
|
RsThread::async([=]()
|
||||||
|
{
|
||||||
|
std::list<RsGxsGroupSummary> results;
|
||||||
|
RsGenExchange::localSearch(matchString, results);
|
||||||
|
if(std::chrono::steady_clock::now() < timeout)
|
||||||
|
for(const RsGxsGroupSummary& result : results) multiCallback(result);
|
||||||
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1851,6 +2027,7 @@ void p3GxsChannels::receiveDistantSearchResults(
|
|||||||
std::cerr << __PRETTY_FUNCTION__ << "(" << id << ", " << grpId << ")"
|
std::cerr << __PRETTY_FUNCTION__ << "(" << id << ", " << grpId << ")"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
|
{
|
||||||
RsGenExchange::receiveDistantSearchResults(id, grpId);
|
RsGenExchange::receiveDistantSearchResults(id, grpId);
|
||||||
RsGxsGroupSummary gs;
|
RsGxsGroupSummary gs;
|
||||||
gs.mGroupId = grpId;
|
gs.mGroupId = grpId;
|
||||||
@ -1860,14 +2037,48 @@ void p3GxsChannels::receiveDistantSearchResults(
|
|||||||
RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
||||||
auto cbpt = mSearchCallbacksMap.find(id);
|
auto cbpt = mSearchCallbacksMap.find(id);
|
||||||
if(cbpt != mSearchCallbacksMap.end())
|
if(cbpt != mSearchCallbacksMap.end())
|
||||||
|
{
|
||||||
cbpt->second.first(gs);
|
cbpt->second.first(gs);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} // end RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
} // end RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
RS_STACK_MUTEX(mDistantChannelsCallbacksMapMutex);
|
||||||
|
auto cbpt = mDistantChannelsCallbacksMap.find(id);
|
||||||
|
if(cbpt != mDistantChannelsCallbacksMap.end())
|
||||||
|
{
|
||||||
|
std::function<void (const RsGxsChannelGroup&)> callback =
|
||||||
|
cbpt->second.first;
|
||||||
|
RsThread::async([this, callback, grpId]()
|
||||||
|
{
|
||||||
|
std::list<RsGxsGroupId> chanIds({grpId});
|
||||||
|
std::vector<RsGxsChannelGroup> channelsInfo;
|
||||||
|
if(!getChannelsInfo(chanIds, channelsInfo))
|
||||||
|
{
|
||||||
|
std::cerr << __PRETTY_FUNCTION__ << " Error! Received "
|
||||||
|
<< "distant channel result grpId: " << grpId
|
||||||
|
<< " but failed getting channel info"
|
||||||
|
<< std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(const RsGxsChannelGroup& chan : channelsInfo)
|
||||||
|
callback(chan);
|
||||||
|
} );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} // RS_STACK_MUTEX(mDistantChannelsCallbacksMapMutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void p3GxsChannels::cleanTimedOutSearches()
|
void p3GxsChannels::cleanTimedOutCallbacks()
|
||||||
{
|
{
|
||||||
RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
|
||||||
auto now = std::chrono::system_clock::now();
|
auto now = std::chrono::system_clock::now();
|
||||||
|
|
||||||
|
{
|
||||||
|
RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
||||||
for( auto cbpt = mSearchCallbacksMap.begin();
|
for( auto cbpt = mSearchCallbacksMap.begin();
|
||||||
cbpt != mSearchCallbacksMap.end(); )
|
cbpt != mSearchCallbacksMap.end(); )
|
||||||
if(cbpt->second.second <= now)
|
if(cbpt->second.second <= now)
|
||||||
@ -1876,4 +2087,17 @@ void p3GxsChannels::cleanTimedOutSearches()
|
|||||||
cbpt = mSearchCallbacksMap.erase(cbpt);
|
cbpt = mSearchCallbacksMap.erase(cbpt);
|
||||||
}
|
}
|
||||||
else ++cbpt;
|
else ++cbpt;
|
||||||
|
} // RS_STACK_MUTEX(mSearchCallbacksMapMutex);
|
||||||
|
|
||||||
|
{
|
||||||
|
RS_STACK_MUTEX(mDistantChannelsCallbacksMapMutex);
|
||||||
|
for( auto cbpt = mDistantChannelsCallbacksMap.begin();
|
||||||
|
cbpt != mDistantChannelsCallbacksMap.end(); )
|
||||||
|
if(cbpt->second.second <= now)
|
||||||
|
{
|
||||||
|
clearDistantSearchResults(cbpt->first);
|
||||||
|
cbpt = mDistantChannelsCallbacksMap.erase(cbpt);
|
||||||
|
}
|
||||||
|
else ++cbpt;
|
||||||
|
} // RS_STACK_MUTEX(mDistantChannelsCallbacksMapMutex)
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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,137 @@ 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::getForumContent(
|
||||||
|
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::seconds(5)) != RsTokenService::COMPLETE )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return getMsgData(token, msgs);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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 +543,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;
|
||||||
|
@ -38,55 +38,65 @@
|
|||||||
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::getForumMsgMetaData
|
||||||
virtual bool createMsg(uint32_t &token, RsGxsForumMsg &msg);
|
virtual bool getForumMsgMetaData(const RsGxsGroupId& forumId, std::vector<RsMsgMetaData>& msg_metas) ;
|
||||||
|
|
||||||
/*!
|
/// @see RsGxsForums::getForumContent
|
||||||
* To update forum group with new information
|
virtual bool getForumContent(
|
||||||
* @param token the token used to check completion status of update
|
const RsGxsGroupId& forumId,
|
||||||
* @param group group to be updated, groupId element must be set or will be rejected
|
std::set<RsGxsMessageId>& msgs_to_request,
|
||||||
* @return false groupId not set, true if set and accepted (still check token for completion)
|
std::vector<RsGxsForumMsg>& msgs );
|
||||||
*/
|
|
||||||
virtual bool updateGroup(uint32_t &token, RsGxsForumGroup &group);
|
|
||||||
|
|
||||||
|
/// @see RsGxsForums::markRead
|
||||||
|
virtual bool markRead(const RsGxsGrpMsgIdPair& messageId, bool read);
|
||||||
|
|
||||||
private:
|
/// @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();
|
||||||
|
|
||||||
|
@ -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 *
|
||||||
|
@ -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 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 *
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user