summaryrefslogtreecommitdiff
path: root/attache/UploadSettings.h
diff options
context:
space:
mode:
authorsje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2006-11-01 14:28:18 +0000
committersje <sje@4f64403b-2f21-0410-a795-97e2b3489a10>2006-11-01 14:28:18 +0000
commit31d3a6408d045eadaff094d4c11bf017817743d7 (patch)
tree61f75240490677d57477fea63d6f771bf3d754d9 /attache/UploadSettings.h
parent31654bd814b4e5fdc1b68807e341c623d74f357d (diff)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@4 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'attache/UploadSettings.h')
-rw-r--r--attache/UploadSettings.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/attache/UploadSettings.h b/attache/UploadSettings.h
new file mode 100644
index 0000000..d7cd0dc
--- /dev/null
+++ b/attache/UploadSettings.h
@@ -0,0 +1,40 @@
+#pragma once
+#include "FileInfo.h"
+#include "FieldInfo.h"
+
+class UploadSettings
+{
+ TCHAR m_strHostName[1024];
+ TCHAR m_strUrlPath[MAX_PATH];
+
+ FileInfoList m_files;
+ FieldInfoList m_fields;
+
+ DWORD m_dwCachedBytesPerSecond;
+
+ // A random guess: 56Kbps modem (ish)
+ static const DWORD INITIAL_ESTIMATED_TRANSFER_RATE = 5600;
+
+public:
+ UploadSettings()
+ : m_dwCachedBytesPerSecond(INITIAL_ESTIMATED_TRANSFER_RATE)
+ {
+ }
+
+ bool SetAddress(TCHAR *lpszAddress);
+
+ TCHAR *GetAddress() const;
+ const TCHAR *GetHostName() const { return &m_strHostName[0]; }
+ const TCHAR *GetUrlPath() const { return &m_strUrlPath[0]; }
+
+ void ClearFiles();
+ void AddFile(TCHAR *lpszFieldName, TCHAR *lpszFileName, TCHAR *lpszContentType);
+ void GetFiles(FileInfoList *pFiles) const;
+
+ void ClearFields();
+ void AddField(TCHAR *lpszFieldName, TCHAR *lpszFieldValue);
+ void GetFields(FieldInfoList *pFields) const;
+
+ DWORD GetCachedBytesPerSecond() const { return m_dwCachedBytesPerSecond; }
+ void SetCachedBytesPerSecond(DWORD dwBytesPerSecond) { m_dwCachedBytesPerSecond = dwBytesPerSecond; }
+};