diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-02-24 17:38:35 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-02-24 17:38:35 +0000 |
commit | e62bc2a6f28f6a7b7fcb3996e9fab86fae3239f7 (patch) | |
tree | 6fc970809eb2fbbbf383c1639f83c93a2edf406b /plugins/Dropbox/src/file_transfer.h | |
parent | 994443d6cdca5a5a1204575a0cea2a198c9d01bb (diff) |
Dropbox:
- added ability to send files to contacts of other protocols
- many other little improvements
git-svn-id: http://svn.miranda-ng.org/main/trunk@8263 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/file_transfer.h')
-rw-r--r-- | plugins/Dropbox/src/file_transfer.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/plugins/Dropbox/src/file_transfer.h b/plugins/Dropbox/src/file_transfer.h new file mode 100644 index 0000000000..1c0a511e47 --- /dev/null +++ b/plugins/Dropbox/src/file_transfer.h @@ -0,0 +1,57 @@ +#ifndef _FILE_TRANSFER_H_
+#define _FILE_TRANSFER_H_
+
+#include "common.h"
+
+struct FileTransfer
+{
+ HANDLE hProcess;
+ MCONTACT hContact;
+ PROTOFILETRANSFERSTATUS pfts;
+
+ int totalFolders;
+ char **pszFolders;
+ int relativePathStart;
+
+ FileTransfer()
+ {
+ totalFolders = 0;
+ pszFolders = NULL;
+ relativePathStart = 0;
+
+ pfts.cbSize = sizeof(this->pfts);
+ pfts.flags = PFTS_UTF;
+ pfts.currentFileNumber = 0;
+ pfts.currentFileProgress = 0;
+ pfts.currentFileSize = 0;
+ pfts.totalBytes = 0;
+ pfts.totalFiles = 0;
+ pfts.totalProgress = 0;
+ pfts.pszFiles = NULL;
+ pfts.tszWorkingDir = NULL;
+ pfts.wszCurrentFile = NULL;
+ }
+
+ ~FileTransfer()
+ {
+ if (pfts.pszFiles)
+ {
+ for (int i = 0; pfts.pszFiles[i]; i++)
+ {
+ if (pfts.pszFiles[i]) mir_free(pfts.pszFiles[i]);
+ }
+ delete pfts.pszFiles;
+ }
+
+ if (pszFolders)
+ {
+ for (int i = 0; pszFolders[i]; i++)
+ {
+ if (pszFolders[i]) mir_free(pszFolders[i]);
+ }
+ delete pszFolders;
+ }
+ }
+};
+
+#endif //_FILE_TRANSFER_H_
\ No newline at end of file |