Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
hybridclient.h
1 #ifndef __HYBRIDCLIENT_H__
2 #define __HYBRIDCLIENT_H__
3 
4 #include <set>
5 #include "percyclient.h"
6 #include "hybridparams.h"
7 #include "agclient.h"
8 
9 NTL_CLIENT
10 
12 public:
13  PercyHybridClient (const HybridClientParams * params,
14  nservers_t num_servers, nservers_t t, sid_t * sids = NULL,
15  PercyStats * stats = NULL);
16 
18 
19 protected:
20  const HybridClientParams * params;
21 
22  // Virtual members as described in PercyClient class
23  virtual void encode_request_impl (nqueries_t request_identifier);
24  virtual dbsize_t send_request_impl (nqueries_t request_identifier,
25  vector<ostream*> &osvec);
26  virtual dbsize_t receive_replies_impl (nqueries_t request_identifier,
27  vector<istream*> &isvec);
28  virtual nqueries_t process_replies_impl (nservers_t h,
29  vector<vector<PercyResult> >& results);
30 
31  nservers_t num_servers;
32 
33  // Sub params
34  const PercyClientParams& it_params;
35  const AGClientParams& c_params;
36 
37  // Clients
38  PercyClient * it_client;
39  PercyClient * c_client;
40 
41  // inner request ids
42  map<nqueries_t, nqueries_t> it_req_ids;
43  map<nqueries_t, nqueries_t> c_req_ids;
44 
45 private:
46  std::set<nqueries_t> unprocessed;
47 };
48 
49 #endif
Client parameters.
Definition: percyparams.h:189
Definition: percystats.h:66
nservers_t t
The privacy level.
Definition: percyclient.h:186
virtual dbsize_t receive_replies_impl(nqueries_t request_identifier, vector< istream * > &isvec)
Implementation for encode_request().
Definition: hybridclient.h:11
virtual void encode_request_impl(nqueries_t request_identifier)
Implementation for encode_request().
An abstract base class for a PIR client.
Definition: percyclient.h:35
virtual nqueries_t process_replies_impl(nservers_t h, vector< vector< PercyResult > > &results)
Implementation for encode_request().