summaryrefslogtreecommitdiff
path: root/attache/UploadProgress.h
diff options
context:
space:
mode:
Diffstat (limited to 'attache/UploadProgress.h')
-rw-r--r--attache/UploadProgress.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/attache/UploadProgress.h b/attache/UploadProgress.h
new file mode 100644
index 0000000..6af34b1
--- /dev/null
+++ b/attache/UploadProgress.h
@@ -0,0 +1,34 @@
+#pragma once
+
+// The UploadProgress interface allows an observer to be notified
+// about the upload.
+class UploadProgress
+{
+public:
+ virtual void OnResolvingName(LPCTSTR lpsz) = 0;
+ virtual void OnNameResolved(LPCTSTR lpsz) = 0;
+ virtual void OnConnectingToServer(LPCTSTR lpsz) = 0;
+ virtual void OnConnectedToServer(LPCTSTR lpsz) = 0;
+ virtual void OnSendingRequest() = 0;
+ virtual void OnRequestSent(DWORD dwBytesSent) = 0;
+ virtual void OnReceivingResponse() = 0;
+ virtual void OnResponseReceived(DWORD dwBytesReceived) = 0;
+ virtual void OnClosingConnection() = 0;
+ virtual void OnConnectionClosed() = 0;
+
+ virtual void OnFileBegin(LPCTSTR lpszPathName) = 0;
+ virtual void OnFileProgress(LPCTSTR lpszPathName, DWORD dwFileBytesSent, DWORD dwFileBytesTotal, DWORD dwSecondsToFileCompletion, DWORD dwOverallBytesSent, DWORD dwOverallBytesTotal, DWORD dwSecondsToOverallCompletion, DWORD dwBytesPerSecond) = 0;
+ virtual void OnFileComplete(LPCTSTR lpszPathName, HRESULT hr) = 0;
+
+ virtual bool CheckCancel() = 0;
+};
+
+// The BackgroundUploadProgress interface adds other notification
+// methods that are important when doing the upload from a
+// background thread.
+class BackgroundUploadProgress : public UploadProgress
+{
+public:
+ virtual void OnBackgroundUploadBegin() = 0;
+ virtual void OnBackgroundUploadComplete(HRESULT hr) = 0;
+};