Commit Graph

137 Commits

Author SHA1 Message Date
Phenom
300359863e Fix clang warning: 'p3ChatService' defined as a struct here but
previously declared as a class

/libretroshare/src/chat/p3chatservice.h:56: warning: 'p3ChatService'
defined as a struct here but previously declared as a class [-
Wmismatched-tags]
struct p3ChatService :
/libretroshare/src/rsserver/p3msgs.h:33: did you mean struct here?
class p3ChatService;
2017-07-17 22:32:23 +02:00
Phenom
0479ec07ab Fix clang warning: unused variable 'MAX_MESSAGES_PER_SECONDS_NUMBER'
/libretroshare/src/chat/distributedchat.cc:57: warning: unused variable
'MAX_MESSAGES_PER_SECONDS_NUMBER' [-Wunused-const-variable]
static const uint32_t MAX_MESSAGES_PER_SECONDS_NUMBER     =  5 ; // max
number of messages from a given peer in a window for duration below
2017-07-16 21:17:06 +02:00
Phenom
8a270af519 fixed merging problem 2017-07-16 21:15:26 +02:00
csoler
08faa3f5d5 fixed p3Gxstunnel so that it sends the data packets in the same order it received them. This fixes the bug in distant chat causing images to not transfer correctly in some cases 2017-07-15 22:16:45 +02:00
csoler
23156ab4b1 fixed malloc problem when chat avatar is missing 2017-06-07 20:14:27 +02:00
csoler
fb7ac7a8f6 fixed mismatched free/delete (free is used in rschatitems.cc to delete avatars) 2017-06-02 23:10:43 +02:00
csoler
eea63ac217 minor code cleaning in p3GxsTrans (struct->class for consistency, sendMail->sendData), added popularity+subscribed status display in statistics 2017-05-27 22:19:52 +02:00
Gioacchino Mazzurco
10ec52718d Fix GxsTrans related serialization regressions 2017-05-15 19:13:29 +02:00
csoler
c0c5cc52db Merge branch 'master' into gxs_mail_experiments 2017-05-13 21:08:16 +02:00
Phenom
d02cba5a91 Fix Lobby Topic not send on invite. 2017-05-08 15:38:36 +02:00
Gioacchino Mazzurco
ea8f800003 Port GxsTrans to new serialization system
RsItem added some comment and more verbose error reporting
RsTypeSerializer added support for RsItem derived classes as members
  added utility macros for better readability of the code and easier
  handling of RsItem derived members
  RS_REGISTER_SERIAL_MEMBER(I)
  RS_REGISTER_SERIAL_MEMBER_TYPED(I, T)
  RS_REGISTER_ITEM_TYPE(T)

RsNxsMsg::serial_process use new macros for better readability and to
 have an exemple of usage with RsTlvItem derived class
Fix undefined reference to RsNxsMsg::print
2017-05-08 00:19:11 +02:00
Gioacchino Mazzurco
5159e326c7 Merge branch 'master' into gxs_mail_experiments 2017-05-05 15:44:22 +02:00
csoler
e401b90e02 moved rsserializer and rstypeserializer to serialiser/ 2017-04-30 16:05:37 +02:00
csoler
9c610a736d cleaned the hierarchy of serialization classes 2017-04-26 11:40:46 +02:00
csoler
0d7df568b4 moved rsconfigitems and rshistoryitems to rsitems/ 2017-04-24 22:47:08 +02:00
csoler
dc2df071a5 renamed RsSerializer into RsServiceSerializer 2017-04-24 14:14:34 +02:00
csoler
f6aaee7382 converted RTT items to new serialization 2017-04-24 11:01:45 +02:00
csoler
08867945f3 fixed bug caused by wrong cast in lobby msg signature validation 2017-04-24 10:29:57 +02:00
csoler
91b04098b6 fixed two memory bugs in serialization code 2017-04-24 10:11:24 +02:00
csoler
31c07f4dfd converted RsMsgItems to new serialization. Added format and flag members to RsSerialiser and used the later to handle signature and config serialization techniques 2017-04-23 22:40:26 +02:00
csoler
e2d9152b22 moved converted serialisation files into new directory rsitems/, leaving serialiser/ for the serialisation classes 2017-04-18 21:11:37 +02:00
csoler
121133488c fixed bug in serialization for turtle 2017-04-16 19:59:22 +02:00
csoler
3453a3e57d switched FileTransfer items to new serialization 2017-04-11 23:05:27 +02:00
csoler
691ed8de08 added new template for std::string with type id 2017-04-10 20:34:02 +02:00
csoler
8b773885fd removed all chat serialization code 2017-04-05 21:02:17 +02:00
csoler
ae9d0b2ab4 fixed a few bugs in chat serialization 2017-04-05 20:49:32 +02:00
csoler
6b4fdb42ae fixed bug in serialization 2017-04-05 18:25:54 +02:00
csoler
a941136c04 fixed a few bugs in new serialization 2017-04-05 18:09:45 +02:00
csoler
5b3e488b42 fixed compilation 2017-04-05 16:53:20 +02:00
csoler
48688eae3f progress in converting chat items to new serialization 2017-04-05 10:27:12 +02:00
csoler
9438d60609 progress in converting Chat items to new serialization model 2017-04-04 22:53:50 +02:00
csoler
f2fa70e395 progress in converting Chat items to new serialization model 2017-04-04 16:37:57 +02:00
csoler
32ce9aea3a started converting rschatitems to new serialization 2017-04-04 15:33:59 +02:00
Gioacchino Mazzurco
da459c884e Renamed GxsMails to GxsTrans
GxsTrans is a generic transport service, use more generic name trans
 instead of mail to avoid confusion
Renamed size(...) to seria_size(...) for costistence whit the codebase
Moved GxsTrans and related things to gxstrans directory
Removed outdated and now uncompatible gxsmail test service
Avoid expose internal items in public interface methods
2017-03-02 02:37:53 +01:00
Gioacchino Mazzurco
953b70fbe4 Improve async distant chat, fix chat msg receiving
DistantChatService::initiateDistantChatConnexion(...) made notification
  message optional (enabled by default)
p3ChatService removed duplicion avoidance as it is not necessary
p3ChatService::sendStatusString(...) send status only if peer is online
protect p3ChatService::mDistantGxsMap with mutex as operation on it may
  be done by different threads
p3ChatService::receiveGxsMai(...) set chat message item peer id with
  distant tunnel id, so it is recognized as a distant message later
made p3GxsTunnelService::makeGxsTunnelId(...) static as it need no
  access to this, now it can be used easier by other components
rename RsGxsMailItem::recipientsHint to recipientHint as for now only
  one recipient is possible (TODO: update documentation too)
GxsMailsClient::receiveGxsMail(...) changed paramethers for better
  abstracion, now destination id is passed too because it is usually a
  very useful information
ChatWidget some adaptation to async chat, a couple of method have been
  deprecated too
PopupDistantChatDialog::updateDisplay(...) adapt message shown to the
  user to the new async chat paradigm (TODO: need review)
2017-03-01 23:31:13 +01:00
Gioacchino Mazzurco
0f1106fd8f PrivateOugoingMapItem fix offset calculation 2017-02-28 01:19:18 +01:00
Gioacchino Mazzurco
4c89641d3e p3ChatService support async distant chat via Gxs
To implement async distant chat p3ChatService use p3GxsMails in a similar
way that has been done with p3MsgService tought as p3ChatService was not
thinked for async comunication in the first place the result is quite
clumsy. A proper chat service should be rewritten from scratch in the near
future, with proper chat history and other desiderables features.
deprecated empty p3ChatService::locked_storeIncomingMsg(...)
2017-02-27 22:18:37 +01:00
csoler
8d8453f9c0 removed the reputation calls through rsIdentity. Improved the logic of updating static identity flags in p3gxsreputations 2017-01-09 23:47:51 +01:00
csoler
a9670a569a Second stage in abstracting GXS identities usage cases (almost done) 2017-01-02 23:53:39 +01:00
csoler
17fc89e3c0 First stage in abstracting GXS identities usage cases (half done) 2017-01-02 15:58:37 +01:00
csoler
72fb8f17a9 changed the reputation system to output a level that differentiate your own opinion to your friends opinion 2016-12-23 17:52:02 +01:00
csoler
0a3ec9706d added statistics info for key requests 2016-12-22 00:14:16 +01:00
Gio
9eef412b44 Expose libresapi for distant chat
Added macro to deprecate symbols usage in a crossplatform way.
Deprecated Request::mMethod and related stuff that make implementation
 more complex without advantage.
Added /chat/{initiate_distant_chat, distant_chat_status,
 close_distant_chat} to libresapi.
Solved subtle bug in ChatId::ChatId(std::string str) that caused zeroed
 DistantChatPeerId being created.
2016-12-07 20:29:33 +01:00
Phenom
674b6de381 Fix Some gcc warnings 383 to 208 lines
Left explicit #warning and deprecated.
Some lines are wrong indented and produce mal formed code.
2016-11-30 22:01:01 +01:00
csoler
90dfc6e14a improved explicit requests of missing GXS ids, also fixing situations where empty peers lists would wipe out pending peer lists 2016-07-15 16:59:57 -04:00
csoler
e611b2bb05 moved isIdentitybanned from p3GxsReputations to p3IdService, so as to avoid calling back p3IdService from p3GxsReputations, which simplifies the code 2016-07-03 18:06:01 -04:00
csoler
a2ca0385db fixed compilation and several problems following separation of public/private keys 2016-06-04 21:39:40 -04:00
csoler
590be092e5 separated RsTlvSecurityKey into two incompatible classes to enforce the correct usage of private vs. public keys 2016-06-02 23:47:57 -04:00
csoler
59aef8ab7b added packet slicing for large broadcast chat items, and output warning when chat of serialised item is too big. Also fixed a couple of bugs in the handling of chat packets 2016-05-26 20:33:24 -04:00
csoler
5261c3cd73 prevented turtle to not deleting a config item when it is not cast 2016-04-21 22:23:07 -04:00