ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/Spectre/Configurator.cpp
Revision: 162
Committed: 2003-06-09T22:01:14-07:00 (22 years ago) by douglas
File size: 708 byte(s)
Log Message:
Worked on Configurator::configurate().

File Contents

# Content
1 // Spectre Samba Mounter
2 //
3 // Douglas Thrift
4 //
5 // Configurator.cpp
6
7 #include "Configurator.h"
8
9 Configurator::Configurator(const string& host)
10 {
11 this->host = host;
12
13 configurate();
14 }
15
16 void Configurator::configurate()
17 {
18 if (config.hosts.count(host) < 2)
19 {
20 cerr << program << ": No configuration for " << host << "\n";
21 exit(1);
22 }
23
24 for (multimap<string, string>::iterator itor =
25 config.hosts.lower_bound(host); itor != config.hosts.upper_bound(host);
26 itor++)
27 {
28 string entry = itor->second;
29
30 if (entry.find("passwd=") == 0)
31 {
32 //
33 }
34 else if (entry.find("folder=") == 0)
35 {
36 //
37 }
38 else
39 {
40 cerr << program << ": Unknown configuration " << entry
41 << ", ignored\n";
42 }
43 }
44 }