git.fiddlerwoaroof.com
Browse code

removes now-unused token read function

jbalcita authored on 25/04/2017 00:25:59
Showing 5 changed files
... ...
@@ -11,7 +11,7 @@
11 11
 
12 12
 #include <syslog.h>
13 13
 
14
-#include "logging.h"
14
+//#include "logging.h"
15 15
 #include "test_support.h"
16 16
 
17 17
 static const char program_name[] = "pam_dual_control";
... ...
@@ -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
 
... ...
@@ -13,8 +13,6 @@
13 13
 #include <vector>
14 14
 #include <memory>
15 15
 #include <fstream>
16
-#include <sstream>
17
-#include <iostream>
18 16
 
19 17
 #include "token.h"
20 18
 #include "user.h"
... ...
@@ -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
 
... ...
@@ -15,7 +15,6 @@
15 15
 #include <cstdio>
16 16
 #include <sys/stat.h>
17 17
 #include <fstream>
18
-#include <istream>
19 18
 
20 19
 #include "token.h"
21 20
 #include "test_util.h"