00001 /* 00002 Free Download Manager Copyright (c) 2003-2007 FreeDownloadManager.ORG 00003 Open Download Manager Copyright (c) 2008-2010 OpenDownloadManager.ORG 00004 */ 00005 00006 #include "fsServerConnection.h" 00007 #include "fsInternetSession.h" 00008 #include "common.h" 00009 00010 fsInternetServerConnection::fsInternetServerConnection() 00011 { 00012 m_hServer = NULL; 00013 m_pSession = NULL; 00014 m_pszLastError = NULL; 00015 } 00016 00017 fsInternetServerConnection::~fsInternetServerConnection() 00018 { 00019 CloseHandle (); 00020 SAFE_DELETE_ARRAY (m_pszLastError); 00021 } 00022 00023 HINTERNET fsInternetServerConnection::GetHandle() 00024 { 00025 return m_hServer; 00026 } 00027 00028 fsInternetResult fsInternetServerConnection::Initialize(fsInternetSession *pSession) 00029 { 00030 m_pSession = pSession; 00031 return IR_SUCCESS; 00032 } 00033 00034 LPCSTR fsInternetServerConnection::GetLastError() 00035 { 00036 return m_pszLastError; 00037 } 00038 00039 void fsInternetServerConnection::CloseHandle() 00040 { 00041 if (m_hServer) 00042 { 00043 InternetCloseHandle (m_hServer); 00044 m_hServer = NULL; 00045 } 00046 } 00047 00048 fsInternetSession* fsInternetServerConnection::GetSession() 00049 { 00050 return m_pSession; 00051 } 00052 00053 LPCSTR fsInternetServerConnection::GetServerName() 00054 { 00055 return m_strServer; 00056 } 00057 00058 INTERNET_PORT fsInternetServerConnection::GetServerPort() 00059 { 00060 return m_uPort; 00061 } 00062
1.5.6