mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-27 23:57:38 -04:00
* Added the basics of GxsCircles service to libretroshare.
- Defined the control group stuff. - Background task to determine friend membership. - Caching of Circle info, - Added GXS interface class to gxs/rsgixs.h - TODO: Serialiser is incomplete. - TODO: SubCircles to be done in Phase 2. * Improvements to RsMemCache: - Added Value& ref(Key) to avoid data copying. - Added Statistics to check cache performance. - Fixed up bugs in tracking membership. * Improvements to RsTickEvent: - Added additional string parameter for more specificity. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5910 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
baa949eaac
commit
5a55c1b5d6
18 changed files with 2353 additions and 427 deletions
|
@ -109,7 +109,9 @@ RsIdentity *rsIdentity = NULL;
|
|||
|
||||
p3IdService::p3IdService(RsGeneralDataService *gds, RsNetworkExchangeService *nes)
|
||||
: RsGxsIdExchange(gds, nes, new RsGxsIdSerialiser(), RS_SERVICE_GXSV1_TYPE_GXSID),
|
||||
RsIdentity(this), GxsTokenQueue(this), RsTickEvent(), mIdMtx("p3IdService")
|
||||
RsIdentity(this), GxsTokenQueue(this), RsTickEvent(), mIdMtx("p3IdService"),
|
||||
mPublicKeyCache(DEFAULT_MEM_CACHE_SIZE, "GxsIdPublicKeyCache"),
|
||||
mPrivateKeyCache(DEFAULT_MEM_CACHE_SIZE, "GxsIdPrivateKeyCache")
|
||||
{
|
||||
mBgSchedule_Mode = 0;
|
||||
mBgSchedule_Active = false;
|
||||
|
@ -702,11 +704,13 @@ bool p3IdService::cache_store(const RsGxsIdGroupItem *item)
|
|||
// Create Cache Data.
|
||||
RsGxsIdCache pubcache(item, pubkey);
|
||||
mPublicKeyCache.store(id, pubcache);
|
||||
mPublicKeyCache.resize();
|
||||
|
||||
if (full_key_ok)
|
||||
{
|
||||
RsGxsIdCache fullcache(item, fullkey);
|
||||
mPrivateKeyCache.store(id, fullcache);
|
||||
mPrivateKeyCache.resize();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -809,10 +813,6 @@ bool p3IdService::cache_load_for_token(uint32_t token)
|
|||
cache_store(item);
|
||||
delete item;
|
||||
}
|
||||
|
||||
RsStackMutex stack(mIdMtx); /********** STACK LOCKED MTX ******/
|
||||
mPrivateKeyCache.resize();
|
||||
mPublicKeyCache.resize();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2430,7 +2430,7 @@ void p3IdService::handleResponse(uint32_t token, uint32_t req_type)
|
|||
|
||||
|
||||
// Overloaded from RsTickEvent for Event callbacks.
|
||||
void p3IdService::handle_event(uint32_t event_type)
|
||||
void p3IdService::handle_event(uint32_t event_type, const std::string &elabel)
|
||||
{
|
||||
std::cerr << "p3IdService::handle_event(" << event_type << ")";
|
||||
std::cerr << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue