00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "vmsInternetSession.h"
00008 #include "inetutil.h"
00009
00010 #ifdef _DEBUG
00011 #undef THIS_FILE
00012 static char THIS_FILE[]=__FILE__;
00013 #define new DEBUG_NEW
00014 #endif
00015
00016 vmsInternetSession::vmsInternetSession()
00017 {
00018
00019 }
00020
00021 vmsInternetSession::~vmsInternetSession()
00022 {
00023
00024 }
00025
00026 fsInternetResult vmsInternetSession::Create(LPCSTR pszAgent, fsInternetAccessTypeEx enAT, LPCSTR pszProxyName, fsNetworkProtocol enProtocol)
00027 {
00028 #ifndef FDM_DLDR__RAWCODEONLY
00029 if (enAT != IATE_FIREFOXPROXY)
00030 {
00031 return fsInternetSession::Create (pszAgent, (fsInternetAccessType)enAT, pszProxyName);
00032 }
00033 else
00034 {
00035
00036 if (1 != _App.FirefoxSettings_Proxy_Type ())
00037 return fsInternetSession::Create (pszAgent, IAT_NOPROXY, "");
00038
00039 LPCSTR ppszProts [] = {
00040 "http", "ssl", "ftp"
00041 };
00042 if (enProtocol > 2)
00043 enProtocol = NP_HTTP;
00044
00045 CString strProxy;
00046 strProxy.Format ("%s:%d",
00047 _App.FirefoxSettings_Proxy_Addr (ppszProts [enProtocol]),
00048 _App.FirefoxSettings_Proxy_Port (ppszProts [enProtocol]));
00049
00050 char szProxy [10000];
00051 vmsMakeWinInetProxy (strProxy, enProtocol, enProtocol, szProxy);
00052
00053 return fsInternetSession::Create (pszAgent, IAT_MANUALPROXY, szProxy);
00054 }
00055 #else
00056 return fsInternetSession::Create (pszAgent, (fsInternetAccessType)enAT, pszProxyName);
00057 #endif
00058 }