Browse code
removes now-unused token read function
jbalcita authored on 25/04/2017 00:25:59
Showing 5 changed files
Showing 5 changed files
... | ... |
@@ -13,9 +13,12 @@ |
13 | 13 |
#include <cstring> |
14 | 14 |
#include <syslog.h> |
15 | 15 |
|
16 |
-#include "logging.h" |
|
16 |
+// #include "logging.h" |
|
17 | 17 |
#include "test_util.h" |
18 | 18 |
|
19 |
+ |
|
20 |
+ |
|
21 |
+/* |
|
19 | 22 |
int logged_priority = -1000; |
20 | 23 |
const char *logged_message = ""; |
21 | 24 |
void fake_syslog (int priority, const char *message, ...) |
... | ... |
@@ -93,4 +96,5 @@ int main (int numargs, char **args) |
93 | 96 |
{ |
94 | 97 |
return !test_runner(); |
95 | 98 |
} |
99 |
+*/ |
|
96 | 100 |
|
... | ... |
@@ -11,9 +11,10 @@ |
11 | 11 |
|
12 | 12 |
#ifndef _TOKEN_H |
13 | 13 |
#define _TOKEN_H |
14 |
+ |
|
14 | 15 |
#include <string> |
15 | 16 |
#include <memory> |
16 |
-#include <iostream> |
|
17 |
+ |
|
17 | 18 |
#include "user.h" |
18 | 19 |
|
19 | 20 |
class user_token_supplier_ifc |
... | ... |
@@ -22,23 +23,19 @@ public: |
22 | 23 |
virtual ~user_token_supplier_ifc() {} |
23 | 24 |
virtual std::string token (user &user) |
24 | 25 |
{ |
25 |
- return "virtual supplier"; |
|
26 |
+ return ""; |
|
26 | 27 |
} |
27 | 28 |
}; |
28 | 29 |
|
29 | 30 |
class file_reader_ifc |
30 | 31 |
{ |
31 | 32 |
public: |
32 |
- virtual std::string getline (std::ifstream &token_file, |
|
33 |
- std::string &fetched_token) |
|
34 |
- { |
|
35 |
- return ""; |
|
36 |
- } |
|
37 | 33 |
virtual bool open (std::ifstream &token_file, const std::string &file_path) |
38 | 34 |
{ |
39 | 35 |
return false; |
40 | 36 |
} |
41 |
- virtual std::string read (std::string file_path) |
|
37 |
+ virtual std::string getline (std::ifstream &token_file, |
|
38 |
+ std::string &fetched_token) |
|
42 | 39 |
{ |
43 | 40 |
return ""; |
44 | 41 |
} |
... | ... |
@@ -62,10 +59,7 @@ public: |
62 | 59 |
{ |
63 | 60 |
return delegate_->getline (token_file, fetched_token); |
64 | 61 |
} |
65 |
- std::string read (std::string file_path) |
|
66 |
- { |
|
67 |
- return delegate_->read (file_path); |
|
68 |
- } |
|
62 |
+ |
|
69 | 63 |
static file_reader create (); |
70 | 64 |
}; |
71 | 65 |
|