blob: bf01638072c6ea09cc55c10b55ffbd0e877012fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/* -*- C++ -*- */
//=============================================================================
/**
* @file BS_Client.h
*
* @author Douglas C. Schmidt
*/
//=============================================================================
#ifndef _BS_CLIENT_H
#define _BS_CLIENT_H
#include "Binary_Search.h"
/**
* @class BS_Client
*
* @brief Provides the client's binary search lookup table abstraction.
*/
class BS_Client : public Binary_Search
{
public:
// = Initialization.
/// Constructor.
BS_Client (void);
/**
* This function is used to merge the <key_name> from server
* <host_name> into the sorted list of userids kept on the client's
* side. Since we *know* we are going to find the name we use the
* traditional binary search.
*/
virtual Protocol_Record *insert (const char *key_name,
int max_len = MAXUSERIDNAMELEN);
/**
* An iterator, similar to Binary_Search::get_next_friend, though in
* this case the friend records are returned in the order they
* appeared in the friend file, rather than in sorted order. Also,
* we skip over entries that don't have any hosts associated with
* them.
*/
virtual Protocol_Record *get_each_entry (void);
};
#endif /* _BS_CLIENT_H */
|