]>
cygwin.com Git - cygwin-apps/setup.git/blob - ConnectionSetting.cc
2 * Copyright (c) 2003, Robert Collins <rbtcollins@hotmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by Robert Collins.
17 static const char *cvsid
=
21 #include "ConnectionSetting.h"
22 #include "UserSettings.h"
23 #include "io_stream.h"
29 ConnectionSetting::load()
31 static int inited
= 0;
34 io_stream
*f
= UserSettings::Instance().settingFileForLoad("last-connection");
38 char *fg_ret
= f
->gets (localdir
, 1000);
41 net_method
= typeFromString(fg_ret
);
47 ConnectionSetting::save()
50 io_stream
*f
= UserSettings::Instance().settingFileForSave("last-connection");
55 f
->write("Direct\n",7);
61 f
->write("Proxy\n",6);
62 // TODO: also write the proxy and port, and then parse them in load.
72 ConnectionSetting::typeFromString(String
const & aType
)
74 if (!aType
.casecompare("Direct"))
75 return IDC_NET_DIRECT
;
76 if (!aType
.casecompare("IE"))
78 if (!aType
.casecompare("Proxy"))
81 /* A sanish default */
This page took 0.037831 seconds and 5 git commands to generate.