Percy++
A C++ implementation of Private Information Retrieval (PIR) protocols
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
PercyClientParams Class Reference

Client parameters. More...

#include <percyparams.h>

Inheritance diagram for PercyClientParams:
RecursiveClientParams

Public Member Functions

 PercyClientParams (const PercyParams *params, nservers_t num_servers=1, bool is_null=false)
 Constructor. More...
 
virtual ~PercyClientParams ()
 Destructor. More...
 
void send (std::ostream &os, nservers_t sid) const
 Send parameters and sid to server to test compatibility. More...
 
bool is_compatible (std::istream &is, nservers_t sid) const
 Test compatibility with a server. More...
 
nservers_t num_servers () const
 Get the number of servers being queried. More...
 
void print (std::ostream &os) const
 Prints the parameters in CSV form. More...
 
const PercyParamspercy_params () const
 Get the protocol parameters. More...
 
bool is_null () const
 Check if the client is a null client. More...
 

Protected Attributes

const PercyParamsparams
 The protocol parameters. More...
 
nservers_t _num_servers
 The number of servers being queried. More...
 
bool null
 Whether or not the client a null client. More...
 

Detailed Description

Client parameters.

Constructor & Destructor Documentation

PercyClientParams ( const PercyParams params,
nservers_t  num_servers = 1,
bool  is_null = false 
)

Constructor.

Parameters
paramsThe protocol parameters.
num_serversThe number of servers being queried.
is_nullIf true, the client does nothing except send random data to the server(s) and read the response(s).
virtual ~PercyClientParams ( )
inlinevirtual

Destructor.

Member Function Documentation

bool is_compatible ( std::istream &  is,
nservers_t  sid 
) const

Test compatibility with a server.

Read parameters from a server and check compatibility with the server.

Parameters
isStream to read from.
sidServer ID of server begin checked.
Returns
Returns true if server is compatible with this client; false otherwise.
bool is_null ( ) const
inline

Check if the client is a null client.

If true, the client does nothing except send random data to the server(s) and read the response(s).

nservers_t num_servers ( ) const
inline

Get the number of servers being queried.

const PercyParams* percy_params ( ) const
inline

Get the protocol parameters.

void print ( std::ostream &  os) const

Prints the parameters in CSV form.

Prints the protocol parameters and add the following client fields:

num_servers,
Parameters
osStream to print to.
void send ( std::ostream &  os,
nservers_t  sid 
) const

Send parameters and sid to server to test compatibility.

Parameters
osStream to write to.
sidServer ID of server being sent params.

Member Data Documentation

nservers_t _num_servers
protected

The number of servers being queried.

bool null
protected

Whether or not the client a null client.

const PercyParams* params
protected

The protocol parameters.


The documentation for this class was generated from the following file: